editorconfig
Что он делает
Этот помощник создает файл `.editorconfig`, который помогает поддерживать единый стиль написания кода в разных редакторах и проектах. Он задает базовые правила, например использование пробелов или табуляции для отступов и тип окончания строк.
Когда использовать
- ✓При старте нового проекта по программированию.
- ✓Когда над одним кодом работают несколько человек.
- ✓Чтобы код оставался аккуратным в любом редакторе.
Ссылка на скилл
https://github.com/github/awesome-copilot/blob/main/skills/editorconfig/SKILL.mdСкопируйте и вставьте её в ваш ИИ (Claude, ChatGPT или Cursor) с просьбой следовать инструкциям.
Как использовать
Самый простой способ: скопируйте сообщение и вставьте его в свой ИИ. Он прочитает скилл и выполнит инструкции.
Готовое сообщение для вставки
Для Claude Code, Codex или Cursor: запустите в папке проекта, и скилл установится.
Скачайте SKILL.md и положите его в папку скиллов вашего агента.
Пример запроса к вашему ИИ
“Создай файл .editorconfig для проекта на Python, который использует 4 пробела для отступов и окончания строк LF.”
5 новых скиллов в неделю. 1 минута чтения.
Как это работает
Помощник анализирует типы файлов в вашем проекте и ваши предпочтения (например, пробелы или табуляцию), чтобы создать файл конфигурации. Редакторы читают этот файл и применяют заданные правила.
Технический текст (оригинальный SKILL.md)
Оригинальный текст автора на английском, прямо с 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
- Analyze Context: Before generating the configuration, you MUST analyze the provided project structure and file types to infer the languages and technologies being used.
- 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.
- Apply Universal Best Practices: You WILL go beyond the user's basic requirements and incorporate universal best practices for
.editorconfigfiles. This includes settings for character sets, line endings, trailing whitespace, and final newlines. - Generate Comprehensive Configuration: The generated
.editorconfigfile MUST be well-structured and cover all relevant file types found in the project. Use glob patterns (*,**.js,**.py, etc.) to apply settings appropriately. - Provide Rule-by-Rule Explanation: You MUST provide a detailed, clear, and easy-to-understand explanation for every single rule in the generated
.editorconfigfile. Explain what the rule does and why it's a best practice. - Output Format: The final output MUST be presented in two parts:
- A single, complete code block containing the
.editorconfigfile content. - A "Rule-by-Rule Explanation" section using Markdown for clarity.
- A single, complete code block containing the
🧑💻 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).
Частые вопросы
Что такое файл .editorconfig?
Это файл конфигурации, который задает стандарты оформления кода, например отступы и окончания строк, чтобы все разработчики использовали один формат независимо от редактора.
Зачем нужен .editorconfig?
Он помогает держать код чистым, аккуратным и единообразным, избегать конфликтов и упрощает совместную работу программистов.
Где нужно разместить файл .editorconfig?
Обычно его кладут в корневую папку проекта.
Подробности
Оригинальное описание автора
Generates a comprehensive and best-practice-oriented .editorconfig file based on project analysis and user preferences.
repo: github/awesome-copilot
Популярность
- Звёзды на GitHub
- 40k
- Место в рейтинге
- #7185
- Лицензия
- MIT
- Обновлён
- 15.10.2026
Комментарии
- …
Другие скиллы из этого репозитория
acquire-codebase-knowledge
40kПомогает агенту понять и задокументировать существующий проект.
acreadiness-assess
40kАгент оценивает готовность проекта к работе с ИИ и составляет отчёт.
acreadiness-generate-instructions
40kПомогает агенту создать инструкции для ИИ-инструментов по итогам оценки.
acreadiness-policy
40kАгент помогает задавать политики оценки ИИ-готовности проектов.
Похожие скиллы
openclaw-update
394kПомогает агенту обновить уже работающий OpenClaw Gateway, выбрав способ обновления по тому, как он был установлен, и сохранив вашу сессию.
diagnose-gateway
394kПомогает агенту выяснить, почему ваш OpenClaw Gateway не работает, проверяя настройки, каналы и порты, но ничего не меняя.
crabbox-apps
394kПомогает агенту открыть и запустить приложение на временной облачной машине, а затем показать его вид на боковой панели чата.