create-project-skill
Scaffold a project-local skill under a consuming repo's `.agents/skills` tree for Codex and Claude by default, with Codex-only and bridge-only modes.
- License 许可
- MIT
- 最近更新
- 2026-08-29
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- create-project-skill
- description
- Scaffold a project-local skill under a consuming repo's `.agents/skills` tree for Codex and Claude by default, with Codex-only and bridge-only modes.
02 资源文件 1
- 脚本scripts/create-project-skill.sh10.9 KB
03 SKILL.md 正文
Create Project Skill
Contract
Prereqs:
- Run inside the target consuming project's git work tree.
- The request is for a project-local skill, not a repo-owned runtime-kit managed
skill. Use
create-skillforagent-runtime-kitmanaged skills. - The caller has supplied or accepted a lowercase hyphenated skill name that
starts with
project-(project-local skills) orprivate-(skills under the private overlay home,$AGENT_PRIVATE_SKILLS_HOME). - Existing files are never overwritten without explicit user approval.
- Claude-only creation is unsupported. Claude exposure is a bridge to the
canonical
.agents/skillssource tree, not a second source location.
Inputs:
- Skill name, description, intended entrypoint, and whether the skill needs
skill-owned
scripts/,tests/,references/,fixtures/, orbin/. - Creation mode:
- default /
--target both: create the canonical skill source and ensure.claude/skills -> ../.agents/skills. --codex-only/--target codex: create only the canonical skill source and do not mutate.claude/.--bridge-only: create or verify only the Claude bridge for an existing.agents/skillstree.
- default /
- Optional
.agents/scripts/<command>.shthin wrapper for project slash-command style dispatch. - Optional project validation command to run after scaffolding.
Outputs:
.agents/skills/<skill>/SKILL.md.- Optional
.agents/skills/<skill>/scripts/<skill>.shexecutable stub. - Optional
.agents/skills/<skill>/{tests,references,fixtures,bin}/support directories. - Default
.claude/skillssymlink and.gitignoreentry for.claude/unless--codex-onlyis used. - Optional
.agents/scripts/<command>.shwrapper that delegates to the skill-owned script or another canonical project command. - A validation summary with created paths and any skipped optional surfaces.
Failure modes:
- The current directory is not inside a git work tree.
- The skill name is malformed (does not match
^(project|private)-[a-z0-9-]+), ambiguous, or collides with an existing.agents/skills/<skill>path. - A requested wrapper path already exists and replacement was not approved.
--target claude,--claude-only, or removed--link-onlyis requested.--bridge-onlyis requested without an existing.agents/skillstree.- The workflow would mutate runtime-kit manifests, product render output, golden snapshots, or global runtime homes.
- Validation fails after scaffolding.
Entrypoint
Use the bundled helper for deterministic file creation:
$HOME/.claude/plugins/meta/skills/create-project-skill/scripts/create-project-skill.sh <skill-name> --description "One-line description."
Default creation exposes the skill to both Codex-style .agents/skills
consumers and Claude through the project-local bridge. Use Codex-only only when
the current repo should not receive a .claude/ local directory:
$HOME/.claude/plugins/meta/skills/create-project-skill/scripts/create-project-skill.sh <skill-name> --codex-only
Use bridge-only when .agents/skills already exists and only Claude discovery
needs to be wired:
$HOME/.claude/plugins/meta/skills/create-project-skill/scripts/create-project-skill.sh --bridge-only
Optional support surfaces are explicit:
$HOME/.claude/plugins/meta/skills/create-project-skill/scripts/create-project-skill.sh <skill-name> --with-script --with-tests --with-wrapper <command>
Workflow
- Resolve the target project root with
git rev-parse --show-toplevel. - Confirm this is a project-local skill request. If the user wants a
runtime-kit managed skill, switch to
create-skill. - Normalize and validate the skill name as lowercase hyphenated text that
starts with
project-(project-local) orprivate-(private overlay); reject any other prefix. - Inspect
.agents/skills/,.agents/scripts/,.claude/, projectAGENTS.md/CLAUDE.md, and nearby local skill conventions before editing. - Refuse to overwrite existing skill directories, scripts, wrappers, symlinks, or project policy files unless the user explicitly approves replacement.
- Create
SKILL.mdwith front matter, H1, Contract, Entrypoint or Scripts, Workflow, and Boundary sections. - Add only the support folders explicitly requested. Keep stubs small and mark TODO behavior clearly when implementation remains.
- In the default mode, create or verify
.claude/skills -> ../.agents/skillsand ensure.claude/is ignored. Skip all.claude/mutation only when--codex-onlyis requested. - If a slash-command style wrapper is requested, create a thin
.agents/scripts/<command>.shwrapper that delegates to the skill-owned script or another canonical project command. - Create
.agents/scripts/pre-pr.shonly when--with-pre-pr-stubis requested. - Refuse removed Claude-only flags:
--target claude,--claude-only, and--link-only. - Run focused validation:
test -f, shell syntax for generated scripts, project-owned checks when available, and the user's requested validation command. - Report created paths, skipped optional paths, validation status, and next implementation work.
Boundary
This skill owns project-local skill scaffolding only. It does not mutate
manifests/skills.yaml, manifests/plugins.yaml, targets/, build/,
tests/golden/, sandbox expected skill lists, or live global runtime homes. If
project-local creation needs a reusable dry-run/apply planner, reference graph,
or machine-readable mutation contract, extract that deterministic behavior to
released nils-cli first and then call it from this workflow.
04 同仓库更多 Skills
removable-skill
暂无简介
removable-skill
暂无简介
removable-project-skill
Fixture project-local skill used to prove remove-project-skill dry-run coverage.
project-sample-skill
Fixture project-local skill used to prove create-project-skill governance coverage.
project-local-skill
Fixture project-local skill used by runtime-kit project-local smoke checks.
topic-radar
Aggregate read-only AI and technology trend signals (Polymarket, Hacker News, GitHub, arXiv, Hugging Face, news search) into source-grounded Markdown or JSON; the lower-level data engine behind `daily-brief`.