Skip to main content
skill GitHub Copilot official · GitHub

editorconfig — GitHub Copilot skill: what it does, how to install

Creates an .editorconfig after reviewing project files and formatting preferences. Use it when a project needs consistent editor rules.

Install into GitHub Copilot · Skills CLI (Vercel) All methods and platforms ↓
npx skills add github/awesome-copilot --skill editorconfig
Open on GitHub

What editorconfig does

The skill reviews the project structure and file types to infer the languages and technologies in use. It then writes an .editorconfig with glob patterns for the relevant files and follows the formatting requirements you provide.

Its default preferences use spaces with an indent size of 2, plus rules for character encoding, line endings, trailing whitespace, and a final newline. The response includes the full file in a code block and an explanation for every rule. When a requested rule conflicts with common practice, the skill follows the request and calls out the conflict. Install it if your team wants the same formatting rules across editors and IDEs.

What it helps with

  • generate an .editorconfig from project files
  • set space indentation with size 2
  • apply rules to file types with glob patterns
  • remove trailing whitespace from source files
  • explain each configuration rule

Example prompts for the agent

  • Create an `.editorconfig` for this project and explain every rule.
  • Review the file types and generate an `.editorconfig` with 2-space indentation.
  • Add Markdown rules that keep meaningful trailing whitespace.

How to install editorconfig

1Skills CLI (Vercel)

npx skills add github/awesome-copilot --skill editorconfig

2GitHub CLI

gh skill install github/awesome-copilot editorconfig

3Manually: put the files in place

.github/skills/editorconfig/SKILL.md

From the same set554

The whole set →
git-commit official github This skill reviews Git changes, stages related files, and creates Conventional Commits. Use it when you want an agent to make one commit or split work into separate commits. GitHub Copilot 47,165installs excalidraw-diagram-generator official github Turn a plain-language description into an Excalidraw diagram. Useful for mapping processes, system structure, and relationships between entities. GitHub Copilot 31,639installs multi-stage-dockerfile official github This skill guides GitHub Copilot in writing multi-stage Dockerfiles for different languages and frameworks. Use it when the final runtime image should contain fewer build dependencies. GitHub Copilot 29,688installs documentation-writer official github Skill that turns the agent into a technical writer following the Diátaxis framework: tutorials, how-to guides, reference, and explanation. Proposes structure before writing. GitHub Copilot 27,757installs prd official github Turns a feature idea into a structured PRD with user stories, technical requirements, and risks. Use it when planning a software feature or an AI-powered one. GitHub Copilot 24,035installs refactor official github This skill reshapes existing code without changing its external behavior. Use it for gradual cleanup of large functions, duplication, weak types, and code smells. GitHub Copilot 22,321installs java-springboot official github Gives GitHub Copilot Spring Boot development practices, from project layout to tests and security. Use it when writing or reviewing Java application code. GitHub Copilot 21,272installs create-readme official github This skill reviews a project and creates a structured README.md. Use it when the repository needs clear documentation based on its actual files and code. GitHub Copilot 19,081installs

Similar

code-simplifier rtk-ai Reviews Rust code in RTK to remove over-engineering and needless allocations. It applies idiomatic simplifications without altering runtime behavior. Claude Code CX Codex Cursor +1 2,100installs rtk-tdd rtk-ai This skill enforces a Red-Green-Refactor workflow for Rust and activates on implementation, testing, refactoring, and bug-fixing tasks. Claude Code CX Codex Cursor +1 2,100installs migrate-to-shoehorn Matt Pocock Replaces as type assertions in tests with helpers from @total-typescript/shoehorn. Use it when tests need partial objects or deliberately invalid data. Claude Code 475,388installs write-swift emilkowalski This skill guides Swift coding, reviews, and migrations using the language’s current practices. Use it to investigate concurrency errors, hangs, data races, or retain cycles. Claude Code CX Codex Cursor +1 117,500installs megacave JuliusBrussee Switches agent responses to Classical Chinese (wenyan) to reduce terminal output. Activated via /megacave or /caveman wenyan. Claude Code CX Codex Cursor +1 24,400installs find-docs upstash Pulls up-to-date documentation, API references and code examples for any library through the Context7 CLI. Useful when the model's training data lags behind the API. Claude Code CX Codex Cursor +1 9,400installs typescript-advanced-types Seth Hobson Guides an agent through advanced TypeScript types, from generics to conditional and mapped types. Use it for typed libraries, API clients, or strict configuration objects. Claude Code CX Codex Cursor 92,169installs smart-explore thedotmack Uses tree-sitter to map code structure and find symbols. Useful when you need to explore a codebase without loading every full file. Claude Code CX Codex Cursor +1 7,300installs

Questions about editorconfig

How do I install editorconfig in GitHub Copilot?

Run npx skills add github/awesome-copilot --skill editorconfig. You can also use gh skill install github/awesome-copilot editorconfig.

What does editorconfig do?

The skill reviews a project and generates an .editorconfig for consistent formatting rules. It explains every rule included in the generated file.

Which settings does editorconfig add?

The skill covers indentation, character encoding, line endings, trailing whitespace, and a final newline. It can override trailing-whitespace trimming for Markdown files.

Source text

SKILL.md · MIT
---
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
# .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).

© github · MIT · github/awesome-copilot

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor