Catalog
github/comment-code-generate-a-tutorial

github

comment-code-generate-a-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.

v1.0Latest
New~332Updated Jun 26, 2026

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
  2. 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
  3. 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
Files1
1 files · 1.0 KB

Select a file to preview

Overall Score

76/100

Grade

B

Good

Safety

82

Quality

72

Clarity

78

Completeness

68

Summary

This skill transforms a Python script into a beginner-friendly educational project by refactoring code to follow PEP 8 standards, adding instructional comments, and generating a comprehensive README.md tutorial. It guides an agent to improve code clarity and create documentation for learners.

Detected Capabilities

file readcode analysisfile writemarkdown generationtext transformation

Trigger Keywords

Phrases that MCP clients use to match this skill to user intent.

refactor python scriptadd code commentsgenerate tutorialcreate readmebeginner documentationpython best practiceseducational project

Use Cases

  • Convert a raw Python script into a polished, educational project
  • Add pedagogical comments to explain code logic to beginners
  • Generate a complete tutorial README with setup and usage examples
  • Refactor existing code to follow Python best practices and PEP 8
  • Create onboarding documentation for open-source Python projects

Quality Notes

  • Clear three-part workflow: refactor → comment → document
  • Well-structured README sections cover practical onboarding needs (setup, usage, output)
  • Specific guidance on comment quality (avoid redundant, focus on reasoning)
  • PEP 8 compliance requirement ensures professional Python standards
  • Beginner-friendly tone is consistently emphasized throughout
  • Missing concrete examples of before/after code or comment style
  • No guidance on handling scripts with no visible output
  • No discussion of edge cases (scripts that require external dependencies, API keys, or network access)
  • Scope is limited but clear: expects existing Python script as input
Model: claude-haiku-4-5-20251001Analyzed: Jun 26, 2026

Reviews

Add this skill to your library to leave a review.

No reviews yet

Be the first to share your experience.

Use github/comment-code-generate-a-tutorial in your dev environment

Command Palette

Search for a command to run...