Skip to content

hiteshbedre/claude-custom-slash-commands

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 

Repository files navigation

Claude Custom Slash Commands

A collection of custom slash commands for Claude Code to enhance your development workflow.

Overview

This repository contains custom slash commands that extend Claude Code's functionality. These commands help automate common development tasks and improve code organization.

Installation

  1. Clone this repository:

    git clone https://github.com/yourusername/claude-custom-commands.git
    cd claude-custom-commands
  2. Copy the custom commands to your Claude configuration directory:

    cp -r commands/* ~/.claude/commands/
  3. Restart Claude Code to load the new commands.

Available Commands

/modularize <function_name>

Organizes and refactors a function into a well-structured, modular format.

Usage:

/modularize calculateTotalPrice

Features:

  • Extracts helper functions for better code organization
  • Adds proper error handling
  • Implements input validation
  • Creates clear function documentation
  • Follows best practices for modularity

Creating Custom Commands

To create your own custom slash command:

  1. Create a new file in the commands/ directory
  2. Define your command configuration following the Claude Code slash command format
  3. Implement the command logic
  4. Add documentation to this README

Command Structure

Each command should follow this structure:

{
  "name": "command-name",
  "description": "Brief description of what the command does",
  "parameters": {
    "argument_name": {
      "type": "string",
      "description": "Description of the argument"
    }
  },
  "handler": "path/to/handler/script"
}

Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/new-command)
  3. Commit your changes (git commit -m 'Add new command')
  4. Push to the branch (git push origin feature/new-command)
  5. Open a Pull Request

Command Ideas

Here are some ideas for additional commands you could implement:

  • /test-gen - Generate unit tests for a function
  • /doc-gen - Generate comprehensive documentation
  • /optimize - Optimize code performance
  • /secure - Add security best practices to code
  • /type-safe - Add TypeScript types to JavaScript code
  • /clean - Clean and format code according to standards
  • /extract - Extract repeated code into reusable functions

License

MIT License - feel free to use and modify these commands for your projects.

Support

If you encounter any issues or have suggestions, please open an issue on GitHub.

About

πŸš€ Custom slash commands for Claude Code to supercharge your development workflow πŸš€

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published