[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75ENTPKSWGB7E7D7FSC6E2Q":3,"skill-same:01M75ENTPKSWGB7E7D7FSC6E2Q":81},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":28,"commitSha":29,"skillDirectory":30,"forksCount":31,"repositoryHtmlUrl":32,"repositoryHomepageUrl":33,"ownerHtmlUrl":34,"ownerBlogUrl":35,"ownerDescription":6,"updatedAt":36,"install":37,"resources":50},"01M75ENTPKSWGB7E7D7FSC6E2Q","insforge-integrations",null,"Use when wiring an external auth provider (Clerk, Auth0, WorkOS, Kinde, Stytch, Better Auth) into InsForge for JWT-based RLS, or when adding the OKX x402 payment facilitator for onchain pay-per-use billing.","agisota\u002Fold-one","agisota","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F121413592?v=4","01M75B4BRNT67EC1NDRT8QZEP2","01M75B4BS7QR9VP580MSCPTS3X",3,"MIT","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Finsforge-integrations\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: insforge-integrations\ndescription: >-\n  Use when wiring an external auth provider (Clerk, Auth0, WorkOS, Kinde,\n  Stytch, Better Auth) into InsForge for JWT-based RLS, or when adding the\n  OKX x402 payment facilitator for onchain pay-per-use billing.\nlicense: MIT\nmetadata:\n  author: insforge\n  version: \"1.2.0\"\n  organization: InsForge\n  date: April 2026\n---\n\n# InsForge Integrations\n\nThis skill covers integrating **third-party providers** with InsForge. Currently two categories are supported: **auth providers** (RLS via JWT claims) and **payment facilitators** (x402 HTTP payment protocol). Each provider has its own guide under this directory.\n\n## Auth Providers\n\n| Provider | Guide | When to use |\n|----------|-------|-------------|\n| [Clerk](references\u002Fclerk.md) | Clerk JWT Templates + InsForge RLS | Clerk signs tokens directly via JWT Template — no server-side signing needed |\n| [Auth0](references\u002Fauth0.md) | Auth0 Actions + InsForge RLS | Auth0 uses a post-login Action to embed claims into the access token |\n| [WorkOS](references\u002Fworkos.md) | WorkOS AuthKit + InsForge RLS | WorkOS AuthKit middleware + server-side JWT signing with `jsonwebtoken` |\n| [Kinde](references\u002Fkinde.md) | Kinde + InsForge RLS | Kinde token customization for InsForge integration |\n| [Stytch](references\u002Fstytch.md) | Stytch + InsForge RLS | Stytch session tokens for InsForge integration |\n| [Better Auth](references\u002Fbetter-auth.md) | Better Auth + InsForge RLS | Self-hosted auth running in your InsForge Postgres — no third-party SaaS, no per-MAU cost |\n\n## Payment Facilitators\n\n| Provider | Guide | When to use |\n|----------|-------|-------------|\n| [OKX x402](references\u002Fokx-x402.md) | OKX as x402 facilitator (USDG on X Layer) | Pay-per-use HTTP endpoints settled onchain with zero gas for the payer |\n\n## Common Patterns\n\n### Auth providers\n1. **Provider signs or issues a JWT** containing the user's ID\n2. **JWT is passed to InsForge** via `edgeFunctionToken` in `createClient()`\n3. **InsForge extracts claims** via `request.jwt.claims` in SQL\n4. **RLS policies** use a `requesting_user_id()` function to enforce row-level security\n\n### Payment facilitators (x402)\n1. **Server returns `402 Payment Required`** with a JSON challenge base64-encoded in `PAYMENT-REQUIRED` header\n2. **Client signs an EIP-3009 authorization** using the stablecoin's EIP-712 domain\n3. **Server forwards the signed payload** to the facilitator's `\u002Fverify` + `\u002Fsettle` endpoints\n4. **Server records the settled payment** in an InsForge table with a realtime trigger for live dashboards\n\n## Choosing a Provider\n\n**Auth**\n- **Clerk** — Simplest setup; JWT Template handles signing, no server code needed\n- **Auth0** — Flexible; uses post-login Actions for claim injection\n- **WorkOS** — Enterprise-focused; AuthKit middleware + server-side JWT signing\n- **Kinde** — Developer-friendly; built-in token customization\n- **Stytch** — API-first; session-based token flow\n- **Better Auth** — Self-hosted in your Postgres; no SaaS vendor; you own the user table. Pairs cleanly with InsForge's Postgres via a connection string + a small bridge route. Requires a one-time `REVOKE` after migrate to seal PostgREST exposure.\n\n**Payment facilitators**\n- **OKX x402** — Onchain pay-per-use via USDG on X Layer; zero gas for the payer\n\n## Setup\n\n1. Identify which provider the project uses\n2. Read the corresponding reference guide from the tables above\n3. Follow the provider-specific setup steps\n\n## Usage Examples\n\nEach provider guide includes full code examples for:\n- Provider dashboard configuration (API keys, application settings, etc.)\n- Server and client code (JWT utilities for auth; facilitator client + signing utilities for payments)\n- Database setup (RLS for auth; payment table + realtime trigger for payments)\n- Environment variable setup\n\nRefer to the specific `references\u002F\u003Cprovider>.md` file for complete examples.\n\n## Best Practices\n\n**Auth**\n- All auth provider user IDs are strings (not UUIDs) — always use `TEXT` columns for `user_id`\n- Use `requesting_user_id()` instead of `auth.uid()` for RLS policies\n- Set `edgeFunctionToken` as an async function (Clerk) or server-signed JWT (Auth0, WorkOS, Kinde, Stytch)\n- Always get the JWT secret via `npx @insforge\u002Fcli secrets get JWT_SECRET`\n\n**Payment facilitators (x402)**\n- Always check the result of the database `insert(...)` after settlement — settlement takes money onchain before the insert runs; a silent DB failure loses the record\n- Add `UNIQUE` to the `tx_hash` column to prevent duplicate records from retries\n- Verify EIP-712 domain (`name`, `version`) against the token contract's on-chain `DOMAIN_SEPARATOR` — wrong values produce `Invalid Authority` errors\n- Use a `MOCK_OKX_FACILITATOR` env flag for local dev so the full flow can be exercised without real funds\n\n## Common Mistakes\n\n**Auth**\n\n| Mistake | Solution |\n|---------|----------|\n| Using `auth.uid()` for RLS | Use `requesting_user_id()` — third-party IDs are strings, not UUIDs |\n| Using UUID columns for `user_id` | Use `TEXT` — all supported providers use string-format IDs |\n| Hardcoding the JWT secret | Always retrieve via `npx @insforge\u002Fcli secrets get JWT_SECRET` |\n| Missing `requesting_user_id()` function | Must be created before RLS policies will work |\n\n**Payments (x402)**\n\n| Mistake | Solution |\n|---------|----------|\n| Using an OKX exchange trading API key | Create a separate Web3 API key at `web3.okx.com\u002Fonchainos\u002Fdev-portal` |\n| Wrong EIP-712 domain values | Read the token contract's `DOMAIN_SEPARATOR` — for USDG on X Layer use `name: \"Global Dollar\"`, `version: \"1\"` |\n| Ignoring DB insert error after settlement | Always destructure `{ error }` and log\u002Fhandle it — money has already moved |\n| `MOCK_OKX_FACILITATOR=true` in production | Mock mode is demo-only; it returns fake tx hashes and bypasses verification |\n","# InsForge Integrations\n\nThis skill covers integrating **third-party providers** with InsForge. Currently two categories are supported: **auth providers** (RLS via JWT claims) and **payment facilitators** (x402 HTTP payment protocol). Each provider has its own guide under this directory.\n\n## Auth Providers\n\n| Provider | Guide | When to use |\n|----------|-------|-------------|\n| [Clerk](references\u002Fclerk.md) | Clerk JWT Templates + InsForge RLS | Clerk signs tokens directly via JWT Template — no server-side signing needed |\n| [Auth0](references\u002Fauth0.md) | Auth0 Actions + InsForge RLS | Auth0 uses a post-login Action to embed claims into the access token |\n| [WorkOS](references\u002Fworkos.md) | WorkOS AuthKit + InsForge RLS | WorkOS AuthKit middleware + server-side JWT signing with `jsonwebtoken` |\n| [Kinde](references\u002Fkinde.md) | Kinde + InsForge RLS | Kinde token customization for InsForge integration |\n| [Stytch](references\u002Fstytch.md) | Stytch + InsForge RLS | Stytch session tokens for InsForge integration |\n| [Better Auth](references\u002Fbetter-auth.md) | Better Auth + InsForge RLS | Self-hosted auth running in your InsForge Postgres — no third-party SaaS, no per-MAU cost |\n\n## Payment Facilitators\n\n| Provider | Guide | When to use |\n|----------|-------|-------------|\n| [OKX x402](references\u002Fokx-x402.md) | OKX as x402 facilitator (USDG on X Layer) | Pay-per-use HTTP endpoints settled onchain with zero gas for the payer |\n\n## Common Patterns\n\n### Auth providers\n1. **Provider signs or issues a JWT** containing the user's ID\n2. **JWT is passed to InsForge** via `edgeFunctionToken` in `createClient()`\n3. **InsForge extracts claims** via `request.jwt.claims` in SQL\n4. **RLS policies** use a `requesting_user_id()` function to enforce row-level security\n\n### Payment facilitators (x402)\n1. **Server returns `402 Payment Required`** with a JSON challenge base64-encoded in `PAYMENT-REQUIRED` header\n2. **Client signs an EIP-3009 authorization** using the stablecoin's EIP-712 domain\n3. **Server forwards the signed payload** to the facilitator's `\u002Fverify` + `\u002Fsettle` endpoints\n4. **Server records the settled payment** in an InsForge table with a realtime trigger for live dashboards\n\n## Choosing a Provider\n\n**Auth**\n- **Clerk** — Simplest setup; JWT Template handles signing, no server code needed\n- **Auth0** — Flexible; uses post-login Actions for claim injection\n- **WorkOS** — Enterprise-focused; AuthKit middleware + server-side JWT signing\n- **Kinde** — Developer-friendly; built-in token customization\n- **Stytch** — API-first; session-based token flow\n- **Better Auth** — Self-hosted in your Postgres; no SaaS vendor; you own the user table. Pairs cleanly with InsForge's Postgres via a connection string + a small bridge route. Requires a one-time `REVOKE` after migrate to seal PostgREST exposure.\n\n**Payment facilitators**\n- **OKX x402** — Onchain pay-per-use via USDG on X Layer; zero gas for the payer\n\n## Setup\n\n1. Identify which provider the project uses\n2. Read the corresponding reference guide from the tables above\n3. Follow the provider-specific setup steps\n\n## Usage Examples\n\nEach provider guide includes full code examples for:\n- Provider dashboard configuration (API keys, application settings, etc.)\n- Server and client code (JWT utilities for auth; facilitator client + signing utilities for payments)\n- Database setup (RLS for auth; payment table + realtime trigger for payments)\n- Environment variable setup\n\nRefer to the specific `references\u002F\u003Cprovider>.md` file for complete examples.\n\n## Best Practices\n\n**Auth**\n- All auth provider user IDs are strings (not UUIDs) — always use `TEXT` columns for `user_id`\n- Use `requesting_user_id()` instead of `auth.uid()` for RLS policies\n- Set `edgeFunctionToken` as an async function (Clerk) or server-signed JWT (Auth0, WorkOS, Kinde, Stytch)\n- Always get the JWT secret via `npx @insforge\u002Fcli secrets get JWT_SECRET`\n\n**Payment facilitators (x402)**\n- Always check the result of the database `insert(...)` after settlement — settlement takes money onchain before the insert runs; a silent DB failure loses the record\n- Add `UNIQUE` to the `tx_hash` column to prevent duplicate records from retries\n- Verify EIP-712 domain (`name`, `version`) against the token contract's on-chain `DOMAIN_SEPARATOR` — wrong values produce `Invalid Authority` errors\n- Use a `MOCK_OKX_FACILITATOR` env flag for local dev so the full flow can be exercised without real funds\n\n## Common Mistakes\n\n**Auth**\n\n| Mistake | Solution |\n|---------|----------|\n| Using `auth.uid()` for RLS | Use `requesting_user_id()` — third-party IDs are strings, not UUIDs |\n| Using UUID columns for `user_id` | Use `TEXT` — all supported providers use string-format IDs |\n| Hardcoding the JWT secret | Always retrieve via `npx @insforge\u002Fcli secrets get JWT_SECRET` |\n| Missing `requesting_user_id()` function | Must be created before RLS policies will work |\n\n**Payments (x402)**\n\n| Mistake | Solution |\n|---------|----------|\n| Using an OKX exchange trading API key | Create a separate Web3 API key at `web3.okx.com\u002Fonchainos\u002Fdev-portal` |\n| Wrong EIP-712 domain values | Read the token contract's `DOMAIN_SEPARATOR` — for USDG on X Layer use `name: \"Global Dollar\"`, `version: \"1\"` |\n| Ignoring DB insert error after settlement | Always destructure `{ error }` and log\u002Fhandle it — money has already moved |\n| `MOCK_OKX_FACILITATOR=true` in production | Mock mode is demo-only; it returns fake tx hashes and bypasses verification |\n",{"name":5,"license":14,"metadata":23,"description":7},{"date":24,"author":25,"version":26,"organization":27},"April 2026","insforge","1.2.0","InsForge","main","f37de8f681f0c0ca0e0ebab6e5fddf764ca7553d","skills\u002Finsforge-integrations",1,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one","https:\u002F\u002Fagisota.github.io\u002Fold-one\u002F","https:\u002F\u002Fgithub.com\u002Fagisota","pzd.world","2026-07-04 22:32:06",{"source":8,"skillName":5,"commands":38,"prompt":48,"zipAvailable":49},[39,42,45],{"tool":40,"command":41},"npx","npx skills add agisota\u002Fold-one --skill insforge-integrations",{"tool":43,"command":44},"bunx","bunx skills add agisota\u002Fold-one --skill insforge-integrations",{"tool":46,"command":47},"pnpm","pnpm dlx skills add agisota\u002Fold-one --skill insforge-integrations","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Finsforge-integrations\u002FSKILL.md",true,[51,57,61,65,69,73,77],{"path":52,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":55,"sourceHtmlUrl":56},"references\u002Fauth0.md","REFERENCE","参考文档",6625,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Finsforge-integrations\u002Freferences\u002Fauth0.md",{"path":58,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":59,"sourceHtmlUrl":60},"references\u002Fbetter-auth.md",33289,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Finsforge-integrations\u002Freferences\u002Fbetter-auth.md",{"path":62,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":63,"sourceHtmlUrl":64},"references\u002Fclerk.md",7343,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Finsforge-integrations\u002Freferences\u002Fclerk.md",{"path":66,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":67,"sourceHtmlUrl":68},"references\u002Fkinde.md",4846,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Finsforge-integrations\u002Freferences\u002Fkinde.md",{"path":70,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":71,"sourceHtmlUrl":72},"references\u002Fokx-x402.md",38745,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Finsforge-integrations\u002Freferences\u002Fokx-x402.md",{"path":74,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":75,"sourceHtmlUrl":76},"references\u002Fstytch.md",7744,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Finsforge-integrations\u002Freferences\u002Fstytch.md",{"path":78,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":79,"sourceHtmlUrl":80},"references\u002Fworkos.md",5626,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Finsforge-integrations\u002Freferences\u002Fworkos.md",[82,89,96,105,112,119],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":18},"01M75KRGZWQWE9JDBS6RX42NWV","zoom-out","Tell the agent to zoom out and give broader context or a higher-level perspective. Use when you're unfamiliar with a section of code or need to understand how it fits into the bigger picture.","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fzoom-out\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":18},"01M75KRCZHKE0ZYAQFFYHS0YNP","zeroize-audit","Detects missing zeroization of sensitive data in source code and identifies zeroization removed by compiler optimizations, with assembly-level analysis, and control-flow verification. Use for auditing C\u002FC++\u002FRust code handling secrets, keys, passwords, or other sensitive data.","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fzeroize-audit\u002FSKILL.md",[],[],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":100,"licenseFileUrl":101,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":18},"01M75KR94KYQ30DTE1P9WNDAE0","yeet","Use only when the user explicitly asks to stage, commit, push, and open a GitHub pull request in one flow using the GitHub CLI (`gh`).","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fyeet\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fyeet\u002FSKILL.md",[],[],{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":18},"01M75KR3H13YJ9QHMD49818FA1","yara-rule-authoring","Guides authoring of high-quality YARA-X detection rules for malware identification. Use when writing, reviewing, or optimizing YARA rules. Covers naming conventions, string selection, performance optimization, migration from legacy YARA, and false positive reduction. Triggers on: YARA, YARA-X, malware detection, threat hunting, IOC, signature, crx module, dex module.","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fyara-rule-authoring\u002FSKILL.md",[],[],{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":18},"01M75KQMPY8A4Y8XTDD2DT0M9T","x-twitter-growth","X\u002FTwitter growth engine for building audience, crafting viral content, and analyzing engagement. Use when the user wants to grow on X\u002FTwitter, write tweets or threads, analyze their X profile, research competitors on X, plan a posting strategy, or optimize engagement. Complements social-content (generic multi-platform) with X-specific depth: algorithm mechanics, thread engineering, reply strategy, profile optimization, and competitive intelligence via web search.","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fx-twitter-growth\u002FSKILL.md",[],[],{"skillNo":120,"name":121,"nameZh":6,"description":122,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":123,"categories":124,"keywords":125,"publishedAt":18},"01M75KQHNZ0ANZNJGZY6M8MDAK","x-api","X\u002FTwitter API integration for posting tweets, threads, reading timelines, search, and analytics. Covers OAuth auth patterns, rate limits, and platform-native content posting. Use when the user wants to interact with X programmatically.","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fx-api\u002FSKILL.md",[],[]]