Skip to content

Comments

agent: add make-command for interactive command scaffolding#18

Merged
p-iknow merged 1 commit intomainfrom
i11-agent/create-make-command-to-scaffold-new-claude-code-commands
Oct 25, 2025
Merged

agent: add make-command for interactive command scaffolding#18
p-iknow merged 1 commit intomainfrom
i11-agent/create-make-command-to-scaffold-new-claude-code-commands

Conversation

@p-iknow
Copy link
Contributor

@p-iknow p-iknow commented Oct 25, 2025

Requirement

Resolves #11

Create a /make-command slash command to scaffold new Claude Code commands following the official guide. The command should help users create properly structured command files with correct frontmatter, tool permissions, and workflow structure without requiring prior knowledge of the command structure.

Implementation

Interactive 4-Question Workflow:

  • Created guided workflow with 4 key questions:
    • Q1: Command purpose (generates description)
    • Q2: Workflow steps (infers tools and structures workflow)
    • Q3: User input requirements (none/arguments/interactive)
    • Q4: External system interaction (determines tool permissions)

AI-Powered Generation:

  • AI analyzes user responses to generate concise, action-oriented descriptions
  • Smart tool inference from keywords:
    • "GitHub"/"gh"/"PR" → Bash(gh *:*)
    • "git"/"branch"/"commit" → Bash(git *:*)
    • "npm"/"package.json" → Bash(npm *:*), Read
    • "read"/"analyze"/"search" → Read, Grep, Glob
    • "create file"/"generate" → Write
    • "modify"/"update file" → Edit
  • AI structures workflow from user's step descriptions
  • Shows generated content (description, tools, workflow) to user for approval
  • Supports iteration until user is satisfied

Command File Generation:

  • Generates complete command file at .claude/commands/{command-name}.md
  • Includes proper YAML frontmatter (description, argument-hint, allowed-tools)
  • Creates structured sections: Usage, Workflow, Examples, Best Practices, References
  • Adds inline comments about argument patterns and tool usage
  • Includes quality guidelines for workflow and documentation

Comprehensive Documentation:

  • 4 detailed examples showing different scenarios:
    1. Simple command (no arguments, hello-world)
    2. GitHub PR review with arguments
    3. npm dependency analyzer with iteration flow
    4. Fully interactive (no command name provided)
  • Enhanced Best Practices section with:
    • Information gathering guidelines
    • AI inference patterns
    • Description generation rules
    • Tool selection best practices
    • Workflow generation guidelines

Files Added:

  • .claude/commands/make-command.md (653 lines)

Test

  • Command file structure validated (frontmatter, sections, examples)
  • Interactive workflow documented with clear Q&A flow
  • AI analysis section includes tool inference patterns
  • 4 comprehensive examples cover different use cases
  • Best practices include information gathering guidance
  • References official Claude Code slash commands guide

Reference

Human Check

🤖 Generated with Claude Code

  • I reviewed it

Requirement:
Create a /make-command slash command to scaffold new Claude Code commands following the official guide. The command should help users create properly structured command files with correct frontmatter, tool permissions, and workflow structure.

Implementation:
- Created interactive workflow with 4 key questions (Q1: purpose, Q2: workflow steps, Q3: user input, Q4: external systems)
- AI analyzes responses to generate description, infer required tools, and structure workflow
- Smart tool inference from keywords (GitHub→gh CLI, git→Bash(git *:*), npm→Bash(npm *:*))
- Shows generated components to user for approval with iteration support
- Generates complete command file with frontmatter, usage, workflow, examples, and best practices sections
- Includes 4 comprehensive examples showing different scenarios (simple, arguments, iteration, fully interactive)
- Command accepts optional command-name argument, all other info collected interactively

Resolves #11

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions github-actions bot added the agent Agent rules and commands label Oct 25, 2025
@p-iknow p-iknow marked this pull request as ready for review October 25, 2025 14:12
@p-iknow p-iknow merged commit b623b2c into main Oct 25, 2025
4 checks passed
@p-iknow p-iknow deleted the i11-agent/create-make-command-to-scaffold-new-claude-code-commands branch October 25, 2025 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent Agent rules and commands

Projects

None yet

Development

Successfully merging this pull request may close these issues.

agent: create make-command to scaffold new Claude Code commands

1 participant