# 自定义命令

> 把常用提示做成 Markdown 斜杠命令，用户级与工作区级位置、命名空间和参数。

- 网址：https://funcoding.ai/agents/augment/customize/commands/
- 核实日期：2026-10-02（命令、配置和价格以官方文档为准）
- 官方来源：[Augment 文档：Custom Slash Commands](https://docs.augmentcode.com/cli/custom-commands)

---
自定义斜杠命令是存成 Markdown 文件的可复用提示，Auggie 可以运行它们。语法：`/<command-name> [arguments]`，命令名取自文件名。**位置及优先级**：1 用户命令 `~/.augment/commands/<name>.md`；2 工作区命令 `./.augment/commands/<name>.md`；3 Claude Code 用户命令 `~/.claude/commands/`；4 Claude Code 工作区命令 `./.claude/commands/`；5 `~/.agents/commands/`；6 `./.agents/commands/`。用户命令跨项目可用；工作区命令随仓库提交与团队共享。Auggie 自动识别 `.claude/commands/` 以兼容已有的 Claude Code 配置，新项目建议迁移到 `.augment/commands/`。

```bash
mkdir -p ~/.augment/commands
echo "Review this code for security vulnerabilities:" > ~/.augment/commands/security-review.md
```

**命名空间**：子目录里的命令用 `namespace:command` 访问，例如 `.augment/commands/frontend/component.md` 对应 `/frontend:component`；用户级与工作区级的冲突不支持，按上面的优先级决定。命令还可以接收参数，把动态值传给命令；具体占位语法见官方页。
