[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6K09V992D89GB03PSWGCEZ8":3,"skill-same:01M6K09V992D89GB03PSWGCEZ8":53},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":28,"linkOnly":29,"markdownContent":30,"markdownBody":31,"frontMatter":32,"refName":33,"commitSha":34,"skillDirectory":35,"forksCount":13,"repositoryHtmlUrl":36,"repositoryHomepageUrl":6,"ownerHtmlUrl":37,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":38,"install":39,"resources":52},"01M6K09V992D89GB03PSWGCEZ8","implementing-jsc-classes-zig",null,"Creates JavaScript classes using Bun's Zig bindings generator (.classes.ts). Use when implementing new JS APIs in Zig with JSC integration.","sigitpoerwo\u002Frepoworkspace_zahra","sigitpoerwo","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F260207224?v=4","01M6K000PB6NA0N6SQ7VFMEAFZ","01M6K000V4N0CEHNPPQA9TNQNX",0,"MIT","https:\u002F\u002Fgithub.com\u002Fsigitpoerwo\u002Frepoworkspace_zahra\u002Fblob\u002Fmain\u002Fskills\u002F03-BELUM-DICOBA\u002Fdari-clawhub\u002Fimplementing-jsc-classes-zig\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27],"zig","implementing","implementing jsc classes zig","javascript","integration","js","use","bun","with","generator","2026-11-10 10:12:30",false,"---\nname: implementing-jsc-classes-zig\ndescription: Creates JavaScript classes using Bun's Zig bindings generator (.classes.ts). Use when implementing new JS APIs in Zig with JSC integration.\n---\n\n# Bun's JavaScriptCore Class Bindings Generator\n\nBridge JavaScript and Zig through `.classes.ts` definitions and Zig implementations.\n\n## Architecture\n\n1. **Zig Implementation** (.zig files)\n2. **JavaScript Interface Definition** (.classes.ts files)\n3. **Generated Code** (C++\u002FZig files connecting them)\n\n## Class Definition (.classes.ts)\n\n```typescript\ndefine({\n  name: \"TextDecoder\",\n  constructor: true,\n  JSType: \"object\",\n  finalize: true,\n  proto: {\n    decode: { args: 1 },\n    encoding: { getter: true, cache: true },\n    fatal: { getter: true },\n  },\n});\n```\n\nOptions:\n\n- `name`: Class name\n- `constructor`: Has public constructor\n- `JSType`: \"object\", \"function\", etc.\n- `finalize`: Needs cleanup\n- `proto`: Properties\u002Fmethods\n- `cache`: Cache property values via WriteBarrier\n\n## Zig Implementation\n\n```zig\npub const TextDecoder = struct {\n    pub const js = JSC.Codegen.JSTextDecoder;\n    pub const toJS = js.toJS;\n    pub const fromJS = js.fromJS;\n    pub const fromJSDirect = js.fromJSDirect;\n\n    encoding: []const u8,\n    fatal: bool,\n\n    pub fn constructor(\n        globalObject: *JSGlobalObject,\n        callFrame: *JSC.CallFrame,\n    ) bun.JSError!*TextDecoder {\n        return bun.new(TextDecoder, .{ .encoding = \"utf-8\", .fatal = false });\n    }\n\n    pub fn decode(\n        this: *TextDecoder,\n        globalObject: *JSGlobalObject,\n        callFrame: *JSC.CallFrame,\n    ) bun.JSError!JSC.JSValue {\n        const args = callFrame.arguments();\n        if (args.len \u003C 1 or args.ptr[0].isUndefinedOrNull()) {\n            return globalObject.throw(\"Input cannot be null\", .{});\n        }\n        return JSC.JSValue.jsString(globalObject, \"result\");\n    }\n\n    pub fn getEncoding(this: *TextDecoder, globalObject: *JSGlobalObject) JSC.JSValue {\n        return JSC.JSValue.createStringFromUTF8(globalObject, this.encoding);\n    }\n\n    fn deinit(this: *TextDecoder) void {\n        \u002F\u002F Release resources\n    }\n\n    pub fn finalize(this: *TextDecoder) void {\n        this.deinit();\n        bun.destroy(this);\n    }\n};\n```\n\n**Key patterns:**\n\n- Use `bun.JSError!JSValue` return type for error handling\n- Use `globalObject` not `ctx`\n- `deinit()` for cleanup, `finalize()` called by GC\n- Update `src\u002Fbun.js\u002Fbindings\u002Fgenerated_classes_list.zig`\n\n## CallFrame Access\n\n```zig\nconst args = callFrame.arguments();\nconst first_arg = args.ptr[0];  \u002F\u002F Access as slice\nconst argCount = args.len;\nconst thisValue = callFrame.thisValue();\n```\n\n## Property Caching\n\nFor `cache: true` properties, generated accessors:\n\n```zig\n\u002F\u002F Get cached value\npub fn encodingGetCached(thisValue: JSC.JSValue) ?JSC.JSValue {\n    const result = TextDecoderPrototype__encodingGetCachedValue(thisValue);\n    if (result == .zero) return null;\n    return result;\n}\n\n\u002F\u002F Set cached value\npub fn encodingSetCached(thisValue: JSC.JSValue, globalObject: *JSC.JSGlobalObject, value: JSC.JSValue) void {\n    TextDecoderPrototype__encodingSetCachedValue(thisValue, globalObject, value);\n}\n```\n\n## Error Handling\n\n```zig\npub fn method(this: *MyClass, globalObject: *JSGlobalObject, callFrame: *JSC.CallFrame) bun.JSError!JSC.JSValue {\n    const args = callFrame.arguments();\n    if (args.len \u003C 1) {\n        return globalObject.throw(\"Missing required argument\", .{});\n    }\n    return JSC.JSValue.jsString(globalObject, \"Success!\");\n}\n```\n\n## Memory Management\n\n```zig\npub fn deinit(this: *TextDecoder) void {\n    this._encoding.deref();\n    if (this.buffer) |buffer| {\n        bun.default_allocator.free(buffer);\n    }\n}\n\npub fn finalize(this: *TextDecoder) void {\n    JSC.markBinding(@src());\n    this.deinit();\n    bun.default_allocator.destroy(this);\n}\n```\n\n## Creating a New Binding\n\n1. Define interface in `.classes.ts`:\n\n```typescript\ndefine({\n  name: \"MyClass\",\n  constructor: true,\n  finalize: true,\n  proto: {\n    myMethod: { args: 1 },\n    myProperty: { getter: true, cache: true },\n  },\n});\n```\n\n2. Implement in `.zig`:\n\n```zig\npub const MyClass = struct {\n    pub const js = JSC.Codegen.JSMyClass;\n    pub const toJS = js.toJS;\n    pub const fromJS = js.fromJS;\n\n    value: []const u8,\n\n    pub const new = bun.TrivialNew(@This());\n\n    pub fn constructor(globalObject: *JSGlobalObject, callFrame: *JSC.CallFrame) bun.JSError!*MyClass {\n        return MyClass.new(.{ .value = \"\" });\n    }\n\n    pub fn myMethod(this: *MyClass, globalObject: *JSGlobalObject, callFrame: *JSC.CallFrame) bun.JSError!JSC.JSValue {\n        return JSC.JSValue.jsUndefined();\n    }\n\n    pub fn getMyProperty(this: *MyClass, globalObject: *JSGlobalObject) JSC.JSValue {\n        return JSC.JSValue.jsString(globalObject, this.value);\n    }\n\n    pub fn deinit(this: *MyClass) void {}\n\n    pub fn finalize(this: *MyClass) void {\n        this.deinit();\n        bun.destroy(this);\n    }\n};\n```\n\n3. Add to `src\u002Fbun.js\u002Fbindings\u002Fgenerated_classes_list.zig`\n\n## Generated Components\n\n- **C++ Classes**: `JSMyClass`, `JSMyClassPrototype`, `JSMyClassConstructor`\n- **Method Bindings**: `MyClassPrototype__myMethodCallback`\n- **Property Accessors**: `MyClassPrototype__myPropertyGetterWrap`\n- **Zig Bindings**: External function declarations, cached value accessors\n","# Bun's JavaScriptCore Class Bindings Generator\n\nBridge JavaScript and Zig through `.classes.ts` definitions and Zig implementations.\n\n## Architecture\n\n1. **Zig Implementation** (.zig files)\n2. **JavaScript Interface Definition** (.classes.ts files)\n3. **Generated Code** (C++\u002FZig files connecting them)\n\n## Class Definition (.classes.ts)\n\n```typescript\ndefine({\n  name: \"TextDecoder\",\n  constructor: true,\n  JSType: \"object\",\n  finalize: true,\n  proto: {\n    decode: { args: 1 },\n    encoding: { getter: true, cache: true },\n    fatal: { getter: true },\n  },\n});\n```\n\nOptions:\n\n- `name`: Class name\n- `constructor`: Has public constructor\n- `JSType`: \"object\", \"function\", etc.\n- `finalize`: Needs cleanup\n- `proto`: Properties\u002Fmethods\n- `cache`: Cache property values via WriteBarrier\n\n## Zig Implementation\n\n```zig\npub const TextDecoder = struct {\n    pub const js = JSC.Codegen.JSTextDecoder;\n    pub const toJS = js.toJS;\n    pub const fromJS = js.fromJS;\n    pub const fromJSDirect = js.fromJSDirect;\n\n    encoding: []const u8,\n    fatal: bool,\n\n    pub fn constructor(\n        globalObject: *JSGlobalObject,\n        callFrame: *JSC.CallFrame,\n    ) bun.JSError!*TextDecoder {\n        return bun.new(TextDecoder, .{ .encoding = \"utf-8\", .fatal = false });\n    }\n\n    pub fn decode(\n        this: *TextDecoder,\n        globalObject: *JSGlobalObject,\n        callFrame: *JSC.CallFrame,\n    ) bun.JSError!JSC.JSValue {\n        const args = callFrame.arguments();\n        if (args.len \u003C 1 or args.ptr[0].isUndefinedOrNull()) {\n            return globalObject.throw(\"Input cannot be null\", .{});\n        }\n        return JSC.JSValue.jsString(globalObject, \"result\");\n    }\n\n    pub fn getEncoding(this: *TextDecoder, globalObject: *JSGlobalObject) JSC.JSValue {\n        return JSC.JSValue.createStringFromUTF8(globalObject, this.encoding);\n    }\n\n    fn deinit(this: *TextDecoder) void {\n        \u002F\u002F Release resources\n    }\n\n    pub fn finalize(this: *TextDecoder) void {\n        this.deinit();\n        bun.destroy(this);\n    }\n};\n```\n\n**Key patterns:**\n\n- Use `bun.JSError!JSValue` return type for error handling\n- Use `globalObject` not `ctx`\n- `deinit()` for cleanup, `finalize()` called by GC\n- Update `src\u002Fbun.js\u002Fbindings\u002Fgenerated_classes_list.zig`\n\n## CallFrame Access\n\n```zig\nconst args = callFrame.arguments();\nconst first_arg = args.ptr[0];  \u002F\u002F Access as slice\nconst argCount = args.len;\nconst thisValue = callFrame.thisValue();\n```\n\n## Property Caching\n\nFor `cache: true` properties, generated accessors:\n\n```zig\n\u002F\u002F Get cached value\npub fn encodingGetCached(thisValue: JSC.JSValue) ?JSC.JSValue {\n    const result = TextDecoderPrototype__encodingGetCachedValue(thisValue);\n    if (result == .zero) return null;\n    return result;\n}\n\n\u002F\u002F Set cached value\npub fn encodingSetCached(thisValue: JSC.JSValue, globalObject: *JSC.JSGlobalObject, value: JSC.JSValue) void {\n    TextDecoderPrototype__encodingSetCachedValue(thisValue, globalObject, value);\n}\n```\n\n## Error Handling\n\n```zig\npub fn method(this: *MyClass, globalObject: *JSGlobalObject, callFrame: *JSC.CallFrame) bun.JSError!JSC.JSValue {\n    const args = callFrame.arguments();\n    if (args.len \u003C 1) {\n        return globalObject.throw(\"Missing required argument\", .{});\n    }\n    return JSC.JSValue.jsString(globalObject, \"Success!\");\n}\n```\n\n## Memory Management\n\n```zig\npub fn deinit(this: *TextDecoder) void {\n    this._encoding.deref();\n    if (this.buffer) |buffer| {\n        bun.default_allocator.free(buffer);\n    }\n}\n\npub fn finalize(this: *TextDecoder) void {\n    JSC.markBinding(@src());\n    this.deinit();\n    bun.default_allocator.destroy(this);\n}\n```\n\n## Creating a New Binding\n\n1. Define interface in `.classes.ts`:\n\n```typescript\ndefine({\n  name: \"MyClass\",\n  constructor: true,\n  finalize: true,\n  proto: {\n    myMethod: { args: 1 },\n    myProperty: { getter: true, cache: true },\n  },\n});\n```\n\n2. Implement in `.zig`:\n\n```zig\npub const MyClass = struct {\n    pub const js = JSC.Codegen.JSMyClass;\n    pub const toJS = js.toJS;\n    pub const fromJS = js.fromJS;\n\n    value: []const u8,\n\n    pub const new = bun.TrivialNew(@This());\n\n    pub fn constructor(globalObject: *JSGlobalObject, callFrame: *JSC.CallFrame) bun.JSError!*MyClass {\n        return MyClass.new(.{ .value = \"\" });\n    }\n\n    pub fn myMethod(this: *MyClass, globalObject: *JSGlobalObject, callFrame: *JSC.CallFrame) bun.JSError!JSC.JSValue {\n        return JSC.JSValue.jsUndefined();\n    }\n\n    pub fn getMyProperty(this: *MyClass, globalObject: *JSGlobalObject) JSC.JSValue {\n        return JSC.JSValue.jsString(globalObject, this.value);\n    }\n\n    pub fn deinit(this: *MyClass) void {}\n\n    pub fn finalize(this: *MyClass) void {\n        this.deinit();\n        bun.destroy(this);\n    }\n};\n```\n\n3. Add to `src\u002Fbun.js\u002Fbindings\u002Fgenerated_classes_list.zig`\n\n## Generated Components\n\n- **C++ Classes**: `JSMyClass`, `JSMyClassPrototype`, `JSMyClassConstructor`\n- **Method Bindings**: `MyClassPrototype__myMethodCallback`\n- **Property Accessors**: `MyClassPrototype__myPropertyGetterWrap`\n- **Zig Bindings**: External function declarations, cached value accessors\n",{"name":5,"description":7},"main","000d804ba753926ec0eca35be68bdb42da72c672","skills\u002F03-BELUM-DICOBA\u002Fdari-clawhub\u002Fimplementing-jsc-classes-zig","https:\u002F\u002Fgithub.com\u002Fsigitpoerwo\u002Frepoworkspace_zahra","https:\u002F\u002Fgithub.com\u002Fsigitpoerwo","2026-04-05 09:27:05",{"source":8,"skillName":5,"commands":40,"prompt":50,"zipAvailable":51},[41,44,47],{"tool":42,"command":43},"npx","npx skills add sigitpoerwo\u002Frepoworkspace_zahra --skill implementing-jsc-classes-zig",{"tool":45,"command":46},"bunx","bunx skills add sigitpoerwo\u002Frepoworkspace_zahra --skill implementing-jsc-classes-zig",{"tool":48,"command":49},"pnpm","pnpm dlx skills add sigitpoerwo\u002Frepoworkspace_zahra --skill implementing-jsc-classes-zig","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fsigitpoerwo\u002Frepoworkspace_zahra\u002Fblob\u002Fmain\u002Fskills\u002F03-BELUM-DICOBA\u002Fdari-clawhub\u002Fimplementing-jsc-classes-zig\u002FSKILL.md",true,[],[54,81,103,119,125,131],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":28},"01M6K0FJ41XMDT72PK0E3ZJF9P","zahra-workspace-manager","Comprehensive workspace management skill for Zahra Maurita's development environment. Use when managing projects across 8 divisions (Web, App, AI Agent, Bot, Content, Marketing, Research, Business), organizing files, tracking progress, managing memory, or coordinating multi-domain work. Triggers on mentions of workspace organization, project management, division-specific tasks, memory updates, or cross-domain coordination.","https:\u002F\u002Fgithub.com\u002Fsigitpoerwo\u002Frepoworkspace_zahra\u002Fblob\u002Fmain\u002Fskills\u002Fzahra-workspace-manager\u002FSKILL.md",[],[61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80],"workspace","workspace manager","manager","zahra workspace manager","work","updates","progress","app","project","across","multi-domain","files","command","coordination","projects","search","tasks","ai agent","memory","bot",{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":28},"01M6K0FBZYXG5M8VBW5R6TPKEP","tinyfish","AI-powered web automation using TinyFish Web Agent. Use when you need to scrape data from websites, automate form filling, extract structured information, or perform any web-based task using natural language instructions. Works with any website including those with JavaScript, dynamic content, and bot protection.","https:\u002F\u002Fgithub.com\u002Fsigitpoerwo\u002Frepoworkspace_zahra\u002Fblob\u002Fmain\u002Fskills\u002F05-CUSTOM-SKILLS\u002Ftinyfish\u002FSKILL.md",[],[83,26,88,89,90,91,92,93,94,95,24,96,97,80,98,99,100,21,101,102],"natural language","web automation","form","information","scrape","task","language","protection","instructions","automate","you","website","web","automation","data",{"skillNo":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":28},"01M6K0F57WDT62QNXTTC6YS34D","tinyfish-openclaw","TinyFish Web Agent integration for OpenClaw. Use this skill to scrape websites, automate web tasks, extract structured data, and perform browser automation using natural language. Works seamlessly with OpenClaw's MCP protocol.","https:\u002F\u002Fgithub.com\u002Fsigitpoerwo\u002Frepoworkspace_zahra\u002Fblob\u002Fmain\u002Fskills\u002F05-CUSTOM-SKILLS\u002Ftinyfish-openclaw\u002FSKILL.md",[],[83,110,111,101,112,113,114,100,97,115,26,88,24,92,102,22,116,117,118,77],"openclaw","tinyfish openclaw","structured data","browser automation","MCP","for","mcp protocol","browser","protocol",{"skillNo":120,"name":121,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":122,"categories":123,"keywords":124,"publishedAt":28},"01M6K0E9ZWFTG44SK6G2ARS39Z","autoresearchclaw","https:\u002F\u002Fgithub.com\u002Fsigitpoerwo\u002Frepoworkspace_zahra\u002Fblob\u002Fmain\u002Fskills\u002F05-CUSTOM-SKILLS\u002Fautoresearchclaw\u002FSKILL.md",[],[121],{"skillNo":126,"name":127,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":128,"categories":129,"keywords":130,"publishedAt":28},"01M6K0E6ZAEJFYDXM4GANCKZY0","researchclaw","https:\u002F\u002Fgithub.com\u002Fsigitpoerwo\u002Frepoworkspace_zahra\u002Fblob\u002Fmain\u002Fskills\u002F05-CUSTOM-SKILLS\u002Fautoresearchclaw\u002F.claude\u002Fskills\u002Fresearchclaw\u002FSKILL.md",[],[127],{"skillNo":132,"name":133,"nameZh":6,"description":134,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":135,"categories":136,"keywords":137,"publishedAt":28},"01M6K0E1B6RZ8T2S7RMWQ6BVWW","academic-research-assistant","Research assistant for management & digital business academics - literature review, paper analysis, citation management, research methodology","https:\u002F\u002Fgithub.com\u002Fsigitpoerwo\u002Frepoworkspace_zahra\u002Fblob\u002Fmain\u002Fskills\u002F05-CUSTOM-SKILLS\u002Facademic-research-assistant\u002FSKILL.md",[],[138,139,140,141,142,143,115,144,145,146,147,148,149,150,151,152,153,154],"research assistant","academic research assistant","Academic","assistant","research","paper analysis","literature","paper","Citation","research methodology","business","management","literature review","analysis","citation management","methodology","review"]