add-command

Guide for creating new slash commands.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/christopher-buss/bedrock/add-command
Clone the repo
git clone --depth 1 https://github.com/christopher-buss/bedrock

Made for: Claude Code.

Per session 6 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,061 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 86% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00006 $0.01061
Opus 5 $0.00003 $0.00531
Sonnet 5 $0.00001 $0.00212
Haiku 4.5 $0.00001 $0.00106

Measured yesterday against content hash 505432aa2026, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

add-command scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

86% identical to add-command — 76 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.claude/commands/add-command.md · 167 lines

How it starts

The opening of the file, as written. The whole thing — 167 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Slash Command Creator Guide

How This Command Works

The /add-command command shows this guide for creating new slash commands. It includes:

  • Command structure and syntax
  • Common patterns and examples
  • Security restrictions and limitations
  • Frontmatter options

Note for AI: When creating commands, you CAN use bash tools like Bash(mkdir:*), Bash(ls:*), Bash(git status:*) in the allowed-tools frontmatter of NEW commands - but ONLY for operations within the current project directory. This command itself doesn't need bash tools since it's just documentation.

Command Locations

  • Personal: ~/.claude/commands/ (available across all projects)
  • Project: .claude/commands/ (shared with team, shows "(project)")

Basic Structure

---
allowed-tools: Read, Glob, Grep, Bash(git status:*), Task
description: Brief description of what this command does
argument-hint: [required-arg] [optional-arg]
---

# Command Title

Your command instructions here.

Arguments: $ARGUMENTS

File reference: @path/to/file.js

Bash command output: (exclamation)git status(backticks)

⚠️ Security Restrictions

Bash Commands (exclamation prefix): Limited to current working directory only.

  • ✅ Works: ! + backtick + git status + backtick (in project dir)
  • ❌ Blocked: ! + backtick + ls /outside/project + backtick (outside project)
  • ❌ Blocked: ! + backtick + pwd + backtick (if referencing dirs outside project)

File References (@ prefix): No directory restrictions.

  • ✅ Works: @/path/to/system/file.md
  • ✅ Works: @../other-project/file.js

Common Patterns

Simple Command

echo "Review this code for bugs and suggest fixes" > ~/.claude/commands/review.md

Command with Arguments

Note for AI: The example below uses a fullwidth dollar sign ($, U+FF04) to prevent interpolation in this documentation. When creating actual commands, use the regular $ character.

Fix issue $ARGUMENTS following our coding standards

Read the full file on GitHub · 167 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 167 lines · 6 tokens per session scan A 505432aa2026

Subscribe to this mod's changes

add-command is a command published in the GitHub repository christopher-buss/bedrock (13 stars, last pushed yesterday), licensed MIT. It adds 6 tokens to every session and 1,061 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. It is 86% identical to add-command, differing in 76 lines, and is treated as a copy.