i'm doing for agents: lead do planing, delegate work around. the trick is to clever handle sessions and context your "commands" may be Ok, but it does not matter, cause the issue is context length. you do simple fix with /architect -> 10% eats up. You wont get much profit from the promt. as for promts: just run deep research... i'm lazy, im asking claude to write promts for me. Answer from raiffuvar on reddit.com
🌐
Builder.io
builder.io β€Ί blog β€Ί claude-code
How I use Claude Code (+ my best tips)
September 29, 2025 - You can also use the interactive /hooks command in Claude Code to configure hooks through a menu interface, which is often easier than editing JSON directly. You can also add custom slash commands pretty easily. To add commands, just create a .cla...
🌐
Shipyard
shipyard.build β€Ί blog β€Ί claude-code-cheat-sheet
Shipyard | Claude Code CLI Cheatsheet: config, commands, prompts, + best practices
# Create a personal command for all projects mkdir -p ~/.claude/commands echo "Review this code for security vulnerabilities:" > ~/.claude/commands/security.md ... # Create parameterized command echo 'Fix issue #$ARGUMENTS following our coding ...
🌐
Claude
code.claude.com β€Ί docs β€Ί en β€Ί slash-commands
Slash commands - Claude Code Docs
# Create a personal command mkdir -p ~/.claude/commands echo "Review this code for security vulnerabilities:" > ~/.claude/commands/security-review.md Β· Use subdirectories to group related commands. Subdirectories appear in the command description but don’t affect the command name.
🌐
Reddit
reddit.com β€Ί r/claudeai β€Ί easiest way to automate adding custom /commands to claude code
r/ClaudeAI on Reddit: Easiest way to automate adding custom /commands to Claude Code
August 13, 2025 -

Here’s an easy guide for ya nerds.

Stop hand-coding slash commands β€” grab this one file and let Claude make any command for you.

Repo: https://github.com/artemgetmann/claude-slash-commands

Step 1 β€” Get the files Inside you’ll find:

  • add-command.md β€” the magic one. Lets Claude build any other command you want.

  • askgpt5-web-search.md β€” GPT-5 with browsing.

  • system-prompt-editor.md β€” edit your CLAUDE.md in context.

Step 2 β€” Install the one that matters Copy add-command.md to:

  • Global: ~/.claude/commands/

  • Project: <your-project>/.claude/commands/

Step 3 β€” Use it

/add-command "my-new-command" "what it should do"

Claude generates the .md file for your new slash command. Done.

Why this matters Once you have /add-command, you can describe what you want and Claude makes it β€” zero syntax memorization, zero setup headaches.

P.S. The GPT-5 command in there is especially useful.

🌐
Sid Bharath
siddharthbharath.com β€Ί home β€Ί blog β€Ί cooking with claude code: the complete guide
Cooking with Claude Code: The Complete Guide - Sid Bharath
July 8, 2025 - When Claude is done building out the first version of our app, type in /init. This initializes Claude when you use it in a project for the first time. If you have an existing project you want to bring Claude into, run this command first.
🌐
Apidog
apidog.com β€Ί blog β€Ί claude-code-cli-commands
20 Claude Code CLI Commands to Make Your 10x Productive
October 24, 2025 - Now, you can simply type /project:test in your Claude session to execute your custom command. Productivity Boost: This allows you to create a personalized set of tools that are perfectly tailored to your workflow.
🌐
Claude
claude.ai β€Ί public β€Ί artifacts β€Ί e2725e41-cca5-48e5-9c15-6eab92012e75
Complete Claude Code Commands Documentation
## Note This command focuses on architectural consultation and strategic guidance. For implementation details and code generation, use @code.md instead. ... ## Usage `@code.md <FEATURE_DESCRIPTION>` ## Context - Feature/functionality to implement: $ARGUMENTS - Existing codebase structure and ...
🌐
GitHub
github.com β€Ί qdhenry β€Ί Claude-Command-Suite
GitHub - qdhenry/Claude-Command-Suite: Professional slash commands for Claude Code that provide structured workflows for software development tasks including code review, feature creation, security auditing, and architectural analysis.
# Create the commands directory in your project mkdir -p .claude/commands # Download specific commands you need curl -o .claude/commands/dev/code-review.md https://raw.githubusercontent.com/qdhenry/Claude-Command-Suite/main/.claude/commands...
Starred by 870 users
Forked by 84 users
Languages Β  Shell 36.4% | TypeScript 33.8% | Python 26.7% | JavaScript 3.1%
Find elsewhere
🌐
Reddit
reddit.com β€Ί r/claudeai β€Ί how are you using custom commands in claude code to create different personas/modes? looking for community prompts and comparisons with other tools
r/ClaudeAI on Reddit: How are you using custom commands in Claude Code to create different personas/modes? Looking for community prompts and comparisons with other tools
June 13, 2025 -

