opencode-skill-creator
Create, test, evaluate, optimize, and package OpenCode skills with the opencode-skill-creator plugin. Use when users explicitly mention opencode-skill-creator, OpenCode Skill Creator, creating an OpenCode skill, editing an OpenCode SKILL.md, running skill evals, benchmarking skill performance, or optimizing an OpenCode skill description. Do not use for generic Claude Code or Superpowers skill creation unless the user asks to port that workflow to OpenCode.
DeepseekModel
官方收录技能
质量 优秀 · 78
v1.0.0
获取
https://deepseekmodel.com/api/download.php?id=antongulin-opencode-skill-creator-opencode-skill-creator-skill-md&format=skill
下载 .skill
标准格式,含 system_prompt 与 model_config,导入任意 Agent 框架即可使用
.skill 文件中 system_prompt 字段的实际内容。
name opencode-skill-creator description Create, test, evaluate, optimize, and package OpenCode skills with the opencode-skill-creator plugin. Use when users explicitly mention opencode-skill-creator, OpenCode Skill Creator, creating an OpenCode skill, editing an OpenCode SKILL.md, running skill evals, benchmarking skill performance, or optimizing an OpenCode skill description. Do not use for generic Claude Code or Superpowers skill creation unless the user asks to port that workflow to OpenCode. OpenCode 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 opencode-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 skill_serve_review tool 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. For new skill creation, the intake interview is mandatory. Ask at least 3-5 targeted questions before drafting anything (ask more if the workflow is complex). Treat this as shadowing a teammate: the user is the domain expert and existing employee, and the agent is the new hire that must learn and mirror the real workflow. You can still be flexible about eval depth and iteration speed after intake. If the user asks to skip intake, warn once that skill quality and workflow match will be worse, get explicit confirmation, and then proceed with best effort. Then after the skill is done (but again, the order is flexible), you can also run the skill description optimizer ( skill_optimize_loop tool), which we have a whole separate tool 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 AI 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 (Required Gate for New Skills) For new skills, this step is mandatory and cannot be skipped. Do not draft SKILL.md, evals, or other files until this interview is complete and the user confirms your summary. Start by understanding the user's intent. The current conversation might already contain part of the workflow the user wants to capture (e.g., they say "turn this into a skill"). Extract that first: tools used, sequence of steps, corrections, inputs/outputs, and success criteria. Then fill the gaps with questions. Ask at least 3-5 targeted questions (more when needed). Cover these minimum areas: What should this skill enable OpenCode to do end-to-end? When should this skill trigger? (phrases, contexts, near-misses) What output format and quality bar are expected? What workflow steps must be preserved exactly vs. where can the agent improvise? Should we set up test cases to verify behavior? 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 skill type, then let the user decide. Before moving on, summarize your understanding in plain language and ask the user to confirm or correct it. If the user explicitly asks to skip intake, warn that final quality and workflow fit will likely be worse. Proceed only after explicit confirmation. Interview and Research Proactively ask questions about edge cases, input/output formats, example files, success criteria, and dependencies. Use a buddy/shadowing stance: mirror the user's real workflow, terminology, handoffs, and decision points. 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 the Task tool (using general or explore subagent types) if available, otherwise inline. Come prepared with context to reduce burden on the user. Write the SKILL.md For new skills, default to a staging location instead of the current repo/worktree. Use the system temp directory unless the user explicitly requests another path (for example: Unix/macOS /tmp/opencode-skills/<skill-name>/ , $TMPDIR/opencode-skills/<skill-name>/ ; Windows %TEMP%\\opencode-skills\\<skill-name>\\ ). This avoids cluttering unrelated repositories during skill development. Based on the user interview, fill in these components: name : Skill identifier (kebab-case, 1–64 chars, regex ^[a-z0-9]+(-[a-z0-9]+)*$ ) 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 OpenCode 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 data.", you might write "How to build a simple fast dashboard to display internal 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) The skill directory name must match the name field in the frontmatter. Progressive Disclosure Skills use a three-level loading system: Metadata (name + description) — Always in context (~100 words) SKILL.md body — In context whenever skill triggers (<500 lines ideal) 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 OpenCode 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: ## 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): ## 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. { "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 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/ next to the staged skill directory in the system temp area (for example: Unix/macOS /tmp/opencode-skills/<skill-name>-workspace/ ; Windows %TEMP%\\opencode-skills\\<skill-name>-workspace\\ ). 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 Task tool invocations (using general subagent type) 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 Task tool invocation 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. { "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 Task tool invocation completes, you receive a notification containing total_tokens and duration_ms . Save this data immediately to timing.json in the run directory: { "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: Before launching review, enforce this gate: every eval must have paired comparison outputs ( with_skill plus one baseline: without_skill or old_skill ). Do not continue to review if pairs are missing unless the user explicitly asks to proceed with partial data. Grade each run — spawn a grader Task (using general subagent type), 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. Aggregate into benchmark — use the skill_aggregate_benchmark tool: Call skill_aggregate_benchmark with: benchmarkDir: <workspace>/iteration-N skillName: <name> This produces benchmark.json and benchmark.md with pass_rate, time, and tokens for each configuration, with mean ± stddev and the delta. If generating benchmark.json manually, see references/schemas.md for the exact schema the viewer expects. Put each with_skill version before its baseline counterpart. Do an analyst pass — read the benchmark data and surface patterns the aggregate stats might hide. See agents/analyzer.md (the "Analyzing Benchmark Results" section) for what to look for — things like assertions that always pass regardless of skill (non-discriminating), high-variance evals (possibly flaky), and time/token tradeoffs. Launch the viewer with both qualitative outputs and quantitative data using the skill_serve_review tool: Call skill_serve_review with: workspace: <workspace>/iteration-N skillName: "my-skill" benchmarkPath: <workspace>/iteration-N/benchmark.json allowPartial: false For iteration 2+, also pass previousWorkspace: <workspace>/iteration-<N-1> . If benchmarkPath is omitted, the tool auto-generates benchmark.json and benchmark.md inside the workspace before opening the viewer. The default is strict ( allowPartial: false ): it fails fast when eval pairs are incomplete. Use allowPartial: true only when the user explicitly accepts incomplete comparisons. Headless environments: Use the skill_export_static_review tool to write a standalone HTML file instead of starting a server. Feedback will be downloaded as a feedback.json file when the user clicks "Submit All Reviews". After download, copy feedback.json into the workspace directory for the next iteration to pick up. Note: please use the skill_serve_review or skill_export_static_review tools to create the viewer; there's no need to write custom HTML. Tell the user something like: "I've opened the results in your browser. There are two tabs — 'Outputs' lets you click through each test case and leave feedback, 'Benchmark' shows the quantitative comparison. When you're done, come back here and let me know." What the user sees in the viewer The "Outputs" tab shows one test case at a time: Prompt : the task that was given Output : the files the skill produced, rendered inline where possible Previous Output (iteration 2+): collapsed section showing last iteration's output Formal Grades (if grading was run): collapsed section showing assertion pass/fail Feedback : a textbox that auto-saves as they type Previous Feedback (iteration 2+): their comments from last time, shown below the textbox The "Benchmark" tab shows the stats summary: pass rates, timing, and token usage for each configuration, with per-eval breakdowns and analyst observations. Navigation is via prev/next buttons or arrow keys. When done, they click "Submit All Reviews" which saves all feedback to feedback.json . Step 5: Read the feedback When the user tells you they're done, read feedback.json : { "reviews" : [ { "run_id" : "eval-0-with_skill" , "feedback" : "the chart is missing axis labels" , "timestamp" : "..." } , { "run_id" : "eval-1-with_skill" , "feedback" : "" , "timestamp" : "..." } , { "run_id" : "eval-2-with_skill" , "feedback" : "perfect, love this" , "timestamp" : "..." } ] , "status" : "complete" } Empty feedback means the user thought it was fine. Focus your improvements on the test cases where the user had specific complaints. Stop the viewer server when you're done with it by calling the skill_stop_review tool. Improving the skill This is the heart of the loop. You've run the test cases, the user has reviewed the results, and now you need to make the skill better based on their feedback. How to think about improvements Generalize from the feedback. The big picture thing that's happening here is that we're trying to create skills that can be used a million times (maybe literally, maybe even more who knows) across many different prompts. Here you and the user are iterating on only a few examples over and over again because it helps move faster. The user knows these examples in and out and it's quick for them to assess new outputs. But if the skill you and the user are codeveloping works only for those examples, it's useless. Rather than put in fiddly overfitty changes, or oppressively constrictive MUSTs, if there's some stubborn issue, you might try branching out and using different metaphors, or recommending different patterns of working. It's relatively cheap to try and maybe you'll land on something great. Keep the prompt lean. Remove things that aren't pulling their weight. Make sure to read the transcripts, not just the final outputs — if it looks like the skill is making the model waste a bunch of time doing things that are unproductive, you can try getting rid of the parts of the skill that are making it do that and seeing what happens. Explain the why. Try hard to explain the why behind everything you're asking the model to do. Today's LLMs are smart . They have good theory of mind and when given a good harness can go beyond rote instructions and really make things happen. Even if the feedback from the user is terse or frustrated, try to actually understand the task and why the user is writing what they wrote, and what they actually wrote, and then transmit this understanding into the instructions. If you find yourself writing ALWAYS or NEVER in all caps, or using super rigid structures, that's a yellow flag — if possible, reframe and explain the reasoning so that the model understands why the thing you're asking for is important. That's a more humane, powerful, and effective approach. Look for repeated work across test cases. Read the transcripts from the test runs and notice if the Task tool invocations all independently wrote similar helper scripts or took the same multi-step approach to something. If all 3 test cases resulted in the agent writing a create_docx.py or a build_chart.py , that's a strong signal the skill should bundle that script. Write it once, put it in scripts/ , and tell the skill to use it. This saves every future invocation from reinventing the wheel. This task is pretty important (we are trying to create billions a year in economic value here!) and your thinking time is not the blocker; take your time and really mull things over. I'd suggest writing a draft revision and then looking at it anew and making improvements. Really do your best to get into the head of the user and understand what they want and need. The iteration loop After improving the skill: Apply your improvements to the skill Rerun all test cases into a new iteration-<N+1>/ directory, including baseline runs. If you're creating a new skill, the baseline is always without_skill (no skill) — that stays the same across iterations. If you're improving an existing skill, use your judgment on what makes sense as the baseline: the original version the user came in with, or the previous iteration. Launch the reviewer with the skill_serve_review tool, passing previousWorkspace pointing at the previous iteration Wait for the user to review and tell you they're done Read the new feedback, improve again, repeat Keep going until: The user says they're happy The feedback is all empty (everything looks good) You're not making meaningful progress Advanced: Blind comparison For situations where you want a more rigorous comparison between two versions of a skill (e.g., the user asks "is the new version actually better?"), there's a blind comparison system. Read agents/comparator.md and agents/analyzer.md for the details. The basic idea is: give two outputs to an independent agent without telling it which is which, and let it judge quality. Then analyze why the winner won. This is optional, requires the Task tool (using general subagent type), and most users won't need it. The human review loop is usually sufficient. Description Optimization The description field in SKILL.md frontmatter is the primary mechanism that determines whether OpenCode invokes a skill. After creating or improving a skill, offer to optimize the description for better triggering accuracy. Step 1: Generate trigger eval queries
Agent 识别该技能的关键词,点击任意一个即可复制。
该技能未提供触发词。
下载的 .skill 包内含以下字段。
| 字段 | 说明 |
|---|---|
| format | 格式标识(skill/v1) |
| skill_id | 技能唯一 ID |
| name | 技能名称 |
| version | 版本号 |
| description | 技能描述 |
| category | 所属分类(数组) |
| trigger_words | 触发词列表 |
| tags | 标签列表 |
| source | 来源标识 |
| source_url | 来源链接(本页地址) |
| exported_at | 导出时间(每次下载生成) |
| system_prompt | 系统提示词正文 |
| model_config | 模型参数:provider / model / temperature / max_tokens / top_p |
| examples | 示例 |
| install_guide | 各平台导入说明(Coze / Dify / Claude / 自定义框架) |