К основному содержанию
скилл GitHub Copilot официальный · GitHub

add-educational-comments — скилл для GitHub Copilot: комментарии

Добавляет в указанный файл учебные комментарии с учётом уровня знаний. Подойдёт, когда нужно объяснить код себе или тем, кто будет его изучать.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add github/awesome-copilot --skill add-educational-comments -a claude-code
Открыть на GitHub

Что делает add-educational-comments

Скилл поясняет синтаксис, идиомы и проектные решения, ориентируясь на заданный уровень пользователя. Если файл не передан, он попросит его и предложит выбрать из близких совпадений. Комментарии должны сохранять структуру файла и не нарушать его сборку.

По умолчанию скилл стремится увеличить число строк файла на 125% за счёт комментариев, но добавляет не более 400 строк. Для файлов длиннее 1,000 строк ориентир — не более 300 новых строк; для ранее обработанных файлов предлагается править существующие заметки. Настройки задают глубину и частоту пояснений, уровень знаний, нумерацию заметок и вложенность комментариев. Учитываются кодировка и окончания строк.

Ставьте его, если хотите превратить исходник в учебный материал. Для небольшой правки, где комментарии не нужны, такое увеличение файла будет лишним.

Какие задачи решает

  • пояснить незнакомые конструкции в исходном коде
  • подготовить файл для изучения новичком
  • добавить заметки о производительности и архитектуре для опытного разработчика
  • выбрать нужный файл из предложенных совпадений

Примеры запросов агенту

  • Добавь учебные комментарии в `src/app.py` для начинающего разработчика.
  • Объясни идиомы и проектные решения в этом файле; уровень знаний — 2.
  • Попроси меня выбрать файл, если не найдёшь подходящий.

Как установить add-educational-comments

1Через Skills CLI (Vercel)

npx skills add github/awesome-copilot --skill add-educational-comments -a claude-code

2Вручную: положить файлы

~/.claude/skills/add-educational-comments/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/add-educational-comments/

Похожие

skill-creator официальный anthropics Помогает создать новый скилл, доработать существующий и проверить результат через тестовые промпты и оценки. Claude Code Claude.ai 414 180установок grill-with-docs Matt Pocock Скилл проводит жёсткое интервью по плану или дизайну и по ходу создаёт ADR и глоссарий. Подойдёт перед началом сложной разработки. Claude Code 1 219 756установок setup-matt-pocock-skills Matt Pocock Настраивает репозиторий для инженерных скиллов Matt Pocock: трекер задач, метки triage и правила доменной документации. Запускайте перед первым использованием набора. Claude Code 1 052 851установок handoff Matt Pocock Собирает текущий диалог в документ передачи, чтобы другой агент продолжил работу с нужным контекстом. Нужен при смене сессии или исполнителя. Claude Code 1 038 491установок triage Matt Pocock Скилл проводит issue и внешние PR через роли триажа, проверку и подготовку брифа для агента. Подойдёт мейнтейнеру, который разбирает очередь задач. Claude Code 990 453установок domain-modeling Matt Pocock Скилл помогает уточнять термины проекта, вести GLOSSARY.md и фиксировать архитектурные решения в ADR. Нужен, когда модель предметной области меняется. Claude Code 876 391установок

Вопросы о add-educational-comments

Как установить add-educational-comments в GitHub Copilot?

Выполните npx skills add github/awesome-copilot --skill add-educational-comments или gh skill install github/awesome-copilot add-educational-comments.

Что делает add-educational-comments?

Добавляет к коду учебные пояснения с учётом уровня знаний и выбранных настроек. Если файл не передан, просит его указать.

Сколько комментариев добавляет скилл?

По умолчанию он ориентируется на увеличение числа строк файла на 125%, с пределом в 400 новых строк. Для файлов длиннее 1,000 строк ориентир составляет не более 300 новых строк.

Исходный текст

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

Смотрите также

Спонсоры проекта

Компании, которые помогают держать аналитику открытой