Scaffold Skill
Use this skill to write production-quality Agent Skills in the repository the user is working in. It is knowledge-only: read the instructions and references, inspect the repo, then create or edit the skill files in context.
Hard rule: This skill does not run a generator.
Existing skill content is read-only
If the user already wrote the skill (an existing SKILL.md, references, scripts, or assets) and asked only for scaffolding, packaging, or validation, treat that content as final. Scaffold around it.
- Do not rewrite, reword, "improve", or trim the user's
description, frontmatter, or body — not even small edits. - Auditing is welcome: review the content, and report concerns or suggestions in the final response.
- Only change existing skill content after the user explicitly approves a specific proposed change in this conversation. "Scaffold this" is not approval to edit.
- If validation fails because of user-written content, report the failure and the suggested fix; do not apply it unasked.
Source verification is for maintaining this skill
<skill-root>/scripts/verify_reference_facts.py is for maintaining scaffold-skill itself against local agentskills and Vercel skills checkouts. It is not part of the normal workflow for scaffolding skills in user repos.
When updating scaffold-skill's own references or making claims about packaging behavior, directory paths, frontmatter constraints, plugin manifest fields, or install commands, verify against current source when available:
python3 <skill-root>/scripts/verify_reference_facts.py
The verifier auto-discovers sibling checkouts when possible. If auto-discovery fails, pass local paths explicitly with --agentskills <path>, --vercel-skills <path>, and repeatable --production-repo <path>. If sources are unavailable, say what could not be verified, then use the bundled references as a fallback. Do not invent undocumented client-specific behavior.
Workflow
- Clarify context. Ask only for missing essentials: whether the skill belongs in an existing repo or a new repo, whether it is local-only or intended for publishing, the skill name, concrete trigger prompts, desired output, and whether references/scripts/assets are needed.
- Inspect the repo first. Look for existing skills,
README.md, plugin directories, package metadata, and.agents/skills/. Use the current repo's conventions when they are clear. Never overwrite existing files unless the user explicitly asks. - Read the right references before writing.
- Read
references/portable-skill-format.mdforSKILL.mdand resource rules. - Read
references/in-repo-scaffolding.mdfor placement and safe file creation in user repos. - Read
references/repo-architecture.mdfor repository layouts. - Read
references/distribution-targets.mdonly when the user wants publishing or plugin packaging. - Read
references/quality-gates.mdbefore finalizing descriptions, scripts, references, or evals. - Read
references/production-examples.mdwhen choosing between layouts or metadata patterns. - Read
references/verification-process.mdonly when maintaining scaffold-skill references.
- Read
- Write files by hand in the repo. Create only the files needed for the requested scope. For a project-local skill, this is usually
.agents/skills/<name>/SKILL.md. For a repo that ships skills, this is usuallyskills/<name>/SKILL.mdplus optionalreferences/,scripts/,assets/, andagents/openai.yaml. - Validate correctly. Use
<skill-root>/scripts/...paths because agents may be running from the target repo, not from this skill directory.
python3 <skill-root>/scripts/validate_skill_repo.py <repo-root> --strict-frontmatter
For a single skill directory, passing the skill directory path also works:
python3 <skill-root>/scripts/validate_skill_repo.py <repo-root>/.agents/skills/<name> --strict-frontmatter
python3 <skill-root>/scripts/validate_skill_repo.py <repo-root>/skills/<name> --strict-frontmatter
Only pass packaging targets that were actually created:
python3 <skill-root>/scripts/validate_skill_repo.py <repo-root> --targets vercel --strict-frontmatter
python3 <skill-root>/scripts/validate_skill_repo.py <repo-root> --targets claude --strict-frontmatter
python3 <skill-root>/scripts/validate_skill_repo.py <repo-root> --targets codex --strict-frontmatter
Never run --targets vercel,claude,codex for in-repo-only work unless all those manifests exist; the validator correctly exits 1 when requested target manifests are missing.
If Vercel packaging was added and the CLI is available, smoke-test discovery and install:
npx skills add <repo-root> --list
npx skills add <repo-root> -y
npx skills add is the documented install command. The CLI also accepts install as an alias for add. experimental_install only restores from skills-lock.json.
- Report what happened. List files created, existing files skipped, validation run or skipped, and any remaining manual steps. For publishable repos, include the copy-paste install block from
README.md(seereferences/distribution-targets.md).
Defaults that prevent common mistakes
- Keep portable
SKILL.mdfrontmatter strict:name,description, and only spec fields such aslicense,compatibility,metadata, orallowed-toolswhen needed. - Do not put client-specific invocation flags such as
disable-model-invocationinto a portable/public skill unless the user intentionally accepts client-specific validation failures. For Codex, preferskills/<skill>/agents/openai.yamlwithpolicy.allow_implicit_invocation: falsefor explicit-only skills. - Put all trigger logic in the frontmatter
description; a body section titled “When to use” is too late for automatic activation. - Keep
SKILL.mdlean and procedural. If the file approaches 500 lines or mixes unrelated variants, split details intoreferences/and say exactly when to read each reference. - Include
--help, noninteractive flags, structured stdout, useful stderr, and idempotent/dry-run behavior in bundled scripts. - Create packaging metadata from the actual skill, not from placeholders. Plugin manifests must not contain
[TODO: ...]values. - Publishable skill repos must ship a root
README.mdwith an## Installsection whose first command isnpx skills add owner/repo(no--skillflag when the repo has one skill). Verify againstvercel/skillswhen local source is available.
Completion checklist
Before final response, confirm:
- Every created skill directory has
SKILL.mdwith matching lowercase kebab-casename. - Every description says what the skill does and when to use it.
- Referenced
scripts/,references/,assets/, andagents/openai.yamlpaths exist. - No existing files were overwritten unless the user explicitly asked.
- User-written skill content is byte-identical unless the user approved a specific edit; audit findings were reported instead of applied.
-
skills.sh.jsonreferences real skill names if created. -
.claude-plugin/plugin.jsonskill paths resolve if created. -
.codex-plugin/plugin.jsonand.agents/plugins/marketplace.jsonare internally consistent if created. - Validation commands have run, or any skipped validation is explicitly explained.
- Publishable repos have
README.mdwith## Installand a workingnpx skills add owner/repoone-liner (smoke-tested with--listor-ywhen the CLI is available).