Skip to main content
skill GitHub Copilot official · GitHub

add-educational-comments — GitHub Copilot skill: purpose and setup

Adds educational comments to a specified code file, tailored to the reader's knowledge level. Use it when a source file needs to work as a learning resource.

Install into GitHub Copilot · Skills CLI (Vercel) All methods and platforms ↓
npx skills add github/awesome-copilot --skill add-educational-comments
Open on GitHub

What add-educational-comments does

The skill explains syntax, idioms, and design choices at a level suited to the user. If no file is supplied, it asks for one and offers a numbered list of close matches. It aims to preserve the file's structure and build correctness.

By default, it targets a 125% increase in the file's line count using comments, capped at 400 new lines. For files over 1,000 lines, the guidance sets a target of no more than 300 new comment lines. On files already processed with the prompt, it revises existing notes instead. Settings cover explanation depth, repetition, knowledge level, note numbering, and comment nesting; encoding and line endings should stay intact.

Install it when the goal is to teach from a code file. For a small change that needs no explanation, the added comments can be unnecessary bulk.

What it helps with

  • explain unfamiliar syntax in a source file
  • prepare code for a beginner to study
  • add context about architecture or performance for advanced readers
  • let the user pick a file from close matches

Example prompts for the agent

  • Add educational comments to `src/app.py` for a beginner.
  • Explain the idioms and design choices in this file for a user with knowledge level 2.
  • Ask me to choose a file if you cannot identify the target.

How to install add-educational-comments

1Skills CLI (Vercel)

npx skills add github/awesome-copilot --skill add-educational-comments

2GitHub CLI

gh skill install github/awesome-copilot add-educational-comments

3Manually: put the files in place

.github/skills/add-educational-comments/SKILL.md

From the same set554

The whole set →
git-commit official github This skill reviews Git changes, stages related files, and creates Conventional Commits. Use it when you want an agent to make one commit or split work into separate commits. GitHub Copilot 47,165installs excalidraw-diagram-generator official github Turn a plain-language description into an Excalidraw diagram. Useful for mapping processes, system structure, and relationships between entities. GitHub Copilot 31,639installs multi-stage-dockerfile official github This skill guides GitHub Copilot in writing multi-stage Dockerfiles for different languages and frameworks. Use it when the final runtime image should contain fewer build dependencies. GitHub Copilot 29,688installs documentation-writer official github Skill that turns the agent into a technical writer following the Diátaxis framework: tutorials, how-to guides, reference, and explanation. Proposes structure before writing. GitHub Copilot 27,757installs prd official github Turns a feature idea into a structured PRD with user stories, technical requirements, and risks. Use it when planning a software feature or an AI-powered one. GitHub Copilot 24,035installs refactor official github This skill reshapes existing code without changing its external behavior. Use it for gradual cleanup of large functions, duplication, weak types, and code smells. GitHub Copilot 22,321installs java-springboot official github Gives GitHub Copilot Spring Boot development practices, from project layout to tests and security. Use it when writing or reviewing Java application code. GitHub Copilot 21,272installs create-readme official github This skill reviews a project and creates a structured README.md. Use it when the repository needs clear documentation based on its actual files and code. GitHub Copilot 19,081installs

Similar

search-strategy official anthropics This skill breaks a natural-language question into source-specific searches and combines the results. Use it for decisions, status checks, and document discovery. Claude Code CX Codex Cursor +1 5,300installs create-viz official anthropics Generates publication-quality charts from tables and database queries using Python. Selects chart type, formats axes, and saves PNG for reports and presentations. Claude Code CX Codex Cursor +1 5,200installs grill-with-docs Matt Pocock This skill interviews you about a plan or design and creates ADRs and a glossary along the way. Use it when decisions need sharper definition. Claude Code 1,219,756installs skill-creator official anthropics Creates and refines skills, then tests them with prompts, evaluations, and performance checks. Claude Code Claude.ai 414,180installs setup-matt-pocock-skills Matt Pocock This skill configures a repository for Matt Pocock's engineering skills by setting its issue tracker, triage labels, and domain docs layout. Run it before using the other skills. Claude Code 1,052,851installs handoff Matt Pocock Creates a handoff document from the current conversation so another agent can continue the work. Use it when a task moves to a new session or agent. Claude Code 1,038,491installs triage Matt Pocock This skill moves issues and external PRs through triage states, verification, and agent briefs. It fits maintainers managing an issue queue. Claude Code 990,453installs domain-modeling Matt Pocock This skill sharpens project terminology, maintains GLOSSARY.md, and records selected architecture decisions in ADRs. Use it while the domain model is changing. Claude Code 876,391installs

Questions about add-educational-comments

How do I install add-educational-comments in GitHub Copilot?

Run npx skills add github/awesome-copilot --skill add-educational-comments or gh skill install github/awesome-copilot add-educational-comments.

What does add-educational-comments do?

It adds learning-focused explanations to code, adjusted to the reader's knowledge level and configured preferences. If no file is provided, it asks for one.

How many comments does the skill add?

By default, it targets a 125% increase in the file's line count, with a cap of 400 new lines. For files over 1,000 lines, the guidance is no more than 300 new comment lines.

Source text

SKILL.md · MIT
---
name: add-educational-comments
description: 'Add educational comments to the file specified, or prompt asking for file to comment if one is not provided.'
---

# 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

- **Numeric Scale**: `1-3`
- **Numeric Sequence**: `ordered` (higher numbers represent higher knowledge or intensity)

### Parameters

- **File Name** (required): Target file(s) for commenting.
- **Comment Detail** (`1-3`): Depth of each explanation (default `2`).
- **Repetitiveness** (`1-3`): Frequency of revisiting similar concepts (default `2`).
- **Educational Nature**: Domain focus (default `Computer Science`).
- **User Knowledge** (`1-3`): General CS/SE familiarity (default `2`).
- **Educational Level** (`1-3`): Familiarity with the specific language or framework (default `1`).
- **Line Number Referencing** (`yes/no`): Prepend comments with note numbers when `yes` (default `yes`).
- **Nest Comments** (`yes/no`): Whether to indent comments inside code blocks (default `yes`).
- **Fetch List**: Optional URLs for authoritative references.

If a configurable element is missing, use the default value. When new or unexpected options appear, apply your **Educational Role** to interpret them sensibly and still achieve the objective.

### Default Configuration

- File Name
- Comment Detail = 2
- Repetitiveness = 2
- Educational Nature = Computer Science
- User Knowledge = 2
- Educational Level = 1
- Line Number Referencing = yes
- Nest Comments = yes
- Fetch List:
  - <https://peps.python.org/pep-0263/>

## Examples

### Missing File

```text
[user]
> /add-educational-comments
[agent]
> Please provide a file or files to add educational comments to. Preferably as chat variable or attached context.
```

### Custom Configuration

```text
[user]
> /add-educational-comments #file:output_name.py Comment Detail = 1, Repetitiveness = 1, Line Numer = no
```

Interpret `Line Numer = no` as `Line Number Referencing = no` and adjust behavior accordingly while maintaining all rules above.

## Final Checklist

- Ensure the transformed file satisfies the 125% rule without exceeding limits.
- Keep encoding, end-of-line style, and indentation unchanged.
- Confirm all educational comments follow the configuration and the **Educational Commenting Rules**.
- Provide clarifying suggestions only when they aid learning.
- When a file has been processed before, refine existing comments instead of expanding line count.

© github · MIT · github/awesome-copilot

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor