[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CFJXWAGV1H5XJ8RW6PKSD4":3,"skill-same:01M7CFJXWAGV1H5XJ8RW6PKSD4":45},{"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":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M7CFJXWAGV1H5XJ8RW6PKSD4","napi-extract",null,"Extract logic from a crates\u002Fpi-natives N-API module into an ordinary Rust library crate, leaving a thin N-API adapter so TypeScript callers keep working. Use when porting a pi-natives module (sixel, pdf, grep, text, tokens, etc.) for direct use by the Rust app (rust-agent \u002F harvest-omp).","Sanidhya14321\u002Fharvest","Sanidhya14321","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F163896084?v=4","01M7CFGCT2VK10ZTPEKWEJ69PG","Sanidhya Vats","01M7CFGCTM8RP8TZ8H4CW2S4WT",3,"MIT","https:\u002F\u002Fgithub.com\u002FSanidhya14321\u002Fharvest\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fnapi-extract\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: napi-extract\ndescription: Extract logic from a crates\u002Fpi-natives N-API module into an ordinary Rust library crate, leaving a thin N-API adapter so TypeScript callers keep working. Use when porting a pi-natives module (sixel, pdf, grep, text, tokens, etc.) for direct use by the Rust app (rust-agent \u002F harvest-omp).\n---\n\n# Extract a pi-natives module\n\nReference implementation: `crates\u002Fpi-natives\u002Fsrc\u002Fhtml.rs` → `crates\u002Fharvest-media\u002Fsrc\u002Fhtml.rs` (commit 6253f50).\n\n1. Read the module in `crates\u002Fpi-natives\u002Fsrc\u002F\u003Cmod>.rs`, its TS callers (`grep -rn \"\u003CexportName>\" packages\u002F`), and the generated declarations in `packages\u002Fnatives`.\n2. Move the logic into the target crate (`harvest-media`, `harvest-tui`, `harvest-runtime`, `harvest-tokenizer`, or a new `crates\u002Fharvest-\u003Carea>`) with a plain Rust API: owned\u002Fborrowed Rust types, a typed error enum, options struct with `Default`. No `napi` types in the library.\n3. Add explicit input\u002Fsize\u002Fallocation bounds before work; check dependency types in `~\u002F.cargo\u002Fregistry` rather than guessing (e.g. `image::Limits` is non-exhaustive and not strict for all decoders).\n4. Rewrite the N-API function as an adapter only: convert JS inputs (`crate::js::into_string`), call the library inside `task::blocking(...)`, map errors with `Error::from_reason`. Preserve the existing JS-facing signature, defaults and error text exactly.\n5. Re-export from `rust-agent` (`harvest_omp::\u003Carea>`) if the Rust app needs it.\n6. Wire: workspace `Cargo.toml`, `Cargo.lock`, `pi-natives\u002FCargo.toml` dependency, Bazel `BUILD.bazel` targets, Rust CI package list.\n7. Verify: Rust tests (`cargo xtask test -p \u003Ccrate>`), `bun run build:native`, then diff generated bindings — revert the four known unrelated audio declaration lines (`AudioCapture.droppedChunks`, `AudioPlayback.queuedSamples` + comments) if they appear. Compare old vs new addon output on an oracle input set; run focused TS consumer tests.\n8. Continue with `\u002Frust-migration-slice` steps 5–7 (ledger, docs, commit).\n","# Extract a pi-natives module\n\nReference implementation: `crates\u002Fpi-natives\u002Fsrc\u002Fhtml.rs` → `crates\u002Fharvest-media\u002Fsrc\u002Fhtml.rs` (commit 6253f50).\n\n1. Read the module in `crates\u002Fpi-natives\u002Fsrc\u002F\u003Cmod>.rs`, its TS callers (`grep -rn \"\u003CexportName>\" packages\u002F`), and the generated declarations in `packages\u002Fnatives`.\n2. Move the logic into the target crate (`harvest-media`, `harvest-tui`, `harvest-runtime`, `harvest-tokenizer`, or a new `crates\u002Fharvest-\u003Carea>`) with a plain Rust API: owned\u002Fborrowed Rust types, a typed error enum, options struct with `Default`. No `napi` types in the library.\n3. Add explicit input\u002Fsize\u002Fallocation bounds before work; check dependency types in `~\u002F.cargo\u002Fregistry` rather than guessing (e.g. `image::Limits` is non-exhaustive and not strict for all decoders).\n4. Rewrite the N-API function as an adapter only: convert JS inputs (`crate::js::into_string`), call the library inside `task::blocking(...)`, map errors with `Error::from_reason`. Preserve the existing JS-facing signature, defaults and error text exactly.\n5. Re-export from `rust-agent` (`harvest_omp::\u003Carea>`) if the Rust app needs it.\n6. Wire: workspace `Cargo.toml`, `Cargo.lock`, `pi-natives\u002FCargo.toml` dependency, Bazel `BUILD.bazel` targets, Rust CI package list.\n7. Verify: Rust tests (`cargo xtask test -p \u003Ccrate>`), `bun run build:native`, then diff generated bindings — revert the four known unrelated audio declaration lines (`AudioCapture.droppedChunks`, `AudioPlayback.queuedSamples` + comments) if they appear. Compare old vs new addon output on an oracle input set; run focused TS consumer tests.\n8. Continue with `\u002Frust-migration-slice` steps 5–7 (ledger, docs, commit).\n",{"name":5,"description":7},"main","27f0e9fb87c9d11afa27dc273ec5f85f09b1d111",".claude\u002Fskills\u002Fnapi-extract",1,"https:\u002F\u002Fgithub.com\u002FSanidhya14321\u002Fharvest","https:\u002F\u002Fgithub.com\u002FSanidhya14321","2026-11-09 10:21:13",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add Sanidhya14321\u002Fharvest --skill napi-extract",{"tool":37,"command":38},"bunx","bunx skills add Sanidhya14321\u002Fharvest --skill napi-extract",{"tool":40,"command":41},"pnpm","pnpm dlx skills add Sanidhya14321\u002Fharvest --skill napi-extract","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FSanidhya14321\u002Fharvest\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fnapi-extract\u002FSKILL.md",true,[],[46,53,60,67,73,80],{"skillNo":47,"name":48,"nameZh":6,"description":49,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":50,"categories":51,"keywords":52,"publishedAt":19},"01M7CFKZKK4FV8RFWADPXMQDV5","greet","A greeting skill for testing","https:\u002F\u002Fgithub.com\u002FSanidhya14321\u002Fharvest\u002Fblob\u002Fmain\u002Fpackages\u002Fcoding-agent\u002Ftest\u002Fmarketplace\u002Ffixtures\u002Fvalid-marketplace\u002Fplugins\u002Fhello-plugin\u002Fskills\u002Fgreet\u002FSKILL.md",[],[],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":19},"01M7CFKXZ61BGNTGEWJTMX5T9X","valid-skill","A valid skill for testing purposes.","https:\u002F\u002Fgithub.com\u002FSanidhya14321\u002Fharvest\u002Fblob\u002Fmain\u002Fpackages\u002Fcoding-agent\u002Ftest\u002Ffixtures\u002Fskills\u002Fvalid-skill\u002FSKILL.md",[],[],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":19},"01M7CFKWVZTM95KBG2QE1ZBMMC","unknown-field","A skill with an unknown frontmatter field.","https:\u002F\u002Fgithub.com\u002FSanidhya14321\u002Fharvest\u002Fblob\u002Fmain\u002Fpackages\u002Fcoding-agent\u002Ftest\u002Ffixtures\u002Fskills\u002Funknown-field\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":19},"01M7CFKW1MTHDP42M754WFH3Y1","no-frontmatter","https:\u002F\u002Fgithub.com\u002FSanidhya14321\u002Fharvest\u002Fblob\u002Fmain\u002Fpackages\u002Fcoding-agent\u002Ftest\u002Ffixtures\u002Fskills\u002Fno-frontmatter\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":19},"01M7CFKV3DBQDZEQTA3DNR38H8","child-skill","A nested skill in a subdirectory.","https:\u002F\u002Fgithub.com\u002FSanidhya14321\u002Fharvest\u002Fblob\u002Fmain\u002Fpackages\u002Fcoding-agent\u002Ftest\u002Ffixtures\u002Fskills\u002Fnested\u002Fchild-skill\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":19},"01M7CFKSZNTJ16H9YQ7370XKDB","different-name","A skill with a name that doesn't match the directory.","https:\u002F\u002Fgithub.com\u002FSanidhya14321\u002Fharvest\u002Fblob\u002Fmain\u002Fpackages\u002Fcoding-agent\u002Ftest\u002Ffixtures\u002Fskills\u002Fname-mismatch\u002FSKILL.md",[],[]]