- name
- tailcall-skill-creator
- description
- Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.
<!-- Modified by Tailcall for Forge, 2026 — original: anthropics/skills -->
# Skill Creator
A skill for creating new skills and iteratively improving them.
## The mandatory loop
Work through these in order. Steps 3–8 are the part that actually tells you
whether the skill is any good, and they are the part that gets skipped — so
treat them as the job, not as optional rigour. Put them on your todo list
verbatim.
1. **Draft** the skill (`SKILL.md` with frontmatter).
2. **Write `evals/evals.json`** — 2-3 realistic test prompts, confirmed with the user.
3. **Run each prompt with the skill AND as a baseline** (no skill / old
version). Both, in the same batch. See "Running test prompts in Forge".
4. **Grade every run** against the assertions, following `agents/grader.md`.
Save `grading.json` per run.
5. **Aggregate**: `python -m scripts.aggregate_benchmark <workspace>/iteration-N
--skill-name <name>` → `benchmark.json` + `benchmark.md`.
6. **Build the viewer**: `eval-viewer/generate_review.py` (use `--static` when
there's no browser).
7. **Post the eval report in chat** using `scripts/eval_report.py` and the
template below, and **wait for the user to review it**.
8. **Iterate** on the skill from the feedback, then go back to step 3.
9. Only once the user is happy: **description optimization** (`run_loop.py`),
packaging, and publishing.
**A trigger eval is not an evaluation.** `run_eval.py` / `run_loop.py` measure
one thing: whether the description causes the agent to *open* the skill. A
perfect 20/20 tells you nothing about whether the skill made the agent's work
better — a skill that always triggers and then gives bad advice scores 100%.
"Trigger was perfect, so there's nothing left to check" is a failure mode, not
a conclusion. Steps 3–8 are what measure whether the skill helps, and they are
required even when triggering is flawless.
### Do not publish before the review gate
**You MUST NOT `git commit`, `git push`, or open a PR for a new or changed
skill until all three are true:**
1. The behavioural eval has run — with-skill *and* baseline (step 3).
2. `benchmark.md` exists (step 5).
3. You have posted the eval report in chat and **the user has approved it**
(step 7).
This holds even when your instructions say "open a PR" or "ship it". Those
instructions tell you the destination, not that you may skip the measurement;
a PR containing a skill nobody has evidence about is the thing this gate
exists to prevent. Present the report and ask first. If the user then says to
go ahead without evals, that's their call to make — but it has to be their
call, made with the report in front of them.
### If there is no user to ask (headless / sub-agent mode)
You may be running detached: spawned by another agent, handed a task brief, with
no interactive human and no browser. Signs of this are that your instructions
arrived as a task description rather than a conversation, nobody has replied to
anything you've said, and there's no one to open a viewer for.
In that case you still run steps 1–6, and then **stop**. Do not publish and do
not treat your own read of the outputs as approval — you wrote the skill, so
you are the last one who should be signing off on it. Return the eval report
(the same markdown from `scripts/eval_report.py`) as your final answer, with the
status **"awaiting review"** and the path to the generated `review.html`. The
agent or human that spawned you is the reviewer; handing them the numbers is
what finishing looks like in this mode.
---
At a high level, the process of creating a skill goes like this:
- Decide what you want the skill to do and roughly how it should do it
- Write a draft of the skill
- Create a few test prompts and run the-agent-with-access-to-the-skill on them
- Help the user evaluate the results both qualitatively and quantitatively
- While the runs happen in the background, draft some quantitative evals if there aren't any (if there are some, you can either use as is or modify if you feel something needs to change about them). Then explain them to the user (or if they already existed, explain the ones that already exist)
- Use the `eval-viewer/generate_review.py` script to show the user the results for them to look at, and also let them look at the quantitative metrics
- Rewrite the skill based on feedback from the user's evaluation of the results (and also if there are any glaring flaws that become apparent from the quantitative benchmarks)
- Repeat until you're satisfied
- Expand the test set and try again at larger scale
Your job when using this skill is to figure out where the user is in this process and then jump in and help them progress through these stages. So for instance, maybe they're like "I want to make a skill for X". You can help narrow down what they mean, write a draft, write the test cases, figure out how they want to evaluate, run all the prompts, and repeat.
On the other hand, maybe they already have a draft of the skill. In this case you can go straight to the eval/iterate part of the loop.
Of course, you should always be flexible and if the user is like "I don't need to run a bunch of evaluations, just vibe with me", you can do that instead.
Then after the skill is done (but again, the order is flexible), you can also run the skill description improver, which we have a whole separate script for, to optimize the triggering of the skill.
Cool? Cool.
## Communicating with the user
The skill creator is liable to be used by people across a wide range of familiarity with coding jargon. If you haven't heard (and how could you, it's only very recently that it started), there's a trend now where the power of coding agents is inspiring plumbers to open up their terminals, parents and grandparents to google "how to install npm". On the other hand, the bulk of users are probably fairly computer-literate.
So please pay attention to context cues to understand how to phrase your communication! In the default case, just to give you some idea:
- "evaluation" and "benchmark" are borderline, but OK
- for "JSON" and "assertion" you want to see serious cues from the user that they know what those things are before using them without explaining them
It's OK to briefly explain terms if you're in doubt, and feel free to clarify terms with a short definition if you're unsure if the user will get it.
---
## Creating a skill
### Capture Intent
Start by understanding the user's intent. The current conversation might already contain a workflow the user wants to capture (e.g., they say "turn this into a skill"). If so, extract answers from the conversation history first — the tools used, the sequence of steps, corrections the user made, input/output formats observed. The user may need to fill the gaps, and should confirm before proceeding to the next step.
1. What should this skill enable the agent to do?
2. When should this skill trigger? (what user phrases/contexts)
3. What's the expected output format?
4. Should we set up test cases to verify the skill works? Skills with objectively verifiable outputs (file transforms, data extraction, code generation, fixed workflow steps) benefit from test cases. Skills with subjective outputs (writing style, art) often don't need them. Suggest the appropriate default based on the skill type, but let the user decide.
### Interview and Research
Proactively ask questions about edge cases, input/output formats, example files, success criteria, and dependencies. Wait to write test prompts until you've got this part ironed out.
Check available MCPs - if useful for research (searching docs, finding similar skills, looking up best practices), research in parallel via subagents if available, otherwise inline. Come prepared with context to reduce burden on the user.
### Write the SKILL.md
Based on the user interview, fill in these components:
- **name**: Skill identifier
- **description**: When to trigger, what it does. This is the primary triggering mechanism - include both what the skill does AND specific contexts for when to use it. All "when to use" info goes here, not in the body. Note: currently agents have a tendency to "undertrigger" skills -- to not use them when they'd be useful. To combat this, please make the skill descriptions a little bit "pushy". So for instance, instead of "How to build a simple fast dashboard to display internal Anthropic data.", you might write "How to build a simple fast dashboard to display internal Anthropic data. Make sure to use this skill whenever the user mentions dashboards, data visualization, internal metrics, or wants to display any kind of company data, even if they don't explicitly ask for a 'dashboard.'"
- **compatibility**: Required tools, dependencies (optional, rarely needed)
- **the rest of the skill :)**
### Skill Writing Guide
#### Anatomy of a Skill
```
skill-name/
├── SKILL.md (required)
│ ├── YAML frontmatter (name, description required)
│ └── Markdown instructions
└── Bundled Resources (optional)
├── scripts/ - Executable code for deterministic/repetitive tasks
├── references/ - Docs loaded into context as needed
└── assets/ - Files used in output (templates, icons, fonts)
```
#### Where skills live
Forge discovers a skill by its directory, and loads `<dir>/SKILL.md`:
- **User-global**: `~/.forge/skills/<name>/SKILL.md` — available in every project.
- **Project-local**: `<project>/.forge/skills/<name>/`, `<project>/.agents/skills/<name>/`,
or `<project>/.claude/skills/<name>/` — scoped to that repository, and the
natural home for a skill that encodes the project's own conventions.
Workspace skills shadow global ones of the same name, so a project can override
a user-global skill. When you're unsure where the user wants a new skill, ask:
global for "I always want this", project-local for "this is about this repo".
Developing a new skill in the project directory and promoting it to
`~/.forge/skills/` once it's good is a reasonable default.
#### Progressive Disclosure
Skills use a three-level loading system:
1. **Metadata** (name + description) - Always in context (~100 words)
2. **SKILL.md body** - In context whenever skill triggers (<500 lines ideal)
3. **Bundled resources** - As needed (unlimited, scripts can execute without loading)
These word counts are approximate and you can feel free to go longer if needed.
**Key patterns:**
- Keep SKILL.md under 500 lines; if you're approaching this limit, add an additional layer of hierarchy along with clear pointers about where the model using the skill should go next to follow up.
- Reference files clearly from SKILL.md with guidance on when to read them
- For large reference files (>300 lines), include a table of contents
**Domain organization**: When a skill supports multiple domains/frameworks, organize by variant:
```
cloud-deploy/
├── SKILL.md (workflow + selection)
└── references/
├── aws.md
├── gcp.md
└── azure.md
```
The agent reads only the relevant reference file.
#### Principle of Lack of Surprise
This goes without saying, but skills must not contain malware, exploit code, or any content that could compromise system security. A skill's contents should not surprise the user in their intent if described. Don't go along with requests to create misleading skills or skills designed to facilitate unauthorized access, data exfiltration, or other malicious activities. Things like a "roleplay as an XYZ" are OK though.
#### Writing Patterns
Prefer using the imperative form in instructions.
**Defining output formats** - You can do it like this:
```markdown
## Report structure
ALWAYS use this exact template:
# [Title]
## Executive summary
## Key findings
## Recommendations
```
**Examples pattern** - It's useful to include examples. You can format them like this (but if "Input" and "Output" are in the examples you might want to deviate a little):
```markdown
## Commit message format
**Example 1:**
Input: Added user authentication with JWT tokens
Output: feat(auth): implement JWT-based authentication
```
### Writing Style
Try to explain to the model why things are important in lieu of heavy-handed musty MUSTs. Use theory of mind and try to make the skill general and not super-narrow to specific examples. Start by writing a draft and then look at it with fresh eyes and improve it.
### Test Cases
After writing the skill draft, come up with 2-3 realistic test prompts — the kind of thing a real user would actually say. Share them with the user: [you don't have to use this exact language] "Here are a few test cases I'd like to try. Do these look right, or do you want to add more?" Then run them.
Save test cases to `evals/evals.json`. Don't write assertions yet — just the prompts. You'll draft assertions in the next step while the runs are in progress.
```json
{
"skill_name": "example-skill",
"evals": [
{
"id": 1,
"prompt": "User's task prompt",
"expected_output": "Description of expected result",
"files": []
}
]
}
```
See `references/schemas.md` for the full schema (including the `assertions` field, which you'll add later).
## Running test prompts in Forge
There are two ways to run a test prompt, and which you have depends on the
environment. Check before planning the runs.
**Preferred: sub-agents.** If you have a Task tool (or equivalent) that spawns
sub-agents, use it. Each test case becomes two sub-agent tasks — one pointed at
the skill, one without it — and they run in parallel. Sub-agent completions also
report `total_tokens` and `duration_ms`, which is the only place those numbers
are available; save them to `timing.json` as each notification arrives.
**Fallback: drive the runner directly.** With no sub-agents, use
`scripts/forge_client.py`:
```bash
python -m scripts.forge_client "<eval prompt>" \
--cwd <sandbox-dir> --model <model> --provider <provider> \
--timeout 120
# add --isolate-global-skills for baseline runs
```
`run_prompt()` is the same thing as a function, returning `{"text",
"tool_calls", "skills_loaded", "timed_out"}`.
**Token counts are unavailable this way.** `forge_client` sees the conversation
stream, which carries no usage totals, so there is nothing real to put in
`timing.json`. `aggregate_benchmark` falls back to `output_chars` — a character
count, not tokens. Say so when you report the benchmark rather than presenting
the token column as a measurement; wall-clock time from `forge_client` is real,
tokens are a proxy.
### Baselines are contaminated, and you have to say so
A "no skill" baseline on a real machine is not actually skill-free: the user's
own skills in `~/.forge/skills`, `~/.agents/skills`, `~/.claude/skills` and
`~/.forge/tailcall-skills` load in every run, including baselines. Forge has no
working way to turn them off — `skill_dirs` config only appends to the defaults,
`extension_set_enabled` on `tool.skill` is accepted but ignored, and overriding
`HOME` breaks login. `--isolate-global-skills` sends the request anyway so this
fixes itself when the host honours it, but today it changes nothing.
So isolation is **detected, not prevented**. Every run records which skills it
loaded (`skills_loaded`). After each run, write a `contamination.json` next to
its `grading.json`:
```json
{"contaminating_skills": ["tailcall-project"]}
```
For a baseline, any loaded skill is contamination. For a with-skill run, any
skill other than the candidate is. `scripts/eval_report.py` surfaces these as
warnings. If a baseline loaded a skill with a purpose overlapping the
candidate's, the comparison is "candidate + that skill" vs "that skill" — report
the delta with that caveat attached rather than as a clean result.
### Side-effect safety
Some skills drive tools that change real state — creating projects, cloning
repos, writing files, calling APIs. A test prompt for one of those runs the tool
for real, and an eval sweep runs it many times. Before running such a skill's
evals:
- **Sandbox the working directory.** Run with `--cwd` pointing at a fresh temp
directory, never the user's workspace or a repo checkout.
- **Tell the prompt what's off-limits.** Add an explicit line to the eval prompt:
don't clone repositories, don't push, don't write outside the working
directory. The prompt is the only thing the sub-agent obeys.
- **Snapshot before.** List whatever the skill creates (projects, files,
branches) so you can tell afterwards what is new.
- **Clean up after, and report leftovers.** Delete what the runs created, then
say in the eval report what was created and what was removed. If something
couldn't be cleaned up, name it explicitly — a silent leftover is worse than
a noisy one.
This is not hypothetical: a previous run of this skill created real project
boards and cloned a repository into the user's workspace as a side effect of
"evaluating".
## Running and evaluating test cases
This section is one continuous sequence — don't stop partway through. Do NOT use `/skill-test` or any other testing skill.
Put results in `<skill-name>-workspace/` as a sibling to the skill directory. Within the workspace, organize results by iteration (`iteration-1/`, `iteration-2/`, etc.) and within that, each test case gets a directory (`eval-0/`, `eval-1/`, etc.). Don't create all of this upfront — just create directories as you go.
### Step 1: Spawn all runs (with-skill AND baseline) in the same turn
For each test case, spawn two subagents in the same turn — one with the skill, one without. This is important: don't spawn the with-skill runs first and then come back for baselines later. Launch everything at once so it all finishes around the same time.
**With-skill run:**
```
Execute this task:
- Skill path: <path-to-skill>
- Task: <eval prompt>
- Input files: <eval files if any, or "none">
- Save outputs to: <workspace>/iteration-<N>/eval-<ID>/with_skill/outputs/
- Outputs to save: <what the user cares about — e.g., "the .docx file", "the final CSV">
```
**Baseline run** (same prompt, but the baseline depends on context):
- **Creating a new skill**: no skill at all. Same prompt, no skill path, save to `without_skill/outputs/`.
- **Improving an existing skill**: the old version. Before editing, snapshot the skill (`cp -r <skill-path> <workspace>/skill-snapshot/`), then point the baseline subagent at the snapshot. Save to `old_skill/outputs/`.
Write an `eval_metadata.json` for each test case (assertions can be empty for now). Give each eval a descriptive name based on what it's testing — not just "eval-0". Use this name for the directory too. If this iteration uses new or modified eval prompts, create these files for each new eval directory — don't assume they carry over from previous iterations.
```json
{
"eval_id": 0,
"eval_name": "descriptive-name-here",
"prompt": "The user's task prompt",
"assertions": []
}
```
### Step 2: While runs are in progress, draft assertions
Don't just wait for the runs to finish — you can use this time productively. Draft quantitative assertions for each test case and explain them to the user. If assertions already exist in `evals/evals.json`, review them and explain what they check.
Good assertions are objectively verifiable and have descriptive names — they should read clearly in the benchmark viewer so someone glancing at the results immediately understands what each one checks. Subjective skills (writing style, design quality) are better evaluated qualitatively — don't force assertions onto things that need human judgment.
Update the `eval_metadata.json` files and `evals/evals.json` with the assertions once drafted. Also explain to the user what they'll see in the viewer — both the qualitative outputs and the quantitative benchmark.
### Step 3: As runs complete, capture timing data
When each subagent task completes, you receive a notification containing `total_tokens` and `duration_ms`. Save this data immediately to `timing.json` in the run directory:
```json
{
"total_tokens": 84852,
"duration_ms": 23332,
"total_duration_seconds": 23.3
}
```
This is the only opportunity to capture this data — it comes through the task notification and isn't persisted elsewhere. Process each notification as it arrives rather than trying to batch them.
### Step 4: Grade, aggregate, and launch the viewer
Once all runs are done:
1. **Grade each run** — spawn a grader subagent (or grade inline) that reads `agents/grader.md` and evaluates each assertion against the outputs. Save results to `grading.json` in each run directory. The grading.json expectations array must use the fields `text`, `passed`, and `evidence` (not `name`/`met`/`details` or other variants) — the viewer depends on these exact field names. For assertions that can be checked programmatically, write and run a script rather than eyeballing it — scripts are faster, more reliable, and can be reused across iterations.
2. **Aggregate into benchmark** — run the aggregation script from the skill-creator directory:
```bash
python -m scripts.aggregate_benchmark <workspace>/iteration-N --skill-name <name>
```
Ver en GitHub