| name | sg-quick |
| description | Use this when a small ad-hoc task needs to be done without a full phase plan — runs gsd-planner then superpowers:executing-plans with atomic commits and STATE.md tracking. |
| argument-hint | <task description> [--discuss] [--research] [--validate] [--full] |
Detect the user's input language and respond in that language throughout this skill's output.
- Korean input → respond in Korean
- English input → respond in English
- Mixed input → match the dominant language
Execute a small, ad-hoc task using a gsd-planner → Superpowers automatic execution pipeline. Unlike the simple Skill delegation of previous versions, this command runs the full pipeline:
- Parse flags from $ARGUMENTS
- Initialize a quick task via gsd-sdk (quick_id, slug, task_dir)
- Spawn a gsd-planner Agent to write PLAN.md into task_dir
- Hand off the PLAN.md content to superpowers:executing-plans for implementation
- Update STATE.md Quick Tasks Completed and commit artifacts
Flags:
- (no flags) — Plan + execute immediately. Use when you know exactly what to do.
- --discuss — Lightweight discussion phase to clarify gray areas before planning.
- --research — Spawn a research agent to investigate approaches before planning.
- --validate — Enable plan-checking and post-execution verification.
- --full — All of the above.
<execution_context>
Self-contained. Combines gsd-sdk initialization, gsd-planner Agent, and superpowers:executing-plans Skill directly — no external workflow files imported.
</execution_context>
1. **Parse arguments.** Extract DESCRIPTION and flags from `$ARGUMENTS`:
```bash
ARGS="$ARGUMENTS"
DISCUSS_FLAG=""
RESEARCH_FLAG=""
VALIDATE_FLAG=""
FULL_FLAG=""
IFS=' ' read -ra ARGS_ARRAY <<< "$ARGS"
for arg in "${ARGS_ARRAY[@]}"; do
case "$arg" in
--discuss) DISCUSS_FLAG="--discuss" ;;
--research) RESEARCH_FLAG="--research" ;;
--validate) VALIDATE_FLAG="--validate" ;;
--full) FULL_FLAG="--full" ;;
esac
done
# Strip flags — remaining text is the task description
DESCRIPTION=$(node -e "
const a = process.argv[2] || '';
process.stdout.write(a.replace(/--discuss|--research|--validate|--full/g,'').trim());
" -- "$ARGUMENTS" 2>/dev/null)
```
If DESCRIPTION is empty, print exactly:
`Usage: /super-gsd:sg-quick [--discuss] [--research] [--validate] [--full]`
and exit.
If any flag is set, delegate to the full gsd-quick Skill — session control transfers to the skill; no further steps execute:
if [ -n "$DISCUSS_FLAG" ] || [ -n "$RESEARCH_FLAG" ] || [ -n "$VALIDATE_FLAG" ] || [ -n "$FULL_FLAG" ]; then
Skill(skill="gsd-quick", args="$ARGUMENTS")
fi
-
Initialize quick task. Obtain quick_id, slug, and task_dir from gsd-sdk:
INIT_JSON=$(gsd-sdk query init.quick "$DESCRIPTION")
QUICK_ID=$(echo "$INIT_JSON" | node -e 'let s="";process.stdin.on("data",d=>s+=d).on("end",()=>{try{const j=JSON.parse(s);process.stdout.write(j.quick_id||j.id||"")}catch(e){}})')
TASK_DIR=$(echo "$INIT_JSON" | node -e 'let s="";process.stdin.on("data",d=>s+=d).on("end",()=>{try{const j=JSON.parse(s);process.stdout.write(j.task_dir||j.dir||"")}catch(e){}})')
If QUICK_ID or TASK_DIR is empty, print exactly:
gsd-sdk init.quick failed — check gsd-sdk installation
and exit.
-
Create task directory.
mkdir -p "$TASK_DIR"
-
Spawn gsd-planner Agent. Use Agent() to spawn a planning agent that writes PLAN.md into task_dir:
Agent(
description="You are a GSD quick planner. Write a PLAN.md for the following quick task.
Task description: <DESCRIPTION>
Flags: <list any of --discuss --research --validate --full that are set; omit line if none>
Output path: <TASK_DIR>/<QUICK_ID>-PLAN.md
Create a single focused PLAN.md with 1-2 tasks. Target ~30% context usage. Follow the GSD PLAN.md format (frontmatter + objective + tasks with action/verify/done + success_criteria). Write the file to the exact output path above.",
subagent_type="gsd-planner"
)
Substitute <DESCRIPTION>, <TASK_DIR>, and <QUICK_ID> with actual variable values before invoking the Agent.
Wait for the agent to complete before proceeding.
-
Read PLAN.md. Load the file the agent created:
PLAN_PATH="$TASK_DIR/${QUICK_ID}-PLAN.md"
PLAN_CONTENT=$(cat "$PLAN_PATH" 2>/dev/null)
If PLAN_CONTENT is empty, print exactly:
Planner agent did not create PLAN.md at $PLAN_PATH
and exit.
-
Build Superpowers handoff prompt. Assemble the prompt by substituting actual variable values and store it in HANDOFF_PROMPT:
HANDOFF_PROMPT="# Quick Task Execution Handoff — $QUICK_ID
## Goal
$DESCRIPTION
## Plan
$PLAN_CONTENT
## Instruction to Superpowers
Execute the plan above using the superpowers:executing-plans skill. Treat the PLAN.md as the authoritative source of tasks and acceptance criteria. Complete all tasks and verify success criteria before finishing."
Display $HANDOFF_PROMPT to the user.
-
Update STATE.md Quick Tasks Completed. Append a new row after the last existing row in the ### Quick Tasks Completed table:
DIR_NAME=$(basename "$TASK_DIR")
SAFE_DESCRIPTION=$(echo "$DESCRIPTION" | tr -d '\n' | tr '|\&' '---')
NEW_ROW="| $QUICK_ID | $SAFE_DESCRIPTION | $(date +%Y-%m-%d) | (pending) | [$DIR_NAME](./quick/$DIR_NAME/) |"
Read .planning/STATE.md.
Find the
Append NEW_ROW after the last data row in that section (the last line starting with "|" that is NOT the header or `| --- |` separator row). If no data rows exist yet, insert after the `| --- |` separator row.
Write the updated content back using the Edit tool.
If the section is not found, print exactly: `ERROR:
-
Commit PLAN.md and STATE.md together.
git add "$PLAN_PATH" .planning/STATE.md
git commit -m "quick($QUICK_ID): $DESCRIPTION" || { echo "git commit failed"; exit 1; }
-
Invoke Superpowers. Before invoking, verify HANDOFF_PROMPT is non-empty (it must contain the full plan assembled in step 6). If it is empty, print exactly:
HANDOFF_PROMPT assembly failed — PLAN_CONTENT may have been empty
and exit.
Otherwise invoke in the same turn — no confirmation prompt. Session control transfers to the skill; no steps execute after this point:
Skill(skill="superpowers:executing-plans", args="$HANDOFF_PROMPT")
<success_criteria>
- The full pipeline runs end-to-end: gsd-sdk initialization → gsd-planner Agent writes PLAN.md → superpowers:executing-plans is invoked with the full PLAN.md content.
- superpowers:executing-plans Skill is invoked exactly once per run.
- PLAN.md and STATE.md (with (pending) SHA) are committed in a single commit before Superpowers is invoked. STATE.md is not patched with a plan commit SHA that misrepresents the implementation state.
</success_criteria>