Custom commands

Overview

Custom Commands allow you to create reusable slash commands tailored to your workflow. These Markdown-based commands appear in Friday's command menu (accessed with /) and support dynamic arguments, bash command execution, and custom prompts. Friday's custom commands are compatible with Claude Code's slash command ecosystem with some exceptions, see below for more details.

Store commands in ~/.claude/commands/ for personal use across all projects, or in .claude/commands/ for project-specific commands that can be shared with your team.

Quick Start

Create your first custom command in 3 steps:

1. Create the commands directory

mkdir -p ~/.claude/commands

2. Create a command file

cat > ~/.claude/commands/review.md << 'EOF'
---
description: Review code changes
argument-hint: [file-path]
---

Review the code in $1 and provide feedback on:
- Code quality and best practices
- Potential bugs or issues
- Suggestions for improvement
EOF

3. Use your command

In Friday, type / to open the command menu, search for review, and select it. You'll be prompted to provide the file path argument.

Creating Commands with Friday

Friday can help you create custom commands interactively using the /create-command built-in command. This is the easiest way to get started with custom commands.

How to Use

In Friday, type / to open the command menu, then search for and select /create-command. Friday will guide you through creating a new custom command by asking:

  • What would you like to name your command? (should be a single word)
  • What should this command do?
  • Does this command need any arguments? If so, what should they be called?
  • Should this be available only in this project, or for all your projects?

After gathering this information, Friday will:

  • Create the command file in the appropriate location (.claude/commands/ for project-specific or ~/.claude/commands/ for personal)
  • Generate the command with proper frontmatter and structure
  • Confirm the command was created successfully

Important: You'll need to restart your Friday session for the new command to become available in the command menu.

Usage

Command File Structure

Custom commands are Markdown files with optional YAML frontmatter:

---
description: Brief description of what the command does
argument-hint: [arg1] [arg2]
---

Your command prompt goes here.
Use $1, $2, etc. for positional arguments.
Use $ARGUMENTS for all arguments combined.

Frontmatter Fields

  • description - A brief description shown in the command menu
  • argument-hint - Hint text showing what arguments the command expects (e.g., [file-path] or [feature-name])

Argument Substitution

Commands support dynamic argument substitution using placeholders:

  • $1, $2, $3, ... - Individual positional arguments
  • $ARGUMENTS - All arguments combined as a single string

When you invoke a command with arguments, Friday will prompt you to enter them. The placeholders in your command body will be replaced with the actual values.

Bash Command Execution

You can execute bash commands and embed their output using the !command`` syntax:

The current branch is !`git branch --show-current`
The last commit was: !`git log -1 --oneline`

Bash commands are executed before the prompt is sent to Friday, and their output is embedded directly into the prompt. You can combine bash commands with argument substitution:

Review the changes in !`git diff $1`

Command Naming and Organization

Command names are derived from the file path:

  • review.md becomes /review
  • git/status.md becomes /git:status

You can organize commands in subdirectories to create namespaces. For example:

~/.claude/commands/
  review.md          → /review
  git/
    status.md        → /git:status
    diff.md          → /git:diff
  docs/
    generate.md      → /docs:generate

Project vs User Commands

Commands in .claude/commands/ (project-level) override commands with the same name in ~/.claude/commands/ (user-level). This allows you to:

  • Share team-specific commands by committing them to version control
  • Keep personal commands private in your home directory
  • Override user commands with project-specific versions when needed

Examples

Example 1: Code Review Command

Create a command to review code changes in a specific file:

# ~/.claude/commands/review.md

---

description: Review code changes in a file
argument-hint: [file-path]

---

Review the code in $1 and provide feedback on:

- Code quality and best practices
- Potential bugs or issues
- Performance considerations
- Suggestions for improvement

Be specific and constructive in your feedback.

Usage: Type / in Friday, select /review, and enter the file path when prompted.

Example 2: Git Status with Branch Info

Create a command that embeds git information using bash commands:

# ~/.claude/commands/git-status.md

---

## description: Show current git status and branch

Current branch: !`git branch --show-current`
Last commit: !`git log -1 --oneline`

Unstaged changes:
!`git status --short`

What should I do next with these changes?

This command executes the bash commands and embeds their output before sending the prompt to Friday.

Example 3: PR Comment Reviewer

Create a command to address PR comments:

# ~/.claude/commands/address-pr-comments.md

---

## description: Pull PR comments and address them for current branch

Pull the PR comments for the current branch and address them.

Review each comment carefully and make the necessary code changes to address the feedback.

This command doesn't require arguments and will work with Friday's GitHub integration to fetch and address PR comments.

Example 4: Multi-Argument Command

Create a command that uses multiple arguments:

# ~/.claude/commands/refactor.md

---

description: Refactor code with specific focus
argument-hint: [file-path] [focus-area]

---

Refactor the code in $1 with a focus on $2.

Provide:

1. The refactored code
2. Explanation of changes
3. Benefits of the refactoring

Ensure the refactored code maintains the same functionality.

Usage: When prompted, enter arguments separated by spaces, e.g., src/utils.py performance

Example 5: Combining Arguments and Bash Commands

Create a command that combines both features:

# ~/.claude/commands/compare-branches.md

---

description: Compare changes between current branch and another
argument-hint: [target-branch]

---

Current branch: !`git branch --show-current`
Target branch: $1

Differences:
!`git diff $1...HEAD --stat`

Detailed changes:
!`git diff $1...HEAD`

Please analyze these changes and provide:

1. Summary of what changed
2. Potential conflicts or issues
3. Recommendations before merging

This command combines argument substitution ($1) with bash command execution to create a powerful git comparison tool.

Tips and Best Practices

  • Use descriptive command names - Choose names that clearly indicate what the command does
  • Add helpful descriptions - The description appears in the command menu, so make it informative
  • Provide argument hints - Help users understand what arguments are expected
  • Test bash commands - Ensure bash commands work correctly before embedding them in commands
  • Organize with subdirectories - Group related commands in folders for better organization
  • Share team commands - Commit project-level commands to version control to share with your team
  • Keep commands focused - Each command should do one thing well
  • Use $ARGUMENTS for flexibility - When you want to accept any number of arguments, use $ARGUMENTS instead of numbered placeholders