No slash command · from code-foundations
Generates or updates docs/code-standards.md by scanning the codebase for actual conventions, producing an example-rich standards file optimized for LLM consumers.
Ships in code-foundations. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Generate or update docs/code-standards.md — a project-specific conventions file optimized for LLM consumers.
LLMs default to training-data averages. Without project-specific guidance, they produce generic code that passes tests but fails review. This skill extracts the patterns that matter: concrete examples, forbidden patterns, and exemplar file pointers.
Check for existing standards file:
1. Look for docs/code-standards.md (or legacy docs/code-patterns.md)
2. If legacy exists: migrate path (rename to docs/code-standards.md)
If file exists, read the <!-- base-commit: ... --> header and check staleness:
git rev-list <base-commit>..HEAD --count
| Commits since | Action |
|---|---|
| 0 | Skip — file is current, return it as-is |
| 1–20 | Update — spot-check recent diffs (git diff <base-commit>..HEAD), update changed sections only |
| 21+ | Generate — full re-scan, regenerate entire file |
If file exists but has no <!-- base-commit: ... --> header, the sha is unknown, or the repo is not a git repo: treat as Generate.
If file missing, proceed to full Generate.
Search the codebase for conventions. Adapt searches to what the project actually contains — not every section applies to every codebase.
Search strategy per section:
| Section | What to grep/glob for |
|---|---|
| Forbidden Patterns | Linter configs, eslint-disable comments, TODO/HACK comments |
| Code Examples | Covered by other searches — select best do/don't pairs found |
| Error Handling | try/catch, Result types, error classes, .catch() |
| Imports & Dependencies | Import statements, barrel files, dependency direction |
| Testing Patterns | Test files, helpers, fixtures, mocks |
| Naming | Variable/function/file naming across 5+ files |
| File Organization | Directory structure, co-location patterns |
| Technology Decisions | Package files, config files, framework imports |
| Exemplar Files | Well-structured files that demonstrate multiple conventions |
Scan breadth over depth — sample across the codebase rather than exhaustively cataloging one directory.
For Update mode: Only search sections where recent diffs show changes to relevant patterns.
Read the section templates before writing: Read(${CLAUDE_PLUGIN_ROOT}/skills/code-standards/references/section-templates.md)
File format:
<!-- base-commit: [HEAD sha] -->
<!-- generated: [YYYY-MM-DD] -->
# Code Standards
[sections per templates]
Core rules:
Write to docs/code-standards.md. Do NOT commit the file.
After writing, self-check:
Nine sections. Contrastive sections (DO/DON'T) come first — they resist confirmation bias and anchor behavior more reliably than descriptive sections (2603.18740). Not all sections apply to every project — skip where you find no meaningful conventions.
See the templates file for detailed format per section.
What SKILL.md sets; muted values are Claude Code's defaults
20 skills in this plugin
/aposd-designing-deep-modulesGuides module and API design using APOSD principles: generates multiple design alternatives, compares them on information hiding and interface depth, and produces a documented design decision. For creating new module/API design; not for assessing existing designs (use aposd-reviewing-module-design) or routine-level design (use cc-routine-and-class-design)./aposd-reviewing-module-designAssesses existing module and interface design for complexity symptoms: information leakage, shallow interfaces, pass-through layers, and unknown unknowns. Produces a structured assessment — not transformations (use aposd-simplifying-complexity to edit) and not new-design generation (use aposd-designing-deep-modules)./Generated from the plugin's indexed repository (ryanthedev/code-foundations) — no native marketplace selected
npx claudepluginhub p/ryanthedev-code-foundationsOther plugins' skills for the same job