comment-code-generate-a-tutorial — GitHub Copilot skill
Refactors a Python script, adds instructional comments, and writes a tutorial README.md. Use it when a script needs to be understandable for beginners.
npx skills add github/awesome-copilot --skill comment-code-generate-a-tutorialWhat comment-code-generate-a-tutorial does
This skill refactors Python scripts using standard practices and the PEP 8 style guide. It can rename unclear variables or functions when clearer names help readers follow the code.
It then adds instructional comments that explain the code's logic and why each part matters. The focus is on reasoning, rather than comments that merely repeat syntax.
The skill generates a README.md with a project overview, setup guidance, a logic walkthrough, and an example of use. Install it for Python scripts intended for learners; for short internal code, that level of documentation can be unnecessary.
What it helps with
- refactor a Python script to follow PEP 8
- rename unclear variables and functions
- explain code logic with instructional comments
- generate a
README.mdwith setup guidance - add a script usage example to documentation
Example prompts for the agent
- Refactor this Python script, add beginner-friendly comments, and generate a `README.md`.
- Check this code against PEP 8, rename unclear variables, and explain the logic for a beginner.
- Turn this script into a tutorial project with an example in `README.md`.
How to install comment-code-generate-a-tutorial
1Skills 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-tutorial3Manually: put the files in place
.github/skills/comment-code-generate-a-tutorial/SKILL.md1Skills CLI (Vercel)
npx skills add github/awesome-copilot --skill comment-code-generate-a-tutorial -a claude-code2Manually: put the files in place
~/.claude/skills/comment-code-generate-a-tutorial/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/comment-code-generate-a-tutorial/
Manually: put the files in place
.agents/skills/comment-code-generate-a-tutorial/SKILL.mdFor all projects use ~/.agents/skills/
Manually: put the files in place
.cursor/skills/comment-code-generate-a-tutorial/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
Platform CLI
gemini skills install https://github.com/github/awesome-copilot --path skills/comment-code-generate-a-tutorialManually: put the files in place
.devin/skills/comment-code-generate-a-tutorial/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
From the same set554
The whole set →Similar
Questions about comment-code-generate-a-tutorial
How do I install comment-code-generate-a-tutorial in GitHub Copilot?
Run npx skills add github/awesome-copilot --skill comment-code-generate-a-tutorial. You can also use gh skill install github/awesome-copilot comment-code-generate-a-tutorial.
What does comment-code-generate-a-tutorial do?
The skill refactors a Python script, writes explanatory comments, and creates a tutorial-style README.md. The document covers the project, setup, code logic, and an example of use.
What does the generated README.md include?
It includes a project overview, prerequisites and dependencies for setup, a walkthrough of the logic, and an example of use. It can include sample output when the script produces visible results.
Source text
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