# Slash Command Factory

Generate custom Claude Code slash commands through intelligent 5-7 question flow.

- Repository: https://github.com/alirezarezvani/claude-code-skill-factory (897 stars)
- Category: AI and agents
- License: MIT
- Last updated: 2025-11-12
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add alirezarezvani/claude-code-skill-factory --skill slash-command-factory -g -a claude-code -y`
Codex: `npx skills add alirezarezvani/claude-code-skill-factory --skill slash-command-factory -g -a codex -y`
Cursor: `npx skills add alirezarezvani/claude-code-skill-factory --skill slash-command-factory -g -a cursor -y`
Gemini CLI: `npx skills add alirezarezvani/claude-code-skill-factory --skill slash-command-factory -g -a gemini-cli -y`

## Description

Generate custom Claude Code slash commands through intelligent 5-7 question flow. Creates powerful commands for business research, content analysis, healthcare compliance, API integration, documentation automation, and workflow optimization. Outputs organized commands to generated-commands/ with validation and installation guidance.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Slash Command Factory

A comprehensive system for generating production-ready Claude Code slash commands through a simple question-based workflow.

---

## What This Skill Does

This skill helps you create custom slash commands for Claude Code by:
- Asking 5-7 straightforward questions about your command needs
- Generating complete command .md files with proper YAML frontmatter
- Providing 10 powerful preset commands for common use cases
- Validating command format and syntax
- Creating well-organized folder structures
- Offering installation guidance

**Output**: Complete slash commands ready to use in Claude Code

---

## Official Command Structure Patterns

This skill generates commands following **three official patterns** from Anthropic documentation:

### Pattern A: Simple (Context → Task)

**Best for**: Straightforward tasks with clear input/output
**Example**: Code review, file updates, simple analysis
**Official Reference**: code-review.md

**Structure**:
```markdown
---
allowed-tools: Bash(git diff:*), Bash(git log:*)
description: Purpose description
---

## Context
- Current state: !`bash command`
- Additional data: !`another command`

## Your task
[Clear instructions with numbered steps]
[Success criteria]
```

**When to use**:
- Simple, focused tasks
- Quick analysis or reviews
- Straightforward workflows
- 1-3 bash commands for context

---

### Pattern B: Multi-Phase (Discovery → Analysis → Task)

**Best for**: Complex discovery and documentation tasks
**Example**: Codebase analysis, comprehensive audits, system mapping
**Official Reference**: codebase-analysis.md

**Structure**:
```markdown
---
allowed-tools: Bash(find:*), Bash(tree:*), Bash(ls:*), Bash(grep:*), Bash(wc:*), Bash(du:*)
description: Comprehensive purpose
---

# Command Title

## Phase 1: Project Discovery
### Directory Structure
!`find . -type d | sort`

### File Count Analysis
!`find . -type f | wc -l`

The rest: https://github.com/alirezarezvani/claude-code-skill-factory/blob/HEAD/generated-skills/slash-command-factory/SKILL.md
