apex
Apex
Objective
Execute systematic implementation workflows using the APEX methodology. This skill uses progressive step loading to minimize context usage and supports saving outputs for review and resumption.
Quick Start
Basic usage:
/apex add authentication middleware
Recommended workflow (autonomous with save):
/apex -a -s implement user registration
Flags:
-a(auto): Skip confirmations-s(save): Save outputs to.claude/output/apex/-e(economy): No subagents, save tokens
See Parameters below for the complete flag list.
Parameters
Flags
Enable flags (turn ON):
| Short | Long | Description |
|---|---|---|
-a |
--auto |
Autonomous mode: skip confirmations, auto-approve plans |
-s |
--save |
Save mode: output each step to .claude/output/apex/ |
-e |
--economy |
Economy mode: no subagents, save tokens (for limited plans) |
-r |
--resume |
Resume mode: continue from a previous task |
-b |
--branch |
Branch mode: verify not on main, create branch if needed |
-i |
--interactive |
Interactive mode: configure flags via AskUserQuestion |
-f |
--from |
Prior context: GitHub issue (#N, URL), spec, brainstorm report, or any file as foundational input for analysis. Non-Markdown sources (PDF, DOCX, PPTX, audio, YouTube) → pre-process with /markitdown -s and pass the saved path |
Disable flags (turn OFF):
| Short | Long | Description |
|---|---|---|
-A |
--no-auto |
Disable auto mode |
-S |
--no-save |
Disable save mode |
-E |
--no-economy |
Disable economy mode |
-B |
--no-branch |
Disable branch mode |
Examples
# Basic
/apex add auth middleware
# Autonomous (skip confirmations)
/apex -a add auth middleware
# Save outputs
/apex -a -s add auth middleware
# Resume previous task
/apex -r 01-auth-middleware
/apex -r 01 # Partial match
# From a GitHub issue
/apex -f "#42" implement what issue 42 describes
# From prior analysis (spec, brainstorm report, RFC)
/apex -f .claude/output/spec/auth-system/spec.md implement WS-1
/apex -f .claude/output/brainstorm/neon-setup/brainstorm.md implement Neon database
# Economy mode (save tokens)
/apex -e add auth middleware
# Interactive flag config
/apex -i add auth middleware
# Disable flags (uppercase)
/apex -A add auth middleware # Disable auto
Parsing Rules
- Defaults loaded from
steps/step-00-init.md## Default Configurationsection - Command-line flags override defaults (enable with lowercase
-x, disable with uppercase-X) - Flags removed from input, remainder becomes
{task_description} - Task ID generated as
NN-kebab-case-description
For the detailed parsing algorithm, see steps/step-00-init.md.
Output Structure
The output path is .claude/output/apex/{task-id}/, where {task-id} is NN-feature-name (e.g., 01-add-auth). The numbered prefix is intentional — it preserves task ordering for the -r resume lookup. This is a deliberate divergence from the repo-wide .claude/output/{skill}/{slug}/ convention; resume needs ordering, plain slugs don't carry it.
When {save_mode} = true:
All outputs saved to PROJECT directory (where Claude Code is running):
.claude/output/apex/{task-id}/
├── 00-context.md # Params, user request, timestamp
├── 01-analyze.md # Analysis findings
├── 02-plan.md # Implementation plan
├── 03-execute.md # Execution log
└── 04-examine.md # Examination results
00-context.md structure — see templates/00-context.md for the canonical template (populated by scripts/setup-templates.sh).
Resume Workflow
Resume mode (-r {task-id}):
Resolve the partial ID deterministically, then restore state:
bash ${CLAUDE_SKILL_DIR}/scripts/resume_lookup.sh {partial_id}
- Exit 0 → absolute task path on stdout; continue.
- Exit 1 → ambiguous; candidates print on stderr. Show them to the user, ask which one.
- Exit 2 → no match; halt with a clear error.
Step-00 then restores state from {task_dir}/00-context.md and continues from the next pending step.
For implementation details, see steps/step-00-init.md.
Workflow
Standard flow:
- Parse flags and task description
- If
-r: Execute resume workflow - If
-s: Create output folder and00-context.md - Load
step-01-analyze.md→ gather context - Load
step-02-plan.md→ create strategy - Load
step-03-execute.md→ implement - Load
step-04-examine.md→ verify and complete
State Variables
Persist throughout all steps:
| Variable | Type | Description |
|---|---|---|
{task_description} |
string | What to implement (flags removed) |
{feature_name} |
string | Kebab-case name without number (e.g., add-auth-middleware) |
{task_id} |
string | Full identifier with number (e.g., 01-add-auth-middleware) |
{acceptance_criteria} |
list | Success criteria (inferred or explicit) |
{auto_mode} |
boolean | Skip confirmations, use recommended options |
{save_mode} |
boolean | Save outputs to .claude/output/apex/ |
{economy_mode} |
boolean | No subagents, direct tool usage only |
{branch_mode} |
boolean | Verify not on main, create branch if needed |
{interactive_mode} |
boolean | Configure flags interactively |
{from_file} |
string | Path to prior context file (if -f provided) |
{resume_task} |
string | Task ID to resume (if -r provided) |
{output_dir} |
string | Full path to output directory |
{branch_name} |
string | Created branch name (if branch_mode) |
Entry Point
FIRST ACTION: Load steps/step-00-init.md.
Step 00 handles:
- Flag parsing (
-a,-s,-e,-b,-i,-f,-r) - Resume mode detection and task lookup
- Output folder creation (if
save_mode) 00-context.mdcreation (ifsave_mode)- State variable initialization
After initialization, step-00 loads step-01-analyze.md.
Step Files
Progressive loading — only load the current step:
| Step | File | Purpose |
|---|---|---|
| 00 | steps/step-00-init.md |
Parse flags, create output folder, initialize state |
| 01 | steps/step-01-analyze.md |
Smart context gathering with 1-10 parallel agents based on complexity |
| 02 | steps/step-02-plan.md |
File-by-file implementation strategy |
| 03 | steps/step-03-execute.md |
Todo-driven implementation |
| 04 | steps/step-04-examine.md |
Self-check, examination, and workflow completion |
Execution Rules
- Load one step at a time — only load the current step file
- ULTRA THINK before major decisions
- Persist state variables across all steps
- Follow next_step directive at end of each step
- Save outputs if
{save_mode}= true (append to step file) - Use parallel agents for independent exploration tasks
Smart Agent Strategy in Analyze Phase
The analyze phase (step-01) uses adaptive agent launching (unless economy_mode):
Available subagent types (built-in):
Explore— find existing patterns, files, utilities (read-only, fast)general-purpose— research library docs, web search, approaches, gotchas
Launch 0-10 agents based on task complexity:
| Complexity | Agents | When |
|---|---|---|
| Trivial / pre-contextual | 0 | Target already known, or -f context covers it — use direct tools |
| Simple | 1-2 | Bug fix, small tweak |
| Medium | 2-4 | New feature in familiar stack |
| Complex | 4-7 | Unfamiliar libraries, integrations |
| Major | 6-10 | Multiple systems, many unknowns |
BE SMART: Analyze what you actually need before launching. Don't spawn a subagent for work you can complete directly in a single response. Spawn multiple subagents in the same turn when fanning out across items or reading multiple files.
Save Output Pattern
When {save_mode} = true:
Step-00 runs scripts/setup-templates.sh to initialize all output files from the templates/ directory.
Each step then:
- Run
scripts/update-progress.sh {task_id} {step_num} {step_name} "in_progress" - Append findings/outputs to the pre-created step file
- Run
scripts/update-progress.sh {task_id} {step_num} {step_name} "complete"
scripts/validate_state.sh is shipped as a manual debugging utility — invoke it on demand to verify a task's state is consistent (e.g., when a resume looks suspicious). It is not part of the per-step workflow.
Template system benefits:
- Reduces token usage by ~75% (1,350 tokens saved per workflow)
- Templates in
templates/directory (not inline in steps) - Scripts handle progress tracking automatically
- See
templates/README.mdfor details
Success Criteria
- Each step loaded progressively
- All examination checks passing
- Outputs saved if
{save_mode}enabled - Clear completion summary provided
More from coroboros/agent-skills
markitdown
Convert any document to Markdown with Microsoft's `markitdown` CLI — PDF, Word, Excel, PowerPoint, HTML, CSV, JSON, XML, ZIP, EPub, images (OCR/EXIF), audio (transcription), and YouTube URLs. Use whenever the user wants to extract text from a binary document, transcribe audio, OCR an image, scrape a YouTube transcript, or pre-process a file for an LLM context window — even when they just say "convert this pdf", "what's in this docx", "transcribe this mp3", or "get the text out of this".
14design-system
Govern the DESIGN.md — Google's open standard for design tokens (YAML frontmatter + eight prose sections). Auto-activates during UI edits to enforce token-only sourcing for colors, typography, spacing, and corner radius. Also exposes six CLI-backed subcommands — audit (lint + fix proposals), diff (regression check), export (Tailwind / DTCG), spec (canonical spec emission), migrate (port from legacy Stitch format), init (minimal scaffold). When a UI/UX change is requested, DESIGN.md is updated first, audited, then code propagates.
3award-design
Build award-winning websites (Awwwards SOTD 7.5+, FWA, CSSDA). Recommends the best design archetype for the brief, calibrates atmosphere, and produces a complete DESIGN.md. Applies anti-AI-slop rules and targets real judging criteria. Use when building landing pages, portfolios, product sites, or any web interface that needs to look exceptional — not for dashboards or internal tools.
3spec
Transform ideas into structured execution specs with prioritized workstreams, complexity ratings, dependencies, and acceptance criteria. Use this whenever the user needs to decompose work before building — even when they don't explicitly say "spec" (e.g. "break this down", "plan this out", "create issues for", "what are the steps"). The bridge between thinking and building.
1oneshot
Single-pass feature implementation using Explore → Code → Test. Ships focused changes at maximum speed, with a built-in circuit breaker that stops and recommends `/apex` or `/spec` when the task turns out more complex than it looked. Use this whenever the user wants a quick win on a single, focused task — even when they don't say "oneshot" (e.g. "just", "quickly", "small change", "#42", or a GitHub issue URL for a small fix).
1agent-creator
Create, configure, and orchestrate Claude Code subagents — specialized Claude instances with focused roles and limited tool access. Covers YAML frontmatter (name, description, tools, model, permissions, hooks, MCP servers), system prompt design, tool restriction patterns, background execution, and multi-agent orchestration. Use whenever the user mentions subagents, delegation, specialists, agent configs, `.claude/agents/`, the `/agents` command, or wants to parallelize work — even when they just say "background agent" or "delegate this".
1