fabrico-creating-prompts
Skill2 starsChanged 4 months agoMITView on GitHub
Create custom slash commands (.claude/commands/*.md) for Claude Code. Provides templates, guidelines, and a structured process for building command files that trigger specific workflows, optionally delegating to the right subagent. Use when creating, reviewing, or updating .claude/commands/*.md files.
In this repository42 other files it gives its agents.
- docs/agents.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- fabrico-architecture-designingSkill
- fabrico-building-admin-dashboardsSkill
- fabrico-building-admin-resourcesSkill
- fabrico-building-lean-applicationsSkill
- fabrico-codebase-analysingSkill
- fabrico-code-reviewingSkill
- fabrico-creating-agentsSkill
- fabrico-creating-instructionsSkill
- fabrico-creating-skillsSkill
- fabrico-designing-multi-cloud-architectureSkill
- fabrico-e2e-testingSkill
- fabrico-engineering-promptsSkill
- fabrico-ensuring-accessibilitySkill
- fabrico-implementation-gap-analysingSkill
- fabrico-implementing-backendSkill
- fabrico-implementing-ci-cdSkill
- fabrico-implementing-formsSkill
- fabrico-implementing-frontendSkill
- fabrico-implementing-kubernetesSkill
- fabrico-implementing-observabilitySkill
- fabrico-implementing-terraform-modulesSkill
- fabrico-improving-codebasesSkill
- fabrico-improving-uiSkill
- fabrico-jira-task-formattingSkill
- fabrico-managing-secretsSkill
- fabrico-optimizing-cloud-costSkill
- fabrico-optimizing-frontendSkill
- fabrico-planning-migrationSkill
- fabrico-preparing-applications-for-aiSkill
- fabrico-preparing-applications-for-saasSkill
- fabrico-reverse-engineering-specSkill
- fabrico-reviewing-frontendSkill
- fabrico-sql-and-database-understandingSkill
- fabrico-task-analysingSkill
- fabrico-task-extractingSkill
- fabrico-task-quality-reviewingSkill
- fabrico-technical-context-discoveringSkill
- fabrico-transcript-processingSkill
- fabrico-ui-verifyingSkill
- fabrico-writing-hooksSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. About 0 are common, 9 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 42
All structured content inside the command body MUST use XML-like tags for explicit structure.
- Distinctive: line 44
Use Markdown only for inline formatting (bold, code blocks, tables, lists) within XML sections.
- Distinctive: line 55
Use the checklist below and track your progress (the TodoWrite tool is useful here):
- Very specific: line 82
If a subagent fits, the command should delegate to it via the Task tool (subagent_type: <subagent-name>) — add the delegation directive as …
- Distinctive: line 83
If the workflow is generic and needs no specialist, omit delegation and write the steps for the main thread to follow.
- Very specific: line 90
If the workflow should be limited to a specific set (e.g., a read-only review command), list them in the allowed-tools frontmatter field …
- Distinctive: line 99
Do not reference skills that are not directly used in the workflow steps
- Distinctive: line 108
Keep steps focused on WHAT to do, not HOW to think about it (the subagent's personality handles the how)
- Distinctive: line 114
Document structure or template to follow (reference skill templates where applicable)
- Distinctive: line 125
Verify the command file against this checklist:
- Distinctive: line 170
All body content in the command file must use XML-like tags for structure.
- Very specific: line 172
Every section uses a matching opening and closing tag: <section-name> ...
- Very specific: line 176
Avoid XML attributes for structural content — use nested tags or Markdown content instead.
- Very specific: line 187
Place a brief line like The request: $ARGUMENTS near the top of the body when the command clearly operates on user input.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Creating Prompts
Creates well-structured custom slash commands for Claude Code. Enforces a consistent pattern across all commands and ensures clear separation between command files, subagent definitions, and skills.
Core Design Principles
<principles><separation-of-concerns>
A slash command (`.claude/commands/*.md`) defines WHAT workflow to execute. It must NOT define WHO the agent is.- Command = workflow trigger, workflow steps, tool configuration, expected outcome (
.claude/commands/*.mdfiles) - Subagent = behavior, personality, responsibilities, and problem-solving approach (
.claude/agents/*.mdfiles) - Skills = reusable domain knowledge, step-by-step processes, templates (
.claude/skills/<name>/SKILL.mdfiles)
A command routes work to a subagent (via the Task tool) and configures the workflow context. The subagent's role, personality, and behavioral guidelines are defined exclusively in the subagent file. The command must never redefine, override, or contradict the subagent's identity.
</separation-of-concerns>
<workflow-focus>
A slash command is a **workflow trigger**. It must:- Optionally DELEGATE to a specific subagent via the Task tool (
subagent_type: <subagent-name>) when the workflow has a clear owner - Describe the workflow steps Claude should follow for this specific task
- Define the expected outcome of the workflow
- Optionally restrict tools via the
allowed-toolsfrontmatter field - Optionally pick a model via the
modelfrontmatter field (otherwise the command inherits the session model)
A command must NOT:
- Define or alter a subagent's personality, tone, or behavioral traits
- Duplicate instructions that belong in skills
- Duplicate coding standards or guidelines that belong in
CLAUDE.mdmemory files - Contain generic instructions that are not specific to the workflow
</workflow-focus>
<xml-syntax>
All structured content inside the command body MUST use XML-like tags for explicit structure. This ensures reliable parsing across all model tiers.Use Markdown only for inline formatting (bold, code blocks, tables, lists) within XML sections.
</xml-syntax>
<minimal-scope>
A command should only describe what is necessary for the specific workflow it triggers. Delegate domain knowledge to skills, coding standards to `CLAUDE.md` memory, and behavioral guidelines to subagents.
</minimal-scope></principles>Creation Process
Use the checklist below and track your progress (the TodoWrite tool is useful here):
Creation progress:
- [ ] Step 1: Define the command's purpose
- [ ] Step 2: Decide whether to delegate to a subagent (and pick a model)
- [ ] Step 3: Determine tool requirements
- [ ] Step 4: Identify required skills
- [ ] Step 5: Design the workflow steps
- [ ] Step 6: Define output expectations
- [ ] Step 7: Assemble the command file using the template
- [ ] Step 8: Validate the command fileStep 1: Define the command's purpose
Answer these questions before writing anything:
- What specific workflow does this command trigger? (e.g., research a task, implement a feature, run e2e tests)
- What is the expected outcome? (e.g., a research document, implemented code, test suite)
- What inputs does the workflow require? (e.g., Jira ID, plan file, feature description) — these arrive via
$ARGUMENTS(or$1,$2, …) - Does this command extend or depend on another command?
- What makes this workflow distinct from existing commands?
Step 2: Decide whether to delegate to a subagent (and pick a model)
Decide if the workflow has a clear specialist owner:
- Review existing subagents in
.claude/agents/to find one whose role aligns with the workflow - If a subagent fits, the command should delegate to it via the Task tool (
subagent_type: <subagent-name>) — add the delegation directive as the first line of the body. The command should not redefine the subagent's capabilities. - If the workflow is generic and needs no specialist, omit delegation and write the steps for the main thread to follow.
- Optionally set the
model:frontmatter field (opus,sonnet, orhaiku) when the workflow's complexity warrants a specific tier; otherwise omit it and inherit the session model.
Step 3: Determine tool requirements
Decide if the command should restrict the tools Claude may use:
- By default, a command inherits the full Claude Code toolset (including all configured MCP servers). Omit
allowed-toolsunless you need to restrict. - If the workflow should be limited to a specific set (e.g., a read-only review command), list them in the
allowed-toolsfrontmatter field (e.g.,Read, Grep, Glob, Bash). - To allow a specific MCP server's tools, reference them by their
mcp__<server>__*names (e.g.,mcp__context7__*,mcp__figma__*,mcp__playwright__*).
Step 4: Identify required skills
Determine which skills the workflow depends on:
- Review existing skills in
.claude/skills/to find relevant ones - Each referenced skill provides domain knowledge the workflow relies on; reference it so Claude loads it before starting the workflow
- List skills with a brief explanation of why they are needed for THIS workflow
- Do not reference skills that are not directly used in the workflow steps
Step 5: Design the workflow steps
Outline the workflow as a numbered sequence:
- Each step should be a clear, actionable instruction
- Steps should reference skills and tools where appropriate
- Include decision points and branching logic if the workflow is not purely linear
- Include handoffs to other subagents (via the Task tool) or follow-up slash commands if the workflow spans multiple specializations
- Keep steps focused on WHAT to do, not HOW to think about it (the subagent's personality handles the how)
Step 6: Define output expectations
Specify the expected deliverables of the workflow:
- File name conventions and output locations
- Document structure or template to follow (reference skill templates where applicable)
- Summary format if the workflow produces a report
- Success criteria — how to know the workflow is complete
- This step is optional if the workflow outcome is self-evident (e.g., implemented code)
Step 7: Assemble the command file using the template
Use the ./prompt.template.md template to assemble the final command file. Place the file in .claude/commands/ with a descriptive kebab-case filename and the fabrico- prefix (e.g., fabrico-research.md, fabrico-implement-ui.md). The command is then invoked with its slash form (e.g., /fabrico-research, /fabrico-implement-ui). Commands can also be scoped globally by placing them in ~/.claude/commands/.
Step 8: Validate the command file
Verify the command file against this checklist:
- YAML frontmatter is valid and parseable
descriptionfield is present and concise (shown in the/menu)argument-hintfield (if present) describes what the user passes- If the command delegates, the delegation directive names an existing subagent in
.claude/agents/and uses the Task tool (subagent_type: <subagent-name>) allowed-toolsfield (if present) lists only the tools the workflow needsmodelfield (if present) is one ofopus,sonnet,haiku- All skills referenced in
Required Skillssection exist in.claude/skills/ - XML-like tags are properly opened and closed
- No subagent personality or behavioral instructions are embedded (those belong in
.claude/agents/*.md) - No coding standards or guidelines are embedded (those belong in
CLAUDE.md) - No skill content is duplicated (reference skills, don't copy them)
- Workflow steps are clear, sequential, and actionable
- The command is distinct from existing commands and does not duplicate their workflows
- If the command extends another command, the dependency is explicitly stated
Command File Structure Reference
Frontmatter Fields
| Field | Required | Description |
description | Yes | A short description of what the command does. Shown in the / menu. |
argument-hint | No | Hint text shown in the / menu to guide the user on what to provide (e.g., [Jira ID or task description]). |
allowed-tools | No | A comma-separated list of tools the command is permitted to use. If omitted, the command inherits the full Claude Code toolset (including MCP servers). Reference MCP tools as mcp__<server>__*. |
model | No | The model used when running the command (opus, sonnet, or haiku). If omitted, the command inherits the current session model. |
Delegation, not an
agent:field. Claude Code commands do not have anagentfrontmatter field. To route a workflow to a specialist, put a delegation directive at the top of the command body that launches the subagent with the Task tool (subagent_type: <subagent-name>). See the template for the exact wording.
Body Sections
| Section | Required | Purpose |
| Delegation directive | No | First line of the body when the workflow has a subagent owner: launch it via the Task tool. |
| Goal statement | Yes | 1-2 paragraphs describing what the command accomplishes and the expected outcome. |
<prerequisites> | No | Dependencies on other commands or files that must be completed first. |
<input-requirements> | No | Describes what context or inputs the workflow needs to start (often arriving via $ARGUMENTS). |
| Required Skills | Yes | Skills to load before starting the workflow, with brief rationale for each. |
| Workflow | Yes | Numbered steps defining the workflow sequence. |
<output-specification> | No | File naming, document structure, summary format, or success criteria. |
<handoff> | No | Follow-up subagent (via the Task tool) or slash command to run at the end of the workflow. |
<constraints> | No | Workflow-specific limitations, anti-patterns, or scope boundaries. |
XML Syntax Guidelines
All body content in the command file must use XML-like tags for structure. Rules:
- Every section uses a matching opening and closing tag:
<section-name>...</section-name> - Tags use lowercase-kebab-case naming
- Nesting is allowed for sub-sections
- Markdown formatting (bold, lists, tables, code blocks) is used inside XML tags for content
- Avoid XML attributes for structural content — use nested tags or Markdown content instead. Exception: identifier attributes (e.g.,
<tool name="...">) are acceptable when they improve readability.
Arguments Reference
Slash commands receive the user's input through argument placeholders that Claude Code substitutes at runtime. Use them to make commands operate on dynamic input:
| Placeholder | Description |
$ARGUMENTS | The full argument string the user passed after the slash command (e.g., everything after /fabrico-research). |
$1, $2, $3, … | Individual positional arguments, split on whitespace. Use these when the command expects multiple discrete inputs. |
Place a brief line like The request: $ARGUMENTS near the top of the body when the command clearly operates on user input. Use the argument-hint frontmatter field to tell the user what to provide.
Note on dynamic editor context. Unlike VS Code prompt variables, Claude Code commands do not resolve
${file}/${selection}/${workspaceFolder}-style editor variables. To reference workspace files, name the path directly in the workflow (Claude reads it with the Read tool), or have the user pass it as an argument. You can also embed shell output by prefixing a body line with!to run a Bash command and inline its result, or reference a file's contents with@path/to/file.
Connected Skills
fabrico-creating-agents- to understand subagent patterns and ensure commands don't overlap with subagent responsibilitiesfabrico-creating-skills- to ensure this skill's own structure follows the canonical skill creation requirementsfabrico-technical-context-discovering- to understand existing command patterns and project conventions before creating a new onefabrico-codebase-analysing- to analyze existing commands and identify patterns to followfabrico-creating-instructions- to understand when coding standards belong inCLAUDE.mdmemory files rather than command definitions
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

