Delegate coding tasks to Sourcegraph Amp, an autonomous coding agent. Use when: multi-file changes, new features, bug fixes, test writing, or any coding task...
Use this skill to hand off coding work to Amp, an autonomous coding agent. Amp can read, write, refactor, and test code across an entire codebase without supervision.
Delegate when the task involves:
Do NOT delegate:
edit)exec/read)| Mode | Description | Use when |
|---|---|---|
rush | Fast, lightweight model | Small/clear tasks, quick fixes |
smart | Balanced model (default) | Most tasks |
deep | Powerful model, slower, higher cost | Complex architecture, hard bugs |
cd /path/to/project && \
amp \
--dangerously-allow-all \
--no-notifications \
--no-ide \
-m smart \
-x "Your task description here"
The -x flag (execute mode) makes amp non-interactive: it runs the task and exits,
printing only the agent's final message to stdout.
bash {baseDir}/scripts/amp-task.sh \
--task "Add pagination to the /invoices endpoint" \
--dir /path/to/your/project \
--mode smart
The script handles: cd to project dir, thread creation (for auditability), execute mode,
and clean output. It prints the thread ID and final agent response.
| Flag | Effect |
|---|---|
--dangerously-allow-all | No confirmation prompts — agent acts autonomously |
--no-notifications | Suppress sound/system notifications |
--no-ide | Don't connect to IDE (safe for headless runs) |
-x "message" | Execute mode: non-interactive, prints final output |
-m rush/smart/deep | Select agent mode (model + system prompt) |
-l "label" | Tag the thread with a label (repeatable) |
Amp reads the codebase from the current directory. Always cd to the project root first,
or pass --dir to the wrapper script. Without the right cwd, Amp won't see the right files.
After a run, the wrapper script outputs:
To see the full thread as markdown (all messages, tool calls, etc.):
amp threads markdown <thread-id>
To continue a thread (e.g., to follow up or fix something):
cd /path/to/project && \
echo "Now also add tests for the pagination logic" | \
amp threads continue <thread-id> \
--dangerously-allow-all --no-notifications --no-ide -x
To list recent threads:
amp threads list
cd /path/to/your/project && \
amp --dangerously-allow-all --no-notifications --no-ide -x \
"Fix the TypeError in src/api/invoices.js line 42 — amount is sometimes null"
bash {baseDir}/scripts/amp-task.sh \
--task "Implement CSV export for the invoices list page — add a button in the UI and a /api/invoices/export endpoint" \
--dir /path/to/your/project \
--mode smart
bash {baseDir}/scripts/amp-task.sh \
--task "Migrate all database calls from raw SQL to Knex query builder. Maintain existing behaviour, add comments." \
--dir /path/to/your/project \
--mode deep
bash {baseDir}/scripts/amp-task.sh \
--task "Write Jest unit tests for all functions in src/utils/formatting.js" \
--dir /path/to/your/project \
--mode rush
Amp-Thread: trailer in git. Use this to find amp-authored commits.--dangerously-allow-all flag bypasses all tool permission checks. Only use on trusted projects.git diff HEAD~1ZIP package — ready to use