Variant Feature
Guides addition of new features (agents, skills, scripts, docs) to an existing variant template.
When to Use
- A variant needs a new domain-specific agent
- A new skill should be added to a variant
- Variant-specific scripts need to be created
- Documentation structure needs extension
Script
Script: scripts/variant-feature.ts
Usage: bun scripts/variant-feature.ts
This is a guided CLI that prompts for:
- Target variant name
- Feature type (agent, skill, script, doc)
- Feature name and description
What It Generates
| Feature Type | Generated Stubs |
|-------------|----------------|
| Agent | agents/<name>.md with frontmatter skeleton, Role, Responsibilities, Collaboration sections |
| Skill | .claude/skills/<name>/SKILL.md with frontmatter, description, triggers |
| Script | scripts/co-<variant>/<name>.ts with version header and bun imports |
| Doc | docs/<name>.md with heading skeleton |
Step-by-Step Procedure
- Identify target variant:
ls templates/co-*/variant.json - Run CLI:
bun scripts/variant-feature.ts - Follow guided prompts: Select variant, feature type, name, description
- Customize generated stubs: Fill in agent responsibilities, skill triggers, script logic
- Update variant.json: Add new agent/skill/script to manifest
- Validate:
bun scripts/validate-templates.ts - Update platform parity: If adding a skill, ensure
.gemini/skills/mirrors.claude/skills/
After Adding Features
- Update
variant.jsonagents[],skills[], orscript_manifest.local[] - Run validation:
bun scripts/validate-templates.ts - For skills: verify
.claude/skills/and.gemini/skills/parity - For agents: update
AGENTS.mdroster table if the variant has one