SuperAPI AI Directory

opusplan

General & other

View repository

Updated 10-15 21:38

About this skill

opusplan

Opus plans, Sonnet implements — A two-step workflow for complex tasks.

Workflow

  1. Phase 1 — Planning (Opus): Claude Opus generates a structured step-by-step implementation plan
  2. Phase 2 — Review: Show the plan to the user and confirm
  3. Phase 3 — Implementation (Sonnet): Execute step by step according to the plan in the current session

Why

  • Opus is strong at deep thinking and comprehensive design
  • Sonnet is strong at quickly executing clear instructions
  • Think deeply once, execute efficiently

Usage

/opusplan "JWT 인증을 Express API에 추가해줘"
/opusplan "AR 매칭 로직 정확도 개선" --plan-only
/opusplan "Slack 알림 에러 처리 강화" --no-confirm
/opusplan "DB 스키마 리팩토링" --context ./docs/schema.md

Arguments

Parse from $ARGUMENTS:

  • Task (required) — The task to plan and implement
  • --no-confirm — Implement immediately without confirmation
  • --plan-only — Generate plan only, do not implement
  • --context PATH — Additional context files/directories

Phase 1: Generate Plan with Opus

Run the planning script. Use --output to write to a temp file (prevents Windows encoding issues):

python "${SKILL_DIR}/scripts/run_opusplan.py" --task "TASK_HERE" --output "/tmp/opusplan_result.json" [--context PATH]

Then read the result file using the Read tool: /tmp/opusplan_result.json

While waiting, show a status message: "Opus가 계획을 수립 중입니다..."

IMPORTANT: Use python (not python3) on Windows.

Phase 2: Present and Confirm Plan

Parse the JSON from the result file and display:


Opus Implementation Plan

Task: [task description]

Overview: [brief summary]

Steps:

  1. [Step 1 title]
    • Details...
  2. [Step 2 title]
    • Details...

Complexity: [simple/moderate/complex] Files: [list if known] Risks: [potential issues]


Then ask for confirmation (unless --no-confirm):

Use AskUserQuestion:

  • question: "Shall we start implementing according to this plan?"
  • header: "Confirm execution"
  • options:
    • label: "Yes, start (Recommended)", description: "Implement immediately according to the plan"
    • label: "Save plan only", description: "Save only the plan file without implementing"
    • label: "Edit plan then execute", description: "Edit the plan and then execute"

If --plan-only, save plan to file and stop.

Phase 3: Implement the Plan

Execute each step sequentially:

  1. Announce: "Step N/Total: [step title]"
  2. Execute using appropriate tools (Read, Edit, Write, Bash, etc.)
  3. Verify step succeeded
  4. Next step

Guidelines:

  • Follow the plan faithfully, adapt if unexpected issues arise
  • If a step fails, explain and fix or skip with explanation
  • After all steps, provide summary

Output Format

Success:

opusplan Complete

Plan by: Claude Opus | Implemented by: Claude Sonnet

Steps completed: N/N

Summary: [what was accomplished]

Files modified:

  • path/to/file1
  • path/to/file2

Partial:

opusplan — Partial Completion

Completed: ✓ Step 1, ✓ Step 2 Not completed: ✗ Step 3 (reason)