LogoAwesome Skills
  • Search
  • Category
  • Tag
  • Blog
LogoAwesome Skills
LogoAwesome Skills

Discover Open-Source Agent Skills for AI Coding Assistants

Product

  • Search
  • Category
  • Tag
  • Blog

Resources

  • Claude Skill Docs
  • Antigravity Skills Docs

Tools

  • Claude Code
  • OpenCode
  • Cursor
  • Codex
  • Antigravity

Company

  • Privacy Policy
  • Terms of Service
  • Sitemap

©2026 Awesome Skills. All rights reserved.

Privacy PolicyTerms
Back to Skills

Writing Slash Commands

Create and use custom slash commands to automate Claude Code workflows. Learn argument passing, frontmatter configuration, bash integration, and file references for building reusable prompts.

499stars70forksUpdated 2/17/2026
Code ReviewProductivity & Workflow#bash#slash-commands#workflow#code-review#automation

Security Assessment

Safe(100/100)
Security Score100/100

About Writing Slash Commands

The 'Writing Slash Commands' skill enables users to create and utilize custom slash commands to streamline their workflows in Claude Code. This functionality allows you to define reusable templates for automating common tasks, which can save time and reduce manual input. By defining commands with simple syntax, you can execute predefined actions across various repositories and projects. The skill is primarily designed to enhance productivity and simplify repetitive tasks by invoking slash commands with customized arguments.

FAQ

How do I create a custom slash command?

To create a custom slash command, create a file in the `.claude/commands` directory for project-specific commands or in the `~/.claude/commands` directory for personal commands. Then, write your prompt in a markdown file. For example, `echo 'Review this code for security vulnerabilities:' > ~/.claude/commands/security-review.md` creates a personal command called `/security-review`.

Can I use slash commands across different projects?

Yes, you can. If the command is stored in the `~/.claude/commands` directory, it will be available across all projects. However, project-specific commands stored in `.claude/commands/` will only be available within the respective project.

Can I pass arguments to my custom slash commands?

Yes, you can pass arguments to your slash commands. Use `$ARGUMENTS` to capture all arguments as a single string or use positional parameters like `$1`, `$2`, etc., for structured arguments. For example, a command like `/review-pr 123 high alice` would pass '123', 'high', and 'alice' as `$1`, `$2`, and `$3` respectively.

What is the purpose of frontmatter configuration?

Frontmatter configuration allows you to specify optional fields such as `description`, `argument-hint`, `allowed-tools`, `model`, and `disable-model-invocation` to control the behavior of your slash command. It also helps in providing hints for autocomplete, defining tools that the command can invoke, and customizing the model used by the command.

Can I execute Bash commands within my custom slash command?

Yes, you can execute Bash commands within your custom slash commands by using the `!` prefix. This allows you to run commands like `git status` or `git diff` before the main task in your slash command. Ensure that `Bash` is listed under `allowed-tools` for the command.

Install Writing Slash Commands

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill

Repository

CaptainCrouton89/.claude

Related Skills

short-form-video

14

multi-asset-morning-briefing

7,907

content-strategy

2,901

doherty-threshold

2,901