技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
skill-creator-swarm【数据与研究】Guide for creating effective skills. Use when users want to create a new skill or update an existing skill that extends an agent's capabilities with specialized knowledge, workflows, tool usage, or reusable resources. Also use when users want to refine a skill through swarm-style evaluation using subagents, baseline comparisons, grading, and analysis…
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
This skill provides guidance for creating effective skills.
It is designed for an agent swarm environment where a main agent can coordinate multiple subagents via tools such as create_subagent and task.
Skills are modular, self-contained packages that extend an agent's capabilities by providing specialized knowledge, workflows, and tools. Think of them as onboarding guides for specific domains or tasks. A good skill turns a general-purpose agent into a specialized one without bloating every prompt.
The context window is a public good. Skills share it with the system prompt, conversation history, other skills, and the actual user request.
Default assumption: the agent is already smart. Only add information the agent would not reliably infer on its own. Prefer concise examples over long explanations.
Match specificity to the task's fragility:
Every skill has three levels:
SKILL.mdKeep SKILL.md focused. Push detailed schemas, long examples, and variant-specific material into references/.
Every skill consists of a required SKILL.md file and optional bundled resources:
skill-name/
├── SKILL.md
├── scripts/
├── references/
└── assets/
SKILL.mdEvery SKILL.md should contain:
name and descriptionThe description is the main trigger surface. Put all "when to use this skill" guidance there, not in the body.
scripts/Use for deterministic or repetitive operations.
references/Use for documentation the agent may need to read while working.
SKILL.mdassets/Use for files that should be consumed or copied into outputs, not loaded as instructions.
Skill creation usually follows these steps:
Follow these in order unless there is a clear reason not to.
Skip only when the skill's usage patterns are already clear.
Useful questions:
Conclude this step only when there is a concrete sense of:
Analyze each example:
Common outputs of this analysis:
When creating a new skill from scratch, run:
scripts/init_skill.py <skill-name> --path /mnt/agents/output
IMPORTANT: Always use /mnt/agents/output as the output directory. This path is shared across all sandboxes (main agent and subagents). Other paths like /app/.user/skills/ are NOT shared and subagents cannot read files there.
The script creates:
SKILL.mdscripts/, references/, and assets/ directoriesDo not use shell brace expansion when creating additional directories.
When editing the skill, remember that it is being created for another agent instance to use later. Include procedural knowledge, domain-specific constraints, and reusable resources that would materially improve another run.
Consult these references when useful:
references/workflows.mdreferences/output-patterns.mdImplement reusable resources first:
Delete example files you do not need.
SKILL.mdWrite instructions in imperative form.
Use:
namedescriptionThe description should include:
Do not put "when to use" only in the body.
The body should explain:
DO NOT skip this step. You MUST run at least one evaluation round using subagents before packaging. Without this step, the skill is untested — do not proceed to Step 6 until you have compared with_skill vs without_skill outputs.
This section adapts the newer swarm evaluation mindset to an agent swarm environment without relying on heavy orchestration scripts. The main agent should run this process directly through prompts and subagents.
Do not build a large eval harness first. Instead, coordinate a lightweight inline loop: draft realistic prompts, run paired with_skill and baseline executions, evaluate the outputs with dedicated subagents, analyze the results, and revise the skill.
This keeps the process lightweight and aligned with the actual swarm runtime.
For each eval prompt, the main agent should launch two executions in the same turn:
Do not run all with_skill cases first and come back for baseline later. Pair them in the same evaluation round so comparisons are cleaner.
You may still organize outputs in a sibling workspace, but do it manually and simply. A good pattern is:
<skill-name>-workspace/
└── iteration-1/
├── eval-1/
│ ├── with_skill/
│ ├── without_skill/
│ └── notes.md
└── eval-2/
The point is consistency, not strict tooling.
Draft 2-5 realistic prompts.
Good prompts:
Weak prompts:
Choose baseline based on context:
State the baseline explicitly in your notes and prompts.
When evals matter, the main agent should create specialized evaluator subagents instead of doing everything itself.
Recommended roles:
skill_executor: runs the prompt with or without the skillskill_grader: checks expectations against outputsskill_comparator: compares two outputs blindly and picks a winnerskill_analyzer: reads the results and explains what to improveThese do not need dedicated scripts. In an agent swarm environment, they can be created via create_subagent with explicit system_prompts and used through task.
For each run, give the executor subagent:
The skill you created in Step 4 is at /mnt/agents/output/<skill-name>/SKILL.md. Pass this exact path to the with_skill executor so it can read the skill. The without_skill executor gets no skill path.
Execute this eval case.
Mode: with_skill | baseline
Skill path: /path/to/skill/SKILL.md or none
Task: <user prompt>
Input files: <list or none>
Output directory: <path>
Requirements:
- If a skill path is provided, read it before solving the task
- Save deliverables into the output directory
- Return a concise summary of what you produced
- Return the output file paths
- If something is uncertain, say so explicitly
Use a dedicated grader subagent when expectations are objective.
The grader should:
A good grader task prompt has this shape:
Grade this eval run.
Prompt: <original eval prompt>
Outputs path: <path>
Expectations:
- ...
- ...
Return:
- pass/fail for each expectation
- evidence for each judgment
- overall verdict
- any weaknesses in the expectations themselves
Use a comparator subagent when quality is partly subjective or holistic.
The comparator should:
A good comparator task prompt has this shape:
Compare two outputs blindly.
Original prompt: <prompt>
Output A path: <path>
Output B path: <path>
Do not infer which one used the skill.
Judge only on task completion quality, correctness, completeness, and usability.
Return:
- winner: A, B, or TIE
- concise reasoning
- strengths and weaknesses of each
After grading or comparison, use an analyzer subagent to improve the skill itself.
The analyzer should:
A good analyzer task prompt has this shape:
Analyze these eval results and propose skill improvements.
Skill path: <path>
Result materials:
- grading notes
- comparison notes
- output summaries
Focus on:
- ambiguous instructions
- missing guidance
- repeated wasted work
- missing reusable scripts/references/assets
Return:
- top issues
- why they matter
- concrete edits to make
When the task is objectively verifiable, write expectations. Good expectations are:
Examples of weak expectations:
Examples of stronger expectations:
When the task is subjective, rely more on blind comparison and human review than rigid assertions.
If timing and token usage are easy to observe from the runtime, record them. If not, do not overbuild instrumentation. The main goal is to learn whether the skill improves behavior.
After the eval round:
Do not overfit the skill to one example. Improve patterns, not one-off wording hacks.
In this environment, avoid building complex external orchestration scripts just to run evals. Prefer:
The swarm evaluation mindset is valuable. The implementation should stay lightweight.
Once development is complete, you MUST package the skill:
scripts/package_skill.py <path/to/skill-folder>
Optional output directory:
scripts/package_skill.py <path/to/skill-folder> ./dist
The packaging script:
.skill archive if validation passesAfter packaging, your final response to the user MUST include a reference to the .skill file. Do not skip this. It is required for the user interface to display and deliver the packaged skill.
After the skill starts being used on real tasks, keep iterating based on actual behavior.
Use real runs to notice:
Then fold those observations back into the same loop: