Use when documenting component implementation patterns, internal structure, or hand-off points - enforces NO CODE rule and diagram-first approach for leaf-level C3 documentation
/plugin marketplace add lagz0ne/c3-skill/plugin install c3-skill@c3-skill-marketplaceThis skill inherits all available tools. When active, it can use any tool Claude has access to.
component-template.mddefaults.mdSTOP - Before ANY component-level work, execute:
# Load grandparent Context cat .c3/README.md 2>/dev/null || echo "NO_CONTEXT" # Load parent Container (REQUIRED - components inherit from here) cat .c3/c3-{N}-*/README.md 2>/dev/null || echo "NO_CONTAINER" # Check if component is listed in Container grep "c3-{N}{NN}" .c3/c3-{N}-*/README.md 2>/dev/null || echo "COMPONENT_NOT_IN_CONTAINER" # Load existing component doc (if exists) cat .c3/c3-{N}-*/c3-{N}{NN}-*.md 2>/dev/null || echo "NO_COMPONENT_DOC"
Based on output:
⚠️ DO NOT read ADRs unless user specifically asks:
Why this gate exists: Components INHERIT from Container (and transitively from Context). A component cannot exist without being listed in its parent Container.
Self-check before proceeding:
Component is the leaf layer - it inherits all constraints from above and implements actual behavior.
Position: LEAF (c3-{N}{NN}) | Parent: Container (c3-{N}) | Grandparent: Context (c3-0)
📁 File Location: Component is .c3/c3-{N}-{slug}/c3-{N}{NN}-{slug}.md - INSIDE the container folder.
Announce: "I'm using the c3-component-design skill to explore Component-level impact."
See
references/core-principle.mdfor full details.Upper layer defines WHAT. Lower layer implements HOW.
At Component: Container defines WHAT I am. I define HOW I implement it. Code implements my documentation. I must be listed in Container; my Contract references what Container says about me.
Components are stepping stones for loading context, not code documentation.
Group what you'd want to load together. Split what you'd want to load separately.
A component doc is a unit of context. When someone needs to understand one concern, they load that component. The boundary question is: "Would I want this context loaded together?"
| Question | Decision |
|---|---|
| Would someone working on X need to understand Y? | If NO → separate docs |
| Do X and Y change for the same reason? | If NO → separate docs |
| Is this a technology choice (library/framework)? | → Container tech stack, NOT a component |
| Would loading this together save navigation? | If YES and concerns are related → group |
Too grouped: "To understand TaskForm, I must load Header/Sidebar/TaskCard context" → wasted cognitive load
Too split: "50 tiny component docs to navigate" → navigation overhead
Right balance: Each doc = context you'd naturally want together
| Don't Document As Component | Why | Where It Belongs |
|---|---|---|
| Logger/Logging library | Technology choice, not business concern | Container → Tech Stack table |
| Config parsing library | DI framework detail | Container → Tech Stack + patterns |
| Database driver | Technology choice | Container → Tech Stack |
| HTTP framework (Hono, Express) | Foundation documented at Container | Container → Internal Structure diagram |
| Generic utilities | Not a business concern | No doc needed |
| Document As Component | Why |
|---|---|
| Renderer service | Has unique business logic, clear IN/OUT, specific conventions |
| Cache service | Business rules (TTL, eviction), not just "we use Redis" |
| Queue/backpressure | Business constraints (limits, behavior), not just "semaphore" |
| API flow orchestration | Coordinates multiple concerns, has hand-offs |
| External integration | Mapping, error handling, retry logic |
Both are valid component docs, but they serve different purposes:
| Aspect | Foundation Component | Business Component |
|---|---|---|
| Purpose | What it PROVIDES to consumers | HOW it implements logic |
| Audience | Business components using it | Maintainers of this component |
| Content | Interface + conventions for consumers | Processing + hand-offs + edge cases |
| Examples | Logger, Config, HTTP Framework | Renderer, Cache, Queue, Flows |
Foundation component doc answers:
Foundation component doc does NOT include:
Example - Logger as Foundation:
Pure technology choice = just "we use X library". No unique conventions, no hand-off complexity.
See
defaults.mdfor full include/exclude rules and litmus test.
Quick check: "Is this about HOW this component implements its contract?"
Components are documented visually. The diagram tells the story, text supports it.
Every component explains:
Shows the boundary and hand-offs:
flowchart LR
subgraph IN["Receives"]
I1[From Component A]
I2[From External]
end
subgraph SELF["Owns"]
S1[Processing]
S2[Transformation]
end
subgraph OUT["Provides"]
O1[To Component B]
O2[To Caller]
end
IN --> SELF --> OUT
Use multiple diagrams when needed - just enough to explain:
| Diagram Type | Use When |
|---|---|
| Sequence | Hand-off between multiple components matters |
| State | Component has lifecycle/state transitions |
| Organization | Internal structure is complex (layers, subsystems) |
Foundation vs Business components:
Component docs describe HOW things work, NOT the actual implementation.
| Prohibited | Example | Write Instead |
|---|---|---|
| Implementation code | function handle() {...} | Flow diagram |
| Type definitions | interface User {...} | Table: Field | Type | Purpose |
| Config snippets | { "port": 3000 } | Table of settings |
| SQL/queries | SELECT * FROM... | Access pattern description |
| JSON/YAML schemas | { "eventId": "uuid" } | Table with dot notation |
| Example payloads | Request/response JSON | Table: Field | Type | Example |
From loaded Container, extract:
If component not in Container: STOP. Escalate to c3-container-design.
| Check | If Yes |
|---|---|
| Breaks interface/patterns? | Escalate to c3-container-design |
| Needs new tech? | Escalate to c3-container-design |
| Affects siblings? | Coordinate (may need Container update) |
| Implementation only? | Proceed |
By container archetype:
See component-template.md for complete structure with frontmatter, diagrams, and examples.
Required sections:
Optional sections (include based on component nature):
Keep it lean: Simple component = 5 sections. Complex framework = multiple diagrams + optional sections.
Rule: No code blocks except Mermaid diagrams.
# Check for non-mermaid code blocks
grep -E '```[a-z]+' .c3/c3-{N}-*/c3-{N}{NN}-*.md | grep -v mermaid
# Should return nothing
🚩 Red Flags:
function, class, interface, type keywordsimport, require, export statements.ts, .js, .pyRule: Interface diagram (IN → Processing → OUT) is REQUIRED.
Required sections:
Optional sections (include based on component nature):
🚩 Red Flags:
Before claiming completion, execute:
# Verify component doc exists in correct location
ls .c3/c3-{N}-*/c3-{N}{NN}-*.md
# Verify frontmatter
grep -E "^id:|^type:|^parent:" .c3/c3-{N}-*/c3-{N}{NN}-*.md
# Verify Interface diagram exists with IN/OUT structure
grep -c '```mermaid' .c3/c3-{N}-*/c3-{N}{NN}-*.md # Should be >= 1
grep -E "subgraph.*(IN|OUT)" .c3/c3-{N}-*/c3-{N}{NN}-*.md # Should find IN/OUT
# Verify NO non-mermaid code blocks
non_mermaid=$(grep -E '```[a-z]+' .c3/c3-{N}-*/c3-{N}{NN}-*.md | grep -v mermaid | wc -l)
echo "Non-mermaid code blocks: $non_mermaid (should be 0)"
At the end of component work, output a reading chain for related docs.
Format:
## 📚 To Go Deeper
This component (c3-NNN) is part of:
**Ancestors (understand constraints):**
└─ c3-0 (Context) → c3-N (Container) → c3-NNN (this)
**Sibling components (if dependencies):**
├─ c3-NMM - [why this sibling matters]
└─ c3-NKK - [dependency relationship]
**Parent container (for context):**
└─ c3-N-{slug} - [what contract this component fulfills]
*Reading chain generated from component's dependencies and parent.*
Rules:
Escalate to c3-container-design if:
Escalate to c3-context-design if:
Wrong layer symptoms:
flowchart TD
A[Analyze Change] --> B{Breaks interface<br/>or patterns?}
B -->|yes| C[Escalate to<br/>c3-container-design]
B -->|no| D{Needs new<br/>technology?}
D -->|yes| C
D -->|no| E[Document at<br/>Component level]
| Excuse | Reality |
|---|---|
| "JSON is clearer than a table" | JSON is code. Use table with Field | Type | Example columns. |
| "Just one example payload won't hurt" | Examples become implementation. Describe structure, don't show syntax. |
| "Code is easier to understand" | Code is implementation. Component doc describes patterns, not implements. |
| "Type definitions help readers" | Types are code. Use tables with Field, Type, Purpose columns. |
| "I'll use a simple config snippet" | Config syntax is code. Table: Setting | Default | Purpose. |
| "Mermaid is code too" | Mermaid is architectural diagram (allowed). JSON/YAML is data structure (prohibited). |
| "Interface diagram not needed for simple component" | REQUIRED. Even simple components have IN → OUT boundary. |
| "Every atom/service needs a component doc" | Only if it's a context-loading unit. Logger is a tech choice → Container tech stack. |
| "I should document all the pieces" | Document context units, not implementation units. Ask: "Would I load this together?" |
| "The flow is already in another component" | If flow is documented elsewhere, don't duplicate. Reference it. |
| "I'll group related things together" | Related by what? If they change independently, they're separate context units. |
| "One doc per code file/module" | Code structure ≠ context structure. Group by what you'd want to understand together. |
| Mistake | Fix |
|---|---|
| Including code blocks | Use tables. Field | Type | Purpose for structures. |
| Skipping Interface diagram | REQUIRED. Shows IN → Processing → OUT boundary. |
| Not checking Container first | Component must be listed in parent Container inventory. |
| Text-heavy docs | Lead with diagrams. Text supports visuals, not vice versa. |
| Missing Hand-offs table | REQUIRED. Shows what exchanges with whom. |
| Describing WHAT not HOW | WHAT is Container's job. Component explains HOW. |
| Creating doc for every code unit | Only create for context units. Tech choices → Container. |
| Over-grouping unrelated concerns | If working on X doesn't need Y context, split them. |
| Documenting tech choice as component | Logger, config lib → Container tech stack, not component doc. |
| Grouping by code structure | Group by context need, not by file/folder structure. |
references/core-principle.md - The C3 principledefaults.md - Component layer rulesreferences/container-archetypes.md - How archetype shapes component docsreferences/diagram-patterns.md - Diagram guidanceCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.
Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.