[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71KEBREVTBZK061HEX9FK0W":3,"skill-same:01M71KEBREVTBZK061HEX9FK0W":74},{"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":52,"commitSha":53,"skillDirectory":54,"forksCount":55,"repositoryHtmlUrl":56,"repositoryHomepageUrl":6,"ownerHtmlUrl":57,"ownerBlogUrl":58,"ownerDescription":6,"updatedAt":59,"install":60,"resources":73},"01M71KEBREVTBZK061HEX9FK0W","add-adapter",null,"Add a new tool adapter to agentsync — scaffolds internal\u002Ftools\u002F\u003Ctool>.go (a ToolMeta literal + render func), registers it, extends adopt.go for reverse mapping, adds a roundtrip test, regenerates the metadata golden, and updates README compatibility tables. Use when implementing one of the tools still open in TODO.md (Windsurf, Continue.dev, Roo Code, Crush, Goose, Amazon Q, Kilo Code, Aider, Cody) or any new AI tool.","noah-hrbth\u002Fagent-tool-sync","noah-hrbth","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F78396377?v=4","01M71KE9YFAYQ79YBHR2TA6D8K","Noah","01M71KE9Z1FHAXYJT40KM7MD24",2,"MIT","https:\u002F\u002Fgithub.com\u002Fnoah-hrbth\u002Fagent-tool-sync\u002Fblob\u002Fmain\u002F.agentsync\u002Fskills\u002Fadd-adapter\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"add","adapter","add adapter","edit","write","read","crush","adopt","todo","kilo","websearch","code","Bash","updates","when","new","windsurf","open","implementing","render","2026-11-10 10:12:30",false,"---\nname: add-adapter\ndescription: Add a new tool adapter to agentsync — scaffolds internal\u002Ftools\u002F\u003Ctool>.go (a ToolMeta literal + render func), registers it, extends adopt.go for reverse mapping, adds a roundtrip test, regenerates the metadata golden, and updates README compatibility tables. Use when implementing one of the tools still open in TODO.md (Windsurf, Continue.dev, Roo Code, Crush, Goose, Amazon Q, Kilo Code, Aider, Cody) or any new AI tool.\nallowed-tools: [Read, Edit, Write, Bash, Glob, Grep, WebFetch, WebSearch]\n---\n\n# Add a New Tool Adapter\n\nGoal: define a new `Tool` end-to-end. A `Tool` is a pure value — `Tool{ Meta ToolMeta; Render RenderFunc }`; there is **no `Adapter` interface**. Mirror the conventions in `internal\u002Ftools\u002Fclaude.go` (the reference implementation); the types live in `internal\u002Ftools\u002Ftool.go`.\n\n## 0. Research the target tool — do not skip\n\nFind primary-source docs for the tool's config layout. Confirm:\n\n- Config dir: `~\u002F.\u003Ctool>\u002F` or `~\u002F.config\u002F\u003Ctool>\u002F`? (`detectGlobalDir` vs `detectConfigDir`)\n- Project layout: `.\u003Ctool>\u002F...` at workspace root? Anything special?\n- Root memory file (name + format): does it live at workspace root or under the tool dir?\n- Per-rule files supported? Subdir layout? File extension (`.md`, `.mdc`, `.toml`)?\n- Skills, agents, slash commands: which concepts exist? Frontmatter schema for each?\n- User scope: is there an on-disk user config layer? If not, set `Scopes[ScopeUser] = {Supported: false, Reason: \"...\"}`.\n- Deprecations: any concept the tool flags as legacy? (set `Compatibility.Deprecated = true` with a `Replacement`).\n\nCite the source URL in the tool file as a one-line comment above the `ToolMeta` literal. If docs are ambiguous, prefer WebFetch over guessing.\n\n## 1. Create `internal\u002Ftools\u002F\u003Ctool>.go`\n\nUse `claude.go` as the template. The file holds two things, co-located:\n\n**`var \u003Ctool>Meta = ToolMeta{...}`** — the data descriptor:\n\n- `Key` — stable lowercase id (e.g. `\"windsurf\"`). `Name` — display name in Title Case (e.g. `\"Windsurf\"`).\n- `Detect` — `detectGlobalDir(\"\u003Ctool>\")` or `detectConfigDir(\"\u003Ctool>\")` (or a custom `DetectFunc` closure for irregular probes).\n- `Concepts` — list **all 4** concepts explicitly: `{Supported: true}` per natively-supported concept; `{Supported: false, Reason: \"...\"}` for unsupported; mark deprecated concepts with `Deprecated: true, Replacement: \"\u003Csuccessor>\"`.\n- `Scopes` — list **both** scopes explicitly; `{Supported: false, Reason: \"...\"}` for scopes with no on-disk layer (see `cursor.go`, `zed.go` user scope).\n- `Aliases` — only for concepts whose displayed filename differs from the canonical name (e.g. Claude `ConceptRules: \"CLAUDE.md\"`). Omit otherwise.\n- `ConceptInfo` — a specific per-concept help string for the TUI Tools screen (real paths, not generic filler).\n\n**`func render\u003CTool>(c *canonical.Canonical, scope Scope) ([]FileWrite, error)`** — the only deep, tool-specific code:\n\n- Return `[]FileWrite` with **paths relative to the scope's base dir** (workspace root or `$HOME`). Never emit absolute paths. Build paths from the `paths.go` anchor constants and `filepath.Join` — don't re-type path literals.\n- Build all frontmatter via `buildMDFrontmatter` \u002F `buildTOML` from `frontmatter.go` — they skip zero values, so pass every field unconditionally. Do not hand-roll YAML\u002FTOML.\n- If the tool has no per-rule directory, append rule bodies as `##`-headed sections to the root memory file via `buildRootMemoryContent` (see `gemini.go`, `opencode.go`, `codex.go`).\n- If a canonical field maps to a different key in the target (e.g. Claude `paths:` → Cursor `globs:`), translate **inside this render func only** — don't push translation up the stack.\n\n## 2. Register the tool\n\nEdit `internal\u002Ftools\u002Fregistry.go::All()` and add `{Meta: \u003Ctool>Meta, Render: render\u003CTool>}` to the slice. Ordering is **intentional, not alphabetical** — append new tools at the tail (`TestRegistryTailOrder` pins it) unless there's a reason otherwise.\n\n## 3. Extend `internal\u002Fsyncer\u002Fadopt.go` + `paths.go`\n\nFor each path the render func writes that maps reversibly back to a canonical entity:\n\n1. Add the path's dir prefix \u002F root-memory filename to the relevant slice in `internal\u002Ftools\u002Fpaths.go` (the single owner of path vocabulary).\n2. Ensure an `adopt.go` matcher recognizes it: root memory → the `isRootMemoryFile` \u002F `case` switch calling `canonical.SaveAgentsMD`; rules → `matchRulePath` (`ruleFilename` strips `.md`\u002F`.mdc`); skills → `matchSkillPath` (update `skillDir` if depth differs); agents → `matchAgentPath` \u002F `matchOpenCodeAgentPath`; commands → `matchCommandPath`; or a dedicated per-tool matcher (see `matchCopilotInstructionPath`, `matchClineWorkflowPath`, `matchPiPromptPath`).\n3. Declare the expectation in `tools.ExpectedAdoptOutcome` for each `(tool, concept, path)`: reversible to its own concept (the default), root-memory, cross-mapped, or `OutcomeNonReversible` with a `Reason`.\n\nIf the output isn't reversible (e.g. concatenated rule bodies, TOML agents), return `OutcomeNonReversible` with a reason — the render↔adopt contract test (`internal\u002Fsyncer\u002Fcontract_test.go`) checks render output against these declarations and fails on drift.\n\n## 4. Add a roundtrip test\n\nAdd a per-tool roundtrip test under `internal\u002Fsyncer\u002F` (mirror `roundtrip_vibe_test.go` \u002F `roundtrip_cline_junie_test.go`): build an in-code probe `canonical.Canonical`, render it for both scopes, `AdoptExternal` each reversible output back, and assert the canonical round-trips. The contract test already guards path-level parity; the roundtrip test guards byte-level fidelity.\n\n## 5. Regenerate the metadata golden\n\n`internal\u002Ftools\u002Ftestdata\u002Fmetadata_golden.json` + `TestMetadataParity` pin every tool's observable metadata. Regenerate and review the diff:\n\n```bash\nUPDATE_GOLDEN=1 go test .\u002Finternal\u002Ftools\u002F -run TestMetadataParity\n```\n\nThe diff must contain only the new tool's entry.\n\n## 6. Update the README\n\nEdit `README.md`:\n\n- \"Supported AI tools\" table — new row with paths and detection dir.\n- \"Concept compatibility\" table — ✓ \u002F ⚠ \u002F ✗ per concept.\n- \"Field translation across tools\" table — only if the render func renames any canonical field.\n- \"Tools that don't support user scope\" \u002F \"user-scope output path differs\" lists — add the tool if applicable.\n\n## 7. Verify\n\nRun, in order:\n\n```bash\ngo vet .\u002F...\ngo test .\u002F...\nmake smoke\nmake sandbox-reset && make build && .\u002Fagentsync sync --workspace .\u002Fexamples\u002Fsandbox\n```\n\nThen diff `examples\u002Fsandbox\u002F.\u003Ctool>\u002F` against your expectations.\n\n## 8. Final review\n\nInvoke the `adapter-reviewer` subagent on the new tool file before considering the task done. Apply its findings.\n","# Add a New Tool Adapter\n\nGoal: define a new `Tool` end-to-end. A `Tool` is a pure value — `Tool{ Meta ToolMeta; Render RenderFunc }`; there is **no `Adapter` interface**. Mirror the conventions in `internal\u002Ftools\u002Fclaude.go` (the reference implementation); the types live in `internal\u002Ftools\u002Ftool.go`.\n\n## 0. Research the target tool — do not skip\n\nFind primary-source docs for the tool's config layout. Confirm:\n\n- Config dir: `~\u002F.\u003Ctool>\u002F` or `~\u002F.config\u002F\u003Ctool>\u002F`? (`detectGlobalDir` vs `detectConfigDir`)\n- Project layout: `.\u003Ctool>\u002F...` at workspace root? Anything special?\n- Root memory file (name + format): does it live at workspace root or under the tool dir?\n- Per-rule files supported? Subdir layout? File extension (`.md`, `.mdc`, `.toml`)?\n- Skills, agents, slash commands: which concepts exist? Frontmatter schema for each?\n- User scope: is there an on-disk user config layer? If not, set `Scopes[ScopeUser] = {Supported: false, Reason: \"...\"}`.\n- Deprecations: any concept the tool flags as legacy? (set `Compatibility.Deprecated = true` with a `Replacement`).\n\nCite the source URL in the tool file as a one-line comment above the `ToolMeta` literal. If docs are ambiguous, prefer WebFetch over guessing.\n\n## 1. Create `internal\u002Ftools\u002F\u003Ctool>.go`\n\nUse `claude.go` as the template. The file holds two things, co-located:\n\n**`var \u003Ctool>Meta = ToolMeta{...}`** — the data descriptor:\n\n- `Key` — stable lowercase id (e.g. `\"windsurf\"`). `Name` — display name in Title Case (e.g. `\"Windsurf\"`).\n- `Detect` — `detectGlobalDir(\"\u003Ctool>\")` or `detectConfigDir(\"\u003Ctool>\")` (or a custom `DetectFunc` closure for irregular probes).\n- `Concepts` — list **all 4** concepts explicitly: `{Supported: true}` per natively-supported concept; `{Supported: false, Reason: \"...\"}` for unsupported; mark deprecated concepts with `Deprecated: true, Replacement: \"\u003Csuccessor>\"`.\n- `Scopes` — list **both** scopes explicitly; `{Supported: false, Reason: \"...\"}` for scopes with no on-disk layer (see `cursor.go`, `zed.go` user scope).\n- `Aliases` — only for concepts whose displayed filename differs from the canonical name (e.g. Claude `ConceptRules: \"CLAUDE.md\"`). Omit otherwise.\n- `ConceptInfo` — a specific per-concept help string for the TUI Tools screen (real paths, not generic filler).\n\n**`func render\u003CTool>(c *canonical.Canonical, scope Scope) ([]FileWrite, error)`** — the only deep, tool-specific code:\n\n- Return `[]FileWrite` with **paths relative to the scope's base dir** (workspace root or `$HOME`). Never emit absolute paths. Build paths from the `paths.go` anchor constants and `filepath.Join` — don't re-type path literals.\n- Build all frontmatter via `buildMDFrontmatter` \u002F `buildTOML` from `frontmatter.go` — they skip zero values, so pass every field unconditionally. Do not hand-roll YAML\u002FTOML.\n- If the tool has no per-rule directory, append rule bodies as `##`-headed sections to the root memory file via `buildRootMemoryContent` (see `gemini.go`, `opencode.go`, `codex.go`).\n- If a canonical field maps to a different key in the target (e.g. Claude `paths:` → Cursor `globs:`), translate **inside this render func only** — don't push translation up the stack.\n\n## 2. Register the tool\n\nEdit `internal\u002Ftools\u002Fregistry.go::All()` and add `{Meta: \u003Ctool>Meta, Render: render\u003CTool>}` to the slice. Ordering is **intentional, not alphabetical** — append new tools at the tail (`TestRegistryTailOrder` pins it) unless there's a reason otherwise.\n\n## 3. Extend `internal\u002Fsyncer\u002Fadopt.go` + `paths.go`\n\nFor each path the render func writes that maps reversibly back to a canonical entity:\n\n1. Add the path's dir prefix \u002F root-memory filename to the relevant slice in `internal\u002Ftools\u002Fpaths.go` (the single owner of path vocabulary).\n2. Ensure an `adopt.go` matcher recognizes it: root memory → the `isRootMemoryFile` \u002F `case` switch calling `canonical.SaveAgentsMD`; rules → `matchRulePath` (`ruleFilename` strips `.md`\u002F`.mdc`); skills → `matchSkillPath` (update `skillDir` if depth differs); agents → `matchAgentPath` \u002F `matchOpenCodeAgentPath`; commands → `matchCommandPath`; or a dedicated per-tool matcher (see `matchCopilotInstructionPath`, `matchClineWorkflowPath`, `matchPiPromptPath`).\n3. Declare the expectation in `tools.ExpectedAdoptOutcome` for each `(tool, concept, path)`: reversible to its own concept (the default), root-memory, cross-mapped, or `OutcomeNonReversible` with a `Reason`.\n\nIf the output isn't reversible (e.g. concatenated rule bodies, TOML agents), return `OutcomeNonReversible` with a reason — the render↔adopt contract test (`internal\u002Fsyncer\u002Fcontract_test.go`) checks render output against these declarations and fails on drift.\n\n## 4. Add a roundtrip test\n\nAdd a per-tool roundtrip test under `internal\u002Fsyncer\u002F` (mirror `roundtrip_vibe_test.go` \u002F `roundtrip_cline_junie_test.go`): build an in-code probe `canonical.Canonical`, render it for both scopes, `AdoptExternal` each reversible output back, and assert the canonical round-trips. The contract test already guards path-level parity; the roundtrip test guards byte-level fidelity.\n\n## 5. Regenerate the metadata golden\n\n`internal\u002Ftools\u002Ftestdata\u002Fmetadata_golden.json` + `TestMetadataParity` pin every tool's observable metadata. Regenerate and review the diff:\n\n```bash\nUPDATE_GOLDEN=1 go test .\u002Finternal\u002Ftools\u002F -run TestMetadataParity\n```\n\nThe diff must contain only the new tool's entry.\n\n## 6. Update the README\n\nEdit `README.md`:\n\n- \"Supported AI tools\" table — new row with paths and detection dir.\n- \"Concept compatibility\" table — ✓ \u002F ⚠ \u002F ✗ per concept.\n- \"Field translation across tools\" table — only if the render func renames any canonical field.\n- \"Tools that don't support user scope\" \u002F \"user-scope output path differs\" lists — add the tool if applicable.\n\n## 7. Verify\n\nRun, in order:\n\n```bash\ngo vet .\u002F...\ngo test .\u002F...\nmake smoke\nmake sandbox-reset && make build && .\u002Fagentsync sync --workspace .\u002Fexamples\u002Fsandbox\n```\n\nThen diff `examples\u002Fsandbox\u002F.\u003Ctool>\u002F` against your expectations.\n\n## 8. Final review\n\nInvoke the `adapter-reviewer` subagent on the new tool file before considering the task done. Apply its findings.\n",{"name":5,"description":7,"allowed-tools":44},[45,46,47,31,48,49,50,51],"Read","Edit","Write","Glob","Grep","WebFetch","WebSearch","main","3b6d4dd03c2efaabac9d24bac067186575670b54",".agentsync\u002Fskills\u002Fadd-adapter",0,"https:\u002F\u002Fgithub.com\u002Fnoah-hrbth\u002Fagent-tool-sync","https:\u002F\u002Fgithub.com\u002Fnoah-hrbth","noah-hrbth.dev","2026-08-21 13:43:41",{"source":8,"skillName":5,"commands":61,"prompt":71,"zipAvailable":72},[62,65,68],{"tool":63,"command":64},"npx","npx skills add noah-hrbth\u002Fagent-tool-sync --skill add-adapter",{"tool":66,"command":67},"bunx","bunx skills add noah-hrbth\u002Fagent-tool-sync --skill add-adapter",{"tool":69,"command":70},"pnpm","pnpm dlx skills add noah-hrbth\u002Fagent-tool-sync --skill add-adapter","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fnoah-hrbth\u002Fagent-tool-sync\u002Fblob\u002Fmain\u002F.agentsync\u002Fskills\u002Fadd-adapter\u002FSKILL.md",true,[],[75,90,103,116,123,130],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":39},"01M71KFJ5BKV6Y4S3PXR0BSNYW","code-reviewer","Reviews code for quality, bugs, and security issues.","https:\u002F\u002Fgithub.com\u002Fnoah-hrbth\u002Fagent-tool-sync\u002Fblob\u002Fmain\u002Ftestdata\u002Fscenarios\u002Fempty-workspace\u002Finput\u002F.agentsync\u002Fskills\u002Fcode-reviewer\u002FSKILL.md",[],[30,82,83,84,85,86,87,88,89],"reviewer","code reviewer","issues","quality","for","bugs","security","reviews",{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":39},"01M71KFGQNE7T84G9X0JEZXVM8","commit","Conventional commit helper sourced from Mistral Vibe","https:\u002F\u002Fgithub.com\u002Fnoah-hrbth\u002Fagent-tool-sync\u002Fblob\u002Fmain\u002Fexamples\u002Fsandbox\u002F.vibe\u002Fskills\u002Fcommit\u002FSKILL.md",[],[92,97,98,99,100,101,102],"true","commit helper","helper","Mistral","conventional commit","vibe",{"skillNo":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":39},"01M71KFETSGVYNWR2Z9VEP5XQG","code-review","Code reviewer sourced from Mistral Vibe. Use to review or audit changes.","https:\u002F\u002Fgithub.com\u002Fnoah-hrbth\u002Fagent-tool-sync\u002Fblob\u002Fmain\u002Fexamples\u002Fsandbox\u002F.vibe\u002Fskills\u002Fcode-review\u002FSKILL.md",[],[110,111,30,102,112,113,83,114,100,24,82,115],"review","code review","changes","use","audit","grep",{"skillNo":117,"name":105,"nameZh":6,"description":118,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":119,"categories":120,"keywords":121,"publishedAt":39},"01M71KFDXCM6P17ZTGECET584V","Code reviewer sourced from JetBrains Junie. Use to review or audit changes.","https:\u002F\u002Fgithub.com\u002Fnoah-hrbth\u002Fagent-tool-sync\u002Fblob\u002Fmain\u002Fexamples\u002Fsandbox\u002F.junie\u002Fskills\u002Fcode-review\u002FSKILL.md",[],[110,111,30,122,112,113,83,114,82],"jetbrains",{"skillNo":124,"name":105,"nameZh":6,"description":125,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":126,"categories":127,"keywords":128,"publishedAt":39},"01M71KFAEW9WXYWCSMDM4E85NK","Code reviewer sourced from Cline. Use to review or audit changes.","https:\u002F\u002Fgithub.com\u002Fnoah-hrbth\u002Fagent-tool-sync\u002Fblob\u002Fmain\u002Fexamples\u002Fsandbox\u002F.cline\u002Fskills\u002Fcode-review\u002FSKILL.md",[],[110,111,30,129,112,113,83,114,82],"cline",{"skillNo":131,"name":132,"nameZh":6,"description":133,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":134,"categories":135,"keywords":136,"publishedAt":39},"01M71KF52DECGRXMSZ3PENK1EA","path-scoped","Context-aware TypeScript helper. Auto-activates when TypeScript files are in scope.","https:\u002F\u002Fgithub.com\u002Fnoah-hrbth\u002Fagent-tool-sync\u002Fblob\u002Fmain\u002Fexamples\u002Fsandbox-seed\u002F.agentsync\u002Fskills\u002Fpath-scoped\u002FSKILL.md",[],[137,138,139,140,141,24,142,143,115,144,145,33,99,146,147],"scoped","path","path scoped","scope","lib","src","typescript","files","auto","context","typescript helper"]