comment-code-generate-a-tutorial

Refactor Python scripts to PEP 8, add beginner comments, and generate tutorial README files.

Updated Sep 10, 2026
One-click install
npx skills add https://github.com/serpro-workshop-fortaleza/datacorp-sifap-modernization-team-kit --skill comment-code-generate-a-tutorial-serpro-workshop-fortaleza
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: comment-code-generate-a-tutorial
Source: https://github.com/serpro-workshop-fortaleza/datacorp-sifap-modernization-team-kit/tree/main/.github/skills/comment-code-generate-a-tutorial
Command: npx skills add https://github.com/serpro-workshop-fortaleza/datacorp-sifap-modernization-team-kit --skill comment-code-generate-a-tutorial-serpro-workshop-fortaleza

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Functional scripts often lack clear naming, explanatory comments, and documentation, making them hard for beginners to understand, run, and learn from. ## Core Features & Use Cases - Readability Refactoring: Applies the language style guide (PEP 8 for Python), renames unclear variables, and extracts long blocks into small named functions without changing behavior. - Instructional Comments: Adds comments that explain design reasoning, language idioms, and edge cases instead of restating obvious syntax. - Tutorial Generation: Produces a README.md with project overview, setup instructions, how it works, usage example, and optional sample output. - Use Case: You have a working word-count utility script. Use this Skill to refactor it for clarity, comment the key decisions, and publish a step-by-step README so a beginner can run and understand it. ## Quick Start Refactor my Python script wordcount.py for clarity, add beginner-friendly comments explaining the reasoning, and generate a complete tutorial README.md with setup and usage instructions.

Frequently Asked Questions about comment-code-generate-a-tutorial

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I refactor a Python script to follow PEP 8?▼

Apply the PEP 8 style guide by renaming unclear variables and functions to reveal intent and extracting long blocks into small named functions. Keep the public interface and observable output identical so readability improves without changing behavior.

How to write code comments that help beginners learn?▼

Write comments that explain why a design decision was made, introduce a language idiom at its first occurrence, or warn about edge cases and invariants. Avoid comments that merely restate the syntax or narrate obvious control flow.

What sections should a tutorial README for a script include?▼

A tutorial README should include a project overview, setup instructions, a how-it-works explanation, a usage example, and optionally a sample output section. Start with an H1 naming the project and test the setup command and example before publishing.

Does refactoring for readability change script behavior?▼

No, a didactic refactor must preserve behavior, file encoding, and line endings exactly. The script should still compile and produce identical output after renaming, restructuring, and commenting.

Can this tutorial process be used for languages other than Python?▼

Yes, the same three-step procedure of refactoring, commenting, and writing a tutorial applies to any language. Python with PEP 8 is the example, but the workflow adapts to stacks like Java 21 and TypeScript.