[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71HHE51SB1E0F9YSKVT0BT8":3,"skill-same:01M71HHE51SB1E0F9YSKVT0BT8":77},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":44,"commitSha":45,"skillDirectory":46,"forksCount":14,"repositoryHtmlUrl":47,"repositoryHomepageUrl":6,"ownerHtmlUrl":48,"ownerBlogUrl":49,"ownerDescription":6,"updatedAt":50,"install":51,"resources":64},"01M71HHE51SB1E0F9YSKVT0BT8","cursor-edit",null,"Delegate file edits to Cursor through the headless cursor-agent CLI instead of editing files directly in the calling AI agent. The calling AI agent analyzes the change, writes precise edit instructions, and verifies the result; cursor-agent performs the actual file modifications. Use when the user says things like \"let Cursor edit this\", \"fix it with cursor\", or \"have Cursor handle the file edits\". Best for offloading large edits to Cursor to reduce token usage and speed up the overall workflow.","to4iki\u002Fskills","to4iki","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F2172769?v=4","01M71HH205HPM7NES0N5Z2VDBE","toshiki takezawa","01M71HH219X7404ZB422PPP1HM",0,"MIT","https:\u002F\u002Fgithub.com\u002Fto4iki\u002Fskills\u002Fblob\u002Fmain\u002Fmisc\u002Fcursor-edit\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"cursor edit","edit","cursor","calling","handle","when","things","reduce","for","headless","usage","speed","ai agent","files","up","use","fix","delegate","editing","workflow","2026-11-10 10:12:30",false,"---\nname: cursor-edit\ndescription: >\n  Delegate file edits to Cursor through the headless cursor-agent CLI instead of editing files directly in the calling AI agent.\n  The calling AI agent analyzes the change, writes precise edit instructions, and verifies the result; cursor-agent performs the actual file modifications.\n  Use when the user says things like \"let Cursor edit this\", \"fix it with cursor\", or \"have Cursor handle the file edits\".\n  Best for offloading large edits to Cursor to reduce token usage and speed up the overall workflow.\n---\n\n# Cursor Edit\n\n## Overview\n\nThis skill outsources **only the act of editing files** to Cursor's headless CLI (`cursor-agent`). Use the same contract from Claude Code, Codex, or any other AI agent.\n\n- **Calling AI agent (brain)**: reads and searches code, decides what to change, writes edit instructions, and verifies the result\n- **Cursor (hands)**: rewrites files according to the received instructions\n\nThe goal is to move heavy editing work to Cursor, reducing token usage in the calling AI agent and speeding up the overall task.\n\nThis only pays off for **larger edits**. For small changes, the cost of writing self-contained instructions and reviewing `git diff` can exceed the cost of direct editing. Do not force this skill onto trivial one-line or few-line edits.\n\n## When To Use\n\nThese tendencies apply:\n\n- **Not suitable for trivial edits (one to a few lines)**. Startup, instruction writing, and diff review often cost more than direct editing by the calling AI agent.\n- **Best for edits that are large, pattern-heavy, and have good sibling files to imitate**. Example: adding tests that follow an existing test suite. `cursor-agent` can closely follow good sibling examples and often produce convention-compliant results quickly.\n- **Be careful with new features or non-obvious assumptions when no good sibling example exists**. `cursor-agent` tends to pattern-match without semantic validation, so correctness is not guaranteed. In this case, the calling AI agent must separately verify semantic correctness. See \"Required Verification\".\n- **Cursor consumes the delegated tokens**. The calling AI agent saves tokens, but the speed and quality advantages mainly apply under the suitable conditions above.\n\n## Operating Contract\n\n- The calling AI agent must **not** use direct editing tools such as `Edit`, `Write`, or `apply_patch`.\n- All file rewrites must go through `scripts\u002Fcursor-agent-print.sh`, which calls `cursor-agent`.\n- The calling AI agent remains responsible for code reading, search, planning, writing edit instructions, git operations, build\u002Ftest\u002Flint verification, TODO management, and persistent memory updates.\n- This is a soft contract. Direct editing tools are not technically blocked by hooks; the calling AI agent must follow this as discipline.\n\n## Editing Loop\n\n1. **Analyze and design** — The calling AI agent reads the code and decides what to change in which files.\n2. **Write edit instructions** — State the target files and desired changes unambiguously. Follow the guidance below.\n3. **Delegate** — Pass the instructions to `cursor-agent-print.sh` so `cursor-agent` edits the files.\n4. **Verify** — Review Cursor's actual changes with `git diff`, then build\u002Ftest\u002Flint the changed scope.\n5. **Retry** — If the result diverges from the intent, return to step 2 with more specific instructions.\n\n## Calling cursor-agent\n\nCall the wrapper from the target repository root. If working in a worktree, run it from the worktree root. `cursor-agent` reads and writes files relative to the current directory.\n\n```bash\n\u003Ccursor-edit>\u002Fscripts\u002Fcursor-agent-print.sh \"\u003Cedit instructions>\"\n```\n\n`\u003Ccursor-edit>` is the directory where this skill is installed.\n\nInternally, the wrapper runs:\n\n```bash\ncursor-agent -p --force --trust --output-format text --model \"${CURSOR_MODEL:-composer-2.5-fast}\" \"\u003Cedit instructions>\"\n# -p      : non-interactive print mode\n# --force : apply file changes without confirmation\n# --trust : trust the workspace without prompting\n```\n\nThe default model is Composer2.5 Fast (`composer-2.5-fast`). Set `CURSOR_MODEL` to override it.\n\n```bash\nCURSOR_MODEL=gpt-5.5 \u003Ccursor-edit>\u002Fscripts\u002Fcursor-agent-print.sh \"\u003Cedit instructions>\"\n```\n\n## Writing Good Edit Instructions\n\n`cursor-agent` is another AI. If instructions are vague, Cursor can edit in the wrong direction. Write instructions that are self-contained.\n\n- **Name the target file paths** using relative or absolute paths.\n- **Name existing sibling files to imitate**. Example: \"Read the existing `foo-1.test.ts` through `foo-6.test.ts` files and follow their conventions.\" This is the strongest lever for quality and convention matching. `cursor-agent` follows imports, naming, helpers, and local patterns much better when it has good examples.\n- **Describe the before and after concretely**. Quoting the relevant code improves accuracy.\n- **Include acceptance criteria**. Example: the build must pass, or function signatures must not change.\n- **Constrain the scope**. Example: \"Do not modify any files other than the specified files.\"\n- **Split large changes**. Do not pack too much into a single delegation.\n\nGood instruction example:\n\n```text\nIn server\u002Fsrc\u002Fdomain\u002Ffoo\u002Ffoo.ts, add an early return at the start of Foo.validate()\nthat returns new EmptyNameError() when this.name.trim() === \"\".\nDo not change the existing logic.\nDo not edit any files other than the specified file.\n```\n\n## Scope And Safety\n\n- **Delegate**: project code and configuration files.\n- **Do directly in the calling AI agent**: git operations, persistent memory updates, and TODO management.\n- Do not let `cursor-agent` roam freely. **Always name the files it is allowed to edit** and keep it out of unrelated scope.\n- **When using a worktree**: run `cursor-agent-print.sh` from the worktree root and include \"do not modify files outside this worktree\" in the instructions.\n\n## Required Verification\n\n- After editing, **always review Cursor's actual changes with `git diff`**. Do not trust the text output from `cursor-agent` alone.\n  - To preserve the token savings, review the diff first instead of rereading whole files.\n- **Confirm where files were generated**. Because `cursor-agent` runs from the current working directory, verify that worktree edits stayed inside the worktree and did not dirty the parent repository, for example with `git -C \u003Cworktree> status`.\n- **`cursor-agent` does not verify semantic assumptions**; it mainly pattern-matches sibling files. `git diff` and builds do not prove the semantic correctness of claims or logic. For new or non-obvious logic, such as whether an assertion is really valid or whether an API actually exists, the calling AI agent must verify the behavior against use cases and sibling tests. Be especially careful when there is no good sibling example. Confirm with search before claiming that something is absent or nonexistent.\n- Build, test, and lint the changed scope according to the project's conventions.\n\n## Gotchas\n\n- If `cursor-agent` is missing or authentication fails, report that the execution environment does not meet the prerequisite and stop.\n- If `cursor-agent` fails or edits against the instructions, make the instructions more specific and retry.\n- If retrying does not resolve the issue, report the situation to the user and ask how to proceed. Even though this is a soft contract, the calling AI agent must not silently switch back to direct editing.\n","# Cursor Edit\n\n## Overview\n\nThis skill outsources **only the act of editing files** to Cursor's headless CLI (`cursor-agent`). Use the same contract from Claude Code, Codex, or any other AI agent.\n\n- **Calling AI agent (brain)**: reads and searches code, decides what to change, writes edit instructions, and verifies the result\n- **Cursor (hands)**: rewrites files according to the received instructions\n\nThe goal is to move heavy editing work to Cursor, reducing token usage in the calling AI agent and speeding up the overall task.\n\nThis only pays off for **larger edits**. For small changes, the cost of writing self-contained instructions and reviewing `git diff` can exceed the cost of direct editing. Do not force this skill onto trivial one-line or few-line edits.\n\n## When To Use\n\nThese tendencies apply:\n\n- **Not suitable for trivial edits (one to a few lines)**. Startup, instruction writing, and diff review often cost more than direct editing by the calling AI agent.\n- **Best for edits that are large, pattern-heavy, and have good sibling files to imitate**. Example: adding tests that follow an existing test suite. `cursor-agent` can closely follow good sibling examples and often produce convention-compliant results quickly.\n- **Be careful with new features or non-obvious assumptions when no good sibling example exists**. `cursor-agent` tends to pattern-match without semantic validation, so correctness is not guaranteed. In this case, the calling AI agent must separately verify semantic correctness. See \"Required Verification\".\n- **Cursor consumes the delegated tokens**. The calling AI agent saves tokens, but the speed and quality advantages mainly apply under the suitable conditions above.\n\n## Operating Contract\n\n- The calling AI agent must **not** use direct editing tools such as `Edit`, `Write`, or `apply_patch`.\n- All file rewrites must go through `scripts\u002Fcursor-agent-print.sh`, which calls `cursor-agent`.\n- The calling AI agent remains responsible for code reading, search, planning, writing edit instructions, git operations, build\u002Ftest\u002Flint verification, TODO management, and persistent memory updates.\n- This is a soft contract. Direct editing tools are not technically blocked by hooks; the calling AI agent must follow this as discipline.\n\n## Editing Loop\n\n1. **Analyze and design** — The calling AI agent reads the code and decides what to change in which files.\n2. **Write edit instructions** — State the target files and desired changes unambiguously. Follow the guidance below.\n3. **Delegate** — Pass the instructions to `cursor-agent-print.sh` so `cursor-agent` edits the files.\n4. **Verify** — Review Cursor's actual changes with `git diff`, then build\u002Ftest\u002Flint the changed scope.\n5. **Retry** — If the result diverges from the intent, return to step 2 with more specific instructions.\n\n## Calling cursor-agent\n\nCall the wrapper from the target repository root. If working in a worktree, run it from the worktree root. `cursor-agent` reads and writes files relative to the current directory.\n\n```bash\n\u003Ccursor-edit>\u002Fscripts\u002Fcursor-agent-print.sh \"\u003Cedit instructions>\"\n```\n\n`\u003Ccursor-edit>` is the directory where this skill is installed.\n\nInternally, the wrapper runs:\n\n```bash\ncursor-agent -p --force --trust --output-format text --model \"${CURSOR_MODEL:-composer-2.5-fast}\" \"\u003Cedit instructions>\"\n# -p      : non-interactive print mode\n# --force : apply file changes without confirmation\n# --trust : trust the workspace without prompting\n```\n\nThe default model is Composer2.5 Fast (`composer-2.5-fast`). Set `CURSOR_MODEL` to override it.\n\n```bash\nCURSOR_MODEL=gpt-5.5 \u003Ccursor-edit>\u002Fscripts\u002Fcursor-agent-print.sh \"\u003Cedit instructions>\"\n```\n\n## Writing Good Edit Instructions\n\n`cursor-agent` is another AI. If instructions are vague, Cursor can edit in the wrong direction. Write instructions that are self-contained.\n\n- **Name the target file paths** using relative or absolute paths.\n- **Name existing sibling files to imitate**. Example: \"Read the existing `foo-1.test.ts` through `foo-6.test.ts` files and follow their conventions.\" This is the strongest lever for quality and convention matching. `cursor-agent` follows imports, naming, helpers, and local patterns much better when it has good examples.\n- **Describe the before and after concretely**. Quoting the relevant code improves accuracy.\n- **Include acceptance criteria**. Example: the build must pass, or function signatures must not change.\n- **Constrain the scope**. Example: \"Do not modify any files other than the specified files.\"\n- **Split large changes**. Do not pack too much into a single delegation.\n\nGood instruction example:\n\n```text\nIn server\u002Fsrc\u002Fdomain\u002Ffoo\u002Ffoo.ts, add an early return at the start of Foo.validate()\nthat returns new EmptyNameError() when this.name.trim() === \"\".\nDo not change the existing logic.\nDo not edit any files other than the specified file.\n```\n\n## Scope And Safety\n\n- **Delegate**: project code and configuration files.\n- **Do directly in the calling AI agent**: git operations, persistent memory updates, and TODO management.\n- Do not let `cursor-agent` roam freely. **Always name the files it is allowed to edit** and keep it out of unrelated scope.\n- **When using a worktree**: run `cursor-agent-print.sh` from the worktree root and include \"do not modify files outside this worktree\" in the instructions.\n\n## Required Verification\n\n- After editing, **always review Cursor's actual changes with `git diff`**. Do not trust the text output from `cursor-agent` alone.\n  - To preserve the token savings, review the diff first instead of rereading whole files.\n- **Confirm where files were generated**. Because `cursor-agent` runs from the current working directory, verify that worktree edits stayed inside the worktree and did not dirty the parent repository, for example with `git -C \u003Cworktree> status`.\n- **`cursor-agent` does not verify semantic assumptions**; it mainly pattern-matches sibling files. `git diff` and builds do not prove the semantic correctness of claims or logic. For new or non-obvious logic, such as whether an assertion is really valid or whether an API actually exists, the calling AI agent must verify the behavior against use cases and sibling tests. Be especially careful when there is no good sibling example. Confirm with search before claiming that something is absent or nonexistent.\n- Build, test, and lint the changed scope according to the project's conventions.\n\n## Gotchas\n\n- If `cursor-agent` is missing or authentication fails, report that the execution environment does not meet the prerequisite and stop.\n- If `cursor-agent` fails or edits against the instructions, make the instructions more specific and retry.\n- If retrying does not resolve the issue, report the situation to the user and ask how to proceed. Even though this is a soft contract, the calling AI agent must not silently switch back to direct editing.\n",{"name":5,"description":7},"main","b34c94ef0434c720f59427c57230c4a156d2a069","misc\u002Fcursor-edit","https:\u002F\u002Fgithub.com\u002Fto4iki\u002Fskills","https:\u002F\u002Fgithub.com\u002Fto4iki","https:\u002F\u002Fto4iki.com\u002F","2026-10-06 22:04:42",{"source":8,"skillName":5,"commands":52,"prompt":62,"zipAvailable":63},[53,56,59],{"tool":54,"command":55},"npx","npx skills add to4iki\u002Fskills --skill cursor-edit",{"tool":57,"command":58},"bunx","bunx skills add to4iki\u002Fskills --skill cursor-edit",{"tool":60,"command":61},"pnpm","pnpm dlx skills add to4iki\u002Fskills --skill cursor-edit","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fto4iki\u002Fskills\u002Fblob\u002Fmain\u002Fmisc\u002Fcursor-edit\u002FSKILL.md",true,[65,71],{"path":66,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":69,"sourceHtmlUrl":70},"scripts\u002Fcursor-agent-print.sh","SCRIPT","脚本",855,"https:\u002F\u002Fgithub.com\u002Fto4iki\u002Fskills\u002Fblob\u002Fmain\u002Fmisc\u002Fcursor-edit\u002Fscripts\u002Fcursor-agent-print.sh",{"path":72,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":75,"sourceHtmlUrl":76},"SKILL-ja.md","REFERENCE","参考文档",8981,"https:\u002F\u002Fgithub.com\u002Fto4iki\u002Fskills\u002Fblob\u002Fmain\u002Fmisc\u002Fcursor-edit\u002FSKILL-ja.md",[78,101,113,132,150,168],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":39},"01M71HHM94N0EPMGH3TF1XA7QN","use-claude-artifact","When the user asks for HTML output for code review materials, explanations of plans or discussions, or design verification, create the HTML as a Claude artifact instead of a file in the repository. Use when the user says things like \"create it as HTML\", \"as an artifact\", \"HTML for review\", or \"HTML for design check\".","https:\u002F\u002Fgithub.com\u002Fto4iki\u002Fskills\u002Fblob\u002Fmain\u002Fmisc\u002Fuse-claude-artifact\u002FSKILL.md",[],[34,85,86,87,88,89,90,91,92,93,24,94,95,96,25,27,97,98,99,100],"use claude artifact","artifact","repository","review","user","html","it","code","file","plans","design","code review","verification","as","create","materials",{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":39},"01M71HHHY1NRNSAYHYA1AZ29BM","eli5","Explain a topic like I'm a 5 year old. Use when the user types \u002Feli5 or asks for a dead-simple picture explainer of how something works.","https:\u002F\u002Fgithub.com\u002Fto4iki\u002Fskills\u002Fblob\u002Fmain\u002Fmisc\u002Feli5\u002FSKILL.md",[],[103,108,27,109,24,110,111,34,112,89],"explain","how","types","explainer","simple",{"skillNo":114,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":117,"categories":118,"keywords":119,"publishedAt":39},"01M71HHAZM7H1GMXP1FGVAH37P","implementation-notes","Implement a spec while keeping a running implementation-notes.html with decisions, deviations, tradeoffs, and open questions. Use for \u002Fimplementation-notes, @implementation-notes, implementation-notes.html, or when the user wants a spec implemented with a work log.","https:\u002F\u002Fgithub.com\u002Fto4iki\u002Fskills\u002Fblob\u002Fmain\u002Fengineering\u002Fimplementation-notes\u002FSKILL.md",[],[120,121,122,123,124,89,90,125,24,34,126,127,128,27,129,130,131],"implementation","implementation notes","notes","log","implement","decisions","open","spec","questions","work","with","running",{"skillNo":133,"name":134,"nameZh":6,"description":135,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":136,"categories":137,"keywords":138,"publishedAt":39},"01M71HH8WGYMY511VTB6ADK18E","hunk-session","Drive a live Hunk terminal diff review via `hunk session *`. Use when the user has a Hunk session running or wants to review diffs interactively.","https:\u002F\u002Fgithub.com\u002Fto4iki\u002Fskills\u002Fblob\u002Fmain\u002Fengineering\u002Fhunk-session\u002FSKILL.md",[],[139,140,141,142,131,143,88,89,24,144,34,145,146,147,148,149],"hunk","session","hunk session","review diffs","drive","live","diff review","diffs","terminal","diff","via",{"skillNo":151,"name":152,"nameZh":6,"description":153,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":154,"categories":155,"keywords":156,"publishedAt":39},"01M71HH6H61Q6KMVRJKVZGK3KH","git-wt","Creates a Git worktree with `git wt` and implements changes in an isolated directory. After the work is done, removes the worktree pending user confirmation. Use when the user explicitly says \"worktree\", \"branch off\", \"wt\", \"git-wt\", etc.","https:\u002F\u002Fgithub.com\u002Fto4iki\u002Fskills\u002Fblob\u002Fmain\u002Fengineering\u002Fgit-wt\u002FSKILL.md",[],[157,158,159,34,89,160,161,24,162,163,164,165,166,129,167,130],"git","wt","git wt","done","pending","confirmation","directory","worktree","git worktree","changes","branch",{"skillNo":169,"name":170,"nameZh":6,"description":171,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":172,"categories":173,"keywords":174,"publishedAt":39},"01M71HH56F04MHJ8W2J3050W85","git-commit","Analyze changes, stage files, and commit with Conventional Commits. Use when the user asks to commit or run git commit.","https:\u002F\u002Fgithub.com\u002Fto4iki\u002Fskills\u002Fblob\u002Fmain\u002Fengineering\u002Fgit-commit\u002FSKILL.md",[],[175,176,157,166,130,34,24,177,178,89,179,180,32,181],"git commit","commit","stage","conventional commits","commits","run","analyze"]