document-patterns

Survey and maintain living documentation of codebase patterns and architectural conventions.

Updated Jan 2, 2024
One-click install
npx skills add https://github.com/Mithrandir21/game-deals-app --skill document-patterns-mithrandir21
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: document-patterns
Source: https://github.com/Mithrandir21/game-deals-app/tree/main/.claude/skills/document-patterns
Command: npx skills add https://github.com/Mithrandir21/game-deals-app --skill document-patterns-mithrandir21

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Engineering teams lose track of their own coding conventions as codebases evolve, forcing engineers and AI agents to re-derive patterns every session. This Skill produces and maintains a living guide to the patterns, conventions, and design idioms actually used in a repository. ## Core Features & Use Cases - Bootstrap survey: Spawns parallel exploration agents across 12 seed categories (architecture, ui-state, compose-correctness, data, concurrency, errors, resources, di, kmp, testing, observability, build) to produce docs/PATTERNS.md plus per-category files. - Incremental updates: Uses per-category git cursors and path-scope globs to re-verify only what changed, classifying entries as KEEP, UPDATE, DECOMMISSION, or FLIP via a triage plan the user approves before any writes. - Structured pattern schema: Each entry records status, coverage, trade-offs, pseudocode application guidance, file-path citations, and optional senior deep dives. - Use Case: An Android team adopting Compose wants new hires to follow existing StateFlow and MVVM conventions; run the skill to generate docs/patterns/ui-state.md documenting the established shapes with real file references. ## Quick Start Ask the assistant to document the coding patterns and architectural conventions used in this codebase.

Frequently Asked Questions about document-patterns

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

FAQPage Schema
How do I document coding patterns in an existing codebase?▼

Run the document-patterns skill, which spawns parallel exploration agents across 12 categories like architecture, ui-state, and testing. It writes docs/PATTERNS.md plus per-category files after you approve a triage plan.

How do I keep architecture documentation up to date as code changes?▼

The skill stores a per-category git SHA cursor and path-scope globs in each file's frontmatter. On update runs it diffs against those cursors, re-verifies only affected categories, and proposes KEEP, UPDATE, DECOMMISSION, or FLIP actions.

Does the pattern documentation skill work with Android and Kotlin projects?▼

Yes, its seed categories cover Android-specific concerns like Compose correctness, StateFlow UI state, Koin/Hilt DI, KMP boundaries, and coroutine concurrency. Entries use Kotlin-flavored pseudocode and file-path citations.

Can I restrict the pattern survey to a single category?▼

Yes, pass --scope <category> to limit the run to one category file, or --deep <category> for a full re-exploration of that category instead of citation sampling. Other categories are left untouched.

Will the skill commit the generated documentation automatically?▼

No, the skill writes files and stops. It never runs git add or git commit, and it never modifies .claude/, CLAUDE.md, or AGENTS.md — output is limited to docs/PATTERNS.md and docs/patterns/.