agent-skill-kit-creator
Scaffold and validate agent skills against SKILL_SPEC.md (frontmatter, naming rules, structure). Use when the user asks to create a new agent skill, generate a SKILL.md file, scaffold a skill directory, or validate existing skills. Tier/scope (company, enterprise, org, team, project, application) is optional and off by default — engaged only when the user opts in with --tiers / --agents-skills-kit-tiers.
- License 许可
- MIT
- 最近更新
- 2026-05-28
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- agent-skill-kit-creator
- tier
- org
- description
- Scaffold and validate agent skills against SKILL_SPEC.md (frontmatter, naming rules, structure). Use when the user asks to create a new agent skill, generate a SKILL.md file, scaffold a skill directory, or validate existing skills. Tier/scope (company, enterprise, org, team, project, application) is optional and off by default — engaged only when the user opts in with --tiers / --agents-skills-kit-tiers.
03 SKILL.md 正文
Agent Skill Creator
Scaffold a new agent skill OR validate an existing one against SKILL_SPEC.md.
Tier is optional and off by default. By default a new skill is created with no tier: frontmatter and no scope prefix — just name + description (plus any optional fields the user asks for). The scope-tier model below is engaged only when the user opts in — e.g. they say "use tiers", "scope this skill", pick a tier explicitly, or pass --agents-skills-kit-tiers (alias --tiers). Do not ask the user to pick a scope unless they have opted in.
This skill mirrors the slash commands /agent-skill-create and /agent-skill-validate. Use it when slash commands are not auto-loaded or when the user invokes the skill explicitly.
Mode Selection
Pick a mode based on the user's request:
- create — user wants to make a new skill ("create a skill", "scaffold a new skill", "new agent skill")
- validate — user wants to check existing skills ("validate skill X", "check if this skill meets the spec", "audit skills")
If ambiguous, ask the user which mode before proceeding.
Scope Tiers (opt-in)
Skip this whole section unless the user has opted into tiers. When they have, every tiered skill belongs to exactly one scope. The scope determines what kind of knowledge/context the skill encodes, the directory-name prefix, and the
tier:frontmatter value.
| Scope | Prefix | tier: value |
Knowledge / context the skill owns |
|---|---|---|---|
| company | company- |
company |
Company-wide policy, brand, legal/compliance baselines, security floor, code-of-conduct. Applies to every employee and every codebase the company touches. |
| enterprise | enterprise- |
enterprise |
Multi-org / multi-division standards: shared platforms, cross-BU governance, procurement-approved tooling, enterprise architecture patterns. Sits above org but below company. |
| org | org- |
org |
Engineering-org or business-unit standards: shared workflows, common tooling choices, on-call/release norms, naming conventions, repo-template policy. |
| team | team- |
team |
Team-level conventions: tech-stack picks, coding style, review checklist, on-call rotation, sprint cadence. Specific to one squad/team. |
| project | project- |
project |
Project-specific architecture, build/test pipeline, dependency graph, domain language, milestone plan. Bound to one repo or coordinated set of repos. |
| application | app- |
application |
Application-runtime concerns: deployed surfaces, integration points, env-config, observability, customer-facing behavior. Bound to one running service or product. |
Note: application uses the historical app- prefix to stay backwards-compatible with existing skills (e.g. app-plan-feature-stories). Do not introduce application- as a prefix.
Scope decision questions
When the user is unsure which scope to pick, ask:
- Who is the audience? Every employee → company. Multiple orgs/BUs → enterprise. One org → org. One team → team. One repo → project. One running service → application.
- Where does the knowledge live today? Legal/policy site → company. Enterprise wiki / architecture council → enterprise. Org handbook → org. Team README → team. Repo docs → project. Runbook / service dashboard → application.
- If this knowledge were wrong, who would file the bug? Picks the owning scope.
Create Mode
Input
Expected args: <skill-name> or <skill-name> <short description>.
- If only a name is given, ask for a description before proceeding.
- If empty, ask for a name and description.
Step 1: Scope tier — only if the user opted in
Default: no tier. Skip this step entirely unless the user opted into tiers (see the intro). When skipped, treat <prefix> as empty and <tier> as unset in Steps 2–6.
When the user has opted in: ask which scope the new skill belongs to. Present the six options with their one-line knowledge/context summaries (from the table above) so the user can pick deliberately. If the user names a scope that isn't in the table, push back and offer the closest match — do not invent a seventh tier. Map the chosen scope to its <prefix> and <tier> for use in Steps 2–6.
Step 2: Validate the Skill Name
Check against SKILL_SPEC Section 3.1:
- 1–64 characters
- Lowercase alphanumeric (
a-z,0-9) and hyphens (-) only - Cannot start or end with a hyphen
- Cannot contain consecutive hyphens (
--)
Scope-prefix rule (tier mode only): if the user opted into tiers, the final directory name must begin with the chosen scope's prefix (e.g. team-onboarding-checklist, project-ployglot-release-flow). If the user-provided name lacks the prefix, prepend it automatically and show the corrected name back for confirmation. In the default (no-tier) mode there is no prefix requirement — use the name as given (after the character checks above).
If the name is invalid for any other reason, explain why and suggest a corrected version. Do not proceed until valid.
Step 3: Determine Skill Location
The skill directory should be created as a sibling of other skill directories under .agents/skills/. Confirm the target path with the user:
.agents/skills/<prefix><skill-stem>/
Step 4: Gather Skill Details
Ask the user (if not provided):
- Description (required) — what it does and when to trigger it
- Knowledge / context payload — what knowledge this skill carries (in tier mode the answer should reflect the chosen tier — e.g. a
team-skill should reference team artifacts, not company policy) - Instructions — step-by-step body content for the agent
- Optional directories —
scripts/,references/,assets/ - Optional frontmatter —
license,compatibility,metadata,allowed-tools
Step 5: Create the Directory Structure
<prefix><skill-stem>/
├── SKILL.md
├── scripts/ # only if requested
├── references/ # only if requested
└── assets/ # only if requested
Step 6: Generate SKILL.md
Default (no tier):
---
name: <skill-stem>
description: <description>
---
# <Skill Title>
<Body: instructions, examples, edge cases>
Tier mode (user opted in) — add the tier: line and the scope prefix to name:
---
name: <prefix><skill-stem>
description: <description>
tier: <tier>
---
Include any optional frontmatter the user specified. Keep the body under 500 lines. In tier mode the body should make the scope explicit — a tier: team skill should not silently embed company-wide policy, and a tier: company skill should not encode one team's tech stack.
Step 7: Validate
Run the validator subprocess against the new skill.
Default (no tier) — tier is not checked:
skills-ref validate <full-path> --format human
Tier mode (user opted in) — enforce tier presence + value, allowing the extended scope set:
skills-ref validate <full-path> --tiers --extra-tiers company,enterprise,application --format human
- Exit 0 → all checks passed; proceed to the Output step.
- Exit 1 → one or more errors; do not present success. Re-enter Step 4–6 to fix the reported issues, then re-run.
- Exit 2 → warnings only; surface them in the Output's "Validator output" section but proceed.
Output
## Created: <skill-name>
Scope: <tier> (<one-line knowledge/context summary>) # omit this line in default no-tier mode
Location: <full-path>
### Structure
<tree output>
### SKILL.md Preview
<first 20 lines>
### Validator output
<verbatim final summary line from `skills-ref validate`, e.g. "PASS: 12/12 checks passed; 0 warnings">
Status: All validation checks passed.
Validate Mode
Input
Expected args: path to a skill directory, OR empty / . to scan .agents/skills/ for all skill directories (any directory containing SKILL.md).
Step 1: Structural Validation
- [ ] Skill directory exists
- [ ]
SKILL.mdfile exists inside
Step 2: Frontmatter Validation
Parse the YAML frontmatter block (between --- delimiters) and check:
Required:
- [ ]
nameexists and is 1–64 characters - [ ]
nameuses only lowercase alphanumeric (a-z,0-9) and hyphens (-) - [ ]
namedoes not start or end with a hyphen - [ ]
namedoes not contain consecutive hyphens (--) - [ ]
nameexactly matches the parent directory name - [ ]
descriptionexists, is non-empty, and is 1–1024 characters
Tier (opt-in — only check when the user passed --tiers / --agents-skills-kit-tiers):
- [ ]
tierexists and is one of:company,enterprise,org,team,project,application - [ ]
tiermatches the directory-name prefix per the scope table (company-→company,enterprise-→enterprise,org-→org,team-→team,project-→project,app-→application)
Without
--tiers,tieris neither required nor checked: a skill with notier:field PASSES, and the prefix rule does not apply.
Optional (if present):
- [ ]
license— short string - [ ]
compatibility— max 500 characters - [ ]
metadata— string-to-string key-value map - [ ]
allowed-tools— space-delimited string
Step 3: Body Content Validation
- [ ] Markdown body exists after the frontmatter
- [ ] Body is under 500 lines (warn if exceeded)
- [ ] File references use relative paths (no absolute paths like
/foo/bar) - [ ] (tier mode only) Body content is consistent with the declared
tier(warn if atier: teamskill encodes obvious company-wide policy, or vice versa)
Step 4: Optional Directory Checks
If present, verify non-empty:
- [ ]
scripts/— executable or recognized script extensions - [ ]
references/—.mdor documentation files - [ ]
assets/— resource files
Output
## Validation: <skill-name>
Scope: <tier> # omit when the skill declares no tier
Status: PASS | FAIL | WARN
### Results
- [x] Check that passed
- [ ] Check that failed — reason
### Summary
X/Y checks passed. Z warnings.
For multiple skills, append a summary table:
| Skill | Scope | Status | Passed | Warnings | Errors |
|-------|-------|--------|--------|----------|--------|
Reference
Full spec: SKILL_SPEC.md at the repo root.
Source commands: .agents/commands/agent-skill-create.md, .agents/commands/agent-skill-validate.md.
04 同仓库更多 Skills
agent-skill-kit-validator
Validate one or many SKILL.md files against the agentskills.io specification — frontmatter, naming, body, optional-directory, and reference checks. Use when the user asks to validate a skill, audit skills, check SKILL.md, or run skills-ref against an existing skill or directory tree.
agent-skill-kit-security-auditor
Audit a skills tree for the four canonical security findings — unauthorized frontmatter fields, command-injection patterns in scripts, unvetted cross-repo dependency origins, and host-path leaks in body or scripts. Use when the user asks to audit, scan, security-check, or harden a skill or skills directory.
agent-skill-kit-prompt-emitter
Emit progressive-disclosure artifacts from a skills tree — an `<available_skills>` XML block for stage-1 agent startup, or canonical JSON of frontmatter properties for CI consumption. Use when the user asks to export skill metadata, build a prompt block, generate JSON for CI, or wire skills into an agent host.
agent-skill-kit-discoverability-linter
Score a SKILL.md description 0-100 for trigger quality, flag vague language, warn on vendor-specific frontmatter, and verify relative file references resolve. Use when the user asks to lint a skill, improve discoverability, score a description, or check why an agent never fires their skill.
agent-skill-kit-description-optimizer
Optimize a SKILL.md description for trigger quality — generate synthetic positive and negative queries, score the current description by hit-rate vs false-positive, and propose three ranked rewrites. Use when the user asks to auto-tune, improve, or rewrite a skill description, fix a skill that never fires, or measure description quality.
agent-skill-kit-dependency-resolver
Resolve and topologically sort skill dependencies, enforce the spec §3.3 inversion rule (project→app→team→org), warn on unpinned versions, and fail-closed on incompatible range conflicts. Use when the user asks to check skill dependencies, sort skills by build order, detect cycles, or audit skill version pinning.