PluginBench
Skill
Official
Review
Audit score 70

editorconfig

github/awesome-copilot

Generates best-practice .editorconfig files tailored to your project structure and preferences.

What is editorconfig?

An EditorConfig expert that analyzes your project and generates a comprehensive .editorconfig file ensuring consistent coding styles across editors and IDEs. Use this when you need standardized indentation, line endings, and formatting rules enforced automatically.

  • Analyzes project structure and file types to infer languages and technologies
  • Generates comprehensive .editorconfig with glob patterns for all relevant file types
  • Applies universal best practices including charset, line endings, and whitespace handling
  • Incorporates user preferences while noting conflicts with best practices
  • Provides detailed rule-by-rule explanations for every configuration setting
  • Covers indentation style, indentation size, line endings, character encoding, and trailing whitespace rules

How to install editorconfig

npx skills add https://github.com/github/awesome-copilot --skill editorconfig
Claude Code
Cursor
Windsurf
Cline

How to use editorconfig

  1. 1.Run the skill and provide your project structure or file types
  2. 2.Specify any custom indentation or formatting preferences (or accept defaults: 2 spaces, LF line endings)
  3. 3.Review the generated .editorconfig file and rule-by-rule explanation
  4. 4.Place the .editorconfig file in your project root directory
  5. 5.Commit to version control so all team members use the same configuration

Use cases

Good for
  • Setting up consistent code formatting across a team working with multiple editors
  • Establishing baseline editor configuration for a new project with mixed file types
  • Enforcing coding standards in monorepos with different language requirements
  • Ensuring POSIX compliance and version control compatibility across platforms
  • Configuring language-specific formatting rules (e.g., preserving trailing whitespace in Markdown)
Who it's for
  • Development teams needing editor-agnostic formatting standards
  • Project leads establishing coding conventions
  • Full-stack developers working across multiple languages and file types
  • Teams using diverse IDEs and editors (VS Code, Vim, JetBrains, etc.)

editorconfig FAQ

What if my project has conflicting style requirements?

The skill will follow your explicit preferences while documenting any conflicts with best practices in the explanation, allowing you to make informed decisions.

Does this work with all editors and IDEs?

EditorConfig is supported by most modern editors including VS Code, Vim, JetBrains IDEs, Sublime Text, and others. Check editorconfig.org for full compatibility.

Can I customize rules for specific file types?

Yes. The skill generates glob patterns for different file types (*.js, *.py, *.md, etc.) and can create language-specific overrides based on your requirements.

What happens with Markdown files and trailing whitespace?

By default, trailing whitespace is preserved in Markdown files since it can be significant for formatting (e.g., hard line breaks), while other files have it trimmed.

Do I need to install EditorConfig separately?

EditorConfig is a specification supported natively by most modern editors. No separate installation is needed; just place the .editorconfig file in your project root.

Full instructions (SKILL.md)

Source of truth, from github/awesome-copilot.


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

πŸ“œ 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).