From jx-local
Scaffold a local project-level skill in .claude/skills/<name>/. Creates SKILL.md with proper frontmatter and optional extras (evals, scripts, templates, references directories). Triggers on: "create local skill", "scaffold local skill", "new local skill", "add local skill", /jx-local:create-skill, or any request to create a skill in a project's .claude/skills/ directory. Do not trigger for: creating skills inside Jodex plugins (author those manually under plugins/<plugin>/skills/), plugin scaffolding, wiki operations.
How this skill is triggered — by the user, by Claude, or both
Slash command
/jx-local:create-skill --name <skill-name> --description "..." [--triggers "..."] [--allowed-tools "..."] [--argument-hint "..."] [--extras evals,scripts,templates,references] [--project-root <path>]--name <skill-name> --description "..." [--triggers "..."] [--allowed-tools "..."] [--argument-hint "..."] [--extras evals,scripts,templates,references] [--project-root <path>]The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Scaffold a new skill in the user's project at `<project-root>/.claude/skills/<name>/`.
Scaffold a new skill in the user's project at <project-root>/.claude/skills/<name>/.
| Argument | Flag | Required | Default | Notes |
|---|---|---|---|---|
| Skill name | --name | Yes | — | Lowercase hyphenated, must match ^[a-z0-9]+(?:-[a-z0-9]+)*$. Prompted if missing. |
| Description | --description | Yes | — | Skill description. Prompted if missing. |
| Triggers | --triggers | No | (none) | CSV trigger phrases. When omitted, a "Use when..." sentence is auto-generated. |
| Allowed tools | --allowed-tools | No | (none) | Tool allowlist. When omitted, allowed-tools: field is omitted from frontmatter. |
| Argument hint | --argument-hint | No | (none) | Bracketed args (e.g., [--mode lite]). |
| Extras | --extras | No | (none) | CSV from {evals, scripts, templates, references}. Creates optional dirs. |
| Project root | --project-root | No | (auto-detect) | Override project root. Defaults to git rev-parse --show-toplevel or cwd. |
Detect project root. If --project-root provided, use it. Otherwise, try git rev-parse --show-toplevel first; if that fails (not a git repo), fall back to pwd. Run each as a separate command:
git rev-parse --show-toplevel
If that exits non-zero:
pwd
Verify the resolved directory exists and is a directory.
Extract --name. If missing, prompt: "What should this skill be called? (lowercase, hyphens ok, e.g., deploy-check)"
Extract --description. If missing, prompt: "One-line description of what this skill does:"
Extract --triggers. Optional. If missing, a "Use when..." sentence will be auto-generated from the name and description.
Extract --allowed-tools. Optional. If missing, allowed-tools: field is omitted from generated frontmatter.
Extract --argument-hint. Optional. If missing, argument-hint: field is omitted from generated frontmatter.
Extract --extras. Optional. If provided, validate each item against the closed set {evals, scripts, templates, references}. Reject unknown values with: "Unknown extra ''. Valid extras: evals, scripts, templates, references."
Run all validations sequentially. Halt on first failure, show the exact problem and how to fix it.
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/local-skill-creator.py" validate-name <skill_name>
On failure (JSON "valid": false), display the error and ask for a corrected name.
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/local-skill-creator.py" check-collision <skill_name> "<PROJECT_ROOT>"
Checks both .claude/skills/<name>/ and .claude/commands/<name>.md. On collision (JSON "collision": true): display the collision details and ask the user to choose a different name. Do not offer a replacement path — the scaffold helper does not support overwriting existing skills.
Compute the effective trigger text:
--triggers was provided, use it directly.scaffold will produce.Then run:
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/local-skill-creator.py" check-triggers <skill_name> "<effective_triggers>" "<PROJECT_ROOT>"
On exact conflicts: halt and display. On substring conflicts: warn but allow the user to proceed.
Classify the target project root:
PROJECT_ROOT matches the current working directory or its git root. Skill will be discoverable immediately (if .claude/skills/ already exists) or after restart (if newly created).PROJECT_ROOT is an ancestor of cwd. Skill is discoverable.PROJECT_ROOT is not the current project or an ancestor. Warn: "This skill will be created at <path> which is outside the current project. You will need to start Claude Code in that directory or use /add-dir to discover it."Display the planned artifacts and require explicit confirmation before writing.
## Planned Artifacts
Project: <PROJECT_ROOT>
Skill: <name>
Discovery: <usable now | restart required | external target>
| # | File | Action |
|---|------|--------|
| 1 | .claude/skills/<name>/SKILL.md | CREATE |
| 2 | .claude/skills/<name>/evals/evals.json | CREATE (if --extras includes evals) |
| 3 | .claude/skills/<name>/scripts/.gitkeep | CREATE (if --extras includes scripts) |
| 4 | .claude/skills/<name>/templates/.gitkeep | CREATE (if --extras includes templates) |
| 5 | .claude/skills/<name>/references/.gitkeep | CREATE (if --extras includes references) |
Only rows for files that will actually be created should appear.
Proceed? (yes/no)
Do NOT proceed until user confirms with an affirmative answer.
Run the helper script:
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/local-skill-creator.py" scaffold <skill_name> "<PROJECT_ROOT>" --description "<description>" [--triggers "<triggers_csv>"] [--allowed-tools "<tools>"] [--argument-hint "<hint>"] [--extras "<extras_csv>"]
The helper:
tempfile.mkdtemp)..claude/skills/<name>/.On success: proceed to Phase 5. On failure: display the error and any rollback details.
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/local-skill-creator.py" verify <skill_name> "<PROJECT_ROOT>" [--extras "<extras_csv>"]
python3 -m json.tool "<PROJECT_ROOT>/.claude/skills/<name>/evals/evals.json"
## Local Skill Scaffolded
Project: <PROJECT_ROOT>
Skill: <name>
### Files Created
- .claude/skills/<name>/SKILL.md
- .claude/skills/<name>/evals/evals.json (if extras)
- .claude/skills/<name>/scripts/.gitkeep (if extras)
- .claude/skills/<name>/templates/.gitkeep (if extras)
- .claude/skills/<name>/references/.gitkeep (if extras)
### Discovery Status
- "Skill is ready — invoke with `/<name>`" (if .claude/skills/ already existed)
- "Restart Claude Code to discover this skill" (if .claude/skills/ was newly created)
- "External target — start Claude in `<path>` or use `/add-dir`" (if non-current project)
### Next Steps
1. Edit SKILL.md to add full phase logic and instructions
2. Add eval test cases to evals/evals.json (if created)
3. Test the skill with: /<name>
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub jairosoft-com/jodex-plugins --plugin jx-local