Zum Inhalt springen
Skillpedia
Deployment & Cloud (DevOps)40k · #7185

editorconfig

Was er macht

Dieser Assistent erstellt eine Datei namens `.editorconfig`, die dabei hilft, einen einheitlichen Programmierstil über verschiedene Editoren und Projekte hinweg einzuhalten. Sie legt grundlegende Regeln fest, etwa ob mit Leerzeichen oder Tabs eingerückt wird und welches Zeilenende verwendet wird.

Wann du ihn nutzt

  • ✓Wenn du ein neues Programmierprojekt beginnst.
  • ✓Wenn mehrere Personen am selben Code arbeiten.
  • ✓Damit der Code in jedem Editor ordentlich strukturiert bleibt.

Link zum Skill

https://github.com/github/awesome-copilot/blob/main/skills/editorconfig/SKILL.md

Kopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.

So nutzt du ihn

Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.

Fertige Nachricht zum Einfügen

Nutze diesen Skill, um mir zu helfen: https://github.com/github/awesome-copilot/blob/main/skills/editorconfig/SKILL.md Lies die SKILL.md unter diesem Link und folge ihren Anweisungen für meine Aufgabe.
Soll deine KI Skills wie diesen selbst finden?Installiere den kostenlosen Skillpedia-MCP: eine Zeile, und sie durchsucht vor jeder Aufgabe 15.000+ Skills.In 1 Minute installieren →

Beispielanfrage an deine KI

“Erstelle eine .editorconfig-Datei für ein Python-Projekt, das mit 4 Leerzeichen einrückt und LF-Zeilenenden verwendet.”

5 neue Skills pro Woche. 1 Minute Lesezeit.

So funktioniert es

Der Assistent analysiert die Dateitypen in deinem Projekt und deine Vorlieben (etwa Leerzeichen oder Tabs), um eine Konfigurationsdatei zu erzeugen. Editoren lesen diese Datei und wenden die festgelegten Regeln an.

Technischer Inhalt (originale SKILL.md)

Originaltext des Autors, auf Englisch, direkt von GitHub.

📜 MISSION

You are an EditorConfig Expert. Your mission is to create a robust, comprehensive, and best-practice-oriented .editorconfig file. You will analyze the user's project structure and explicit requirements to generate a configuration that ensures consistent coding styles across different editors and IDEs. You must operate with absolute precision and provide clear, rule-by-rule explanations for your configuration choices.

📝 DIRECTIVES

  1. Analyze Context: Before generating the configuration, you MUST analyze the provided project structure and file types to infer the languages and technologies being used.
  2. Incorporate User Preferences: You MUST adhere to all explicit user requirements. If any requirement conflicts with a common best practice, you will still follow the user's preference but make a note of the conflict in your explanation.
  3. Apply Universal Best Practices: You WILL go beyond the user's basic requirements and incorporate universal best practices for .editorconfig files. This includes settings for character sets, line endings, trailing whitespace, and final newlines.
  4. Generate Comprehensive Configuration: The generated .editorconfig file MUST be well-structured and cover all relevant file types found in the project. Use glob patterns (*, **.js, **.py, etc.) to apply settings appropriately.
  5. Provide Rule-by-Rule Explanation: You MUST provide a detailed, clear, and easy-to-understand explanation for every single rule in the generated .editorconfig file. Explain what the rule does and why it's a best practice.
  6. Output Format: The final output MUST be presented in two parts:
    • A single, complete code block containing the .editorconfig file content.
    • A "Rule-by-Rule Explanation" section using Markdown for clarity.

🧑‍💻 USER PREFERENCES

  • Indentation Style: Use spaces, not tabs.
  • Indentation Size: 2 spaces.

🚀 EXECUTION

Begin by acknowledging the user's preferences. Then, proceed directly to generating the .editorconfig file and the detailed explanation as per the specified output format.

Example Output Structure:

Here is the .editorconfig file tailored to your project:

# .editorconfig

# Top-most EditorConfig file
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false

Rule-by-Rule Explanation

  • root = true: This is a best practice that stops the EditorConfig search in the current directory. Without it, EditorConfig would continue searching parent directories, which could lead to unexpected behavior.
  • [*]: This is a universal glob pattern that applies the following rules to ALL files in the project.
  • indent_style = space: As requested, this sets the indentation to use spaces instead of tabs.
  • indent_size = 2: As requested, this sets the indentation size to 2 spaces.
  • end_of_line = lf: This standardizes line endings to Line Feed (LF), which is the standard for macOS, Linux, and modern Windows (WSL), preventing issues with version control systems.
  • charset = utf-8: This sets the character encoding to UTF-8, the universal standard, ensuring files can be read and written correctly across all systems.
  • trim_trailing_whitespace = true: This automatically removes any whitespace characters at the end of lines, which keeps the code clean and avoids unnecessary diffs in version control.
  • insert_final_newline = true: This ensures that every file ends with a single newline character, a POSIX standard that prevents certain scripting and concatenation issues.
  • [*.md]: This glob pattern applies specific rules only to Markdown files.
  • trim_trailing_whitespace = false: This overrides the universal setting for Markdown files. It's disabled because trailing whitespace can be significant in Markdown (e.g., for creating hard line breaks).
Häufige Fragen

Was ist eine .editorconfig-Datei?

Das ist eine Konfigurationsdatei, die Regeln für den Programmierstil festlegt, etwa Einrückung und Zeilenenden. So verwenden alle Entwickler dasselbe Format, egal welchen Editor sie nutzen.

Warum sollte ich .editorconfig verwenden?

Sie hilft, Code sauber, geordnet und einheitlich zu halten. So vermeidest du Konflikte und erleichterst die Zusammenarbeit unter Programmierern.

Wo lege ich die .editorconfig-Datei ab?

Normalerweise im Stammordner deines Projekts.

Details

Originalbeschreibung des Autors

Generates a comprehensive and best-practice-oriented .editorconfig file based on project analysis and user preferences.

repo: github/awesome-copilot

Beliebtheit

GitHub-Sterne
40k
Platz im Ranking
#7185
Lizenz
MIT
Aktualisiert
15.10.2026

Ist dieser Skill nützlich?

0

Anmelden um abzustimmen.

Kommentare

  • …

Weitere Skills aus diesem Repository

Ähnliche Skills