comment-code-generate-a-tutorial — скилл для GitHub Copilot
Приводит Python-скрипт в порядок, поясняет его комментариями и создаёт учебный README.md. Подходит, когда код нужно подготовить для новичков.
npx skills add github/awesome-copilot --skill comment-code-generate-a-tutorial -a claude-codeЧто делает comment-code-generate-a-tutorial
Скилл рефакторит Python-код по распространённым практикам и стилю PEP 8. Он может переименовать неясные переменные и функции, чтобы чтение скрипта не превращалось в догадки.
Затем он добавляет поясняющие комментарии с акцентом на логику: что делает фрагмент и зачем он нужен. Поверхностные комментарии к синтаксису скилл старается не писать.
В результате создаётся README.md с обзором проекта, инструкциями по запуску, разбором логики и примером использования. Ставить его стоит для Python-скриптов, которые вы отдаёте начинающим; для краткого внутреннего кода такой объём документации может быть лишним.
Какие задачи решает
- привести Python-скрипт к стилю PEP 8
- переименовать непонятные переменные и функции
- добавить комментарии, объясняющие логику кода
- создать
README.mdс инструкциями по запуску - подготовить пример использования скрипта
Примеры запросов агенту
- Отрефактори этот Python-скрипт, добавь учебные комментарии и создай `README.md`.
- Проверь код на PEP 8, переименуй неясные переменные и объясни логику для новичка.
- Сделай из этого скрипта учебный проект с примером использования в `README.md`.
Как установить comment-code-generate-a-tutorial
1Через Skills CLI (Vercel)
npx skills add github/awesome-copilot --skill comment-code-generate-a-tutorial -a claude-code2Вручную: положить файлы
~/.claude/skills/comment-code-generate-a-tutorial/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/comment-code-generate-a-tutorial/
Вручную: положить файлы
.agents/skills/comment-code-generate-a-tutorial/SKILL.mdДля всех проектов — ~/.agents/skills/
Вручную: положить файлы
.cursor/skills/comment-code-generate-a-tutorial/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1Через Skills CLI (Vercel)
npx skills add github/awesome-copilot --skill comment-code-generate-a-tutorial2GitHub CLI
gh skill install github/awesome-copilot comment-code-generate-a-tutorial3Вручную: положить файлы
.github/skills/comment-code-generate-a-tutorial/SKILL.mdКомандой платформы
gemini skills install https://github.com/github/awesome-copilot --path skills/comment-code-generate-a-tutorialВручную: положить файлы
.devin/skills/comment-code-generate-a-tutorial/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Claude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
Похожие
Вопросы о comment-code-generate-a-tutorial
Как установить comment-code-generate-a-tutorial в GitHub Copilot?
Выполните команду npx skills add github/awesome-copilot --skill comment-code-generate-a-tutorial. Также доступна установка через gh skill install github/awesome-copilot comment-code-generate-a-tutorial.
Что делает comment-code-generate-a-tutorial?
Скилл рефакторит Python-скрипт, добавляет понятные комментарии и генерирует README.md в формате учебного руководства. В документацию входят описание проекта, запуск, разбор работы и пример кода.
Что будет в README.md?
Файл включает обзор проекта, требования и зависимости для запуска, объяснение логики и пример использования. Если скрипт показывает результат, руководство может содержать пример вывода.
Исходный текст
SKILL.md · MIT
--- name: comment-code-generate-a-tutorial description: 'Transform this Python script into a polished, beginner-friendly project by refactoring the code, adding clear instructional comments, and generating a complete markdown tutorial.' --- Transform this Python script into a polished, beginner-friendly project by refactoring the code, adding clear instructional comments, and generating a complete markdown tutorial. 1. **Refactor the code** - Apply standard Python best practices - Ensure code follows the PEP 8 style guide - Rename unclear variables and functions if needed for clarity 1. **Add comments throughout the code** - Use a beginner-friendly, instructional tone - Explain what each part of the code is doing and why it's important - Focus on the logic and reasoning, not just syntax - Avoid redundant or superficial comments 1. **Generate a tutorial as a `README.md` file** Include the following sections: - **Project Overview:** What the script does and why it's useful - **Setup Instructions:** Prerequisites, dependencies, and how to run the script - **How It Works:** A breakdown of the code logic based on the comments - **Example Usage:** A code snippet showing how to use it - **Sample Output:** (Optional) Include if the script returns visible results - Use clear, readable Markdown formatting
© github · MIT · github/awesome-copilot