Skip to content
Back to skills

Document

ASecurity

apply documentation philosophy — explain why, not what. use for jsdocs, READMEs, inline comments.

  • 64 stars
  • 0 votes
  • 3 copies
  • 55 views
  • Added February 10, 2026
developmenttypescriptgoexpressapidocumentation

Works with

  • api

Security analysis

A100/100

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

Scanned February 12, 2026

npx -y skills add bdsqqq/dots --skill document --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Document?

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

Security grade badge for Document
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/bdsqqq-document/badge)](https://www.skillsdirectory.com/skills/bdsqqq-document)

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: document
description: apply documentation philosophy — explain why, not what. use for jsdocs, READMEs, inline comments.
---

# document

apply documentation philosophy: explain why, not what.

## when to use

- writing jsdocs for components or functions
- updating README or project docs
- adding inline comments during implementation
- reviewing existing documentation for cleanup

## workflow

1. check if documentation is needed — if it describes obvious behavior, skip it
2. identify the non-obvious why: design constraints, behavioral consequences, inheritance warnings
3. write terse, lowercase prose
4. delete anything that merely restates the code

## quick reference: why over what

**delete this:**
```typescript
/** context provider that wraps children in a DisclosureProvider. */
```

**keep this:**
```typescript
/**
 * blocks CompositeContext so nested Lists create isolated focus loops.
 * essential for "Simple API" goal — our List is "greedy" and would
 * otherwise join parent's arrow-key navigation.
 */
```

## what to document

- design rationale and constraints
- context shadowing / inheritance warnings
- non-obvious behavioral consequences
- internal decisions affecting correctness

## what to delete

- obvious behavior ("renders a button")
- what the function name already says
- what types already express

## jsdoc structure

```typescript
/**
 * one-line description of purpose or behavior.
 *
 * additional context if design rationale is complex (keep brief).
 *
 * @prop propName - what it does
 * @example
 * ```tsx
 * <Component>content</Component>
 * ```
 */
```

## maintainer notes

preserve `@bdsqqq notes` or similar when they explain non-obvious decisions:

```typescript
/**
 * @bdsqqq notes: alpha colors avoided for strokes due to compounding
 * overlap issues at intersection points.
 */
```

## colocate context with code

jsdocs are source of truth. upon finishing a task, colocate valuable context as jsdocs — only notes that explain non-obvious why. delete everything else.

## tone

- lowercase only (ALL CAPS for emphasis)
- terse, no unsupported claims
- specific over general; describe, don't emote

Files in this skill

  • SKILL.md2.1 KB
  • references/05-documentation-philosophy.md3.3 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.

Comments

Loading comments…