skill-creator

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 t

By bytedance · 2,058 installs

npx skills add bytedance/deer-flow --skill skill-creator

Source repository · Upstream listing

Skill Creator A skill for creating new skills and iteratively improving them. 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 claude 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. DeerFlow Environment (⚠️ READ THIS FIRST) If you are running inside a DeerFlow sandboxed agent environment (you have access to the skill manage tool), you MUST follow these rules for all skill file operations. These override the generic file writing and packaging instructions below. Why this matters In DeerFlow, the sandbox filesystem is isolated. Files written with write file land in /mnt/user data/outputs/ , which is a per thread output directory — new chats cannot see files there. Skills must be persisted through the dedicated skill manage tool so they are stored in the per user skill directory and immediately visible to all future chats. Use skill manage for all skill file operations Operation skill manage action Example Create a new skill action="create" skill manage(action="create", name="my skill", content=" \nname: my skill\n \n...") Replace entire SKILL.md action="edit" skill manage(action="edit", name="my skill", content="updated SKILL.md") Partial edit (find & replace) action="patch" skill manage(action="patch", name="my skill", find="old text", replace="new text") Delete a skill action="delete" skill manage(action="delete", name="my skill") Add a supporting file action="write file" skill manage(action="write file", name="my skill", path="scripts/helper.py", content="...") Remove a supporting file action="remove file" skill manage(action="remove file", name="my skill", path="scripts/helper.py") Key rules 1. NEVER use sandbox write file to create or modify skill files (SKILL.md, scripts/, references/, assets/). These would land in /mnt/user data/outputs/ and be invisible to future chats. Always use skill manage instead. 2. Skip the package skill.py step . In DeerFlow, skill manage already persists the skill to the correct per user directory. No .skill packaging or manual install is needed. The skill is immediately available in all new chats. 3. Skip the present files step for skills . Skills are NOT deliverables — they are persisted via skill manage and auto loaded by the skill system. Only use present files for non skill outputs (eval reports, benchmarks, etc.). 4. Eval workspace files are OK in sandbox . Test prompts, benchmark data, eval viewer HTML, grading results, etc. are NOT skill files — you can write these to /mnt/user data/outputs/ or /mnt/user data/workspace/ using sandbox write file as usual. 5. To read an existing skill's SKILL.md , use read file("/mnt/skills/custom/<name /SKILL.md") in the sandbox (it maps to the per user skill directory). 6. Updating an existing skill : use skill manage(action="edit") or skill manage(action="patch") . Do NOT copy to /tmp/ first — skill manage handles the per user storage directly. Workflow in DeerFlow The core loop is the same, but the persistence mechanism changes: 1. Capture intent → interview → draft SKILL.md content 2. Call skill manage(action="create", name=<name , content=<SKILL.md ) to persist the skill 3. Run test cases (eval workspace files use sandbox write file ) 4. Evaluate results, gather feedback 5. Call skill manage(action="edit") or skill manage(action="patch") to improve the skill 6. Repeat until satisfied 7. Done — no packaging needed. The skill is already persisted and visible to all future chats. 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 Claude 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 Claude 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 Claude has 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 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: Claude 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: 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): 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. See references/schemas.md for the full schema (including the assertions field, which you'll add later). 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