Back to list
cl-victor1

auto-doc

by cl-victor1

best Claude Code skills

3🍴 0📅 Jan 24, 2026

SKILL.md


name: auto-doc description: Automatic codebase documentation maintenance system. Use this skill ALWAYS when making ANY code changes including creating, modifying, deleting, or moving files. Enforces three-tier documentation (root ARCHITECTURE.md, folder INDEX.md, file header comments) that must be updated after every code change to keep documentation synchronized with codebase.

Auto Doc

Automatic documentation maintenance system with three-tier structure. MUST be applied after every code change.

Three-Tier Documentation Structure

Tier 1: Root ARCHITECTURE.md

Location: Project root directory.

Content requirements:

  • High-level architecture overview (max 10 lines)
  • Links to all subdirectory INDEX.md files
  • Update trigger: Any feature, architecture, or structural change

Header declaration:

<!-- AUTO-DOC: Update me when project structure or architecture changes -->

Tier 2: Folder INDEX.md

Location: Every folder containing code files.

Format (max 3 lines for overview):

<!-- AUTO-DOC: Update me when files in this folder change -->

# [FolderName]

[1-3 line architecture description]

## Files

| File | Role | Function |
|------|------|----------|
| example.ts | Core | Main entry point |

Tier 3: File Header Comments

Location: Top of every code file (first 3-5 lines after imports).

Format:

/**
 * @input Dependencies this file requires from external sources
 * @output What this file provides/exports to other parts of the system
 * @position Role and importance in the local architecture
 * @auto-doc Update header and folder INDEX.md when this file changes
 */

Language-specific formats:

TypeScript/JavaScript:

/**
 * @input { UserService } from './services', { config } from '@/config'
 * @output { AuthProvider, useAuth } React context and hook for authentication
 * @position Core auth layer, wraps entire app
 * @auto-doc Update header and folder INDEX.md when this file changes
 */

Python:

"""
@input: requests, json from stdlib; Config from ./config
@output: APIClient class for external service calls
@position: Network layer abstraction
@auto-doc: Update header and folder INDEX.md when this file changes
"""

Go:

// @input: net/http, encoding/json; config from ./internal/config
// @output: Handler struct, NewHandler(), ServeHTTP()
// @position: HTTP request handler for /api/users
// @auto-doc: Update header and folder INDEX.md when this file changes

Mandatory Update Workflow

After ANY code change, execute in order:

  1. Update file header - Reflect new input/output/position if changed
  2. Update folder INDEX.md - Add/remove/modify file entry
  3. Update root ARCHITECTURE.md - Only if structural change

Quick Reference

Change TypeUpdate HeaderUpdate INDEX.mdUpdate ARCHITECTURE.md
Edit file logicIf I/O changesIf role changesNo
Create fileYes (new)Yes (add entry)If new feature
Delete fileN/AYes (remove)If structural
Move fileYes (new pos)Both foldersIf structural
Rename fileYesYesIf structural

Example: Creating New File

When creating lib/utils/format.ts:

  1. Add header to new file:
/**
 * @input { date-fns } for date formatting
 * @output { formatDate, formatCurrency } utility functions
 * @position Shared formatting utilities
 * @auto-doc Update header and folder INDEX.md when this file changes
 */
  1. Update or create lib/utils/INDEX.md:
<!-- AUTO-DOC: Update me when files in this folder change -->

# Utils

Shared utility functions for formatting, validation, and helpers.

## Files

| File | Role | Function |
|------|------|----------|
| format.ts | Utility | Date and currency formatting |
  1. Update ARCHITECTURE.md if lib/utils/ is new.

Score

Total Score

40/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon