add-educational-comments

Adds level-appropriate educational comments to source code files while preserving compilation.

Updated Sep 10, 2026
One-click install
npx skills add https://github.com/serpro-workshop-fortaleza/sifap-modernization-paula --skill add-educational-comments-serpro-workshop-fortaleza
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-educational-comments
Source: https://github.com/serpro-workshop-fortaleza/sifap-modernization-paula/tree/main/.github/skills/add-educational-comments
Command: npx skills add https://github.com/serpro-workshop-fortaleza/sifap-modernization-paula --skill add-educational-comments-serpro-workshop-fortaleza

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Turning an existing source file into a learning resource by hand is slow and error-prone: comments can break indentation, encoding, or compilation, and explanations often miss the reader's actual knowledge level. This Skill annotates code files with clear, level-appropriate educational comments while guaranteeing the file still compiles and keeps its original structure. ## Core Features & Use Cases - Configurable teaching depth: Tune comment detail, repetitiveness, user knowledge, and educational level (scales 1-3) so explanations fit beginners, intermediate, or advanced readers. - Safety-preserving annotation: Maintains file encoding, line endings, indentation style, and compilation correctness; never alters namespaces, imports, or module declarations. - Line growth targets with hard limits: Expands files by 125% using comments only, capped at 400 new lines (300 for files over 1,000 lines), and refines existing notes on re-runs instead of reapplying growth. - Use Case: A team modernizing a legacy Natural/Adabas system asks the agent to annotate a Java 21 service file so new team members can learn the language constructs directly from real code, with numbered notes referencing related explanations. ## Quick Start Ask the agent to add educational comments to a specific source file, for example: add educational comments to src/main/java/PaymentService.java with comment detail 2 and user knowledge 2.

Frequently Asked Questions about add-educational-comments

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

FAQPage Schema
How do I add educational comments to a source code file?

Provide the target file path and optionally set parameters like comment detail, repetitiveness, and user knowledge on a 1-3 scale. The skill inserts explanatory comments into the file, growing it by about 125% with a hard cap of 400 new lines.

What happens if I run the skill without specifying a file?

The skill asks you to provide one or more files, preferably as a chat variable or attached context. If multiple files match, it presents a numbered list so you can select by number or name.

Does adding comments change how my code compiles or runs?

No. The skill preserves encoding, line-ending style, indentation, namespaces, imports, and module declarations, and validates that the file still compiles or executes after annotation. It avoids syntax errors such as Python encoding issues per PEP 263.

Can I customize the teaching level of the code comments?

Yes. Comment detail, repetitiveness, user knowledge, and educational level each accept values 1-3, letting you target beginners with fundamentals or advanced readers with performance and architecture context. Defaults are detail 2, knowledge 2, level 1.

What are the limits on how many comments get added?

The default target grows the file to 125% of its original line count, never exceeding 400 new comment lines. Files over 1,000 lines are limited to 300 comment lines, and previously processed files get refined notes instead of new growth.