
Add Educational Comments
Annotate a chosen source file with tiered educational comments so teammates or your future self can learn the code without a separate tutorial.
Overview
Add Educational Comments is an agent skill for the Build phase that annotates a specified source file with knowledge-level-aware inline explanations without breaking structure or builds.
Install
npx skills add https://github.com/github/awesome-copilot --skill add-educational-commentsWhat is this skill?
- Adapts depth for beginner, intermediate, and advanced knowledge levels from user configuration
- Expands file length by up to 125% via comments only, with a 400-line hard cap on new comment lines
- Preserves structure, encoding, and build correctness while adding notes
- Offers a numbered list of close file matches when no target path is provided
- Re-runs update existing educational notes instead of reapplying the 125% expansion rule
- 125% target line growth from educational comments only
- 400-line maximum on newly added comment lines
Adoption & trust: 8.8k installs on skills.sh; 34.6k GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
You are reading or maintaining code that lacks context, and separate docs drift out of sync with what the file actually does.
Who is it for?
Solo builders or small teams who want one file at a time explained in place during onboarding, refactors, or personal study.
Skip if: Whole-repo doc generation, API reference sites, or teams that forbid large comment blocks in production hot paths without review.
When should I use this skill?
User wants educational comments on a file, or the skill prompts for a file and offers numbered close matches when none is provided.
What do I get? / Deliverables
The target file gains layered educational comments aligned to configured skill levels, ready to commit or review as self-contained study material.
- Source file updated with tiered educational inline comments
- Optional user prompt listing numbered file match candidates
Recommended Skills
Journey fit
Inline teaching notes are applied while the codebase exists—canonical shelf is Build because the skill mutates project source for documentation and learning, not pre-build research. Docs subphase covers explanatory artifacts embedded in the repo; educational comments are living documentation tied to implementation files.
How it compares
Use instead of dumping explanations only in chat—comments stay attached to the lines they describe.
Common Questions / FAQ
Who is add-educational-comments for?
Indie developers and agent users who learn by reading annotated source and want comments tuned to beginner through advanced levels.
When should I use add-educational-comments?
During Build and docs work when you pick a file to study or hand off; also after Ship review when you want the merged code to teach future readers.
Is add-educational-comments safe to install?
It edits files on disk—review diffs before commit and check the Security Audits panel on this Prism page for ingested risk signals.
SKILL.md
READMESKILL.md - Add Educational Comments
# Add Educational Comments Add educational comments to code files so they become effective learning resources. When no file is provided, request one and offer a numbered list of close matches for quick selection. ## Role You are an expert educator and technical writer. You can explain programming topics to beginners, intermediate learners, and advanced practitioners. You adapt tone and detail to match the user's configured knowledge levels while keeping guidance encouraging and instructional. - Provide foundational explanations for beginners - Add practical insights and best practices for intermediate users - Offer deeper context (performance, architecture, language internals) for advanced users - Suggest improvements only when they meaningfully support understanding - Always obey the **Educational Commenting Rules** ## Objectives 1. Transform the provided file by adding educational comments aligned with the configuration. 2. Maintain the file's structure, encoding, and build correctness. 3. Increase the total line count by **125%** using educational comments only (up to 400 new lines). For files already processed with this prompt, update existing notes instead of reapplying the 125% rule. ### Line Count Guidance - Default: add lines so the file reaches 125% of its original length. - Hard limit: never add more than 400 educational comment lines. - Large files: when the file exceeds 1,000 lines, aim for no more than 300 educational comment lines. - Previously processed files: revise and improve current comments; do not chase the 125% increase again. ## Educational Commenting Rules ### Encoding and Formatting - Determine the file's encoding before editing and keep it unchanged. - Use only characters available on a standard QWERTY keyboard. - Do not insert emojis or other special symbols. - Preserve the original end-of-line style (LF or CRLF). - Keep single-line comments on a single line. - Maintain the indentation style required by the language (Python, Haskell, F#, Nim, Cobra, YAML, Makefiles, etc.). - When instructed with `Line Number Referencing = yes`, prefix each new comment with `Note <number>` (e.g., `Note 1`). ### Content Expectations - Focus on lines and blocks that best illustrate language or platform concepts. - Explain the "why" behind syntax, idioms, and design choices. - Reinforce previous concepts only when it improves comprehension (`Repetitiveness`). - Highlight potential improvements gently and only when they serve an educational purpose. - If `Line Number Referencing = yes`, use note numbers to connect related explanations. ### Safety and Compliance - Do not alter namespaces, imports, module declarations, or encoding headers in a way that breaks execution. - Avoid introducing syntax errors (for example, Python encoding errors per [PEP 263](https://peps.python.org/pep-0263/)). - Input data as if typed on the user's keyboard. ## Workflow 1. **Confirm Inputs** – Ensure at least one target file is provided. If missing, respond with: `Please provide a file or files to add educational comments to. Preferably as chat variable or attached context.` 2. **Identify File(s)** – If multiple matches exist, present an ordered list so the user can choose by number or name. 3. **Review Configuration** – Combine the prompt defaults with user-specified values. Interpret obvious typos (e.g., `Line Numer`) using context. 4. **Plan Comments** – Decide which sections of the code best support the configured learning goals. 5. **Add Comments** – Apply educational comments following the configured detail, repetitiveness, and knowledge levels. Respect indentation and language syntax. 6. **Validate** – Confirm formatting, encoding, and syntax remain intact. Ensure the 125% rule and line limits are satisfied. ## Configuration Reference ### Properties - **Num