1---2name: component-architect3description: Enforces official Claude Code component standards. Use when creating skills, agents, commands, or hooks. Validates existing components and offers remediation. Implements the "one skill = one specialized agent" architecture pattern.4---56# Component Architect78## Core Responsibilities9101. **Pre-Creation Validation**: Check official docs before generating any component112. **Existing Component Audit**: Scan ~/.claude for non-compliant components123. **Remediation Orchestration**: Spawn subagents to fix non-compliant files134. **Architecture Enforcement**: Apply "one skill = one specialized agent" pattern1415## Official Frontmatter Reference1617| Component | Required | Optional |18|-----------|----------|----------|19| SKILL.md | name, description | allowed-tools, model, context, agent, hooks, user-invocable |20| Agent .md | name, description | tools, disallowedTools, model, permissionMode, skills, hooks |21| Command .md | (none) | description, allowed-tools, model, argument-hint |22| plugin.json | name, description | author |23| hooks.json | hooks object | description |2425## Validation Commands2627### Validate All Components28```bash29/component-architect validate30```3132### Validate Specific Type33```bash34/component-architect validate --type skills35/component-architect validate --type agents36/component-architect validate --type hooks37```3839### Apply Architecture Pattern40```bash41/component-architect apply-pattern --skill skill-name42```4344## Architecture Pattern: One Skill = One Agent4546For every active skill:471. Set `context: fork` in SKILL.md482. Create designated agent with matching name pattern493. Configure agent with:50 - Intelligent `model` selection based on task complexity51 - Appropriate `permissionMode` for the workflow52 - Complementary `skills` that enhance the primary skill53 - Scoped `hooks` for lifecycle management54 - Restricted `tools` appropriate to the domain5556### Model Selection Matrix5758| Complexity | Model | Indicators |59|------------|-------|------------|60| High | opus | Architecture, debugging, multi-domain reasoning |61| Medium | sonnet | Implementation, refactoring, moderate analysis |62| Low | haiku | Searches, simple transforms, quick lookups |63| Inherited | inherit | When parent context model is appropriate |6465### Permission Mode Selection Matrix6667| Scenario | Mode | Use When |68|----------|------|----------|69| Complex multi-step | plan | High complexity requiring human feedback before implementation |70| Edge case handling | acceptEdits | Potential edge cases need user confirmation on edits |71| Routine execution | bypassPermissions | Clear requirements, preplanned, or promise completion |72| Standard workflow | default | Normal permission checking with prompts |73| Deny risky ops | dontAsk | Auto-deny prompts (explicitly allowed tools still work) |7475## Remediation Workflow76771. Scan component directories for non-compliant files782. Generate remediation plan per file793. Spawn parallel subagents for batch updates804. Verify all changes post-remediation8182## Integration References8384- [scripts/validate-component.sh](scripts/validate-component.sh) - PreToolUse validation85- [scripts/log-component.sh](scripts/log-component.sh) - PostToolUse logging86- [scripts/audit-components.py](scripts/audit-components.py) - Full audit script87- [references/official-spec.md](references/official-spec.md) - Cached official docs