Skip to content

斜杠命令

斜杠命令概述

斜杠命令(Slash Commands)是快速调用特定功能的快捷方式,以 / 开头。

常用命令详解

/commit - 提交代码

bash
You: /commit

Claude: Creating commit with staged changes...
 Commit created

/review-pr - 审查 PR

bash
You: /review-pr 123

Claude: Reviewing PR #123...
[Review results]

/feature-dev - 功能开发

bash
You: /feature-dev "comment system"

Claude: Starting feature development workflow...

/help - 帮助

bash
You: /help

Available commands:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
/commit        - Create Git commit
/review-pr     - Review pull request
/feature-dev   - Feature development
/code-review   - Review code quality
/help          - Show help
/clear         - Clear context
/save          - Save session
/load          - Load session
/history       - Show history
/quit          - Exit
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

命令组合技巧

bash
# 开发 → 测试 → 提交
You: /feature-dev "login feature"
You: 运行测试
You: /commit

小结

在本章中,我们学习了:

  • ✅ 斜杠命令概述
  • ✅ 常用命令详解
  • ✅ 命令组合技巧