MR
Mayur Rathi
@github
⭐ 34.1k GitHub stars

Comment-Code-Generate-A-Tutorial

Comment-Code-Generate-A-Tutorial是一款code方向的AI技能,核心价值是Transform this Python script into a polished, beginner-friendly project by refactoring the code, adding clear instructional comments, and generating a complete markdown tutorial,可用于解决开发者在code领域的实际问题,帮助用户提升效率、自动化重复任务或优化工作流。

Transform this Python script into a polished, beginner-friendly project by refactoring the code, adding clear instructional comments, and generating a complete markdown tutorial.

Last verified on: 2026-05-30
mkdir -p ./skills/comment-code-generate-a-tutorial && curl -sfL https://raw.githubusercontent.com/github/awesome-copilot/main/skills/comment-code-generate-a-tutorial/SKILL.md -o ./skills/comment-code-generate-a-tutorial/SKILL.md

Run in terminal / PowerShell. Requires curl (Unix) or PowerShell 5+ (Windows).

Skill Content

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

🎯 Best For

  • Tech leads planning refactors
  • Developers modernizing legacy code
  • Developers scaffolding new projects
  • Prototype builders
  • Claude users

💡 Use Cases

  • Migrating from class components to hooks
  • Breaking apart monolithic functions
  • Bootstrapping React components
  • Creating API route handlers

📖 How to Use This Skill

  1. 1

    Install the Skill

    Copy the install command from the Terminal tab and run it. The SKILL.md file downloads to your local skills directory.

  2. 2

    Load into Your AI Assistant

    Open Claude or GitHub Copilot and reference the skill. Paste the SKILL.md content or use the system prompt tab.

  3. 3

    Apply Comment-Code-Generate-A-Tutorial to Your Work

    Open your project in the AI assistant and ask it to apply the skill. Start with a small module to verify the output quality.

  4. 4

    Review and Refine

    Review AI suggestions before committing. Run tests, check for regressions, and iterate on the skill output.

❓ Frequently Asked Questions

Does this handle breaking changes?

Refactoring skills identify breaking changes but always run your test suite after applying suggestions.

Can I customize the generated output?

Yes — modify the skill's prompt instructions to match your project conventions and coding style.

Is Comment-Code-Generate-A-Tutorial compatible with Cursor and VS Code?

Yes — this skill works with any AI coding assistant including Cursor, VS Code with Copilot, and JetBrains IDEs.

Do I need specific dependencies for Comment-Code-Generate-A-Tutorial?

Check the install command and Works With section. Most code skills only require the AI assistant and your codebase.

How do I install Comment-Code-Generate-A-Tutorial?

Copy the install command from the Terminal tab and run it. The skill downloads to ./skills/comment-code-generate-a-tutorial/SKILL.md, ready to use.

⚠️ Common Mistakes to Avoid

Refactoring without tests

Never refactor critical paths without a comprehensive test suite to catch regressions.

Using generated code without understanding

Understand what generated code does before shipping it to production.

Skipping validation

Always test AI-generated code changes, even for simple refactors.

Missing dependency updates

Check if the skill requires updated dependencies or new packages.

🔗 Related Skills