/repo-documentation:comment-code-generate-a-tutorialfrom repo-documentation
Refactors a Python script for readability, adds beginner-friendly instructional comments, and generates a tutorial-style README.md with setup, usage, and internals.
Ships in repo-documentation. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Refactor a Python script for readability, add useful beginner-friendly comments that explain reasoning, and generate a tutorial-style README.md that teaches setup, usage, internals, and expected output.
| Area | Apply | Avoid |
|---|---|---|
| Style | Apply standard Python best practices and PEP 8 naming, spacing, imports, and line length conventions. | Reformatting in a way that conflicts with the repository's formatter. |
| Names | Rename unclear variables and functions when it improves clarity. | Renaming public APIs, CLI flags, files, or serialized fields without preserving compatibility. |
| Structure | Extract small functions for distinct steps such as loading input, processing data, and presenting output. | Over-engineering a short teaching script with unnecessary classes. |
| Safety | Keep behavior equivalent unless the user asks for functional changes. | Silently changing algorithms, file paths, network behavior, or output formats. |
| Entry point | Prefer a main() function and if __name__ == "__main__": main() for runnable scripts. | Running side effects at import time. |
# increment i above i += 1.Generate or update README.md with these sections:
| Section | Required content |
|---|---|
Project Overview | What the script does and why it is useful. |
Setup Instructions | Prerequisites, dependencies, environment setup, and how to run the script. |
How It Works | A breakdown of the code logic based on the instructional comments. |
Example Usage | A command or code snippet showing how to use it. |
Sample Output | Include when the script returns visible results or a representative output can be shown confidently. |
Use clear, readable Markdown formatting. Keep commands copy-pasteable and avoid inventing dependencies that are not present in the script or project files.
## Python tutorial project result
**Status:** complete | partial | blocked
**Script:** `<path/to/script.py>`
**Tutorial:** `README.md`
| Area | Changes made | Notes |
| --- | --- | --- |
| Refactor | `<functions/names/structure>` | `<behavior preserved or changed>` |
| Comments | `<instructional comments added>` | `<focus areas>` |
| README | `<sections generated>` | `<sample output included or omitted>` |
### Validation
- Syntax check: `<command and result>`
- Run command: `<command and result, or not run with reason>`
README.md includes Project Overview, Setup Instructions, How It Works, Example Usage, and Sample Output when applicable.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
15 skills in this plugin
/add-educational-commentsAdd educational comments to existing code files while preserving encoding, line endings, indentation, syntax, and build correctness. Use this skill when the user asks to annotate a file for learning, add teaching comments, explain code inline, adjust comment detail or repetitiveness, or use Line Number Referencing./convert-plaintext-to-mdConvert plaintext or generic text documentation into well-structured Markdown while preserving source content and applying explicit instructions, documented options, or a converted guide file. Use when asked to convert a file to Markdown, finalize Markdown formatting, apply header patterns, use a guide document, or target GitHub, StackOverflow, VS Code, GitLab, or CommonMark rendering./create-agentsmdnpx claudepluginhub gbb-acelerators/awesome-harness-primitives --plugin repo-documentationOther plugins' skills for the same job