---
source_url: https://docs.anthropic.com/en/docs/claude-code/slash-commands
title: Claude Code - Slash commands
fetched_at: 2026-02-05T23:26:33+08:00
version_or_last_updated: unknown
---

## 自定义 Slash Commands 的目录（原文摘录）

> You can create custom slash commands by adding Markdown files to one of these directories:
>
> - Project commands: `.claude/commands/` (shared with your team)
> - Personal commands: `~/.claude/commands/` (available only to you)

## 执行 Shell 命令（原文摘录）

> You can run bash commands from slash commands by starting a line with `!`.
