Skip to main content
guidesSource-backedReview first Safety Privacy

Claude Code Slash Commands For Maintainers

Use Claude Code slash commands for maintainer workflows: project commands in .claude/commands, namespacing, permission-safe defaults, review before merge, and documenting command scope for contributors.

by kiannidev·added 2026-06-16·
HarnessClaude Code
Review first review before installing

Open the source and read safety notes before installing.

Safety notes

  • Slash commands expand agent capabilities—commands that run bash or edit files need explicit safety review.
  • Do not embed secrets or production URLs with credentials in command templates.
  • Avoid commands that disable sandbox or permission prompts without CODEOWNERS gate.

Privacy notes

  • Command templates may include internal service names—sanitize before open-sourcing repos.
  • Shared commands appear in autocomplete for all contributors—scrub customer examples.
  • Command output logs follow normal session retention policies.

Prerequisites

  • Claude Code with slash command support enabled.
  • Repository write access to add .claude/commands files.
  • Maintainer agreement on which workflows become shared commands.
  • Staging branch or fork to test commands before merging to default branch.

Schema details

Install type
copy
Reading time
8 min
Difficulty score
52
Troubleshooting
Yes
Breaking changes
No
Full copyable content
Add reviewed markdown commands under .claude/commands, namespace by team function, avoid destructive defaults, document args in frontmatter, and test commands in CI or staging before publishing to main.

About this resource

TL;DR

Build maintainer slash commands with scoped .claude/commands and review discipline.

Prerequisites & Requirements

  • {"task": "Check", "description": "Claude Code with slash command support enabled."}
  • {"task": "Check", "description": "Repository write access to add .claude/commands files."}
  • {"task": "Check", "description": "Maintainer agreement on which workflows become shared commands."}
  • {"task": "Check", "description": "Staging branch or fork to test commands before merging to default branch."}

Core Concepts Explained

Project vs personal commands

Official docs distinguish personal commands from project-scoped commands checked into the repository for team sharing.

Commands shape agent behavior

A slash command is a reusable prompt template—maintainers should treat changes as policy updates.

Frontmatter controls metadata

Document description, allowed tools, or argument hints in command frontmatter when supported.

Step-by-Step Implementation Guide

  1. Pick maintainer workflows. Examples: /review-pr, /release-notes, /triage-flaky.

  2. Create .claude/commands/ directory if missing; add one markdown file per command.

  3. Write self-contained prompts. Include context the agent needs without relying on chat history.

  4. Namespace names. Prefix team-specific commands (/acme-review) to avoid clashes.

  5. Review in PR. Require maintainer approval; note safety implications in PR body.

  6. Test on sample tasks. Run each command against a known small issue before broad announcement.

  7. Document in CONTRIBUTING. List available commands, owners, and expected outputs.

  8. Deprecate safely. Remove commands in a dedicated PR and announce replacements.

Troubleshooting

Command not appearing in autocomplete

Confirm file path .claude/commands/name.md and reload session; check plugin conflicts.

Command runs wrong repo context

Ensure contributors run Claude Code from repository root or document required cwd.

Built-in command name collision

Rename project command with team prefix.

Source Verification Notes

Verified against official documentation on 2026-06-16:

  • Slash commands documentation describes user and project commands invoked with /name syntax.
  • Project commands live under .claude/commands as markdown with optional frontmatter.
  • Commands can standardize maintainer workflows like review, release, or triage prompts.
  • Teams should review command diffs like code because they shape agent behavior.
  • Namespacing commands reduces collision with built-in or plugin commands.

Duplicate Check

Complements content/commands/* catalog entries and plugin command bundles. This guide focuses on maintainer-authored project slash commands in .claude/commands.

References

Source citations

Add this badge to your README

Show that Claude Code Slash Commands For Maintainers is listed on HeyClaude. Paste this Markdown into your README — it renders the badge and links back to this page.

Listed on HeyClaude
[![Listed on HeyClaude](https://heyclau.de/badge/guides/claude-code-slash-commands-for-maintainers.svg)](https://heyclau.de/entry/guides/claude-code-slash-commands-for-maintainers)

How it compares

Claude Code Slash Commands For Maintainers side by side with 3 alternatives on trust, install, platform support, and disclosed safety notes — all from reviewed registry metadata.

FieldClaude Code Slash Commands For Maintainers

Use Claude Code slash commands for maintainer workflows: project commands in .claude/commands, namespacing, permission-safe defaults, review before merge, and documenting command scope for contributors.

Open dossier
Slash Command Generator for Claude Code

Claude Code slash command that generates a new .claude/commands/*.md file from a template, with optional arguments, frontmatter, and team-sharing support.

Open dossier
/docs - Docs Generator Command for Claude Code

Intelligent documentation generator with API specs, code examples, tutorials, and interactive guides

Open dossier
/refactor-code - Scoped Refactor Command for Claude Code

Custom slash command for behavior-preserving, scoped refactors of one file, function, or selection — stays inside a narrow ownership boundary for a reviewable, PR-sized change instead of a repo-wide pass

Open dossier
Trust
Install riskReview firstReview firstReview firstReview first
Notes Safety Privacy Safety Privacy Safety · Privacy · Safety Privacy
Categoryguidescommandscommandscommands
Sourcesource-backedsource-backedsource-backedsource-backed
AuthorkiannidevJSONboredJSONboredJSONbored
Added2026-06-162025-10-252025-09-162025-09-16
Platforms
Claude Code
Claude Code
Claude Code
Claude Code
Source repo
Safety notesSlash commands expand agent capabilities—commands that run bash or edit files need explicit safety review. Do not embed secrets or production URLs with credentials in command templates. Avoid commands that disable sandbox or permission prompts without CODEOWNERS gate.Creates .md files in .claude/commands/ in the current project directory; review generated content before committing.— missingThis command edits source files in your working directory. Review the proposed diff before accepting, and keep your work committed or backed up so changes are easy to revert. It is scoped on purpose — it should not perform repository-wide rewrites. Run your tests after applying to confirm behavior is unchanged.
Privacy notesCommand templates may include internal service names—sanitize before open-sourcing repos. Shared commands appear in autocomplete for all contributors—scrub customer examples. Command output logs follow normal session retention policies.Creates .md files in your local .claude/commands/ directory; no content is sent externally.— missingThe command reads the local source you point it at so Claude can refactor it within your session. It does not send your code to any third-party service beyond the model you are already using.
Prerequisites
  • Claude Code with slash command support enabled.
  • Repository write access to add .claude/commands files.
  • Maintainer agreement on which workflows become shared commands.
  • Staging branch or fork to test commands before merging to default branch.
— none listed— none listed— none listed
Install
/slash-command-gen [command-name] [options]
/docs [options] <file_or_project>
/refactor-code <file, function, or selection>
Config
Citations
ClaimUnclaimedUnclaimedUnclaimedUnclaimed

Signals

Loading live community signals…

More like this, weekly

A short, calm digest of reviewed Claude resources. Unsubscribe any time.