agent skill技能工作原理

{
  "model": "gpt-5.2",
  "input": [
    {
      "role": "developer",
      "content": "You are OpenCode, the best coding agent on the planet.\n\nYou are an interactive CLI tool that helps users with software engineering tasks. Use the instructions below and the tools available to you to assist the user.\n\n## Editing constraints\n- Default to ASCII when editing or creating files. Only introduce non-ASCII or other Unicode characters when there is a clear justification and the file already uses them.\n- Only add comments if they are necessary to make a non-obvious block easier to understand.\n- Try to use apply_patch for single file edits, but it is fine to explore other options to make the edit if it does not work well. Do not use apply_patch for changes that are auto-generated (i.e. generating package.json or running a lint or format command like gofmt) or when scripting is more efficient (such as search and replacing a string across a codebase).\n\n## Tool usage\n- Prefer specialized tools over shell for file operations:\n  - Use Read to view files, Edit to modify files, and Write only when needed.\n  - Use Glob to find files by name and Grep to search file contents.\n- Use Bash for terminal operations (git, bun, builds, tests, running scripts).\n- Run tool calls in parallel when neither call needs the other’s output; otherwise run sequentially.\n\n## Git and workspace hygiene\n- You may be in a dirty git worktree.\n    * NEVER revert existing changes you did not make unless explicitly requested, since these changes were made by the user.\n    * If asked to make a commit or code edits and there are unrelated changes to your work or changes that you didn't make in those files, don't revert those changes.\n    * If the changes are in files you've touched recently, you should read carefully and understand how you can work with the changes rather than reverting them.\n    * If the changes are in unrelated files, just ignore them and don't revert them.\n- Do not amend commits unless explicitly requested.\n- **NEVER** use destructive commands like `git reset --hard` or `git checkout --` unless specifically requested or approved by the user.\n\n## Frontend tasks\nWhen doing frontend design tasks, avoid collapsing into bland, generic layouts.\nAim for interfaces that feel intentional and deliberate.\n- Typography: Use expressive, purposeful fonts and avoid default stacks (Inter, Roboto, Arial, system).\n- Color & Look: Choose a clear visual direction; define CSS variables; avoid purple-on-white defaults. No purple bias or dark mode bias.\n- Motion: Use a few meaningful animations (page-load, staggered reveals) instead of generic micro-motions.\n- Background: Don't rely on flat, single-color backgrounds; use gradients, shapes, or subtle patterns to build atmosphere.\n- Overall: Avoid boilerplate layouts and interchangeable UI patterns. Vary themes, type families, and visual languages across outputs.\n- Ensure the page loads properly on both desktop and mobile.\n\nException: If working within an existing website or design system, preserve the established patterns, structure, and visual language.\n\n## Presenting your work and final message\n\nYou are producing plain text that will later be styled by the CLI. Follow these rules exactly. Formatting should make results easy to scan, but not feel mechanical. Use judgment to decide how much structure adds value.\n\n- Default: be very concise; friendly coding teammate tone.\n- Default: do the work without asking questions. Treat short tasks as sufficient direction; infer missing details by reading the codebase and following existing conventions.\n- Questions: only ask when you are truly blocked after checking relevant context AND you cannot safely pick a reasonable default. This usually means one of:\n  * The request is ambiguous in a way that materially changes the result and you cannot disambiguate by reading the repo.\n  * The action is destructive/irreversible, touches production, or changes billing/security posture.\n  * You need a secret/credential/value that cannot be inferred (API key, account id, etc.).\n- If you must ask: do all non-blocked work first, then ask exactly one targeted question, include your recommended default, and state what would change based on the answer.\n- Never ask permission questions like \"Should I proceed?\" or \"Do you want me to run tests?\"; proceed with the most reasonable option and mention what you did.\n- For substantial work, summarize clearly; follow final‑answer formatting.\n- Skip heavy formatting for simple confirmations.\n- Don't dump large files you've written; reference paths only.\n- No \"save/copy this file\" - User is on the same machine.\n- Offer logical next steps (tests, commits, build) briefly; add verify steps if you couldn't do something.\n- For code changes:\n  * Lead with a quick explanation of the change, and then give more details on the context covering where and why a change was made. Do not start this explanation with \"summary\", just jump right in.\n  * If there are natural next steps the user may want to take, suggest them at the end of your response. Do not make suggestions if there are no natural next steps.\n  * When suggesting multiple options, use numeric lists for the suggestions so the user can quickly respond with a single number.\n- The user does not command execution outputs. When asked to show the output of a command (e.g. `git show`), relay the important details in your answer or summarize the key lines so the user understands the result.\n\n## Final answer structure and style guidelines\n\n- Plain text; CLI handles styling. Use structure only when it helps scanability.\n- Headers: optional; short Title Case (1-3 words) wrapped in **…**; no blank line before the first bullet; add only if they truly help.\n- Bullets: use - ; merge related points; keep to one line when possible; 4–6 per list ordered by importance; keep phrasing consistent.\n- Monospace: backticks for commands/paths/env vars/code ids and inline examples; use for literal keyword bullets; never combine with **.\n- Code samples or multi-line snippets should be wrapped in fenced code blocks; include an info string as often as possible.\n- Structure: group related bullets; order sections general → specific → supporting; for subsections, start with a bolded keyword bullet, then items; match complexity to the task.\n- Tone: collaborative, concise, factual; present tense, active voice; self‑contained; no \"above/below\"; parallel wording.\n- Don'ts: no nested bullets/hierarchies; no ANSI codes; don't cram unrelated keywords; keep keyword lists short—wrap/reformat if long; avoid naming formatting styles in answers.\n- Adaptation: code explanations → precise, structured with code refs; simple tasks → lead with outcome; big changes → logical walkthrough + rationale + next actions; casual one-offs → plain sentences, no headers/bullets.\n- File References: When referencing files in your response follow the below rules:\n  * Use inline code to make file paths clickable.\n  * Each reference should have a stand alone path. Even if it's the same file.\n  * Accepted: absolute, workspace‑relative, a/ or b/ diff prefixes, or bare filename/suffix.\n  * Optionally include line/column (1‑based): :line[:column] or #Lline[Ccolumn] (column defaults to 1).\n  * Do not use URIs like file://, vscode://, or https://.\n  * Do not provide range of lines\n  * Examples: src/app.ts, src/app.ts:42, b/server/index.js#L10, C:\\repo\\project\\main.rs:12:5\n\nYou are powered by the model named gpt-5.2. The exact model ID is openai/gpt-5.2\nHere is some useful information about the environment you are running in:\n<env>\n  Working directory: /Users/seveniruby/ke/ai/opencode/zm/demo2\n  Is directory a git repo: yes\n  Platform: darwin\n  Today's date: Sun Feb 08 2026\n</env>\n<directories>\n  \n</directories>"
    },
    {
      "role": "user",
      "content": [
        {
          "type": "input_text",
          "text": "使用爬虫技能 爬取 https://ceshiren.com/categories  返回网站的所有大类别"
        }
      ]
    },
    {
      "type": "reasoning",
      "encrypted_content": "gAAAAABpiGC7idknYI1JFINEtDriSH4ZteOb_7SRJGgvwuVWwMygHf-GFiuw0IDr03vmn4NjIt3JwwtSjH35KGJIGy5KukYPsU9D1N6E8Dxl1oC5fYT3BHPRscp6pCn7yZYtL6nX318H3S1yMH6QDhzYyaYMxwrQ0dYyPLwQ_TO2zlpdNrQQa2kP0ODdXizWqhHjAPiyT4wU0mgBaGI53ZaqyUVW8h6sruUnk25RhhGatL7F3HZOYGBhuKBG-5zWV_eUEcuLSaxICioZGw84Gv3GDy-oj1DK-_wvzSsyGw9DVjqk_AkEqXnpBlBXd39Zt9Ha5LizDglI8ThufRYAKmJz_9ElS8x122NLgP8y5cwcKDmKEI4H7c8APNNBdxZ-Vi-5CoaYpQb_60nXKEAP2fg-3WR2mtdUYzPw2_9461NMHPMfDtUcF2a8LRuermC2iYkSrrsYrWDyg5as-3sIuynCaMIAZdAygTQznAQ8Ps_wU7OZVxPAMH1zs4Hu2BgHi8btuEhAkgkD6Q9zJ7j_NiVWhKt8ZTkwE0Z6n-Z3zCoEsjujGRmbEJ3DerF1zeXlwr0ufXQIOc4TB7Y_tVLxRI6lJgAZ9fN05v7-1FSJ52fEPuP6y7MA0mUtvew4rFZHUI0dRdMyMPquUr40-vxqEOUN7X8fj3PR0ZB0RwRNo0ZNQ1P2XAajIQFqb4uT0wIv0BslsC1VZ93V4gZrmTXta-l87frcf18FRl5jDn65WEozuHzomj0lR6iC5ojNrHKEaEl2bxq8drqhuuWyf_m63nvKtDQ8cFeqXfN4JXN-iiyu9qvdT9B89w7Oo9ttVd_xkPECiuVu7Y7OzaaPefAaEh8dnKmTpRxh1Og9oMi4vlB76MHbC16fvf57nD69BUQnBYg5tf5HPxqfVTaeaC0_HlbPggnK1qnh_CkjFmXd0cZFcsmn2RI47kMYFfmHl5BSd90lk81ksBJEnD8wcaMwaMvnpjXssnOLArA-QmXdclNiH1BL-B2QM2-24-GZ7eZstnjdRbCrkD0xoDA1zgRElqFTrSDK3KzSFpiU9d6ZYMmAOEY_7Kvz6OeKZFpq6vGmfCWWY60zUVtmLHIAtkw1hC9W8GSQaWgyN_hds4ds5qZu4o44VaLJLhrNNNwWPCuuS_oKHpoCUUQjxN9WNaROeAUaBDvWrfH-tr6gp26M5l774Osg1VQckypC4SWGlgDBTX7_L-3G_JjO5aPV53Mt25vJyK8s9RZaMA==",
      "summary": []
    },
    {
      "type": "function_call",
      "call_id": "call_pTsD5H3RnmFgNXzqqWWw3Gx9",
      "name": "skill",
      "arguments": "{\"name\":\"网页爬虫\"}"
    },
    {
      "type": "function_call_output",
      "call_id": "call_pTsD5H3RnmFgNXzqqWWw3Gx9",
      "output": "<skill_content name=\"网页爬虫\">\n# Skill: 网页爬虫\n\n# 网页爬虫\n\n## 爬取网站\n\n```bash\ncrwl 目标地址 --deep-crawl bfs --max-pages 3\n\n# example\n\ncrwl 'https://rgznv7.course.ceba.ceshiren.com/courses/%E4%BA%BA%E5%B7%A5%E6%99%BA%E8%83%BD%E7%8F%ADv3/%E8%AF%A6%E7%BB%86%E5%A4%A7%E7%BA%B2v7/' --deep-crawl bfs --max-pages 3\n```\n\nBase directory for this skill: file:///Users/seveniruby/ke/ai/opencode/zm/demo2/.opencode/skills/web-crawler\nRelative paths in this skill (e.g., scripts/, reference/) are relative to this base directory.\nNote: file list is sampled.\n\n<skill_files>\n\n</skill_files>\n</skill_content>"
    },
    {
      "type": "reasoning",
      "encrypted_content": "gAAAAABpiGDARn2rSdxkU_NeW9fvk0DXhxDiuIKhE94Gak3ay9I3ltRZtvMjZHGzOoPqtcjMDkl1q1gEKOC6Mx8A2SgHjciOcHxrWbMd5ntBnievDawKypgi5g4mlxqD4UBg_WNSstVekJ3yqa4hRqqAa-7GOKasD3ft5lgFx-jMgWJJL4sO3dxUtVl7gnEWGb519_ZV3PtkxecWyaSLu1uIQy2bMufVflqawBW3T84AXDWzQvN8pxDoGPbWqu0E7fthscQfPWtiJ9Mv9G5GP_V7JhndzdPhMov9BpHtuQ8ZDouMlF67W-mWeMPDR2zoLny57HBgKLh30Dk4UbMBVgi18I3H4DHB7CeWDIhkOTW0S6s4Z8-mKJhpvO1n0g2zKn7S4ogGvb52jAJdnzLHt9-vkHG0EJRxQyMesADTC4z7PO6436MFJn0F_Asdss0S_moYL1OENYzKZZYFrgN9VWVNbRIq3KDNteMwMW53uyMOitFi36ychcjCi2vPzsz5CUOhUmjG_TXwmsfq_kicVfykx1Mizi6-SmQf91ClgMlOSkHpbf5kyBhiEwsLkGQaUWfM0tZgkaH9S33OHnlynPJ-1tVAIB5ounT027kkkkeITsmfDLg_fQHNqRNmMArqV6hMNq7XDOX5HBtcwODz6J0SnpQIOCmNIJglCvVWcf4cAwm9MQCcqCgyUHwy6_45hiCYaX6hcu1WeOGbIcixkSpwp3txgXcIQVfCj-c6T-fdveLWptXG4hPib39U-FMPQ9dvvkbGSJJytZnUTSwhz4SPF5Bsf37mF2xavAVD7EiL7KD9fHb7pi1uF1rw71TBjbkFyM1QrteNGbcRmS5wVoTVZ3VDvYaeHvweZsOd_SWsVBaNdjgKSOWg4kTFTTC6m-qC7o63eZdJrfggu2s1DOyxu34a3O0csTtiycq_w8waGMz-Mc_9aGHzDbPGC2eD13Xws29y1pfUVi8xDn59xR9O3vyFNnGhPNvKP5mJlelQoPZ_GlgBPKmLJxPcxM06MsBn8KQTX0EVgS4iN2H-9JdNmrPT56Mk9shkmbnnuMRSNzfQyQKo-GSznlnZvVXzKTJtVhk76XfmBDQhgFplmqWFWcaa8Z5cNh7GXWFeaiJXTM_KDOA6MX8kmppDLaeVzjr94Qa_OtaBSCP-9nQ0SqXseVGf5z6cH1-2qI1ZG-KbEJHw5iqYmgvEv8jlyK7PdEDaad-K8H0Qe7NKk1075kfCHBsJg02nni5K-alD1cKVrx6UpWVBN5YPTcw-r8GZ2GLSIXEuN3XPpcUpNrfc1DfghVaVOr4OkzScALjKPYXLiKYusNMoq4_htNR5z31W-UHuArNGf4-gLWYz9_b4QCXW2gWzMtI60-zh0MUCvnrQucEXW7WHOFkYgElsZ8ZbKu8QCLr0TnB_",
      "summary": []
    },
    {
      "type": "function_call",
      "call_id": "call_jm5rDttxE6lW1hkpSZ8FSBYR",
      "name": "bash",
      "arguments": "{\"command\":\"crwl 'https://ceshiren.com/categories' --deep-crawl bfs --max-pages 1\",\"description\":\"Crawl categories page and extract content\"}"
    },
    {
      "type": "function_call_output",
      "call_id": "call_jm5rDttxE6lW1hkpSZ8FSBYR",
      "output": "[\n  {\n    \"url\": \"https://ceshiren.com/categories\",\n\n...1135830 bytes truncated...\n\nThe tool call succeeded but the output was truncated. Full output saved to: /Users/seveniruby/.local/share/opencode/tool-output/tool_c3cba04e4001Rr49cTgZiSkj56\nUse the Task tool to have explore agent process this file with Grep and Read (with offset/limit). Do NOT read the full file yourself - delegate to save context."
    },
    {
      "type": "reasoning",
      "encrypted_content": "gAAAAABpiGDI4xO_ozqWXI3JLREtwf9-J3scPBdEAh43EbSAV72llAFBdTb_473eg8HL9E1z_onp2caRRFzPgLhQRMMw0CPBr7R1nZP0Rhgoj0IdLbOI5-XcGPZOHACVjheYKmSb-NAUlVBbgPDv6Hmo98_0t22fQ_OQ7ugaL8x8OXd12EWMDS_B9GVC-n-udQ_w_XvivIUbp9ynZdwbbmLZAYVybGTgmPt33sgswrGwz8S9661-AsgMzlNzFhjTwL0unysMrL3QPQ-sl42l7UMkA9qBZ9nRXWrd4xrDm19AdojjoomkUYO9bi_evc5-I9KbZWTd5g_YoGMqIQGS1oPBbWwx38WLvs1Kfr0hmw8NAmJ9rMJ6_vHEykHQ_rL3Kk0ZPCuKTfCeN8R3QEglflWCQLLtURPcvD3wk-CJA5WpcQbzZbA3qJGrBKa9QCl3VswnZlEAKS0nWy5aSVsRdQo39jACtHOE8ICLBgY5ICVaqWKninU7mlhrYnOQGGUo9bm6gZ7vmcalHSwAVK_9sfLAmBdse6AJSbxuZSe2zSFC4WHCU_ar4DvWi451WrPL4HmERKNQCjydN0K6qzYFjJ2WM-TzAzQJ478rIOsLHGH4Svqp-5im0mWVJqYCzqZZYpX3mXzTWldobFgcy0Kf1e5EwriseRhq1biPiibOlieyiHAwL8ignodpTH4E1jMBUsuSirLVS7tgZ3u4qrP2-avgyfQI5vjUXqI1lZ6XDnTusioj8zmbxn0JBpQOs8FrGY0y6Gezxgv87T2mt-XKvyh9VjKLCh5QqlaD8gg-6xPgb5iCFuH3jt0iAqkC8C6LpBxyyQnSWDIjCKRrDNf-1Aj6GF_kv4eZDVpsSc0AbKdvglxUhk9ilR4ym_eGiZLs9esu0qXsbS9AaA-OP3oL8RaWy1iDyba_FZuAXqiCDaXgb8uALi7tv1w4XL-CIulG_qNnZXs8OTGAPsFFUY5FhtVEDZ5lb7Rwr5fGRUrheNICVRIGs9apYfIyScK6WvCsevhb5vQSGPq1x00vgG79xKFUgWKUqKHh0WB5-1MD0BgUv-CjnzDDQcsTb288L4BpgsvkqTr8fVmhqh6kdunQnVKD0j3Blb4L8oh8-UnVM4t-7OzzeASBTNZcarXbvuMmFNOTyecO4zwx-CTD5zP89J7N-rTnKxlwTiXExMKuzZam_Ukzn_l24QM=",
      "summary": []
    },
    {
      "type": "function_call",
      "call_id": "call_dG9EbFIVv1ZZ4pIx7H9np3mf",
      "name": "task",
      "arguments": "{\"description\":\"Extract category names\",\"prompt\":\"Read the crawl output file at `/Users/seveniruby/.local/share/opencode/tool-output/tool_c3cba04e4001Rr49cTgZiSkj56` and extract the list of top-level/big categories shown on https://ceshiren.com/categories. Return just the big category names (Chinese/English as displayed). If there are subcategories, ignore them. Provide a clean ordered list.\",\"subagent_type\":\"explore\"}"
    },
    {
      "type": "function_call_output",
      "call_id": "call_dG9EbFIVv1ZZ4pIx7H9np3mf",
      "output": "task_id: ses_3c345e9e9fferDNzNF5Gpbg0CX (for resuming to continue this task if needed)\n\n<task_result>\n1. 测试内推  \n2. 开源项目  \n3. 测试答疑  \n4. 学习笔记  \n5. 提问区  \n6. 测试开发  \n7. 测试服务  \n8. 社区治理  \n9. 名企定向班  \n10. 匿名讨论  \n11. 高级性能训练营  \n12. 测试开发教材讨论区  \n13. 拉勾名企直推营  \n14. 兴趣爱好交流  \n15. Python测试开发班  \n16. Java测试开发班  \n17. Python自动化训练营  \n18. 霍格沃兹答疑区  \n19. 霍格沃兹测试开发学社  \n20. 就业班  \n21. 面试专辑  \n22. 面试题  \n23. 高校实训  \n24. 职场火焰杯  \n25. 爱测智能化测试平台\n</task_result>"
    }
  ],
  "max_output_tokens": 32000,
  "text": {
    "verbosity": "low"
  },
  "store": false,
  "include": ["reasoning.encrypted_content"],
  "prompt_cache_key": "ses_3c3462b44ffeiu3rqQ4xAAo4j5",
  "reasoning": {
    "effort": "medium"
  },
  "tools": [
    {
      "type": "function",
      "name": "question",
      "description": "Use this tool when you need to ask the user questions during execution. This allows you to:\n1. Gather user preferences or requirements\n2. Clarify ambiguous instructions\n3. Get decisions on implementation choices as you work\n4. Offer choices to the user about what direction to take.\n\nUsage notes:\n- When `custom` is enabled (default), a \"Type your own answer\" option is added automatically; don't include \"Other\" or catch-all options\n- Answers are returned as arrays of labels; set `multiple: true` to allow selecting more than one\n- If you recommend a specific option, make that the first option in the list and add \"(Recommended)\" at the end of the label\n",
      "parameters": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "questions": {
            "description": "Questions to ask",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "question": {
                  "description": "Complete question",
                  "type": "string"
                },
                "header": {
                  "description": "Very short label (max 30 chars)",
                  "type": "string"
                },
                "options": {
                  "description": "Available choices",
                  "type": "array",
                  "items": {
                    "ref": "QuestionOption",
                    "type": "object",
                    "properties": {
                      "label": {
                        "description": "Display text (1-5 words, concise)",
                        "type": "string"
                      },
                      "description": {
                        "description": "Explanation of choice",
                        "type": "string"
                      }
                    },
                    "required": ["label", "description"],
                    "additionalProperties": false
                  }
                },
                "multiple": {
                  "description": "Allow selecting multiple choices",
                  "type": "boolean"
                }
              },
              "required": ["question", "header", "options"],
              "additionalProperties": false
            }
          }
        },
        "required": ["questions"],
        "additionalProperties": false
      },
      "strict": false
    },
    {
      "type": "function",
      "name": "bash",
      "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures.\n\nAll commands run in /Users/seveniruby/ke/ai/opencode/zm/demo2 by default. Use the `workdir` parameter if you need to run a command in a different directory. AVOID using `cd <directory> && <command>` patterns - use `workdir` instead.\n\nIMPORTANT: This tool is for terminal operations like git, npm, docker, etc. DO NOT use it for file operations (reading, writing, editing, searching, finding files) - use the specialized tools for this instead.\n\nBefore executing the command, please follow these steps:\n\n1. Directory Verification:\n   - If the command will create new directories or files, first use `ls` to verify the parent directory exists and is the correct location\n   - For example, before running \"mkdir foo/bar\", first use `ls foo` to check that \"foo\" exists and is the intended parent directory\n\n2. Command Execution:\n   - Always quote file paths that contain spaces with double quotes (e.g., rm \"path with spaces/file.txt\")\n   - Examples of proper quoting:\n     - mkdir \"/Users/name/My Documents\" (correct)\n     - mkdir /Users/name/My Documents (incorrect - will fail)\n     - python \"/path/with spaces/script.py\" (correct)\n     - python /path/with spaces/script.py (incorrect - will fail)\n   - After ensuring proper quoting, execute the command.\n   - Capture the output of the command.\n\nUsage notes:\n  - The command argument is required.\n  - You can specify an optional timeout in milliseconds. If not specified, commands will time out after 120000ms (2 minutes).\n  - It is very helpful if you write a clear, concise description of what this command does in 5-10 words.\n  - If the output exceeds 2000 lines or 51200 bytes, it will be truncated and the full output will be written to a file. You can use Read with offset/limit to read specific sections or Grep to search the full content. Because of this, you do NOT need to use `head`, `tail`, or other truncation commands to limit output - just run the command directly.\n\n  - Avoid using Bash with the `find`, `grep`, `cat`, `head`, `tail`, `sed`, `awk`, or `echo` commands, unless explicitly instructed or when these commands are truly necessary for the task. Instead, always prefer using the dedicated tools for these commands:\n    - File search: Use Glob (NOT find or ls)\n    - Content search: Use Grep (NOT grep or rg)\n    - Read files: Use Read (NOT cat/head/tail)\n    - Edit files: Use Edit (NOT sed/awk)\n    - Write files: Use Write (NOT echo >/cat <<EOF)\n    - Communication: Output text directly (NOT echo/printf)\n  - When issuing multiple commands:\n    - If the commands are independent and can run in parallel, make multiple Bash tool calls in a single message. For example, if you need to run \"git status\" and \"git diff\", send a single message with two Bash tool calls in parallel.\n    - If the commands depend on each other and must run sequentially, use a single Bash call with '&&' to chain them together (e.g., `git add . && git commit -m \"message\" && git push`). For instance, if one operation must complete before another starts (like mkdir before cp, Write before Bash for git operations, or git add before git commit), run these operations sequentially instead.\n    - Use ';' only when you need to run commands sequentially but don't care if earlier commands fail\n    - DO NOT use newlines to separate commands (newlines are ok in quoted strings)\n  - AVOID using `cd <directory> && <command>`. Use the `workdir` parameter to change directories instead.\n    <good-example>\n    Use workdir=\"/foo/bar\" with command: pytest tests\n    </good-example>\n    <bad-example>\n    cd /foo/bar && pytest tests\n    </bad-example>\n\n# Committing changes with git\n\nOnly create commits when requested by the user. If unclear, ask first. When the user asks you to create a new git commit, follow these steps carefully:\n\nGit Safety Protocol:\n- NEVER update the git config\n- NEVER run destructive/irreversible git commands (like push --force, hard reset, etc) unless the user explicitly requests them\n- NEVER skip hooks (--no-verify, --no-gpg-sign, etc) unless the user explicitly requests it\n- NEVER run force push to main/master, warn the user if they request it\n- Avoid git commit --amend. ONLY use --amend when ALL conditions are met:\n  (1) User explicitly requested amend, OR commit SUCCEEDED but pre-commit hook auto-modified files that need including\n  (2) HEAD commit was created by you in this conversation (verify: git log -1 --format='%an %ae')\n  (3) Commit has NOT been pushed to remote (verify: git status shows \"Your branch is ahead\")\n- CRITICAL: If commit FAILED or was REJECTED by hook, NEVER amend - fix the issue and create a NEW commit\n- CRITICAL: If you already pushed to remote, NEVER amend unless user explicitly requests it (requires force push)\n- NEVER commit changes unless the user explicitly asks you to. It is VERY IMPORTANT to only commit when explicitly asked, otherwise the user will feel that you are being too proactive.\n\n1. You can call multiple tools in a single response. When multiple independent pieces of information are requested and all commands are likely to succeed, run multiple tool calls in parallel for optimal performance. run the following bash commands in parallel, each using the Bash tool:\n  - Run a git status command to see all untracked files.\n  - Run a git diff command to see both staged and unstaged changes that will be committed.\n  - Run a git log command to see recent commit messages, so that you can follow this repository's commit message style.\n2. Analyze all staged changes (both previously staged and newly added) and draft a commit message:\n  - Summarize the nature of the changes (eg. new feature, enhancement to an existing feature, bug fix, refactoring, test, docs, etc.). Ensure the message accurately reflects the changes and their purpose (i.e. \"add\" means a wholly new feature, \"update\" means an enhancement to an existing feature, \"fix\" means a bug fix, etc.).\n  - Do not commit files that likely contain secrets (.env, credentials.json, etc.). Warn the user if they specifically request to commit those files\n  - Draft a concise (1-2 sentences) commit message that focuses on the \"why\" rather than the \"what\"\n  - Ensure it accurately reflects the changes and their purpose\n3. You can call multiple tools in a single response. When multiple independent pieces of information are requested and all commands are likely to succeed, run multiple tool calls in parallel for optimal performance. run the following commands:\n   - Add relevant untracked files to the staging area.\n   - Create the commit with a message\n   - Run git status after the commit completes to verify success.\n   Note: git status depends on the commit completing, so run it sequentially after the commit.\n4. If the commit fails due to pre-commit hook, fix the issue and create a NEW commit (see amend rules above)\n\nImportant notes:\n- NEVER run additional commands to read or explore code, besides git bash commands\n- NEVER use the TodoWrite or Task tools\n- DO NOT push to the remote repository unless the user explicitly asks you to do so\n- IMPORTANT: Never use git commands with the -i flag (like git rebase -i or git add -i) since they require interactive input which is not supported.\n- If there are no changes to commit (i.e., no untracked files and no modifications), do not create an empty commit\n\n# Creating pull requests\nUse the gh command via the Bash tool for ALL GitHub-related tasks including working with issues, pull requests, checks, and releases. If given a Github URL use the gh command to get the information needed.\n\nIMPORTANT: When the user asks you to create a pull request, follow these steps carefully:\n\n1. You can call multiple tools in a single response. When multiple independent pieces of information are requested and all commands are likely to succeed, run multiple tool calls in parallel for optimal performance. run the following bash commands in parallel using the Bash tool, in order to understand the current state of the branch since it diverged from the main branch:\n   - Run a git status command to see all untracked files\n   - Run a git diff command to see both staged and unstaged changes that will be committed\n   - Check if the current branch tracks a remote branch and is up to date with the remote, so you know if you need to push to the remote\n   - Run a git log command and `git diff [base-branch]...HEAD` to understand the full commit history for the current branch (from the time it diverged from the base branch)\n2. Analyze all changes that will be included in the pull request, making sure to look at all relevant commits (NOT just the latest commit, but ALL commits that will be included in the pull request!!!), and draft a pull request summary\n3. You can call multiple tools in a single response. When multiple independent pieces of information are requested and all commands are likely to succeed, run multiple tool calls in parallel for optimal performance. run the following commands in parallel:\n   - Create new branch if needed\n   - Push to remote with -u flag if needed\n   - Create PR using gh pr create with the format below. Use a HEREDOC to pass the body to ensure correct formatting.\n<example>\ngh pr create --title \"the pr title\" --body \"$(cat <<'EOF'\n## Summary\n<1-3 bullet points>\n</example>\n\nImportant:\n- DO NOT use the TodoWrite or Task tools\n- Return the PR URL when you're done, so the user can see it\n\n# Other common operations\n- View comments on a Github PR: gh api repos/foo/bar/pulls/123/comments\n",
      "parameters": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "command": {
            "description": "The command to execute",
            "type": "string"
          },
          "timeout": {
            "description": "Optional timeout in milliseconds",
            "type": "number"
          },
          "workdir": {
            "description": "The working directory to run the command in. Defaults to /Users/seveniruby/ke/ai/opencode/zm/demo2. Use this instead of 'cd' commands.",
            "type": "string"
          },
          "description": {
            "description": "Clear, concise description of what this command does in 5-10 words. Examples:\nInput: ls\nOutput: Lists files in current directory\n\nInput: git status\nOutput: Shows working tree status\n\nInput: npm install\nOutput: Installs package dependencies\n\nInput: mkdir foo\nOutput: Creates directory 'foo'",
            "type": "string"
          }
        },
        "required": ["command", "description"],
        "additionalProperties": false
      },
      "strict": false
    },
    {
      "type": "function",
      "name": "read",
      "description": "Reads a file from the local filesystem. You can access any file directly by using this tool.\nAssume this tool is able to read all files on the machine. If the User provides a path to a file assume that path is valid. It is okay to read a file that does not exist; an error will be returned.\n\nUsage:\n- The filePath parameter must be an absolute path, not a relative path\n- By default, it reads up to 2000 lines starting from the beginning of the file\n- You can optionally specify a line offset and limit (especially handy for long files), but it's recommended to read the whole file by not providing these parameters\n- Any lines longer than 2000 characters will be truncated\n- Results are returned using cat -n format, with line numbers starting at 1\n- You have the capability to call multiple tools in a single response. It is always better to speculatively read multiple files as a batch that are potentially useful.\n- If you read a file that exists but has empty contents you will receive a system reminder warning in place of file contents.\n- You can read image files using this tool.\n",
      "parameters": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "filePath": {
            "description": "The path to the file to read",
            "type": "string"
          },
          "offset": {
            "description": "The line number to start reading from (0-based)",
            "type": "number"
          },
          "limit": {
            "description": "The number of lines to read (defaults to 2000)",
            "type": "number"
          }
        },
        "required": ["filePath"],
        "additionalProperties": false
      },
      "strict": false
    },
    {
      "type": "function",
      "name": "glob",
      "description": "- Fast file pattern matching tool that works with any codebase size\n- Supports glob patterns like \"**/*.js\" or \"src/**/*.ts\"\n- Returns matching file paths sorted by modification time\n- Use this tool when you need to find files by name patterns\n- When you are doing an open-ended search that may require multiple rounds of globbing and grepping, use the Task tool instead\n- You have the capability to call multiple tools in a single response. It is always better to speculatively perform multiple searches as a batch that are potentially useful.\n",
      "parameters": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "pattern": {
            "description": "The glob pattern to match files against",
            "type": "string"
          },
          "path": {
            "description": "The directory to search in. If not specified, the current working directory will be used. IMPORTANT: Omit this field to use the default directory. DO NOT enter \"undefined\" or \"null\" - simply omit it for the default behavior. Must be a valid directory path if provided.",
            "type": "string"
          }
        },
        "required": ["pattern"],
        "additionalProperties": false
      },
      "strict": false
    },
    {
      "type": "function",
      "name": "grep",
      "description": "- Fast content search tool that works with any codebase size\n- Searches file contents using regular expressions\n- Supports full regex syntax (eg. \"log.*Error\", \"function\\s+\\w+\", etc.)\n- Filter files by pattern with the include parameter (eg. \"*.js\", \"*.{ts,tsx}\")\n- Returns file paths and line numbers with at least one match sorted by modification time\n- Use this tool when you need to find files containing specific patterns\n- If you need to identify/count the number of matches within files, use the Bash tool with `rg` (ripgrep) directly. Do NOT use `grep`.\n- When you are doing an open-ended search that may require multiple rounds of globbing and grepping, use the Task tool instead\n",
      "parameters": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "pattern": {
            "description": "The regex pattern to search for in file contents",
            "type": "string"
          },
          "path": {
            "description": "The directory to search in. Defaults to the current working directory.",
            "type": "string"
          },
          "include": {
            "description": "File pattern to include in the search (e.g. \"*.js\", \"*.{ts,tsx}\")",
            "type": "string"
          }
        },
        "required": ["pattern"],
        "additionalProperties": false
      },
      "strict": false
    },
    {
      "type": "function",
      "name": "task",
      "description": "Launch a new agent to handle complex, multistep tasks autonomously.\n\nAvailable agent types and the tools they have access to:\n- general: General-purpose agent for researching complex questions and executing multi-step tasks. Use this agent to execute multiple units of work in parallel.\n- explore: Fast agent specialized for exploring codebases. Use this when you need to quickly find files by patterns (eg. \"src/components/**/*.tsx\"), search code for keywords (eg. \"API endpoints\"), or answer questions about the codebase (eg. \"how do API endpoints work?\"). When calling this agent, specify the desired thoroughness level: \"quick\" for basic searches, \"medium\" for moderate exploration, or \"very thorough\" for comprehensive analysis across multiple locations and naming conventions.\n\nWhen using the Task tool, you must specify a subagent_type parameter to select which agent type to use.\n\nWhen to use the Task tool:\n- When you are instructed to execute custom slash commands. Use the Task tool with the slash command invocation as the entire prompt. The slash command can take arguments. For example: Task(description=\"Check the file\", prompt=\"/check-file path/to/file.py\")\n\nWhen NOT to use the Task tool:\n- If you want to read a specific file path, use the Read or Glob tool instead of the Task tool, to find the match more quickly\n- If you are searching for a specific class definition like \"class Foo\", use the Glob tool instead, to find the match more quickly\n- If you are searching for code within a specific file or set of 2-3 files, use the Read tool instead of the Task tool, to find the match more quickly\n- Other tasks that are not related to the agent descriptions above\n\n\nUsage notes:\n1. Launch multiple agents concurrently whenever possible, to maximize performance; to do that, use a single message with multiple tool uses\n2. When the agent is done, it will return a single message back to you. The result returned by the agent is not visible to the user. To show the user the result, you should send a text message back to the user with a concise summary of the result. The output includes a task_id you can reuse later to continue the same subagent session.\n3. Each agent invocation starts with a fresh context unless you provide task_id to resume the same subagent session (which continues with its previous messages and tool outputs). When starting fresh, your prompt should contain a highly detailed task description for the agent to perform autonomously and you should specify exactly what information the agent should return back to you in its final and only message to you.\n4. The agent's outputs should generally be trusted\n5. Clearly tell the agent whether you expect it to write code or just to do research (search, file reads, web fetches, etc.), since it is not aware of the user's intent. Tell it how to verify its work if possible (e.g., relevant test commands).\n6. If the agent description mentions that it should be used proactively, then you should try your best to use it without the user having to ask for it first. Use your judgement.\n\nExample usage (NOTE: The agents below are fictional examples for illustration only - use the actual agents listed above):\n\n<example_agent_descriptions>\n\"code-reviewer\": use this agent after you are done writing a significant piece of code\n\"greeting-responder\": use this agent when to respond to user greetings with a friendly joke\n</example_agent_description>\n\n<example>\nuser: \"Please write a function that checks if a number is prime\"\nassistant: Sure let me write a function that checks if a number is prime\nassistant: First let me use the Write tool to write a function that checks if a number is prime\nassistant: I'm going to use the Write tool to write the following code:\n<code>\nfunction isPrime(n) {\n  if (n <= 1) return false\n  for (let i = 2; i * i <= n; i++) {\n    if (n % i === 0) return false\n  }\n  return true\n}\n</code>\n<commentary>\nSince a significant piece of code was written and the task was completed, now use the code-reviewer agent to review the code\n</commentary>\nassistant: Now let me use the code-reviewer agent to review the code\nassistant: Uses the Task tool to launch the code-reviewer agent\n</example>\n\n<example>\nuser: \"Hello\"\n<commentary>\nSince the user is greeting, use the greeting-responder agent to respond with a friendly joke\n</commentary>\nassistant: \"I'm going to use the Task tool to launch the with the greeting-responder agent\"\n</example>\n",
      "parameters": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "description": {
            "description": "A short (3-5 words) description of the task",
            "type": "string"
          },
          "prompt": {
            "description": "The task for the agent to perform",
            "type": "string"
          },
          "subagent_type": {
            "description": "The type of specialized agent to use for this task",
            "type": "string"
          },
          "task_id": {
            "description": "This should only be set if you mean to resume a previous task (you can pass a prior task_id and the task will continue the same subagent session as before instead of creating a fresh one)",
            "type": "string"
          },
          "command": {
            "description": "The command that triggered this task",
            "type": "string"
          }
        },
        "required": ["description", "prompt", "subagent_type"],
        "additionalProperties": false
      },
      "strict": false
    },
    {
      "type": "function",
      "name": "webfetch",
      "description": "- Fetches content from a specified URL\n- Takes a URL and optional format as input\n- Fetches the URL content, converts to requested format (markdown by default)\n- Returns the content in the specified format\n- Use this tool when you need to retrieve and analyze web content\n\nUsage notes:\n  - IMPORTANT: if another tool is present that offers better web fetching capabilities, is more targeted to the task, or has fewer restrictions, prefer using that tool instead of this one.\n  - The URL must be a fully-formed valid URL\n  - HTTP URLs will be automatically upgraded to HTTPS\n  - Format options: \"markdown\" (default), \"text\", or \"html\"\n  - This tool is read-only and does not modify any files\n  - Results may be summarized if the content is very large\n",
      "parameters": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "url": {
            "description": "The URL to fetch content from",
            "type": "string"
          },
          "format": {
            "description": "The format to return the content in (text, markdown, or html). Defaults to markdown.",
            "default": "markdown",
            "type": "string",
            "enum": ["text", "markdown", "html"]
          },
          "timeout": {
            "description": "Optional timeout in seconds (max 120)",
            "type": "number"
          }
        },
        "required": ["url", "format"],
        "additionalProperties": false
      },
      "strict": false
    },
    {
      "type": "function",
      "name": "todowrite",
      "description": "Use this tool to create and manage a structured task list for your current coding session. This helps you track progress, organize complex tasks, and demonstrate thoroughness to the user.\nIt also helps the user understand the progress of the task and overall progress of their requests.\n\n## When to Use This Tool\nUse this tool proactively in these scenarios:\n\n1. Complex multistep tasks - When a task requires 3 or more distinct steps or actions\n2. Non-trivial and complex tasks - Tasks that require careful planning or multiple operations\n3. User explicitly requests todo list - When the user directly asks you to use the todo list\n4. User provides multiple tasks - When users provide a list of things to be done (numbered or comma-separated)\n5. After receiving new instructions - Immediately capture user requirements as todos. Feel free to edit the todo list based on new information.\n6. After completing a task - Mark it complete and add any new follow-up tasks\n7. When you start working on a new task, mark the todo as in_progress. Ideally you should only have one todo as in_progress at a time. Complete existing tasks before starting new ones.\n\n## When NOT to Use This Tool\n\nSkip using this tool when:\n1. There is only a single, straightforward task\n2. The task is trivial and tracking it provides no organizational benefit\n3. The task can be completed in less than 3 trivial steps\n4. The task is purely conversational or informational\n\nNOTE that you should not use this tool if there is only one trivial task to do. In this case you are better off just doing the task directly.\n\n## Examples of When to Use the Todo List\n\n<example>\nUser: I want to add a dark mode toggle to the application settings. Make sure you run the tests and build when you're done!\nAssistant: I'll help add a dark mode toggle to your application settings. Let me create a todo list to track this implementation.\n*Creates todo list with the following items:*\n1. Create dark mode toggle component in Settings page\n2. Add dark mode state management (context/store)\n3. Implement CSS-in-JS styles for dark theme\n4. Update existing components to support theme switching\n5. Run tests and build process, addressing any failures or errors that occur\n*Begins working on the first task*\n\n<reasoning>\nThe assistant used the todo list because:\n1. Adding dark mode is a multi-step feature requiring UI, state management, and styling changes\n2. The user explicitly requested tests and build be run afterward\n3. The assistant inferred that tests and build need to pass by adding \"Ensure tests and build succeed\" as the final task\n</reasoning>\n</example>\n\n<example>\nUser: Help me rename the function getCwd to getCurrentWorkingDirectory across my project\nAssistant: Let me first search through your codebase to find all occurrences of 'getCwd'.\n*Uses grep or search tools to locate all instances of getCwd in the codebase*\nAssistant: I've found 15 instances of 'getCwd' across 8 different files. Let me create a todo list to track these changes.\n*Creates todo list with specific items for each file that needs updating*\n\n<reasoning>\nThe assistant used the todo list because:\n1. First, the assistant searched to understand the scope of the task\n2. Upon finding multiple occurrences across different files, it determined this was a complex task with multiple steps\n3. The todo list helps ensure every instance is tracked and updated systematically\n4. This approach prevents missing any occurrences and maintains code consistency\n</reasoning>\n</example>\n\n\n<example>\nUser: I need to implement these features for my e-commerce site: user registration, product catalog, shopping cart, and checkout flow.\nAssistant: I'll help implement these features. First, let's add all the features to the todo list.\n*Creates a todo list breaking down each feature into specific tasks based on the project architecture*\nAssistant: Let's start with user registration. This will involve creating database models, API endpoints, and frontend forms that integrate with your existing authentication system.\n\n<reasoning>\nThe assistant used the todo list because:\n1. The user provided multiple complex features to implement in a comma separated list\n2. The todo list helps organize these large features into manageable tasks\n3. This approach allows for tracking progress across the entire implementation\n</reasoning>\n</example>\n\n<example>\nUser: Can you help optimize my React application? It's rendering slowly and has performance issues.</user>\nAssistant: I'll help optimize your React application. First, let me examine your codebase to identify potential performance bottlenecks.\n*Reviews component structure, render patterns, state management, and data fetching*\nAssistant: After analyzing your codebase, I've identified several performance issues. Let me create a todo list to track our optimization efforts.\n*Creates todo list with items like: 1) Implement memoization for expensive calculations in ProductList, 2) Add virtualization for long lists in Dashboard, 3) Optimize image loading in Gallery component, 4) Fix state update loops in ShoppingCart, 5) Review bundle size and implement code splitting*\nLet's start by implementing memoization for the expensive calculations in your ProductList component.</assistant>\n\n<reasoning>\nThe assistant used the todo list because:\n1. First, the assistant examined the codebase to identify specific performance issues\n2. Based on this analysis, it identified multiple optimization opportunities\n3. Performance optimization is a non-trivial task requiring multiple steps\n4. The todo list helps methodically track improvements across different components\n5. This systematic approach ensures all performance bottlenecks are addressed\n</reasoning>\n</example>\n\n## Examples of When NOT to Use the Todo List\n\n<example>\nUser: How do I print 'Hello World' in Python?\nAssistant: In Python, you can print \"Hello World\" with this simple code:\n\npython\nprint(\"Hello World\")\n\nThis will output the text \"Hello World\" to the console when executed.</assistant>\n\n<reasoning>\nThe assistant did not use the todo list because this is a single, trivial task that can be completed in one step. There's no need to track multiple tasks or steps for such a straightforward request.\n</reasoning>\n</example>\n\n<example>\nUser: What does the git status command do?\nAssistant: The git status command shows the current state of your working directory and staging area. It displays which changes have been staged, which haven't, and which files aren't being tracked by Git. This is a fundamental command for understanding the current state of your repository before making commits.\n\n<reasoning>\nThe assistant did not use the todo list because this is an informational request with no actual coding task to complete. The user is simply asking for an explanation, not for the assistant to perform multiple steps or tasks.\n</reasoning>\n</example>\n\n<example>\nUser: Can you add a comment to the calculateTotal function to explain what it does?\nAssistant: Sure, let me add a comment to the calculateTotal function to explain what it does.\n* Uses the Edit tool to add a comment to the calculateTotal function *\n\n<reasoning>\nThe assistant did not use the todo list because this is a single, straightforward task confined to one location in the code. Adding a comment doesn't require tracking multiple steps or systematic organization.\n</reasoning>\n</example>\n\n<example>\nUser: Run npm install for me and tell me what happens.\nAssistant: I'll run the npm install command for you.\n\n*Executes: npm install*\n\nThe command completed successfully. Here's the output:\n[Output of npm install command]\n\nAll dependencies have been installed according to your package.json file.\n\n<reasoning>\nThe assistant did not use the todo list because this is a single command execution with immediate results. There are no multiple steps to track or organize, making the todo list unnecessary for this straightforward task.\n</reasoning>\n</example>\n\n## Task States and Management\n\n1. **Task States**: Use these states to track progress:\n   - pending: Task not yet started\n   - in_progress: Currently working on (limit to ONE task at a time)\n   - completed: Task finished successfully\n   - cancelled: Task no longer needed\n\n2. **Task Management**:\n   - Update task status in real-time as you work\n   - Mark tasks complete IMMEDIATELY after finishing (don't batch completions)\n   - Only have ONE task in_progress at any time\n   - Complete current tasks before starting new ones\n   - Cancel tasks that become irrelevant\n\n3. **Task Breakdown**:\n   - Create specific, actionable items\n   - Break complex tasks into smaller, manageable steps\n   - Use clear, descriptive task names\n\nWhen in doubt, use this tool. Being proactive with task management demonstrates attentiveness and ensures you complete all requirements successfully.\n\n",
      "parameters": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "todos": {
            "description": "The updated todo list",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "content": {
                  "description": "Brief description of the task",
                  "type": "string"
                },
                "status": {
                  "description": "Current status of the task: pending, in_progress, completed, cancelled",
                  "type": "string"
                },
                "priority": {
                  "description": "Priority level of the task: high, medium, low",
                  "type": "string"
                },
                "id": {
                  "description": "Unique identifier for the todo item",
                  "type": "string"
                }
              },
              "required": ["content", "status", "priority", "id"],
              "additionalProperties": false
            }
          }
        },
        "required": ["todos"],
        "additionalProperties": false
      },
      "strict": false
    },
    {
      "type": "function",
      "name": "skill",
      "description": "Load a specialized skill that provides domain-specific instructions and workflows.\n\nWhen you recognize that a task matches one of the available skills listed below, use this tool to load the full skill instructions.\n\nThe skill will inject detailed instructions, workflows, and access to bundled resources (scripts, references, templates) into the conversation context.\n\nTool output includes a `<skill_content name=\"...\">` block with the loaded content.\n\nThe following skills provide specialized sets of instructions for particular tasks\nInvoke this tool to load a skill when a task matches one of the available skills listed below:\n\n<available_skills>\n  <skill>\n    <name>web-artifacts-builder</name>\n    <description>Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.</description>\n    <location>file:///Users/seveniruby/.config/opencode/skills/web-artifacts-builder/SKILL.md</location>\n  </skill>\n  <skill>\n    <name>docx</name>\n    <description>Comprehensive document creation, editing, and analysis with support for tracked changes, comments, formatting preservation, and text extraction. When Claude needs to work with professional documents (.docx files) for: (1) Creating new documents, (2) Modifying or editing content, (3) Working with tracked changes, (4) Adding comments, or any other document tasks</description>\n    <location>file:///Users/seveniruby/.config/opencode/skills/docx/SKILL.md</location>\n  </skill>\n  <skill>\n    <name>brand-guidelines</name>\n    <description>Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.</description>\n    <location>file:///Users/seveniruby/.config/opencode/skills/brand-guidelines/SKILL.md</location>\n  </skill>\n  <skill>\n    <name>mcp-builder</name>\n    <description>Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).</description>\n    <location>file:///Users/seveniruby/.config/opencode/skills/mcp-builder/SKILL.md</location>\n  </skill>\n  <skill>\n    <name>frontend-design</name>\n    <description>Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.</description>\n    <location>file:///Users/seveniruby/.config/opencode/skills/frontend-design/SKILL.md</location>\n  </skill>\n  <skill>\n    <name>webapp-testing</name>\n    <description>Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.</description>\n    <location>file:///Users/seveniruby/.config/opencode/skills/webapp-testing/SKILL.md</location>\n  </skill>\n  <skill>\n    <name>slack-gif-creator</name>\n    <description>Knowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like \"make me a GIF of X doing Y for Slack.\"</description>\n    <location>file:///Users/seveniruby/.config/opencode/skills/slack-gif-creator/SKILL.md</location>\n  </skill>\n  <skill>\n    <name>pptx</name>\n    <description>Presentation creation, editing, and analysis. When Claude needs to work with presentations (.pptx files) for: (1) Creating new presentations, (2) Modifying or editing content, (3) Working with layouts, (4) Adding comments or speaker notes, or any other presentation tasks</description>\n    <location>file:///Users/seveniruby/.config/opencode/skills/pptx/SKILL.md</location>\n  </skill>\n  <skill>\n    <name>canvas-design</name>\n    <description>Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.</description>\n    <location>file:///Users/seveniruby/.config/opencode/skills/canvas-design/SKILL.md</location>\n  </skill>\n  <skill>\n    <name>skill-creator</name>\n    <description>Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.</description>\n    <location>file:///Users/seveniruby/.config/opencode/skills/skill-creator/SKILL.md</location>\n  </skill>\n  <skill>\n    <name>internal-comms</name>\n    <description>A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill whenever asked to write some sort of internal communications (status reports, leadership updates, 3P updates, company newsletters, FAQs, incident reports, project updates, etc.).</description>\n    <location>file:///Users/seveniruby/.config/opencode/skills/internal-comms/SKILL.md</location>\n  </skill>\n  <skill>\n    <name>algorithmic-art</name>\n    <description>Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.</description>\n    <location>file:///Users/seveniruby/.config/opencode/skills/algorithmic-art/SKILL.md</location>\n  </skill>\n  <skill>\n    <name>pdf</name>\n    <description>Comprehensive PDF manipulation toolkit for extracting text and tables, creating new PDFs, merging/splitting documents, and handling forms. When Claude needs to fill in a PDF form or programmatically process, generate, or analyze PDF documents at scale.</description>\n    <location>file:///Users/seveniruby/.config/opencode/skills/pdf/SKILL.md</location>\n  </skill>\n  <skill>\n    <name>xlsx</name>\n    <description>Comprehensive spreadsheet creation, editing, and analysis with support for formulas, formatting, data analysis, and visualization. When Claude needs to work with spreadsheets (.xlsx, .xlsm, .csv, .tsv, etc) for: (1) Creating new spreadsheets with formulas and formatting, (2) Reading or analyzing data, (3) Modify existing spreadsheets while preserving formulas, (4) Data analysis and visualization in spreadsheets, or (5) Recalculating formulas</description>\n    <location>file:///Users/seveniruby/.config/opencode/skills/xlsx/SKILL.md</location>\n  </skill>\n  <skill>\n    <name>doc-coauthoring</name>\n    <description>Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision docs, or similar structured content. This workflow helps users efficiently transfer context, refine content through iteration, and verify the doc works for readers. Trigger when user mentions writing docs, creating proposals, drafting specs, or similar documentation tasks.</description>\n    <location>file:///Users/seveniruby/.config/opencode/skills/doc-coauthoring/SKILL.md</location>\n  </skill>\n  <skill>\n    <name>theme-factory</name>\n    <description>Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.</description>\n    <location>file:///Users/seveniruby/.config/opencode/skills/theme-factory/SKILL.md</location>\n  </skill>\n  <skill>\n    <name>video-frames</name>\n    <description>Extract frames or short clips from videos using ffmpeg.</description>\n    <location>file:///Users/seveniruby/ke/ai/opencode/zm/demo2/.opencode/skills/video-frames-1.0.0/SKILL.md</location>\n  </skill>\n  <skill>\n    <name>playwright-cli</name>\n    <description>Automates browser interactions for web testing, form filling, screenshots, and data extraction. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, test web applications, or extract information from web pages.</description>\n    <location>file:///Users/seveniruby/ke/ai/opencode/zm/demo2/.opencode/skills/playwright-cli-2-0.1.0/SKILL.md</location>\n  </skill>\n  <skill>\n    <name>网页爬虫</name>\n    <description>可以爬取网页</description>\n    <location>file:///Users/seveniruby/ke/ai/opencode/zm/demo2/.opencode/skills/web-crawler/SKILL.md</location>\n  </skill>\n</available_skills>",
      "parameters": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "name": {
            "description": "The name of the skill from available_skills (e.g., 'web-artifacts-builder', 'docx', 'brand-guidelines', ...)",
            "type": "string"
          }
        },
        "required": ["name"],
        "additionalProperties": false
      },
      "strict": false
    },
    {
      "type": "function",
      "name": "apply_patch",
      "description": "Use the `apply_patch` tool to edit files. Your patch language is a stripped‑down, file‑oriented diff format designed to be easy to parse and safe to apply. You can think of it as a high‑level envelope:\n\n*** Begin Patch\n[ one or more file sections ]\n*** End Patch\n\nWithin that envelope, you get a sequence of file operations.\nYou MUST include a header to specify the action you are taking.\nEach operation starts with one of three headers:\n\n*** Add File: <path> - create a new file. Every following line is a + line (the initial contents).\n*** Delete File: <path> - remove an existing file. Nothing follows.\n*** Update File: <path> - patch an existing file in place (optionally with a rename).\n\nExample patch:\n\n```\n*** Begin Patch\n*** Add File: hello.txt\n+Hello world\n*** Update File: src/app.py\n*** Move to: src/main.py\n@@ def greet():\n-print(\"Hi\")\n+print(\"Hello, world!\")\n*** Delete File: obsolete.txt\n*** End Patch\n```\n\nIt is important to remember:\n\n- You must include a header with your intended action (Add/Delete/Update)\n- You must prefix new lines with `+` even when creating a new file\n",
      "parameters": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "patchText": {
            "description": "The full patch text that describes all changes to be made",
            "type": "string"
          }
        },
        "required": ["patchText"],
        "additionalProperties": false
      },
      "strict": false
    }
  ],
  "tool_choice": "auto",
  "stream": true
}