# Install & Configure: Custom Slash Commands in Claude Code for Repetitive Workflows
## What This Is
Claude Code supports custom slash commands stored in .claude/commands/*.md. Each file becomes a reusable command — perfect for PR descriptions, commit messages, and code review workflows that you run daily.
Source: https://reddit.com/r/ClaudeAI/comments/1abc123/custom_slash_commands
## Before You Start
Scan my workspace and analyze:
- The project language, framework, and directory structure
- Existing agent configuration (check for .claude/, .codex/, CLAUDE.md, settings.json, commands/, skills/ directories)
Then ask me before proceeding:
1. Where should this skill be installed — project-level (.claude/skills/) or globally?
2. Any customizations needed (trigger conditions, naming, etc.)?
## Source Access Note
The source URL (https://reddit.com/r/ClaudeAI/comments/1abc123/custom_slash_commands) may not be directly accessible from the terminal. Use the Reference Implementation and Additional Context sections below instead. If you need more details, ask me to paste relevant content from the source.
## What to Implement
This is an **Agent Skill** — an auto-loaded capability defined in a SKILL.md file.
- Read the source repository/file to find the skill definition (SKILL.md or equivalent)
- Place it in the correct skills directory for my agent setup (`.claude/skills/`, or equivalent)
- Ensure the SKILL.md frontmatter is valid and the skill is discoverable
- If the skill requires any dependencies, install them using the project's package manager
## Additional Context
- Create a .claude/commands/ directory in your repo root. Each .md file in this folder becomes a /command in Claude Code.
- Write a pr-description.md command that reads recent git diff and formats a structured PR description with Summary, Changes, and Test Plan sections.
- Add commands to your global ~/.claude/commands/ for cross-project utilities like /refactor-to-hooks or /add-error-handling.
## Reference Implementation
```
# .claude/commands/pr-description.md
Generate a pull request description for the current changes.
Steps:
1. Run `git diff main...HEAD` to see all changes
2. Run `git log main...HEAD --oneline` for commit history
3. Identify the primary goal and key implementation decisions
Output format:
## Summary
[1-3 sentence description of what this PR does and why]
## Changes
- [bullet list of key changes]
## Test Plan
- [ ] [specific things to test]
- [ ] Edge cases covered
## Notes
[Any breaking changes, migration steps, or reviewer focus areas]
```
## Guidelines
- Adapt everything to my existing project — do not assume a specific stack or directory layout
- Review any fetched code for safety before installing or executing it
- After setup, run a quick verification and show me a summary of exactly what was installed, where, and how to use it