From claude-factory
Scaffold a Claude Code skill from a natural language description. Use when creating SKILL.md files, /commands, or extending Claude Code with new skills. Triggers on /factory:skill.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-factory:skillThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Official specification: @../../references/skill-spec.md
Official specification: @../../references/skill-spec.md Simple template: @../../templates/skill-simple.md Router template: @../../templates/skill-router.md
/factory:skill "description of what the skill should do"
/factory:skill my-skill-name "description of what the skill should do"
$ARGUMENTS contains the user's input. Parse it to extract:
Extract from $ARGUMENTS:
If $ARGUMENTS is empty, ask the user: "What should this skill do? Describe it in natural language."
Check if a SKILL.md already exists at the target location:
# Look for existing skill with the same name
ls -la <target-path>/skills/<skill-name>/SKILL.md 2>/dev/null
From the description, determine:
context: fork for subagent isolation?Review what was determined in Step 2. If the description is precise enough to resolve all decisions, skip this step entirely.
Otherwise, use AskUserQuestion to ask only about decisions that remain ambiguous:
Rules:
Determine where to write the skill:
# Check if we're inside a plugin directory
pwd_output=$(pwd)
Resolution logic:
*/plugins/<plugin-name>/* → write to <CWD>/skills/<skill-name>/SKILL.md (or relative to the plugin root).claude-plugin/marketplace.json → list available plugins under plugins/ and ask which one to target.claude/skills/<skill-name>/SKILL.md (standalone project)# Check if target directory already exists
ls -la <target-path>/skills/<skill-name>/ 2>/dev/null
If the directory exists:
<skill-name> already exists at <path>"@../../templates/skill-router.md)@../../templates/skill-simple.md)Create the directory and SKILL.md:
<target-path>/skills/<skill-name>/ directorySKILL.md with:
Frontmatter rules:
name: Always include (the kebab-case name)description: Always include. Front-load the use case. Include trigger keywords. Max 250 chars.allowed-tools: Include only if restricting tools (don't include if all tools are needed)model: Include only if a specific model is neededeffort: Include only if non-defaultcontext: Include only if fork is neededpaths: Include only if auto-activation is relevantshell: Include only if powershell is needed (bash is default)hooks: Include only if inline hooks are neededBody rules:
When Step 1.5 detected an existing SKILL.md:
cat <target-path>/skills/<skill-name>/SKILL.md
Parse the existing frontmatter and body content.
Build a diff of what the user wants to change. Show the user:
Current frontmatter:
name: <current>
description: <current>
allowed-tools: <current>
...
Proposed changes:
<field>: <current> → <new>
...
Use AskUserQuestion to present the comparison and ask:
Edit (not Write) to apply only the approved modificationsDisplay:
Skill updated: <skill-name>
Location: <full-path>/skills/<skill-name>/SKILL.md
Changes applied: <list of changed fields/sections>
Display:
Skill created: <skill-name>
Location: <full-path>/skills/<skill-name>/SKILL.md
Invocation: /<namespace>:<skill-name> (plugin) or /<skill-name> (standalone)
Tip: Run /factory:audit <path> to validate the generated skill.
npx claudepluginhub lingelo/marketplace-claude-code --plugin claude-factoryGenerates Claude Code skills and slash commands: interviews for requirements, selects type, crafts dense frontmatter with trigger phrases, initializes directories via Python script.
Creates directory and SKILL.md scaffold with YAML frontmatter for new Claude skills. Invoke via /create-skill [kebab-case-name] when starting skills from scratch.
Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.