| name | codebase-standards |
| description | Auto-discover, index, and inject coding standards from any codebase. Use when user asks to "discover standards", "extract conventions", "document patterns", or "shape a spec" for a project. |
| description_zh | ่ชๅจๅ็ฐๅ็ดขๅผไปฃ็ ๅบ็็ผ็ ่ง่๏ผๆๅ็บฆๅฎใ่ฎฐๅฝๆจกๅผใ็ๆ่ง่ๆๆกฃใ |
Codebase Standards โ Skill
Adapted from Agent OS by Brian Casel.
Auto-discover, index, and inject coding standards from any codebase. Plan products and shape feature specs with standards-aware context.
Available Commands
| Command | Trigger | Reference |
|---|
| Discover Standards | "discover standards", "extract conventions", "document patterns" | references/discover-standards.md |
| Inject Standards | "inject standards", "load standards", "apply conventions" | references/inject-standards.md |
| Index Standards | "rebuild index", "update standards index" | references/index-standards.md |
| Plan Product | "plan product", "define product", "product mission" | references/plan-product.md |
| Shape Spec | "shape spec", "plan feature", "spec out" | references/shape-spec.md |
How It Works
- Read the relevant reference file for the command being invoked
- Follow the reference instructions step by step
- Interact conversationally โ ask the user questions directly (no special tools needed)
- Write files to the project's standards/product/specs directories
Workspace Conventions
All files are stored relative to the target project root (not the agent workspace):
{project}/
โโโ agent-os/
โ โโโ standards/ # Discovered coding standards
โ โ โโโ index.yml # Standards index for quick matching
โ โ โโโ api/ # Standards by area
โ โ โโโ database/
โ โ โโโ frontend/
โ โ โโโ global/
โ โโโ product/ # Product documentation
โ โ โโโ mission.md
โ โ โโโ roadmap.md
โ โ โโโ tech-stack.md
โ โโโ specs/ # Feature specifications
โ โโโ {YYYY-MM-DD-HHMM-feature-slug}/
โ โโโ plan.md
โ โโโ shape.md
โ โโโ standards.md
โ โโโ references.md
If the project root is the current workspace ($HOME/clawd), files go in ./agent-os/. If working on a different project, ask the user for the project path first.
OpenClaw Integration
- Subagent for large codebases: If the codebase has 100+ files to scan, spawn a subagent for the discovery phase to keep the main session clean.
- Memory: After discovering standards for a project, consider noting key conventions in daily notes for cross-session awareness.
- Context Isolation: When analyzing multiple files for
discover-standards, read files via subagent if the total content exceeds ~50KB.
Adaptation Notes
- Original Agent OS uses
AskUserQuestion tool โ We ask the user directly in conversation
- Original uses Claude Code slash commands โ We trigger via natural language
- Original has profile-based config with inheritance โ Simplified to per-project
agent-os/ directory
- All original command logic is preserved in the reference files