add-educational-comments_skill

This skill adds educational comments to Python files to enhance learning while preserving structure and improving clarity for readers.
  • Python

2.6k

GitHub Stars

2

Bundled Files

2 months ago

Catalog Refreshed

3 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill openclaw/skills --skill add-educational-comments

  • _meta.json300 B
  • SKILL.md6.1 KB

Overview

This skill adds educational comments to source files to turn code into clear learning resources. It requests a target file if none is provided, preserves encoding and formatting, and follows configurable detail, repetitiveness, and line-numbering rules. The goal is to increase readability and teach language- and architecture-level concepts without altering program behavior.

How this skill works

The skill inspects the provided file to determine language, encoding, and line endings, then plans comment locations that best illustrate concepts for the configured knowledge level. It inserts only single-line comments with preserved indentation, optional note numbering, and a target increase in lines (default: 125%) while enforcing line limits and syntax safety. If no file is supplied, it prompts for one and can present a numbered list of close matches for quick selection.

When to use it

  • You want to convert production or sample code into a self-explanatory tutorial.
  • Preparing code samples for classrooms, documentation, or onboarding materials.
  • When learners need step-by-step explanations tied to specific lines or blocks.
  • Reviewing legacy code to surface design intent and language idioms.
  • Creating annotated examples for interviews, blog posts, or study guides.

Best practices

  • Provide the exact file(s) and desired knowledge level so comments match learner needs.
  • Keep test/build pipelines available to validate no runtime or syntax changes occurred.
  • Prefer smaller targeted files when aiming for the 125% expansion rule to maintain focus.
  • Use Line Number Referencing = yes for lessons that require cross-reference; disable for lighter commentary.
  • Supply a brief config (Comment Detail, Repetitiveness, User Knowledge) to control depth and repetition.

Example use cases

  • Annotate a Python module so beginners learn idiomatic patterns and why certain choices were made.
  • Add architecture and performance notes to a backend service file for intermediate and advanced engineers.
  • Convert a utility script into a teachable walkthrough for a workshop, including numbered explanatory notes.
  • Refine existing comments in a file that was previously processed, improving clarity without reapplying line-count rules.
  • Prepare code snippets for a tutorial, keeping formatting and encoding untouched while adding nested contextual notes.

FAQ

The skill responds with a prompt asking you to provide one or more files and can offer close matches for quick selection.

Will the skill change code behavior?

No. Comments are inserted only as single-line comments and the skill avoids edits that would alter imports, encodings, or syntax that affect execution.

How does the 125% rule work?

By default the skill increases the file's total lines to 125% using educational comments, capped at 400 new comment lines and adjusted for very large files or previously processed files.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational