DEV Community

Cover image for scaffold-skill-marketplace (a claude skill for claude skills)
emi
emi

Posted on

scaffold-skill-marketplace (a claude skill for claude skills)

scaffold-skill-marketplace is a repo I created that only needs a name, then writes a git repo that other people can install claude code skills from. It's the first skill in some-claude-skills (a repo i created with that skill).

this marketplace repo has a specific shape that the scaffold writes all in one pass:

  • marketplace.json
  • plugin.json
  • release workflow
  • PR scope check
  • skill-recommender hook
  • working example-tool-skill,
  • validate-skill.sh
  • update-plugin-versions.sh
  • .releaserc.json
  • CLAUDE.md
  • CONTRIBUTING.md
  • README.md with the install instructions already filled in.
bash scripts/scaffold.sh \
  --name my-team-skills \
  --owner-name "Your Name" \
  --owner-email "you@example.com" \
  --target-dir ./my-team-skills
Enter fullscreen mode Exit fullscreen mode

only --name is needed to get started, everything else has a default and the skill asks for whatever is missing before it runs.

files only

scaffold.sh:
a plain bash that renders 15 templates from references/templates/ with sed, substituting 6 placeholders:

  • {{MARKETPLACE_NAME}}
  • {{PLUGIN_NAME}}
  • {{DESCRIPTION}}
  • {{OWNER_NAME}}
  • {{OWNER_EMAIL}}
  • {{VERSION}}

the validator is copied over exactly since it has nothing to substitute.

it writes files then stops. next, it prints the next steps (git init, create the repo, claude --plugin-dir "$(pwd)" to test locally) and leaves it to you. where the repo lives and who can see it are the user's call, not the skill's.

the rest of the script is guards.. a target directory that already has files in it is refused unless you pass --force, and the skill is told to confirm with you before it does.

because the templates are just plain files, customizing every future scaffold means editing a template, adding a CI step or a category prefix is a change to one file in references/templates/, not to the script.

adding a skill is adding a directory

the generated marketplace.json sets "strict": false on the plugin, which means claude code auto-discovers whatever is in skills/, agents/, and hooks/. adding a skill is as easy as creating skills/<name>/SKILL.md and merging. there's no manifest to edit and no list of skills to keep in sync with the folders.

the tradeoff is that the folder layout becomes the contract, claude code scans skills/*/SKILL.md, one level deep (the generated CLAUDE.md says not to nest skills), and then the validator enforces the rest.

the validator

validate-skill.sh scans a skills dir against the marketplace conventions and reports any errors and warnings

errors = things that would break future discovery or invocation..
for examples, folder names that aren't kebab-case, a missing SKILL.md, a README.md inside a skill folder, frontmatter with no closing ---, a name that doesn't match its folder, a description with over 1024 characters, etc

warnings = the description, because the description is how claude decides when to auto-invoke a skill. a description without Use when trigger phrases, or without a NOT for line pointing at the right alternative, gets flagged

description: >
  Scaffold a new git repository that acts as a shareable Claude Code plugin
  marketplace for skills, agents, and hooks. Use when asked to "create a skill
  marketplace", ... NOT for authoring an individual skill inside an existing
  repo (create skills/<name>/SKILL.md directly), and NOT for publishing or
  releasing an existing marketplace.
Enter fullscreen mode Exit fullscreen mode

it will also warn on a SKILL.md over 500 lines, raw XML-style tags, and any script in a skill's dir that the SKILL.md doesn't mention.

the hook

the generated hooks.json registers 1 UserPromptSubmit hook, recommend-skills.sh. it reads the prompt and compares it against the name of every skill in the marketplace. if one matches, it prints a suggestion that claude code adds to the context. asking claude to
write this post triggered it:

Relevant skills in this marketplace may help with this request:
  - /scaffold-skill-marketplace
Enter fullscreen mode Exit fullscreen mode

it's intentionally small. it matches skill names, not the trigger words in their
descriptions, and the script's own comments say to extend it as the marketplace grows.

releases

releases run on semantic-release from conventional commits:

  • feat cuts a minor
  • fix and perf cut a patch
  • docs, chore, and refactor release nothing

on each release, update-plugin-versions.sh bumps plugin.json and marketplace.json together, so the 2 manifests never disagree about the version, and the changelog is generated from the same commits.

the other half is the PR scope check. it counts how many skills, agents, and hook scripts a PR touches, so when a single PR touches more than 2 skills, or skills and agents together, it leaves a comment suggesting a split. it doesn't block the merge, but the point is a changelog where each entry means one thing.

living in ~/.claude

the skill started in ~/.claude/skills/scaffold-skill-marketplace, as a personal skill outside any repo.

a personal skill isn't versioned, isn't released, and isn't installable by anyone else,
which is everything the marketplace it scaffolds exists to provide. so I added it into the repo it had just generated, and now it ships the same way the skills it scaffolds do.

a trace of where it started is still in its SKILL.md: the generator command falls back to $HOME/.claude/skills/scaffold-skill-marketplace when CLAUDE_PLUGIN_ROOT isn't set.

the other skills I've added currently

some-claude-skills publishes 2 plugins now.

skills-core is the atomic skills: - - scaffold-skill-marketplace

  • day-in-review: which builds an end-of-day HTML recap of what I shipped from github, jira, calendar, and slack -brainstorm: a skill for shaping a vague feature before any planning starts
  • create-skill: skill for authoring new skills and agents with the same validation
  • setup-feature-branch: skill that installs the recommender hook

feature-builder is opt-in. it's a multi-agent workflow with workflow-build-feature, which drives a feature from requirements to plan, implementation, review, and testing. its way more robust and backed by 8 subagents and about 15 enforcement hooks. it started in the same single
plugin as everything else, but because that meant anyone who wanted brainstorm also got 15 hooks they hadn't asked for I decided to split it out.

Top comments (1)

Collapse
 
devantibot profile image
DEV ANTIBOT •

You need to complete account verification.Link in the profile.