c3
Original:🇺🇸 English
Translated
1 scripts
C3 architecture toolkit. Manages architecture docs in .c3/ directory. Operations: onboard, query, audit, change, ref, sweep. Triggers: /c3, architecture questions when .c3/ exists, C3 docs management. Classifies intent from request, loads operation-specific reference, executes. <example> user: "adopt C3 for this project" assistant: "Using c3 to onboard this project." </example> <example> user: "where is auth in the C3 docs?" assistant: "Using c3 to query the architecture." </example> <example> user: "add a new API component" assistant: "Using c3 to orchestrate the change." </example>
3installs
Sourcelagz0ne/c3-skill
Added on
NPX Install
npx skill4agent add lagz0ne/c3-skill c3Tags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →C3
Single skill for all C3 architecture operations.
CLI
Binary: (relative to this skill's directory)
bin/c3x.shAll CLI calls:
bash
bash <skill-dir>/bin/c3x.sh <command> [args]| Command | Purpose |
|---|---|
| Scaffold |
| Topology: entities, relationships, frontmatter ( |
| Structural validation: broken links, orphans, duplicates ( |
| Create entity with auto-numbering + wiring ( |
Types for : , , ,
addcontainercomponentrefadrIntent Classification
| Keywords | Op | Reference |
|---|---|---|
| adopt, init, scaffold, bootstrap, onboard, "create .c3", "set up architecture" | onboard | |
| where, explain, how, diagram, trace, "show me", "what is", "list components" | query | |
| audit, validate, "check docs", drift, "docs up to date", "verify docs" | audit | |
| add, change, fix, implement, refactor, remove, migrate, provision, design | change | |
| pattern, convention, "create ref", "update ref", "list refs", standardize | ref | |
| impact, "what breaks", assess, sweep, "is this safe" | sweep | |
Dispatch
- Analyze request -> classify op from table above
- Ambiguous -> with 6 ops as options
AskUserQuestion - Load (Read file relative to this skill's dir)
references/<op>.md - Execute per reference instructions
- Use Task tool for parallelism when reasoning suggests it helps (anonymous subagents)
Precondition
Run before every operation (except onboard):
bash
bash <skill-dir>/bin/c3x.sh list --json- Fails or empty -> route to onboard
- Exception: onboard does NOT need existing
.c3/
ASSUMPTION_MODE
If is denied even once -> set for the rest of this session.
AskUserQuestionASSUMPTION_MODE = trueWhen is true:
ASSUMPTION_MODE- NEVER call again
AskUserQuestion - High-impact decisions: state assumption clearly, mark
[ASSUMED] - Low-impact decisions: auto-proceed silently
- Every instruction that says "Use AskUserQuestion" becomes "make your best assumption and mark [ASSUMED]"
Shared Rules
Complexity-First Documentation:
| Level | Signals | Doc Depth |
|---|---|---|
| trivial | Single purpose, stateless | Purpose + deps only |
| simple | Few concerns, basic state | + key components |
| moderate | Multiple concerns, caching | + discovered aspects |
| complex | Orchestration, security-critical | Full aspect discovery |
| critical | Distributed txns, compliance | Comprehensive + rationale |
Red Flags — STOP Immediately:
- Editing code without ADR -> create ADR first
- Guessing user intent -> (skip if ASSUMPTION_MODE)
AskUserQuestion - Jumping to component -> start from Context down
- Updating docs without code check -> verify code first
Component Categories:
- Foundation (01-09): infrastructure, required
## Code References - Feature (10+): business logic, required
## Code References - Ref: conventions only, NO
## Code References
Layer Navigation: Always top-down: Context -> Container -> Component
File Structure:
.c3/
├── README.md # Context (c3-0)
├── adr/ # Architecture Decision Records
│ └── adr-YYYYMMDD-slug.md
├── refs/ # Cross-cutting patterns
│ └── ref-slug.md
└── c3-N-name/ # Container
├── README.md # Container overview
└── c3-NNN-component.md # Component docOperations
onboard
- Pre: No or user wants re-onboard
.c3/ - Flow: -> Socratic discovery (3 stages: Inventory -> Details -> Finalize) -> gate each stage
c3x init - Post: Inject CLAUDE.md routing, show capabilities overview
- Details: Load
references/onboard.md
query
- Pre: exists (precondition check)
.c3/ - Flow: -> match entity -> Read doc -> explore code
c3x list --json - Subagents: parallel container exploration when multi-scope
- Details: Load
references/query.md
audit
- Pre: exists (precondition check)
.c3/ - Flow: (structural) ->
c3x check(inventory) -> Phases 2-10 (semantic via Read+Grep+reasoning)c3x list --json - Output: Table of phases with PASS/WARN/FAIL + action items
- Details: Load
references/audit.md
change
- Pre: exists (precondition check)
.c3/ - Flow: -> impact analysis -> ADR (
c3x list --json) -> user approves -> execute (c3x add adr <slug>for scaffolding) -> audit (c3x add component/ref+ verify)c3x check - Provision gate: after ADR approval, ask implement now or design only
- Details: Load
references/change.md
ref
- Pre: exists (precondition check)
.c3/ - Modes: Add (-> fill -> discover usage -> update citings), Update (find citings -> check compliance -> surface impact), List (
c3x add ref <slug>-> filter type=ref), Usage (find citings from JSON)c3x list --json - Details: Load
references/ref.md
sweep
- Pre: exists (precondition check)
.c3/ - Flow: -> identify affected entities -> parallel per-entity assessment via subagents -> synthesize constraints, risks, recommendations
c3x list --json - Advisory only — route to change for implementation
- Details: Load
references/sweep.md
CLAUDE.md Injection (onboard)
After onboard completes, inject into project CLAUDE.md:
markdown
# Architecture
This project uses C3 docs in `.c3/`.
For architecture questions, changes, audits -> `/c3`.
Operations: query, audit, change, ref, sweep.Capabilities Reveal (onboard)
Show after onboard:
## Your C3 toolkit is ready
| Command | What it does |
|---------|-------------|
| `/c3` query | Ask about architecture |
| `/c3` audit | Validate docs |
| `/c3` change | Modify architecture |
| `/c3` ref | Manage patterns |
| `/c3` sweep | Impact assessment |
Just say `/c3` + what you want.