
Skill Creator Plus
- 44 installs
- 23 repo stars
- Updated August 4, 2026
- aktsmm/agent-skills
skill-creator-plus is a skill that designs and reviews reusable SKILL.md skills and decides whether a request should be a skill, prompt, instruction, agent or hook.
About
This skill helps design and review reusable agent skills packaged as SKILL.md, and first decides whether the request should be a skill at all versus a prompt, instruction, custom agent or hook. It applies principles like progressive disclosure and explicit trigger descriptions, and ships helper scripts to initialize, package and validate a skill. A developer uses it when creating a new skill, extracting a workflow, or fixing weak skill triggering.
- Creates and reviews reusable SKILL.md skills that trigger reliably and stay lean
- Decides whether a request should be a skill, prompt, instruction, agent or hook
- Bundles init, package and validate scripts plus reference guides
Skill Creator Plus by the numbers
- 44 all-time installs (skills.sh)
- Ranked #343 of 782 Skill Development skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
skill-creator-plus capabilities & compatibility
- Capabilities
- skill authoring
What skill-creator-plus says it does
Design and review reusable skills that trigger reliably and stay lean.
Keep `SKILL.md` lean: <150 lines is good, >300 lines must split to references.
npx skills add https://github.com/aktsmm/agent-skills --skill skill-creator-plusAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 44 |
|---|---|
| repo stars | ★ 23 |
| Last updated | August 4, 2026 |
| Repository | aktsmm/agent-skills ↗ |
What it does
Create or review a reusable SKILL.md skill and decide whether the request should be a skill, prompt, agent or hook.
Who is it for?
Authoring lean, reliably triggering SKILL.md skills and reviewing existing ones for quality and trigger strength.
Skip if: Requests that should actually be a prompt, instruction, custom agent or hook rather than a skill.
When should I use this skill?
You want to create a new skill, extract a workflow into a skill, or fix a skill that does not trigger.
What you get
A lean, well-triggered SKILL.md with the right primitive chosen and detail moved into references.
- A validated SKILL.md and bundled resources
- A primitive decision (skill vs prompt/agent/hook)
By the numbers
- 6-step creation process (Step 0 to 6)
- SKILL.md under 150 lines is good, over 300 must split
Files
Skill Creator+
Design and review reusable skills that trigger reliably and stay lean.
Decision Flow
Start by deciding whether the user really needs a skill.
| Need | Use |
|---|---|
| Reusable multi-step workflow with bundled scripts, references, or templates | Skill |
| Single focused slash task with parameterized input | Prompt |
| Always-on or file-scoped guidance | Instruction |
| Persona, tool restrictions, delegation, or handoffs | Custom Agent |
| Deterministic enforcement or lifecycle automation | Hook |
If the answer is not Skill, stop and create the right primitive instead.
上表は「skill にすべきか」の即時ゲート。primitive 選択の詳細 SSOT は agentic-workflow-guide skill。
→ [references/customization-primitives.md](references/customization-primitives.md) for the full selection guide
When to Use
- Create skill, /create-skill, new skill, review skill, fix skill trigger, SKILL.md, workflow, スキル作成
- Creating a new skill from scratch
- Extracting a repeated workflow from a conversation, incident, or checklist
- Updating or refactoring an existing skill
- Reviewing existing SKILL.md files
- Deciding whether a customization should be a skill before authoring it
Start Here
1. Extract the workflow you want to package. 2. Clarify only the missing dimensions: target outcome, personal vs workspace scope, checklist vs full workflow. 3. Draft the smallest useful SKILL.md, then move detail into references.
Core Principles
| Principle | Description |
|---|---|
| Concise is Key | Context window is shared. Only add what Claude doesn't already know. |
| Discovery First | The description is the routing surface. Triggers must be explicit. |
| Degrees of Freedom | Match specificity to task fragility (high/medium/low freedom) |
| Progressive Disclosure | Split into 3 levels: Metadata → Body → References |
| Integrate Before Add | Update, merge, or replace existing guidance before appending more. |
| Right Primitive | A good skill is not a fallback for prompt/agent/instruction design. |
| Scope Before File | Decide workspace vs profile before creating anything. |
| Self-Contained | The skill must carry its own knowledge. Bundle into references/scripts; do not just link to workspace files (instructions, memory, ledgers) that die when copied elsewhere. Abstract env-specific values (paths, names) into args/config. |
Default assumption: Claude is already very smart. Challenge each piece: "Does this justify its token cost?"
Before adding a new section, ask whether it can replace an existing rule, move to references/, or be dropped as session-specific.
Skill Structure
→ [references/skill-structure.md](references/skill-structure.md) for locations, frontmatter, and bundled resource rules
skill-name/
├── SKILL.md (required) # Lean overview + decision points
├── scripts/ # Deterministic helpers
├── references/ # Load on demand
└── assets/ # Templates and reusable outputs→ See skill-structure.md > What NOT to Include for excluded files.
Creation Process
→ [references/creation-process.md](references/creation-process.md) for the end-to-end workflow
| Step | Action |
|---|---|
| 0 | Choose primitive + scope (skill vs prompt/agent/etc.) |
| 1 | Extract the workflow from the conversation or examples |
| 2 | Plan reusable contents (scripts/references/assets) |
| 3 | Initialize or refactor the skill folder |
| 4 | Write SKILL.md and implement resources |
| 5 | Validate frontmatter, structure, and trigger quality |
| 6 | Test on real prompt patterns and iterate |
Clarify if Needed
- What outcome should this skill produce?
- Should it live in workspace scope or personal scope?
- Is a short checklist enough, or does it need a full multi-step workflow?
Refactor Order
When improving an existing skill, use this order:
1. Delete stale or low-value guidance 2. Merge duplicate rules 3. Move long detail to references/ 4. Add genuinely missing guidance last
Frontmatter and Triggering
Use the smallest viable frontmatter: name, description, and only behavior-changing optional fields. name must match the folder and description must include trigger conditions.
Frontmatter details and silent failures: references/common-pitfalls.md
SKILL.md Guidelines
Keep SKILL.md lean: <150 lines is good, >300 lines must split to references. Start When to Use with user phrases, keep essential workflow only, and push long examples / schemas / recipes to references.
Detailed review criteria: references/skill-review-checklist.md
Iteration Loop
1. Draft the skill and save it. 2. Identify the weakest or most ambiguous parts. 3. Tighten those parts, then summarize what the skill produces and example prompts to try.
Review Checklist
Use references/skill-review-checklist.md. For bloat review, use references/skill-bloat-review.md.
Key References
| Topic | Reference |
|---|---|
| Primitive Choice | references/customization-primitives.md |
| Skill Structure | references/skill-structure.md |
| Structure Gallery | references/skill-structure-gallery.md |
| Creation Process | references/creation-process.md |
| Review Checklist | references/skill-review-checklist.md |
| Bloat Review | references/skill-bloat-review.md |
| Common Pitfalls | references/common-pitfalls.md |
| Workflows | references/workflows.md |
| Output Patterns | references/output-patterns.md |
Done Criteria
- [ ] Request is confirmed to be a skill, not another primitive
- [ ] Scope is decided before file creation
- [ ] SKILL.md created and under 150 lines
- [ ] Frontmatter has name + description with trigger conditions
- [ ] Manually used skills have
argument-hint - [ ]
user-invocableis set intentionally - [ ] Optional fields are added only when they change behavior
- [ ] Details moved to references/ (Progressive Disclosure)
- [ ] Review checklist passed
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.Common Pitfalls
These issues often cause silent failures or poor skill routing.
Discovery and Triggering
Weak Description
Bad descriptions explain what the skill is, but not when it should trigger.
description: "Helpful skill for productivity"Prefer explicit trigger phrases and task context.
description: "Create and review Agent Skills. Use when creating a new skill, updating SKILL.md, or fixing weak skill triggers."Missing User Phrases
Add phrases users actually say: file names, verbs, and common shorthand.
SKILL.mdcreate skillreview skill- domain-specific phrases
Method-First Names
Skill names that foreground an implementation detail (tool, input format, intermediate artifact) make slash commands harder to find and reuse. Lead with the user-visible task or outcome; keep techniques in description and ## When to Use.
Example: review-security-structure for a security review skill — mention AST, structure maps, call graphs, Source/Sink in description only.
YAML and Frontmatter
Unquoted Colons
Descriptions containing colons can break YAML if left unquoted.
description: "Use when: reviewing skills"Name Mismatch
name must match the folder name exactly. A mismatch breaks discovery.
Boilerplate Optional Fields
Do not add argument-hint, user-invocable, or disable-model-invocation unless they change behavior.
Accidental Prompt Tool Restrictions
In VS Code prompt files, tools: is not harmless metadata. It overrides the default agent's enabled tools for that prompt run and can appear in the tools picker as a current-session-only configuration.
Use tools: in *.prompt.md only when the prompt must deliberately narrow capabilities. If the prompt should inherit the user's normal Agent tools, omit tools: entirely.
Prefer custom agents for stable role/tool boundaries. Use prompt-level tools: only for narrow slash commands where losing unrelated built-in, extension, or MCP tools is intentional.
Structure Problems
Monolithic SKILL.md
If the body grows past the quick-start workflow, move details into references/.
Wrong Primitive
If the content spends most of its space describing prompts, instructions, agents, or hooks, you may be designing the wrong asset.
→ Re-check customization-primitives.md
Deep or Brittle Links
Use relative links and keep referenced files shallow and predictable.
Good:
[references/creation-process.md](creation-process.md)from insidereferences/[references/creation-process.md](references/creation-process.md)fromSKILL.md
Avoid absolute paths or workspace-specific locations.
Brittle Evaluation Assets
Eval files, graders, or review prompts can silently rot when they depend on one recorded session.
Avoid:
- temporary workspace paths
- machine-specific absolute paths
- long exact-string output assertions that encode one specific run
Prefer:
- headings or schema checks
- tool-usage checks
- stable identifiers such as file basenames or declared section names
Review Smells
- The description cannot be understood without reading the whole body.
- The skill includes README-like marketing content.
- The workflow has no validation step.
- The skill cannot explain why it is a skill instead of a prompt or agent.
- Example triggers are missing from both description and
## When to Use. - Eval assets only pass for one captured session and break after simple renames.
Skill Creation Process
Detailed guide for each step of skill creation.
Overview
0. Route by skill archetype 1. Understand the skill with concrete examples 2. Plan reusable skill contents (scripts, references, assets) 3. Initialize the skill (run init_skill.py) 4. Edit the skill (implement resources and write SKILL.md) 5. Package the skill (run package_skill.py) 6. Iterate based on real usage
Step 0: Route by Skill Archetype
Before writing, check whether the skill fits one primary category. Skills that straddle several categories often become confusing.
| Archetype | Use When | Typical Resources |
|---|---|---|
| Library / API reference | Correct usage of an internal library, CLI, SDK, or service API | snippets, API notes, gotchas |
| Product verification | Proving that UI, CLI, or product behavior works | Playwright drivers, assertions, screenshots, logs |
| Data fetching / analysis | Pulling from known data sources or monitoring stacks | query helpers, schema notes, dashboard IDs |
| Business process automation | Repeating a team process with formatted output | templates, config, append-only run logs |
| Code scaffolding / templates | Creating framework-specific boilerplate | assets, starter files, generators |
| Code quality / review | Finding defects or enforcing review standards | checklists, scripts, deterministic linters |
| CI/CD / deployment | Building, releasing, monitoring, or rollback workflows | runbooks, smoke tests, rollout checks |
| Runbook / debugging | Starting from symptoms and producing findings | symptom maps, query patterns, report templates |
| Infrastructure operations | Routine or risky maintenance tasks | guardrails, dry-run scripts, confirmation gates |
If the candidate does not fit one category, split it or choose another primitive before adding scope.
Source inspiration: Anthropic, "Lessons from building Claude Code: how we use skills" - https://claude.com/blog/lessons-from-building-claude-code-how-we-use-skills
Step 1: Understanding with Concrete Examples
To create an effective skill, clearly understand concrete examples of how the skill will be used.
Questions to ask:
- "What functionality should this skill support?"
- "Can you give some examples of how this skill would be used?"
- "What would a user say that should trigger this skill?"
Tip: Avoid asking too many questions in a single message. Start with the most important questions.
Step 2: Planning Reusable Contents
Analyze each example by:
1. Considering how to execute from scratch 2. Identifying helpful scripts, references, and assets 3. Capturing the non-obvious gotchas that caused past failures 4. Deciding how the skill will verify success, especially for UI, CLI, deployment, or data workflows
Examples:
| Skill | Analysis | Resource |
|---|---|---|
| pdf-editor | Rotating PDF requires rewriting same code | scripts/rotate_pdf.py |
| webapp-builder | Same boilerplate HTML/React each time | assets/hello-world/ |
| big-query | Re-discovering table schemas each time | references/schema.md |
| checkout-verifier | UI state is misleading without backend confirmation | scripts/verify_checkout.py |
Prefer code or structured files when they reduce repeated reasoning:
scripts/for deterministic steps, assertions, or reusable fetch helpersreferences/for gotchas, schemas, command maps, and usage patternsassets/for templates, starter files, or reusable output shapesconfig.jsonwhen the skill needs user-specific setup such as channels, environments, or default destinations- append-only logs when previous runs are part of the workflow contract, such as standups or recurring reports
- named skill dependencies only when another installed skill owns a separate responsibility; include a fallback if it may be missing
Step 3: Initializing the Skill
Run init_skill.py for new skills:
scripts/init_skill.py <skill-name> --path <output-directory>The script:
- Creates the skill directory
- Generates SKILL.md template with frontmatter
- Creates example
scripts/,references/,assets/directories
Step 4: Edit the Skill
Design Patterns
Consult these guides:
- Multi-step processes: See workflows.md
- Output formats: See output-patterns.md
Implement Resources
1. Start with scripts, references, assets identified in Step 2 2. Test scripts by running them 3. Delete unused example files
Write SKILL.md
Frontmatter:
---
name: skill-name
description: "What it does. Use when [trigger conditions]."
---Body: Write instructions using imperative/infinitive form.
Step 5: Packaging
scripts/package_skill.py <path/to/skill-folder>
# Optional: specify output directory
scripts/package_skill.py <path/to/skill-folder> ./distThe script:
1. Validates - YAML format, naming, structure, description quality 2. Packages - Creates .skill file (zip with .skill extension)
Step 6: Iterate
Iteration workflow:
1. Use the skill on real tasks 2. Notice struggles or inefficiencies 3. Identify needed updates 4. Implement changes and test again
When updating, prefer adding one precise gotcha or one verification helper over broad reminders. The strongest skill updates usually come from observed misses, not generic best practices.
For skills where routing quality matters, optionally track lightweight usage signals:
- manual invocation vs model-triggered invocation
- expected-but-not-triggered cases
- success, fallback, or abandoned outcome
- description or
## When to Usephrase that needs adjustment
Keep logs append-only and minimal. Do not store full prompts, secrets, personal data, customer data, or machine-specific paths.
Customization Primitive Selection
Choose the right customization primitive before creating files.
Decision Matrix
| Need | Best Fit | Why | Avoid When |
|---|---|---|---|
| Project-wide defaults that should apply to most work | Workspace instructions | Always-on guidance with low ceremony | The rule only matters for one task or one file type |
| File-scoped or task-scoped guidance | File instructions | On-demand discovery or applyTo matching | The content is really a reusable workflow |
| Single focused slash command | Prompt | Fast invocation with optional parameters | The task needs bundled scripts or rich assets |
| Reusable multi-step workflow with bundled scripts, templates, or references | Skill | Best balance of reuse, discovery, and progressive loading | You only need a one-off command or always-on rule |
| Persona with tool restrictions, delegation, or handoffs | Custom agent | Lets you control role boundaries and tools | The need is procedural, not persona-based |
| Deterministic enforcement or lifecycle automation | Hook | Runtime guarantees, blocking, auto-validation | Simple instructions are sufficient |
Questions to Ask First
1. Is this guidance needed in most conversations, or only for a specific task? 2. Does the user need a reusable slash command, or always-on behavior? 3. Does the solution need bundled scripts, templates, or detailed references? 4. Is persona or tool restriction the core requirement? 5. Must the behavior be enforced deterministically?
Scope Selection
Choose scope before creating the file.
| Scope | Use When | Typical Location |
|---|---|---|
| Workspace | Shared with a team or tied to one repo | .github/ |
| User profile | Personal preference across repos | user profile customization folder |
Default to workspace only when the behavior should be shared through version control.
Fast Rules of Thumb
- If the request starts with "always", it is usually an instruction.
- If the request starts with "when I type /", it is usually a prompt or skill.
- If the request needs scripts, templates, or structured references, lean toward a skill.
- If the request is about a specialist persona or safe tool boundaries, lean toward a custom agent.
- If a prompt only lists tools to make them available, remove
tools:. Prompt-leveltools:narrows availability; it does not request tools opportunistically. - If the request is about blocking commands or auto-running checks, use a hook.
- Treat prompts, templates, quick actions, and canned responses as product surfaces: define grounding source, prohibited actions, output format, and unknown-handling before adding examples or tone guidance.
Escalation Pattern
If you discover mid-design that the file type is wrong:
1. Stop editing the wrong primitive. 2. Explain the mismatch briefly. 3. Create or update the correct primitive. 4. Leave a short note in the related asset if cross-linking helps future maintenance.
Output Patterns
Use these patterns when skills need to produce consistent, high-quality output.
Template Pattern
Provide templates for output format. Match the level of strictness to your needs.
For strict requirements (like API responses or data formats):
## Report structure
ALWAYS use this exact template structure:
# [Analysis Title]
## Executive summary
[One-paragraph overview of key findings]
## Key findings
- Finding 1 with supporting data
- Finding 2 with supporting data
- Finding 3 with supporting data
## Recommendations
1. Specific actionable recommendation
2. Specific actionable recommendationFor flexible guidance (when adaptation is useful):
## Report structure
Here is a sensible default format, but use your best judgment:
# [Analysis Title]
## Executive summary
[Overview]
## Key findings
[Adapt sections based on what you discover]
## Recommendations
[Tailor to the specific context]
Adjust sections as needed for the specific analysis type.Examples Pattern
For skills where output quality depends on seeing examples, provide input/output pairs:
## Commit message format
Generate commit messages following these examples:
**Example 1:**
Input: Added user authentication with JWT tokens
Output:feat(auth): implement JWT-based authentication
Add login endpoint and token validation middleware
**Example 2:**
Input: Fixed bug where dates displayed incorrectly in reports
Output:fix(reports): correct date formatting in timezone conversion
Use UTC timestamps consistently across report generation
Follow this style: type(scope): brief description, then detailed explanation.Examples help Claude understand the desired style and level of detail more clearly than descriptions alone.
Skill Bloat Review
Checklist for deciding whether a SKILL is growing by useful depth or by append-only accumulation.
Review Order
Use this order every time:
1. Delete 2. Merge 3. Move to references 4. Add only what is still missing
Triage Buckets
Delete Candidates
- Stale guidance tied to old tool names or workflows
- Repeated best practices already stated elsewhere in the same SKILL
- Session-specific notes that are not reusable
- Long examples that do not change behavior
Merge Candidates
- Two sections expressing the same rule with different wording
- Separate tables that should be one decision table
- Repeated warnings that belong under one principle
- Multiple mini-checklists that can become one review gate
Move Candidates
- Sections longer than roughly 40-50 lines
- Large examples, schemas, command catalogs, or recipes
- Long external link lists
- Markdown-linked catalogs inside always-loaded entry files such as
copilot-instructions.mdorAGENTS.md - Variant-specific guidance that not every invocation needs
- Repo-global instruction files that started absorbing domain-specific workflow detail
Add Candidates
- Missing trigger guidance that affects discoverability
- A new decision point users repeatedly get wrong
- A reusable rule that cannot fit cleanly into existing sections
- A reference file that reduces main-file token cost
Bloat Signals
- New sections are appended without rewriting old ones
- The same concept appears in three or more places
- Main SKILL reads like a knowledge dump instead of an operating guide
- References exist, but detail still stays inline in SKILL.md
- Line count grows while the core workflow becomes harder to find
- A workspace entry file such as
copilot-instructions.mdstarts acting like a full operations manual - Persona rules, routing rules, and domain workflow rules are mixed in one always-loaded file
- An always-loaded entry file becomes a Markdown-linked directory of rules, agents, or docs
Keep vs Move
| Keep in SKILL.md | Move to references/ |
|---|---|
| What the skill is for | Deep recipes |
| Trigger conditions | Large tables |
| Core workflow | Implementation variants |
| Misuse-prevention decision points | Long examples |
| Minimal review gates | Link collections |
Entry File Note
For always-loaded entry files such as copilot-instructions.md and AGENTS.md, a short body is not enough.
- If the file becomes a Markdown-linked index, treat it as bloat even when line count still looks reasonable
- Prefer a one-line pointer to
instructions/,README, ordocsover a linked catalog in the entry file
Decision Questions
- Can this replace an old sentence instead of adding a new paragraph?
- Is this needed on every invocation, or only sometimes?
- Does this teach the operating shape of the skill, or just document background detail?
- If this were removed from the main file, would the skill still route and operate correctly?
Done Criteria
- Main SKILL still exposes the routing surface clearly
- Core workflow is visible without scrolling through recipes
- Duplicate rules are merged into one place
- Deep detail is loaded on demand via references
- New additions were made only after delete/merge/move was considered
SKILL.md Review Checklist
Checklist for reviewing and improving SKILL.md files.
Quick Check (5 items)
- [ ] SKILL.md is under 150 lines? (GitHub guideline: "2 pages or less")
- [ ] Frontmatter has name + description?
- [ ] Self-authored skills have license + metadata.author?
- [ ] Description clearly states WHEN to use (trigger conditions)?
- [ ] Detailed content moved to references/ (Progressive Disclosure)?
- [ ] Self-contained? Knowledge is bundled, not just linked to workspace files that break when copied elsewhere?
- [ ] No README.md or auxiliary docs in skill folder?
- [ ] The skill fits one primary archetype, or the split is intentional?
- [ ] Non-obvious gotchas are captured where they affect correctness?
- [ ] Success can be verified by scripts, assertions, artifacts, or explicit checks?Size & Structure
Line Count Target
| Status | Lines | Action |
|---|---|---|
| ✅ Good | < 150 | Maintain |
| ⚠️ Warning | 150-300 | Consider splitting |
| ❌ Too Long | > 300 | Must split to references |
Source: GitHub Docs - Adding repository custom instructions
"Instructions must be no longer than 2 pages."
Progressive Disclosure
→ See skill-structure.md > Progressive Disclosure for the 3-level loading system.
Pattern: Keep SKILL.md lean, move details to references.
❌ Bad: 400-line SKILL.md with all details inline
✅ Good: 120-line SKILL.md + references/detailed-guide.mdContent Quality
Skill Archetype Fit
Before reviewing wording, identify the primary kind of skill:
- Library / API reference
- Product verification
- Data fetching / analysis
- Business process automation
- Code scaffolding / templates
- Code quality / review
- CI/CD / deployment
- Runbook / debugging
- Infrastructure operations
If it claims several at once, split it or move secondary behavior into references. A skill can depend on another skill, but its own responsibility should stay crisp.
Frontmatter
---
name: skill-name # Required
description: "..." # Required - include trigger conditions
license: CC BY-NC-SA 4.0 # Required for self-authored skills
metadata: # Required for self-authored skills
author: yamapan (https://github.com/aktsmm)
---Description must answer:
- What does this skill do?
- When should it be triggered?
Body Structure
| Section | Required | Notes |
|---|---|---|
# Title | ✅ | Match skill name |
## When to Use | ✅ | Trigger conditions (brief) |
| Core workflow | ✅ | Main instructions |
## References | If applicable | Links to references/ files |
What NOT to Include
→ See skill-structure.md > What NOT to Include for the complete list.
Gotchas and Verification
High-signal skill content is usually specific failure avoidance, not obvious process narration.
Check for:
- common field-name mismatches, API quirks, stale state, or misleading success responses
- verification steps that inspect real state, not just command exit codes
- scripts or assertions for fragile workflows such as UI flows, deployments, data pulls, or interactive CLIs
- setup state such as
config.jsonwhen a missing channel, environment, or destination should trigger a user question
References Organization
When to Create references/
| Condition | Action |
|---|---|
| Section > 50 lines | Move to references/ |
| Multiple variants/options | Split by variant |
| Domain-specific schemas | Separate reference file |
| Detailed examples | Move to references/examples/ |
Naming Convention
references/
├── {topic}.md # General pattern
├── {variant-name}.md # For variants (aws.md, gcp.md)
├── examples/ # Example files
└── schemas/ # Schema definitionsCommon Issues
Issue 1: SKILL.md Too Long
Symptoms: > 300 lines, scrolling required to find key info
Fix:
1. Identify sections > 50 lines 2. Create references/{section-name}.md 3. Replace with summary + link: → See [references/{name}.md](references/{name}.md)
Issue 2: Vague Description
Symptoms: Description says what skill does, not when to use it
Bad:
description: "Processes PDF files"Good:
description: "Extract text, rotate pages, and fill forms in PDF files. Use when working with .pdf documents for text extraction, page manipulation, or form automation."Issue 3: Duplicate Content
Symptoms: Same information in SKILL.md and references/
Fix: Information should live in ONE place only. Keep procedural instructions in SKILL.md, move detailed reference material to references/.
Issue 4: Missing Trigger Conditions
Symptoms: Skill doesn't activate when expected
Fix: Add specific triggers to description:
- File patterns (
.pdf,.agent.md) - Task keywords ("extract text", "rotate page")
- Context conditions ("when working with...")
Issue 5: Obvious Guidance Without Gotchas
Symptoms: The skill says what any capable agent would already do, but omits the edge cases that caused past failures.
Fix: Replace generic advice with specific gotchas, verification checks, or reusable scripts.
Good examples:
- "A UI success banner can appear before backend processing finishes; verify the persisted state."
- "Two systems expose similar request identifiers; document the canonical join key."
- "Append-only history tables need an explicit rule for choosing the active row."
Review Template
## SKILL.md Review: {skill-name}
### Metrics
- [ ] Line count: \_\_\_ (target: < 150)
- [ ] Frontmatter valid: Yes/No
- [ ] Description has triggers: Yes/No
- [ ] Primary archetype: **\_\_**
### Structure
- [ ] Progressive disclosure applied
- [ ] No auxiliary docs (README, CHANGELOG)
- [ ] References properly linked
### Content
- [ ] Single responsibility (SRP)
- [ ] No duplicate information
- [ ] Examples minimal but sufficient
- [ ] Gotchas are specific and actionable
- [ ] Verification path is explicit
### Action Items
1. ...
2. ...Skill Structure Gallery
Use this gallery when /create-skill needs concrete structure ideas, not just abstract rules.
Do not cargo-cult entire files. Copy the smallest pattern that removes ambiguity.
Pattern 1: Signal Detection Matrix
Inspired by skills that review content against known tells.
Use when:
- The skill scans for repeated signals, smells, or rule violations
- Each detection should map cleanly to a recommended action
- A long prose list would hide the difference between "detect" and "fix"
Recommended shape:
| Category | Signal | Action |
|---|---|---|
| Tone | Repeated filler opener | Remove or replace with concrete statement |
| Structure | Three identical sentence starts | Vary subject or sentence form |
Why it works:
- Compresses many heuristics into a searchable table
- Keeps detection logic and remediation aligned
- Makes reviews more consistent across languages or formats
Avoid when:
- There are fewer than 5 rules
- The output is procedural rather than evaluative
Pattern 2: Mode Selection Table
Inspired by skills that support multiple execution modes or setup paths.
Use when:
- The user must choose between 2 or more viable modes
- Trade-offs matter more than linear steps
- Setup differs by environment, browser, provider, or transport
Recommended shape:
| Mode | Best For | Pros | Cons |
|---|---|---|---|
| Managed mode | First-time setup | Simpler defaults | Less control |
| Attached mode | Existing environment reuse | Reuses login/session | More prerequisites |
Why it works:
- Surfaces the decision before the workflow branches
- Prevents hidden assumptions about the default path
- Gives
/create-skilla compact way to encode trade-offs
Avoid when:
- There is a single recommended path with no real branching
Pattern 3: Output Pair and Variant Naming
Inspired by skills that produce both editable and publishable artifacts.
Use when:
- One task creates multiple deliverables that must stay aligned
- The user needs both source and rendered output
- Language or format variants must coexist without overwrite risk
Recommended shape:
name.ext # editable or source artifact
name-rendered.ext # publishable artifact
name-ja.ext # language variant
name-en.ext # language variantAdd a short rule block:
- Keep editable and publishable outputs as a pair
- Prefer parallel filenames over overwriting one artifact
- Name variants predictably so downstream docs can link them safely
Why it works:
- Makes the deliverable contract explicit
- Reduces drift between source and rendered assets
- Gives reviews a simple naming baseline
Avoid when:
- The task only creates one disposable output
Pattern 4: Quality Gates and Score Bands
Inspired by skills that need objective retry or escalation rules.
Use when:
- The workflow has review/retry loops
- "Good enough" must be defined before execution
- The agent should know when to proceed, retry, simplify, or ask
Recommended shape:
| Score | Action |
|---|---|
| 90-100 | Proceed |
| 70-89 | Fix and retry |
| 50-69 | Simplify |
| 0-49 | Ask user |
Why it works:
- Turns vague quality judgment into a stop condition
- Prevents endless refinement loops
- Helps
/create-skillencode escalation behavior in one table
Avoid when:
- Quality is binary and easy to verify with a checklist alone
Pattern 5: Architecture Sketch and Naming Taxonomy
Inspired by skills that transform files through several stages.
Use when:
- The skill moves data across multiple steps or folders
- Naming rules are part of the workflow contract
- The user needs to understand where ambiguous items land
Recommended shape:
Input
-> Normalize
-> Classify
-> Rename
-> Output
-> Fallback / quarantine branchThen pair it with a naming block:
YYYY-MM-DD-type-subject.extAnd, if needed, a taxonomy table:
| Code | Meaning | Trigger |
|---|---|---|
| doc | Formal document | invoice, contract |
| img | Screenshot/image | png, jpg |
Why it works:
- Explains the pipeline faster than long prose
- Makes edge cases visible, especially fallback paths
- Gives naming conventions a place near the workflow they support
Avoid when:
- The task is a simple one-shot transformation
## Quick Selection Guide
| If the skill needs... | Start with... |
| --------------------- | ------------- |
| Repeated review signals | Signal Detection Matrix |
| A user-facing branch choice | Mode Selection Table |
| Multiple coordinated deliverables | Output Pair and Variant Naming |
| Retry thresholds or escalation | Quality Gates and Score Bands |
| A multi-stage file/data pipeline | Architecture Sketch and Naming Taxonomy |
Use one or two patterns first. If the structure starts looking like a dashboard, the skill is probably over-designed.
Skill Structure
Detailed guide for skill anatomy, bundled resources, and progressive disclosure patterns.
Anatomy of a Skill
Every skill consists of a required SKILL.md file and optional bundled resources:
skill-name/
├── SKILL.md (required)
│ ├── YAML frontmatter metadata (required)
│ │ ├── name: (required)
│ │ └── description: (required)
│ └── Markdown instructions (required)
└── Bundled Resources (optional)
├── scripts/ - Executable code (Python/Bash/etc.)
├── references/ - Documentation loaded into context as needed
└── assets/ - Files used in output (templates, icons, fonts)SKILL.md Structure
Every SKILL.md consists of:
- Frontmatter (YAML): Contains
nameanddescriptionfields. These are the only fields Claude reads to determine when the skill gets used. - Body (Markdown): Instructions and guidance. Only loaded AFTER the skill triggers.
Bundled Resources
Scripts (scripts/)
Executable code for tasks requiring deterministic reliability or repeatedly rewritten.
- When to include: Same code rewritten repeatedly or deterministic reliability needed
- Examples:
scripts/rotate_pdf.pyfor PDF rotation tasks;scripts/verify_flow.pyfor state assertions after UI or CLI workflows - Benefits: Token efficient, deterministic, executed without loading into context
References (references/)
Documentation loaded as needed into context.
- When to include: Documentation Claude should reference while working
- Examples:
references/schema.md,references/api_docs.md - Best practice: If files are large (>10k words), include grep search patterns in SKILL.md
- Avoid duplication: Information should live in ONE place only
Assets (assets/)
Files used in output, not loaded into context.
- When to include: Files used in final output
- Examples:
assets/logo.png,assets/template.pptx - Use cases: Templates, images, icons, boilerplate code
Config and Local State
Use structured state only when it is part of the workflow contract.
- Config:
config.jsonfor user-specific defaults such as channels, environments, output folders, or deployment targets - Run logs: append-only logs for recurring workflows that need delta-only output or previous-run awareness
- Avoid: secrets, personal data, machine-specific absolute paths, and session transcripts
If config is missing, the skill should ask only for the missing setup value and then continue.
What NOT to Include
Do NOT create extraneous documentation:
- ❌ README.md
- ❌ INSTALLATION_GUIDE.md
- ❌ CHANGELOG.md
- ❌ QUICK_REFERENCE.md
Progressive Disclosure
Skills use a three-level loading system:
| Level | Location | Size | Loaded When |
|---|---|---|---|
| 1. Metadata | Frontmatter | ~100 words | Always |
| 2. Body | SKILL.md | < 150 lines | When skill triggers |
| 3. Details | references/ | Unlimited | On demand |
Pattern 1: High-level guide with references
# PDF Processing
## Quick start
Extract text with pdfplumber: [code example]
## Advanced features
- **Form filling**: See [FORMS.md](FORMS.md)
- **API reference**: See [REFERENCE.md](REFERENCE.md)Pattern 2: Domain-specific organization
bigquery-skill/
├── SKILL.md (overview)
└── references/
├── finance.md
├── sales.md
└── product.mdWhen user asks about sales, Claude only reads sales.md.
Pattern 3: Variant-based organization
cloud-deploy/
├── SKILL.md (workflow + selection)
└── references/
├── aws.md
├── gcp.md
└── azure.mdGuidelines
- Avoid deeply nested references - Keep references one level deep from SKILL.md
- Structure longer files - For files > 100 lines, include TOC at top
Workflow Patterns
Sequential Workflows
For complex tasks, break operations into clear, sequential steps. It is often helpful to give Claude an overview of the process towards the beginning of SKILL.md:
Filling a PDF form involves these steps:
1. Analyze the form (run analyze_form.py)
2. Create field mapping (edit fields.json)
3. Validate mapping (run validate_fields.py)
4. Fill the form (run fill_form.py)
5. Verify output (run verify_output.py)Conditional Workflows
For tasks with branching logic, guide Claude through decision points:
1. Determine the modification type:
**Creating new content?** → Follow "Creation workflow" below
**Editing existing content?** → Follow "Editing workflow" below
2. Creation workflow: [steps]
3. Editing workflow: [steps]#!/usr/bin/env python3
"""
Skill Initializer - Creates a new skill from template
Usage:
init_skill.py <skill-name> --path <path>
Examples:
init_skill.py my-new-skill --path skills/public
init_skill.py my-api-helper --path skills/private
init_skill.py custom-skill --path /custom/location
"""
import sys
from pathlib import Path
SKILL_TEMPLATE = """---
name: {skill_name}
description: [TODO: Complete and informative explanation of what the skill does and when to use it. Include WHEN to use this skill - specific scenarios, file types, or tasks that trigger it.]
license: Complete terms in LICENSE.txt
metadata:
author: yamapan (https://github.com/aktsmm)
---
# {skill_title}
## Overview
[TODO: 1-2 sentences explaining what this skill enables]
## Structuring This Skill
[TODO: Choose the structure that best fits this skill's purpose. Common patterns:
**1. Workflow-Based** (best for sequential processes)
- Works well when there are clear step-by-step procedures
- Example: DOCX skill with "Workflow Decision Tree" → "Reading" → "Creating" → "Editing"
- Structure: ## Overview → ## Workflow Decision Tree → ## Step 1 → ## Step 2...
**2. Task-Based** (best for tool collections)
- Works well when the skill offers different operations/capabilities
- Example: PDF skill with "Quick Start" → "Merge PDFs" → "Split PDFs" → "Extract Text"
- Structure: ## Overview → ## Quick Start → ## Task Category 1 → ## Task Category 2...
**3. Reference/Guidelines** (best for standards or specifications)
- Works well for brand guidelines, coding standards, or requirements
- Example: Brand styling with "Brand Guidelines" → "Colors" → "Typography" → "Features"
- Structure: ## Overview → ## Guidelines → ## Specifications → ## Usage...
**4. Capabilities-Based** (best for integrated systems)
- Works well when the skill provides multiple interrelated features
- Example: Product Management with "Core Capabilities" → numbered capability list
- Structure: ## Overview → ## Core Capabilities → ### 1. Feature → ### 2. Feature...
Patterns can be mixed and matched as needed. Most skills combine patterns (e.g., start with task-based, add workflow for complex operations).
Delete this entire "Structuring This Skill" section when done - it's just guidance.]
## [TODO: Replace with the first main section based on chosen structure]
[TODO: Add content here. See examples in existing skills:
- Code samples for technical skills
- Decision trees for complex workflows
- Concrete examples with realistic user requests
- References to scripts/templates/references as needed]
## Resources
This skill includes example resource directories that demonstrate how to organize different types of bundled resources:
### scripts/
Executable code (Python/Bash/etc.) that can be run directly to perform specific operations.
**Examples from other skills:**
- PDF skill: `fill_fillable_fields.py`, `extract_form_field_info.py` - utilities for PDF manipulation
- DOCX skill: `document.py`, `utilities.py` - Python modules for document processing
**Appropriate for:** Python scripts, shell scripts, or any executable code that performs automation, data processing, or specific operations.
**Note:** Scripts may be executed without loading into context, but can still be read by Claude for patching or environment adjustments.
### references/
Documentation and reference material intended to be loaded into context to inform Claude's process and thinking.
**Examples from other skills:**
- Product management: `communication.md`, `context_building.md` - detailed workflow guides
- BigQuery: API reference documentation and query examples
- Finance: Schema documentation, company policies
**Appropriate for:** In-depth documentation, API references, database schemas, comprehensive guides, or any detailed information that Claude should reference while working.
### assets/
Files not intended to be loaded into context, but rather used within the output Claude produces.
**Examples from other skills:**
- Brand styling: PowerPoint template files (.pptx), logo files
- Frontend builder: HTML/React boilerplate project directories
- Typography: Font files (.ttf, .woff2)
**Appropriate for:** Templates, boilerplate code, document templates, images, icons, fonts, or any files meant to be copied or used in the final output.
---
**Any unneeded directories can be deleted.** Not every skill requires all three types of resources.
"""
EXAMPLE_SCRIPT = '''#!/usr/bin/env python3
"""
Example helper script for {skill_name}
This is a placeholder script that can be executed directly.
Replace with actual implementation or delete if not needed.
Example real scripts from other skills:
- pdf/scripts/fill_fillable_fields.py - Fills PDF form fields
- pdf/scripts/convert_pdf_to_images.py - Converts PDF pages to images
"""
def main():
print("This is an example script for {skill_name}")
# TODO: Add actual script logic here
# This could be data processing, file conversion, API calls, etc.
if __name__ == "__main__":
main()
'''
EXAMPLE_REFERENCE = """# Reference Documentation for {skill_title}
This is a placeholder for detailed reference documentation.
Replace with actual reference content or delete if not needed.
Example real reference docs from other skills:
- product-management/references/communication.md - Comprehensive guide for status updates
- product-management/references/context_building.md - Deep-dive on gathering context
- bigquery/references/ - API references and query examples
## When Reference Docs Are Useful
Reference docs are ideal for:
- Comprehensive API documentation
- Detailed workflow guides
- Complex multi-step processes
- Information too lengthy for main SKILL.md
- Content that's only needed for specific use cases
## Structure Suggestions
### API Reference Example
- Overview
- Authentication
- Endpoints with examples
- Error codes
- Rate limits
### Workflow Guide Example
- Prerequisites
- Step-by-step instructions
- Common patterns
- Troubleshooting
- Best practices
"""
EXAMPLE_ASSET = """# Example Asset File
This placeholder represents where asset files would be stored.
Replace with actual asset files (templates, images, fonts, etc.) or delete if not needed.
Asset files are NOT intended to be loaded into context, but rather used within
the output Claude produces.
Example asset files from other skills:
- Brand guidelines: logo.png, slides_template.pptx
- Frontend builder: hello-world/ directory with HTML/React boilerplate
- Typography: custom-font.ttf, font-family.woff2
- Data: sample_data.csv, test_dataset.json
## Common Asset Types
- Templates: .pptx, .docx, boilerplate directories
- Images: .png, .jpg, .svg, .gif
- Fonts: .ttf, .otf, .woff, .woff2
- Boilerplate code: Project directories, starter files
- Icons: .ico, .svg
- Data files: .csv, .json, .xml, .yaml
Note: This is a text placeholder. Actual assets can be any file type.
"""
def title_case_skill_name(skill_name):
"""Convert hyphenated skill name to Title Case for display."""
return ' '.join(word.capitalize() for word in skill_name.split('-'))
def init_skill(skill_name, path):
"""
Initialize a new skill directory with template SKILL.md.
Args:
skill_name: Name of the skill
path: Path where the skill directory should be created
Returns:
Path to created skill directory, or None if error
"""
# Determine skill directory path
skill_dir = Path(path).resolve() / skill_name
# Check if directory already exists
if skill_dir.exists():
print(f"❌ Error: Skill directory already exists: {skill_dir}")
return None
# Create skill directory
try:
skill_dir.mkdir(parents=True, exist_ok=False)
print(f"✅ Created skill directory: {skill_dir}")
except Exception as e:
print(f"❌ Error creating directory: {e}")
return None
# Create SKILL.md from template
skill_title = title_case_skill_name(skill_name)
skill_content = SKILL_TEMPLATE.format(
skill_name=skill_name,
skill_title=skill_title
)
skill_md_path = skill_dir / 'SKILL.md'
try:
skill_md_path.write_text(skill_content)
print("✅ Created SKILL.md")
except Exception as e:
print(f"❌ Error creating SKILL.md: {e}")
return None
# Create resource directories with example files
try:
# Create scripts/ directory with example script
scripts_dir = skill_dir / 'scripts'
scripts_dir.mkdir(exist_ok=True)
example_script = scripts_dir / 'example.py'
example_script.write_text(EXAMPLE_SCRIPT.format(skill_name=skill_name))
example_script.chmod(0o755)
print("✅ Created scripts/example.py")
# Create references/ directory with example reference doc
references_dir = skill_dir / 'references'
references_dir.mkdir(exist_ok=True)
example_reference = references_dir / 'api_reference.md'
example_reference.write_text(EXAMPLE_REFERENCE.format(skill_title=skill_title))
print("✅ Created references/api_reference.md")
# Create assets/ directory with example asset placeholder
assets_dir = skill_dir / 'assets'
assets_dir.mkdir(exist_ok=True)
example_asset = assets_dir / 'example_asset.txt'
example_asset.write_text(EXAMPLE_ASSET)
print("✅ Created assets/example_asset.txt")
except Exception as e:
print(f"❌ Error creating resource directories: {e}")
return None
# Print next steps
print(f"\n✅ Skill '{skill_name}' initialized successfully at {skill_dir}")
print("\nNext steps:")
print("1. Edit SKILL.md to complete the TODO items and update the description")
print("2. Customize or delete the example files in scripts/, references/, and assets/")
print("3. Run the validator when ready to check the skill structure")
return skill_dir
def main():
if len(sys.argv) < 4 or sys.argv[2] != '--path':
print("Usage: init_skill.py <skill-name> --path <path>")
print("\nSkill name requirements:")
print(" - Hyphen-case identifier (e.g., 'data-analyzer')")
print(" - Lowercase letters, digits, and hyphens only")
print(" - Max 40 characters")
print(" - Must match directory name exactly")
print("\nExamples:")
print(" init_skill.py my-new-skill --path skills/public")
print(" init_skill.py my-api-helper --path skills/private")
print(" init_skill.py custom-skill --path /custom/location")
sys.exit(1)
skill_name = sys.argv[1]
path = sys.argv[3]
print(f"🚀 Initializing skill: {skill_name}")
print(f" Location: {path}")
print()
result = init_skill(skill_name, path)
if result:
sys.exit(0)
else:
sys.exit(1)
if __name__ == "__main__":
main()
#!/usr/bin/env python3
"""
Skill Packager - Creates a distributable .skill file of a skill folder
Usage:
python utils/package_skill.py <path/to/skill-folder> [output-directory]
Example:
python utils/package_skill.py skills/public/my-skill
python utils/package_skill.py skills/public/my-skill ./dist
"""
import sys
import zipfile
from pathlib import Path
from quick_validate import validate_skill
def package_skill(skill_path, output_dir=None):
"""
Package a skill folder into a .skill file.
Args:
skill_path: Path to the skill folder
output_dir: Optional output directory for the .skill file (defaults to current directory)
Returns:
Path to the created .skill file, or None if error
"""
skill_path = Path(skill_path).resolve()
# Validate skill folder exists
if not skill_path.exists():
print(f"❌ Error: Skill folder not found: {skill_path}")
return None
if not skill_path.is_dir():
print(f"❌ Error: Path is not a directory: {skill_path}")
return None
# Validate SKILL.md exists
skill_md = skill_path / "SKILL.md"
if not skill_md.exists():
print(f"❌ Error: SKILL.md not found in {skill_path}")
return None
# Run validation before packaging
print("🔍 Validating skill...")
valid, message = validate_skill(skill_path)
if not valid:
print(f"❌ Validation failed: {message}")
print(" Please fix the validation errors before packaging.")
return None
print(f"✅ {message}\n")
# Determine output location
skill_name = skill_path.name
if output_dir:
output_path = Path(output_dir).resolve()
output_path.mkdir(parents=True, exist_ok=True)
else:
output_path = Path.cwd()
skill_filename = output_path / f"{skill_name}.skill"
# Create the .skill file (zip format)
try:
with zipfile.ZipFile(skill_filename, 'w', zipfile.ZIP_DEFLATED) as zipf:
# Walk through the skill directory
for file_path in skill_path.rglob('*'):
if file_path.is_file():
# Calculate the relative path within the zip
arcname = file_path.relative_to(skill_path.parent)
zipf.write(file_path, arcname)
print(f" Added: {arcname}")
print(f"\n✅ Successfully packaged skill to: {skill_filename}")
return skill_filename
except Exception as e:
print(f"❌ Error creating .skill file: {e}")
return None
def main():
if len(sys.argv) < 2:
print("Usage: python utils/package_skill.py <path/to/skill-folder> [output-directory]")
print("\nExample:")
print(" python utils/package_skill.py skills/public/my-skill")
print(" python utils/package_skill.py skills/public/my-skill ./dist")
sys.exit(1)
skill_path = sys.argv[1]
output_dir = sys.argv[2] if len(sys.argv) > 2 else None
print(f"📦 Packaging skill: {skill_path}")
if output_dir:
print(f" Output directory: {output_dir}")
print()
result = package_skill(skill_path, output_dir)
if result:
sys.exit(0)
else:
sys.exit(1)
if __name__ == "__main__":
main()
#!/usr/bin/env python3
"""
Quick validation script for skills - minimal version
"""
import sys
import os
import re
import yaml
from pathlib import Path
def validate_skill(skill_path):
"""Basic validation of a skill"""
skill_path = Path(skill_path)
# Check SKILL.md exists
skill_md = skill_path / 'SKILL.md'
if not skill_md.exists():
return False, "SKILL.md not found"
# Read and validate frontmatter
content = skill_md.read_text()
if not content.startswith('---'):
return False, "No YAML frontmatter found"
# Extract frontmatter
match = re.match(r'^---\n(.*?)\n---', content, re.DOTALL)
if not match:
return False, "Invalid frontmatter format"
frontmatter_text = match.group(1)
# Parse YAML frontmatter
try:
frontmatter = yaml.safe_load(frontmatter_text)
if not isinstance(frontmatter, dict):
return False, "Frontmatter must be a YAML dictionary"
except yaml.YAMLError as e:
return False, f"Invalid YAML in frontmatter: {e}"
# Define allowed properties
ALLOWED_PROPERTIES = {'name', 'description', 'license', 'allowed-tools', 'metadata'}
# Check for unexpected properties (excluding nested keys under metadata)
unexpected_keys = set(frontmatter.keys()) - ALLOWED_PROPERTIES
if unexpected_keys:
return False, (
f"Unexpected key(s) in SKILL.md frontmatter: {', '.join(sorted(unexpected_keys))}. "
f"Allowed properties are: {', '.join(sorted(ALLOWED_PROPERTIES))}"
)
# Check required fields
if 'name' not in frontmatter:
return False, "Missing 'name' in frontmatter"
if 'description' not in frontmatter:
return False, "Missing 'description' in frontmatter"
# Extract name for validation
name = frontmatter.get('name', '')
if not isinstance(name, str):
return False, f"Name must be a string, got {type(name).__name__}"
name = name.strip()
if name:
# Check naming convention (hyphen-case: lowercase with hyphens)
if not re.match(r'^[a-z0-9-]+$', name):
return False, f"Name '{name}' should be hyphen-case (lowercase letters, digits, and hyphens only)"
if name.startswith('-') or name.endswith('-') or '--' in name:
return False, f"Name '{name}' cannot start/end with hyphen or contain consecutive hyphens"
# Check name length (max 64 characters per spec)
if len(name) > 64:
return False, f"Name is too long ({len(name)} characters). Maximum is 64 characters."
# Extract and validate description
description = frontmatter.get('description', '')
if not isinstance(description, str):
return False, f"Description must be a string, got {type(description).__name__}"
description = description.strip()
if description:
# Check for angle brackets
if '<' in description or '>' in description:
return False, "Description cannot contain angle brackets (< or >)"
# Check description length (max 1024 characters per spec)
if len(description) > 1024:
return False, f"Description is too long ({len(description)} characters). Maximum is 1024 characters."
return True, "Skill is valid!"
if __name__ == "__main__":
if len(sys.argv) != 2:
print("Usage: python quick_validate.py <skill_directory>")
sys.exit(1)
valid, message = validate_skill(sys.argv[1])
print(message)
sys.exit(0 if valid else 1)Related skills
FAQ
How long should a SKILL.md be?
Keep it lean: under 150 lines is good, and over 300 lines must split detail into references.
Does it decide skill vs other primitives?
Yes. A decision flow gates whether the need is a skill, prompt, instruction, custom agent or hook before authoring.