code-comments

Write co-located code comments and documentation explaining complex logic and decisions.

Updated Feb 16, 2026
One-click install
npx skills add https://github.com/durancristhian/colore.ar --skill code-comments-durancristhian
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-comments
Source: https://github.com/durancristhian/colore.ar/tree/main/.agents/skills/code-comments
Command: npx skills add https://github.com/durancristhian/colore.ar --skill code-comments-durancristhian

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Writing and maintaining inline comments and co-located documentation is hard when it drifts from the code it describes.

Core Features & Use Cases

  • Co-location keeps explanations together with source files to prevent drift.
  • Why-focused documentation explains decisions, not just what the code does, aiding future readers and AI tools.
  • Applicable across languages (TypeScript, Swift, Python, etc.) to document functions, modules, and architectures.

Quick Start

Add clear, actionable inline comments to a sample function illustrating intent and edge cases.

Frequently Asked Questions about code-comments

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

FAQPage Schema
How do I write inline code comments that explain architectural decisions?

Inline code comments should be co-located with the source they describe to prevent drift. Focus on explaining the why behind architectural decisions and complex logic rather than just stating what the code does.

What is the best way to maintain code documentation without it drifting from the source?

Co-located documentation is the best way to prevent drift, keeping explanations directly within the source files. This ensures that inline comments and architectural notes live alongside the code they describe for future readers.

Can I use co-located comments across different programming languages like TypeScript and Python?

Yes, co-located comments can be applied across languages like TypeScript, Swift, and Python. They conform to language-specific documentation patterns to effectively document functions, modules, and API boundaries.

Why should code comments focus on the why instead of the what?

Code comments should focus on the why because explaining decisions aids future readers and AI copilots in understanding intent. Documenting why a decision was made provides context that reading the code alone cannot convey.

When do I need inline comments for API boundaries and modules?

You need inline comments for API boundaries and modules when complex logic or architectural decisions require explanation. Co-located documentation ensures these explanations remain with the source files to aid future maintenance.

How do I start adding clear inline comments to a sample function?

To start adding inline comments, apply clear and actionable documentation to a sample function that illustrates its intent and edge cases. Ensure the comments are co-located with the code to explain the reasoning behind the logic.