Claude Prompt for Claude Code Customization
Build a project-level slash command at .claude/commands/add-tests.md that write docstrings/JSDoc for all exported symbols in a Kubernetes operator.
More prompts for Claude Code Customization.
Configure a SessionEnd summary writer (commit a session digest) in .claude/settings.json for a FastAPI microservice, with matcher, command, and rollback plan.
Define a specialized Claude Code subagent at .claude/agents/diff-explainer.md with its own tool allowlist and system prompt.
Define a specialized Claude Code subagent at .claude/agents/diff-explainer.md with its own tool allowlist and system prompt.
Configure a UserPromptSubmit linter (strip secrets, expand aliases) in .claude/settings.json for a NestJS API, with matcher, command, and rollback plan.
Define a specialized Claude Code subagent at .claude/agents/changelog-curator.md with its own tool allowlist and system prompt.
Build a project-level slash command at .claude/commands/docstrings.md that review my current diff and comment inline in a Node.js backend.
You are a senior DX engineer with extensive technical knowledge in developer tooling. You write clear, precise, and implementation-ready content. Design a Claude Code slash command for a Kubernetes operator. **Command name:** /add-tests **Task:** write docstrings/JSDoc for all exported symbols **Project:** Kubernetes operator **Team:** 2-5 engineer startup **Scope:** project-level (committed to the repo) ## Where this file lives - Project-level: `.claude/commands/add-tests.md` (checked into git, shared with the team) - User-level: `~/.claude/commands/add-tests.md` (personal, all repos) Pick project-level for this command since it should apply to every contributor on the Kubernetes operator. ## File structure you must produce ```markdown --- description: <one-line, shown in the / menu> argument-hint: <optional hint shown after the slash command, e.g. "[file path]"> allowed-tools: - Bash(git *) - Read - Edit - Grep - Glob model: claude-sonnet-4-5 # optional override --- # /add-tests <body: the prompt Claude sees when this command fires> ``` Rules: - Use `$ARGUMENTS` to interpolate everything the user typed after the slash command - Use `$1`, `$2` for positional args - Use bash substitution with `!` prefix to run shell and inject output (e.g., `!git diff --staged`) - Use `@path/to/file` to inline file contents - Restrict `allowed-tools` to exactly what this command needs -- do not grant unrestricted Bash ## The body of the command should: 1. **Set role** in one line 2. **State the goal** -- what "done" looks like for write docstrings/JSDoc for all exported symbols 3. **Provide inputs** using `!` and `@` substitutions where possible (e.g. current diff, package.json, CLAUDE.md excerpts) 4. **Define the procedure** as a numbered list of steps, each ending in a verifiable outcome 5. **Specify the output format** (commit message? PR body? diff? file rewrite?) 6. **Include guardrails**: what Claude must NOT do (e.g. "do not push to main", "do not run destructive git commands") 7. **Include a verification step** at the end (run tests, re-read the diff, etc.) ## Length target 60-120 lines of markdown. Every line earns its place. ## Constraints - Commit in diffs under 100 lines - Respect no `console.log` in committed code -- use the logger - If the command could cause irreversible changes, the body must include "ask the user to confirm before <action>" ## Output Return the full file content of `.claude/commands/add-tests.md`, including the YAML frontmatter, in a single fenced code block. No prose outside the block. - Use precise technical terminology appropriate for the audience - Include code examples, configurations, or specifications where relevant - Document assumptions, prerequisites, and dependencies - Provide error handling and edge case considerations
Replace the bracketed placeholders with your own context before running the prompt:
[file path]— fill in your specific file path.