name: code-process
description: "ALL code tasks on projects MUST use this skill. Creates isolated git worktree, spawns background Claude agent with progress tracking. Use for ANY feature, refactor, bug fix, or code change."
argument-hint: " [-ax|-ae]"
**THE mandatory process for all code implementation tasks.**
This skill manages code implementation in complete isolation:
- Separate git worktree (no conflicts with main)
- GitHub issue for tracking
- Background Claude agent running /apex
- Cron watcher for monitoring
- Automatic Telegram report when finished
π **ALWAYS use this skill when:**
- Implementing a new feature
- Fixing a bug
- Refactoring code
- Making ANY code change that touches more than 1-2 files
β
This is THE code process - not optional, but required.
```bash
/code-process add-dark-mode # Standard thorough mode (-ax)
/code-process fix-login-bug -ae # Economy/fast mode
/code-process refactor-auth -ax # Explicit thorough mode
```
| Parameter | Description |
|-----------|-------------|
| `` | Name for the feature/task (becomes branch name) |
| `-ax` | Examine mode: thorough implementation with review (default) |
| `-ae` | Economy mode: fast implementation, minimal review |
**FIRST ACTION:** Load `steps/step-00-init.md`
This step parses arguments and validates the environment.
| Step | File | Purpose |
|------|------|---------|
| 00 | `steps/step-00-init.md` | Parse args, validate environment |
| 01 | `steps/step-01-worktree.md` | Create worktree + branch + install deps |
| 02 | `steps/step-02-issue.md` | Create GitHub issue |
| 03 | `steps/step-03-launch.md` | Launch Claude agent |
| 04 | `steps/step-04-watcher.md` | Setup cron watcher |
| 05 | `steps/step-05-cleanup.md` | Cleanup after merge |
| Variable | Type | Description |
|----------|------|-------------|
| `{feature_name}` | string | Feature/task name |
| `{mode}` | string | `-ax` (examine) or `-ae` (economy) |
| `{target_repo_path}` | string | Absolute path to target repo |
| `{target_repo}` | string | GitHub repo (owner/name) |
| `{worktree_root}` | string | Central worktree location |
| `{worktree_path}` | string | This feature's worktree path |
| `{branch_name}` | string | Feature branch name |
| `{issue_url}` | string | Created GitHub issue URL |
| `{issue_number}` | string | Issue number |
| `{claude_pid}` | string | Background Claude process ID |
| `{cron_job_id}` | string | Watcher cron job ID |
π NEVER skip any step - follow the workflow exactly
π NEVER create worktree inside project folder (use central location)
π NEVER use sessions_spawn - ALWAYS use `claude -p` CLI
β
ALWAYS capture target_repo BEFORE changing directories
β
ALWAYS use --repo flag for gh commands in worktree
β
ALWAYS report launch details to Telegram
β
ALWAYS load only the current step file (progressive disclosure)
```
ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ
β 00: INIT ββββΊβ 01: WORKTREEββββΊβ 02: ISSUE ββββΊβ 03: LAUNCH ββββΊβ 04: WATCHER β
β Parse args β β Branch+deps β β GitHub β β Claude -p β β Cron job β
ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ
β
βΌ
ββββββββββββββββ
β 05: CLEANUP β
β After merge β
ββββββββββββββββ
```
β
Each step executed completely before moving to next
β
Worktree created in central location, not in project
β
GitHub issue created with tracking checklist
β
Claude agent launched with correct /apex mode
β
Cron watcher monitoring process
β
Telegram notification sent on completion