I've been exploring Claude Code's custom commands feature (the .claude/commands/*.md files) and realized they can essentially work as different personas or modes for various development roles. But I'm curious about how others are using this.

My understanding so far:

  • You can create markdown files in .claude/commands/

  • Each file becomes a slash command (e.g., architect.md β†’ /architect)

  • You can use $ARGUMENTS to pass parameters

  • These can act like different "modes" or "personas" for Claude

What I'm curious about:

  1. Are you using custom commands this way? Do you have different commands for different roles (architect, engineer, debugger, etc.)?

  2. What prompts are you using? I'd love to see actual examples of what you've put in your command files. What's working well? What isn't?

  3. How does this compare to other AI coding assistants?

    • Does Cursor's rules/modes work similarly?

    • What about Cline/Continue/Aider?

    • Are there features in other tools that Claude Code's approach lacks?

  4. What personas/modes have you found most useful? Are there any creative ones beyond the obvious developer roles?

  5. Any tips or pitfalls? What should someone know before diving into this approach?

I'm not assuming this is the best or only way to use custom commands - just exploring possibilities and want to learn from the community's experience. Maybe some of you have completely different approaches I haven't considered?

Would really appreciate seeing your actual command files if you're willing to share. Thanks!

Top answer
1 of 2
3
i'm doing for agents: lead do planing, delegate work around. the trick is to clever handle sessions and context your "commands" may be Ok, but it does not matter, cause the issue is context length. you do simple fix with /architect -> 10% eats up. You wont get much profit from the promt. as for promts: just run deep research... i'm lazy, im asking claude to write promts for me.
2 of 2
2
Here's concise ABCD method: ## 🚦 Phase Workflow Commands ### `/assess [phase]` **Goal:** Identify gaps & dependencies before coding. **Usage:** `/assess Phase 3` πŸ” **Outputs:** * Dependencies & integration points * Approved specs (endpoints, events, constraints) * Gaps + proposed solutions (e.g. backoff, validation) * Saved to `.assess-phase3.json` ➑️ **Next:** Approve gaps β†’ `/build` --- ### `/build [phase]` **Goal:** Generate code exactly per assessment. **Usage:** `/build Phase 3` πŸ› οΈ **Checks:** * Loads `.assess-phase3.json` * Builds only approved items * Full tests, no assumptions πŸ“¦ **Output:** * Structured files * Gaps implemented * `implementation-progress.md` updated ➑️ **Next:** Run `/check` --- ### `/check` **Goal:** Validate code matches spec + passes real tests. **Usage:** `/check` βœ… **Checks:** * Spec compliance * Honest test logs (`pytest`) * Flags structural issues (e.g. race conditions) * Suggests real fixes (not patches) 🚫 **Blocks:** If design flaws detected ➑️ **Next:** Fix or approve β†’ `/done` --- ### `/done` **Goal:** Finalize and document phase. **Usage:** `/done` πŸ“‹ **Checklist:** * All tests pass * Integration confirmed * Docs updated * Phase marked complete * `.assess-phaseX.json` removed ➑️ **Next:** `/assess [next phase]`
🌐
BioErrorLog
en.bioerrorlog.work β€Ί top β€Ί ai
How to Create Custom Slash Commands in Claude Code - BioErrorLog Tech Blog
September 18, 2025 - In short, they let you predefine prompts in Markdown files and call them up instantly with a command. You can create custom slash commands by placing Markdown files under .claude/commands/. The file name becomes the slash command name.
🌐
AI Engineer Guide
aiengineerguide.com β€Ί blog β€Ί claude-code-custom-command
How to Add Custom Slash Commands in Claude Code
July 1, 2025 - # Create a personal command mkdir -p ~/.claude/commands echo "Review this code for security vulnerabilities:" > ~/.claude/commands/security-review.md Β· Just place the commands in a subdirectories.
🌐
Anthropic
anthropic.com β€Ί engineering β€Ί claude-code-best-practices
Claude Code: Best practices for agentic coding
Follow these steps: 1. Use `gh issue view` to get the issue details 2. Understand the problem described in the issue 3. Search the codebase for relevant files 4. Implement the necessary changes to fix the issue 5. Write and run tests to verify the fix 6. Ensure code passes linting and type checking 7. Create a descriptive commit message 8. Push and create a PR Remember to use the GitHub CLI (`gh`) for all GitHub-related tasks. ... Putting the above content into .claude/commands/fix-github-issue.md makes it available as the /project:fix-github-issue command in Claude Code.
🌐
Reddit
reddit.com β€Ί r/claudeai β€Ί screw the rules! use custom commands (claude code)
Screw the rules! Use custom commands (Claude Code) : r/ClaudeAI
March 13, 2025 - Spent 6 hours debugging my code last night only to find that Claude had put a placeholder code deep inside one of my trained models. This gave no errors or any indication of unfinished code. ... here the docs btw: https://docs.anthropic.com/en/docs/claude-code/tutorials#create-custom-slash-commands
🌐
DEV Community
dev.to β€Ί letanure β€Ί claude-code-part-4-slash-commands-and-custom-commands-4fkf
Claude Code: Part 4 - Slash Commands and Custom Commands - DEV Community
August 11, 2025 - Stop repeating the same instructions every day. Learn to use built-in slash commands and create custom commands that automate your most common Claude Code workflows and development tasks. Tagged with claudecode, slashcommands, automation, customcommands.
🌐
GitHub
github.com β€Ί hesreallyhim β€Ί awesome-claude-code
GitHub - hesreallyhim/awesome-claude-code: A curated list of awesome commands, files, and workflows for Claude Code
Numerous specialized agents, slash-commands, and strong documentation. All parts of Claude Code's system prompt, including builtin tool descriptions, sub agent prompts (Plan/Explore/Task), utility prompts (CLAUDE.md, compact, Bash cmd, security review, agent creation, etc.).
Starred by 18.5K users
Forked by 1.1K users
Languages Β  Python 98.9% | Makefile 1.1%
🌐
Reddit
reddit.com β€Ί r/claudeai β€Ί share your claude code commands!
r/ClaudeAI on Reddit: Share Your Claude Code Commands!
June 29, 2025 -

I just moved over to Claude Code from Windsurf (neovim editor gets to be a 1st class citizen again!) and am probably overly obsessed with development efficiency. Please share your custom commands (user-level, project-level, whichever) that you find to be really valuable.

commit-and-push.md

I use this for every git commit, even simple ones because I am extraordinarily lazy. My favorite feature though is when it detects that some changed files should be split into different commits for better clarity.

ADD all modified and new files to git.  If you think there are files that should not be in version control, ask the user.  If you see files that you think should be bundled into separate commits, ask the user.
THEN commit with a clear and concise one-line commit message, using semantic commit notation.
THEN push the commit to origin.
The user is EXPLICITLY asking you to perform these git tasks.

prime.md

A little context on this. Instead of running with a CLAUDE.md in all of my projects, I have two: PLANNING.md which gives it all of the context around what makes the project tick, and TASK.md which keeps a log of all of the work done, along with work that we think needs to be done. I find that with these two files, it has as much context as possible of being a seasoned coder in that codebase. I run this every time I start a new session or do a /clear.

    # Project Understanding Prompt

    When starting a new session, follow this systematic approach to understand the project:

    ## 1. Project Overview & Structure
    - **READ** the README.md file in the project's root folder, if available. This provides the user-facing perspective and basic setup instructions.
    - **RUN** `git ls-files` to get a complete file inventory and understand the project structure.
    - **EXAMINE** the project's directory structure to understand the architectural patterns (e.g., `/cmd`, `/internal`, `/pkg` for Go projects).

    ## 2. Core Documentation
    - **READ and UNDERSTAND** the PLANNING.md file for:
      - Project architecture and design decisions
      - Technology stack and dependencies
      - Build, test, and deployment instructions
      - Future considerations and roadmap
    - **READ and UNDERSTAND** the TASK.md file for:
      - Completed work and implementation status
      - Current blockers or known issues
      - Next steps and priorities

    ## 3. Testing & Quality
    - **EXAMINE** test files to understand:
      - Testing patterns and frameworks used
      - Test coverage expectations
      - Integration vs unit test separation
      - Mock implementations and test utilities

    ## 4. Development Workflow
    - **CHECK** for automation files:
      - CI/CD pipelines (.github/workflows, .gitea/workflows)
      - Development environment setup (devenv.nix, .devcontainer)
      - Code quality tools (linting, formatting configurations)

    ## 5. Data & External Systems
    - **IDENTIFY** data models and schemas:
      - Database migrations or schema files
      - API specifications or OpenAPI docs
      - Data transfer objects (DTOs) and validation rules
    - **UNDERSTAND** external service integrations:
      - Authentication providers (Keycloak, Auth0)
      - Databases and connection patterns
      - Third-party APIs and clients

    ## 6. Documentation Maintenance
    - **UPDATE TASK.md** with each substantial change made to the project, including:
      - Features implemented or modified
      - Issues resolved or discovered
      - Dependencies added or updated
      - Configuration changes
    - **UPDATE PLANNING.md** if changes affect:
      - Architecture decisions
      - Technology stack
      - Development workflows
      - Future roadmap items

    ## 7. Knowledge Validation
    Before proceeding with any work, confirm understanding by being able to answer:
    - What is the primary purpose of this project?
    - How do I build, test, and run it locally?
    - What are the main architectural components and their responsibilities?
    - What external systems does it integrate with?
    - What's the current implementation status and what's next?

coverage.md

Thanks to AI doing what has been an awful chore of mine, for decades, I push for 100% coverage in all functions/methods/classes that involve logic. This is my cookie-cutter command on it.

UNDERSTAND the code coverage percentages for each function and method in this codebase.
THEN add unit tests to functions and methods without 100% coverage.  This includes negative and edge cases.
ALWAYS use mocks for external functionality, such as web services and databases.
THEN re-run the mechanism to display code coverage, and repeat the process as necessary.

build-planning.md

I use this on any brand new projects, to act as an initial primer files. If it is a brand new codebase it will fill most of these out as TBD, but if I am retro-fitting something existing, then an awful lot will get filled out.

We are going to build a file called PLANNING.md which lives in the project's root directory.  The objective is to have a document that will give you important context about the project, along with instructions on how to build and test.  Start by building a document with the following categories, that we will initially mark as TBD.  Then we will discuss each of these points together and fill in the document as we go.
    - Project Overview
    - Architecture
      - Core components (API, Data, Service layers, configuration, etc)
      - Data Model, if the project has a database component
    - API endpoints, if the project exposes endpoints to be consumed
    - Technology stack (Language, frameworks, etc)
    - Project structure
    - Testing strategy, if the project uses unit or integration testing
    - Development commands (to build,Data Model, if the project has a database component
    - API endpoints, if the project exposes endpoints to be consumed
    - Technology stack (Language, frameworks, etc)
    - Project structure
    - Testing strategy, if the project uses unit or integration tests.
    - Development commands (for building, running, etc).
    - Environment setup (how the development environment is currently set up for the project)
    - Development guidelines (rules to follow when modifying the project)
    - Security considerations (things to keep in mind that are security-focused when modifying the project)
    - Future considerations (things that we may not be adding right away but would be candidates for future versions)

We will BUILD a file called TASK.md which lives in the project's root directory.  The objective is to give you important context about what tasks have been accomplished, and what work is left to do.  READ the PLANNING.md file, then create a list of tasks that you think should be accomplished.  Categorize them appropriately (e.g. Setup, Core Functionality, etc).  The last category will be "Completed Work" where we will have a log of work that has been completed, although initially this will be empty.

fix.md

This is my generic message when I have an error that I want it to fix.

READ the output from the terminal command to understand the error that is being displayed.
THEN FIX the error.  Use `context7` and `brave-search` MCPs to understand the error.
THEN re-run the command in the terminal.  If there is another error, repeat this debugging process.

code-review.md

    # Code Reviewer Assistant for Claude Code

    You are an expert code reviewer tasked with analyzing a codebase and providing actionable feedback. Your primary responsibilities are:

    ## Core Review Process

    1. **Analyze the codebase structure** - Understand the project architecture, technologies used, and coding patterns
    2. **Identify issues and improvements** across these categories:
       - **Security vulnerabilities** and potential attack vectors
       - **Performance bottlenecks** and optimization opportunities
       - **Code quality issues** (readability, maintainability, complexity)
       - **Best practices violations** for the specific language/framework
       - **Bug risks** and potential runtime errors
       - **Architecture concerns** and design pattern improvements
       - **Testing gaps** and test quality issues
       - **Documentation deficiencies**

    3. **Prioritize findings** using this severity scale:
       - πŸ”΄ **Critical**: Security vulnerabilities, breaking bugs, major performance issues
       - 🟠 **High**: Significant code quality issues, architectural problems
       - 🟑 **Medium**: Minor bugs, style inconsistencies, missing tests
       - 🟒 **Low**: Documentation improvements, minor optimizations

    ## TASK.md Management

    Always read the existing TASK.md file first. Then update it by:

    ### Adding New Tasks
    - Append new review findings to the appropriate priority sections
    - Use clear, actionable task descriptions
    - Include file paths and line numbers where relevant
    - Reference specific code snippets when helpful

    ### Task Format
    ```markdown
    ## πŸ”΄ Critical Priority
    - [ ] **[SECURITY]** Fix SQL injection vulnerability in `src/auth/login.js:45-52`
    - [ ] **[BUG]** Handle null pointer exception in `utils/parser.js:120`

    ## 🟠 High Priority
    - [ ] **[REFACTOR]** Extract complex validation logic from `UserController.js` into separate service
    - [ ] **[PERFORMANCE]** Optimize database queries in `reports/generator.js`

    ## 🟑 Medium Priority
    - [ ] **[TESTING]** Add unit tests for `PaymentProcessor` class
    - [ ] **[STYLE]** Consistent error handling patterns across API endpoints

    ## 🟒 Low Priority
    - [ ] **[DOCS]** Add JSDoc comments to public API methods
    - [ ] **[CLEANUP]** Remove unused imports in `components/` directory
    ```

    ### Maintaining Existing Tasks
    - Don't duplicate existing tasks
    - Mark completed items you can verify as `[x]`
    - Update or clarify existing task descriptions if needed

    ## Review Guidelines

    ### Be Specific and Actionable
    - βœ… "Extract the 50-line validation function in `UserService.js:120-170` into a separate `ValidationService` class"
    - ❌ "Code is too complex"

    ### Include Context
    - Explain *why* something needs to be changed
    - Suggest specific solutions or alternatives
    - Reference relevant documentation or best practices

    ### Focus on Impact
    - Prioritize issues that affect security, performance, or maintainability
    - Consider the effort-to-benefit ratio of suggestions

    ### Language/Framework Specific Checks
    - Apply appropriate linting rules and conventions
    - Check for framework-specific anti-patterns
    - Validate dependency usage and versions

    ## Output Format

    Provide a summary of your review findings, then show the updated TASK.md content. Structure your response as:

    1. **Review Summary** - High-level overview of findings
    2. **Key Issues Found** - Brief list of most important problems
    3. **Updated TASK.md** - The complete updated file content

    ## Commands to Execute

    When invoked, you should:
    1. Scan the entire codebase for issues
    2. Read the current TASK.md file
    3. Analyze and categorize all findings
    4. Update TASK.md with new actionable tasks
    5. Provide a comprehensive review summary

    Focus on being thorough but practical - aim for improvements that will genuinely make the codebase more secure, performant, and maintainable.

PLEASE share yours, or critique mine on how they can be better!!

Top answer
1 of 5
23
I wrote this one that helps me find good website domain names: Domain name search command: You're going to generate ideas for a new domain name and use the 'whois' command to check if they are available. Your steps: 1. Ask the user to provide their goals or name ideas for the new domain name. 2. Generate a list of candidate ideas for their domain name. Aim to generate about 200 ideas and write them down into ideas.md. - A good domain name is: - Not too long (less than 12 characters unless there's a very good reason to make it longer) - Catchy, easy to remember and say. Not too many words. - Your candidate ideas should have about 75% using .com suffixes and 25% using alternate suffixes like .net, .biz, .io, .co, etc. Alternate suffixes should only be used when they make sense for the product and they fit well with the name. 3. For each idea, run `whois` to check if the name is actually available. Ignore names that are not available. 4. Finally, compile a ranked list of the best available names. Save this to ideas.md. Next up, ask the user for more information!
2 of 5
8
Before committing, I copy the diff and paste it in a new chat then use this prompt: Based on the above diff and reading any relevant files, pls do the following: Review the diff to check for problems and bugs Check if the tasks marked completed [x] and status updates in the diff for tasks.md have indeed been completed. Report any that have not been completed but were marked erroneously as completed Check if our implementation and tests are aligned with our documentation in a.md b.md c.md Report if any functionality/logic was removed Check if tests are proper and complete. Report if any are placeholders or bypass assertions Report if any test has become misaligned from what it was before Report if functionality/coverage of tests was reduced Raise any concerns/recommendations
🌐
Cloud Artisan
cloudartisan.com β€Ί personal website of david taylor β€Ί posts β€Ί tutorials β€Ί claude code tips & tricks custom slash commands
Claude Code Tips & Tricks: Custom Slash Commands
April 14, 2025 - You just create Markdown files in a special directory structure, and Claude Code automatically recognises them as commands. ... When I want to use one, I type /project:command_name or /project:category:command_name if organised in subdirectories
🌐
Medium
medium.com β€Ί @joe.njenga β€Ί how-i-create-simple-but-beautiful-reusable-claude-code-slash-commands-that-save-me-hours-a7682291664c
How I Create Simple But Beautiful Reusable Claude Code Slash Commands (That Save Me Hours) | by Joe Njenga | Medium
October 9, 2025 - You can now make those 20–30 minute explanations happen with a single /create-component UserCard or /fix-issue 1234. These commands improve over time, they're shareable with your team, and they eliminate the "Did I forget to mention the test setup?" question.