code-annotation

Read full source files to generate code-aware comments explaining non-obvious logic.

Updated Mar 25, 2026
One-click install
npx skills add https://github.com/zkzupup/MySkills --skill code-annotation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-annotation
Source: https://github.com/zkzupup/MySkills/tree/main/skills/code-annotation
Command: npx skills add https://github.com/zkzupup/MySkills --skill code-annotation

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Annotations articulate the rationale, design constraints, and cross-module relationships behind code by describing the non-obvious aspects, without changing behavior.

Core Features & Use Cases

  • Reads the full source file before annotating to avoid inferences from names or paths.
  • Enforces quality gates to prevent hollow or placeholder comments; includes a calibration protocol for long annotation sessions.
  • Produces documentation-friendly annotations for Python and C++ sources, plus templates and guidance for future contributors.

Quick Start

Provide an annotated example of a Python or C++ file that highlights non-obvious logic and reasoning without altering code.

Frequently Asked Questions about code-annotation

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

FAQPage Schema
How do I generate code comments that explain the logic behind non-obvious source code?

To generate code comments explaining non-obvious logic, the Skill reads and interprets full source files to articulate rationale, design constraints, and cross-module relationships without altering behavior. It enforces quality gates and anti-pattern checks to maintain high accuracy.

Does this code annotation approach support Python and C++ source files?

Yes, code annotation supports Python and C++ (.h/.cpp) source files, producing documentation-friendly annotations. It also provides templates and guidance for future contributors to maintain consistency across these languages.

What is the best way to automate code documentation for onboarding new developers?

Automating code documentation for onboarding is best handled by generating code-aware annotations that describe non-obvious aspects. The Skill reads entire source files to prevent incorrect inferences from names or paths, ensuring accurate context for new developers.

How do you prevent hollow or placeholder comments during automatic code review?

To prevent hollow or placeholder comments during code review, the Skill enforces strict quality gates and includes a calibration protocol for long annotation sessions. This ensures generated comments provide substantive explanations rather than empty filler.

Can I use static analysis to interpret full source files before adding code comments?

Yes, the Skill uses static analysis by reading and interpreting the full source file before annotating. This approach ensures comments accurately reflect the underlying logic and design constraints, avoiding superficial inferences based solely on file names or paths.