返回顶部
a

amp-code

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 > ~5 minutes. Amp reads the codebase, plans, edits files, and runs tests autonomously. NOT for: simple single-line edits, read-only questions, tasks needing fine-grained control.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
215
下载量
0
收藏
概述
安装方式
版本历史

amp-code

# amp-code — Delegate Coding Tasks to Sourcegraph Amp 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. --- ## When to delegate to Amp Delegate when the task involves: - **Multi-file changes** — refactoring, moving modules, updating APIs - **New features** — implementing something that requires creating/editing several files - **Bug fixes** — especially when the root cause requires investigation and code changes - **Test writing** — generating test suites, adding coverage - **Anything > ~5 min of coding** — if you'd need multiple edit calls, let Amp do it Do NOT delegate: - Simple single-line edits (just use `edit`) - Purely diagnostic/read-only questions (just use `exec`/`read`) - Tasks where you need fine-grained control over each file change --- ## Modes | 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 | --- ## How to run a task ### Simple one-shot (recommended) ```bash 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. ### Using the wrapper script ```bash 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. --- ## Key flags | 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) | --- ## Working directory matters 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. --- ## Checking results After a run, the wrapper script outputs: 1. The **thread ID** — use this to inspect or continue the conversation 2. The **final agent message** — summary of what was done To see the full thread as markdown (all messages, tool calls, etc.): ```bash amp threads markdown <thread-id> ``` To continue a thread (e.g., to follow up or fix something): ```bash 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: ```bash amp threads list ``` --- ## Example invocations ### One-shot fix ```bash 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" ``` ### Feature implementation (via wrapper) ```bash 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 ``` ### Deep refactor ```bash 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 ``` ### Quick test generation ```bash 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 ``` --- ## Notes - Amp commits are tagged with `Amp-Thread:` trailer in git. Use this to find amp-authored commits. - The `--dangerously-allow-all` flag bypasses all tool permission checks. Only use on trusted projects. - Amp may make mistakes. Review the diff after large changes: `git diff HEAD~1` - For very long tasks, amp may time out. Break into smaller sub-tasks if needed. - Thread IDs are UUIDs. Save them if you want to audit or continue work later.

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 amp-code-1776130034 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 amp-code-1776130034 技能

通过命令行安装

skillhub install amp-code-1776130034

下载 Zip 包

⬇ 下载 amp-code v1.0.0

文件大小: 4.28 KB | 发布时间: 2026-4-14 16:05

v1.0.0 最新 2026-4-14 16:05
Delegate coding tasks to Sourcegraph Amp — autonomous, non-interactive, headless-safe.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部