Skip to content
Back to skills

Inline Docs

ASecurity

Document code using efficient inline comments. Use whenever writing, editing, or reviewing code or if the user mentions documentation.

  • 2 stars
  • 0 votes
  • 0 copies
  • 7 views
  • Added September 6, 2026
ai-agentsjavascripttypescriptgojavadocumentation

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned September 6, 2026

npx -y skills add ethan-ngai/skills --skill inline-docs --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Inline Docs?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Inline Docs
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ethan-ngai-inline-docs/badge)](https://www.skillsdirectory.com/skills/ethan-ngai-inline-docs)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: inline-docs
description: Document code using efficient inline comments. Use whenever writing, editing, or reviewing code or if the user mentions documentation.
argument-hint: What code do you want to document?
license: MIT
---

# Inline Documentation

Documentation remedies ambiguity and supplies missing context. Good code is *self-documenting* — it shows the *what*, so a comment must *earn* its place by adding the *why*. Keep docs lean.

## What to document

- Comment where the code *surprises*: intent, constraints, workarounds, logic that looks wrong but works. Add the *why* when it spares the reader a wrong guess; let plain code speak for itself.
- Reserve inline comments for genuinely complicated logic; short phrases.
- Mark unfinished work with TODO/FIXME.
- Keep a comment beside its code and revise both in one edit; comments *rot* as code drifts.
- Write for the *future reader*, who knows the code but not your session or the surrounding stack: keep comments *timeless* and *self-contained*.

## How to write it

- Use block doc comments (JavaDoc, JSDoc, docstrings) for the standard, dev-readable format.
- Write like a senior developer: *terse* fragments, human names, specific over generic.
- Every comment is *signal*: cut the noise (keeps, so, because, stays), and prefer commas and semicolons to full sentences.
- Shun *ceremony*: structure speaks for itself, so section headers like `// -------- Variables --------` only bloat tokens.
- Use typeable ASCII only; it keeps docs easy to edit.

## Language References

Load in the specific documentation standard(s) for the current project:

| Language | Reference |
| --- | --- |
| JavaScript/TypeScript | [JSDoc](jsdoc.md) |

Files in this skill

  • README.md319 B
  • SKILL.md1.7 KB
  • jsdoc.md2.8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.