[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M790GDPEXK7PB9FS17S1QXNF":3,"skill-same:01M790GDPEXK7PB9FS17S1QXNF":56},{"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":33,"commitSha":34,"skillDirectory":35,"forksCount":36,"repositoryHtmlUrl":37,"repositoryHomepageUrl":6,"ownerHtmlUrl":38,"ownerBlogUrl":39,"ownerDescription":40,"updatedAt":41,"install":42,"resources":55},"01M790GDPEXK7PB9FS17S1QXNF","flyio-sdk-patterns",null,"Apply production-ready Fly.io Machines API patterns for TypeScript with typed\nclients, machine lifecycle management, and multi-region orchestration.\nTrigger: \"fly.io Machines API\", \"fly.io SDK patterns\", \"fly.io API client\".","jukeyman\u002Fjukeyman-skills","jukeyman","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F142960420?v=4","01M78FR4Y3DHMMCBCC0GXXNB3F","RICK JEFFERSON","01M78FR4Z8RVQRAD31Y5J7V6EB",1,"MIT","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsaas-packs--flyio-pack--flyio-sdk-patterns\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: flyio-sdk-patterns\ndescription: |\n  Apply production-ready Fly.io Machines API patterns for TypeScript with typed\n  clients, machine lifecycle management, and multi-region orchestration.\n  Trigger: \"fly.io Machines API\", \"fly.io SDK patterns\", \"fly.io API client\".\nallowed-tools: Read, Write, Edit\nversion: 1.0.0\nlicense: MIT\nauthor: Jeremy Longshore \u003Cjeremy@intentsolutions.io>\ntags: [saas, edge-compute, flyio]\ncompatible-with: claude-code\n---\n\n# Fly.io SDK Patterns\n\n## Overview\nProduction-ready patterns for the Fly.io Machines REST API at `https:\u002F\u002Fapi.machines.dev`. Fly.io exposes both GraphQL (organization queries) and REST (machine lifecycle) APIs. The Machines REST API is the primary integration surface for creating, starting, stopping, and destroying VMs across 30+ global regions. A structured client ensures consistent auth, typed machine states, and reliable wait-for-state polling.\n\n## Singleton Client\n```typescript\nconst FLY_API = 'https:\u002F\u002Fapi.machines.dev';\nlet _client: FlyClient | null = null;\nexport function getClient(appName: string): FlyClient {\n  if (!_client) {\n    const token = process.env.FLY_API_TOKEN;\n    if (!token) throw new Error('FLY_API_TOKEN must be set');\n    _client = new FlyClient(appName, token);\n  }\n  return _client;\n}\nclass FlyClient {\n  private h: Record\u003Cstring, string>;\n  constructor(private app: string, token: string) {\n    this.h = { 'Authorization': `Bearer ${token}`, 'Content-Type': 'application\u002Fjson' };\n  }\n  async listMachines(): Promise\u003CFlyMachine[]> {\n    const r = await fetch(`${FLY_API}\u002Fv1\u002Fapps\u002F${this.app}\u002Fmachines`, { headers: this.h });\n    if (!r.ok) throw new FlyError(r.status, await r.text()); return r.json();\n  }\n  async createMachine(config: MachineConfig, region: string): Promise\u003CFlyMachine> {\n    const r = await fetch(`${FLY_API}\u002Fv1\u002Fapps\u002F${this.app}\u002Fmachines`, {\n      method: 'POST', headers: this.h, body: JSON.stringify({ region, config }) });\n    if (!r.ok) throw new FlyError(r.status, await r.text()); return r.json();\n  }\n  async waitForState(id: string, state: string, timeout = 30): Promise\u003Cvoid> {\n    const r = await fetch(`${FLY_API}\u002Fv1\u002Fapps\u002F${this.app}\u002Fmachines\u002F${id}\u002Fwait?state=${state}&timeout=${timeout}`,\n      { headers: this.h });\n    if (!r.ok) throw new FlyError(r.status, `Wait for ${state} timed out`);\n  }\n}\n```\n\n## Error Wrapper\n```typescript\nexport class FlyError extends Error {\n  constructor(public status: number, message: string) { super(message); this.name = 'FlyError'; }\n}\nexport async function safeCall\u003CT>(operation: string, fn: () => Promise\u003CT>): Promise\u003CT> {\n  try { return await fn(); }\n  catch (err: any) {\n    if (err instanceof FlyError && err.status === 429) { await new Promise(r => setTimeout(r, 2000)); return fn(); }\n    if (err instanceof FlyError && err.status === 401) throw new FlyError(401, 'Invalid FLY_API_TOKEN');\n    throw new FlyError(err.status ?? 0, `${operation} failed: ${err.message}`);\n  }\n}\n```\n\n## Request Builder\n```typescript\nclass DeployBuilder {\n  private regions: string[] = []; private config: Partial\u003CMachineConfig> = {};\n  toRegions(...r: string[]) { this.regions = r; return this; }\n  withImage(img: string) { this.config.image = img; return this; }\n  withGuest(cpus: number, mem: number) { this.config.guest = { cpu_kind: 'shared', cpus, memory_mb: mem }; return this; }\n  async execute(client: FlyClient): Promise\u003CFlyMachine[]> {\n    return Promise.all(this.regions.map(async r => {\n      const m = await client.createMachine(this.config as MachineConfig, r);\n      await client.waitForState(m.id, 'started'); return m;\n    }));\n  }\n}\n\u002F\u002F Usage: await new DeployBuilder().toRegions('iad','lhr','nrt').withImage('app:latest').withGuest(1,256).execute(client);\n```\n\n## Response Types\n```typescript\ntype MachineState = 'created' | 'starting' | 'started' | 'stopping' | 'stopped' | 'destroying' | 'destroyed';\ninterface FlyMachine {\n  id: string; name: string; state: MachineState; region: string;\n  config: MachineConfig; created_at: string; updated_at: string;\n}\ninterface MachineConfig {\n  image: string; guest: { cpu_kind: string; cpus: number; memory_mb: number };\n  services: Array\u003C{ ports: Array\u003C{ port: number; handlers: string[] }>; internal_port: number }>;\n  env: Record\u003Cstring, string>;\n}\ninterface FlyVolume { id: string; name: string; region: string; size_gb: number; attached_machine_id: string | null; }\n```\n\n## Testing Utilities\n```typescript\nexport function mockMachine(overrides: Partial\u003CFlyMachine> = {}): FlyMachine {\n  return { id: 'mach-001', name: 'test-machine', state: 'started', region: 'iad',\n    config: { image: 'app:latest', guest: { cpu_kind: 'shared', cpus: 1, memory_mb: 256 }, services: [], env: {} },\n    created_at: '2025-01-01T00:00:00Z', updated_at: '2025-01-01T00:00:00Z', ...overrides };\n}\n```\n\n## Error Handling\n| Pattern | When to Use | Example |\n|---------|-------------|---------|\n| `safeCall` wrapper | All Machines API calls | Catches network + API errors uniformly |\n| Retry on 429 | Bulk machine creation | 2s delay before retry |\n| `waitForState` timeout | After create\u002Fstart\u002Fstop | Prevents hanging deploys |\n| Region fallback | Multi-region deploy failure | Skip failed region, continue others |\n\n## Resources\n- [Machines API Reference](https:\u002F\u002Ffly.io\u002Fdocs\u002Fmachines\u002Fapi\u002Fmachines-resource\u002F)\n\n## Next Steps\nApply patterns in `flyio-core-workflow-a`.\n","# Fly.io SDK Patterns\n\n## Overview\nProduction-ready patterns for the Fly.io Machines REST API at `https:\u002F\u002Fapi.machines.dev`. Fly.io exposes both GraphQL (organization queries) and REST (machine lifecycle) APIs. The Machines REST API is the primary integration surface for creating, starting, stopping, and destroying VMs across 30+ global regions. A structured client ensures consistent auth, typed machine states, and reliable wait-for-state polling.\n\n## Singleton Client\n```typescript\nconst FLY_API = 'https:\u002F\u002Fapi.machines.dev';\nlet _client: FlyClient | null = null;\nexport function getClient(appName: string): FlyClient {\n  if (!_client) {\n    const token = process.env.FLY_API_TOKEN;\n    if (!token) throw new Error('FLY_API_TOKEN must be set');\n    _client = new FlyClient(appName, token);\n  }\n  return _client;\n}\nclass FlyClient {\n  private h: Record\u003Cstring, string>;\n  constructor(private app: string, token: string) {\n    this.h = { 'Authorization': `Bearer ${token}`, 'Content-Type': 'application\u002Fjson' };\n  }\n  async listMachines(): Promise\u003CFlyMachine[]> {\n    const r = await fetch(`${FLY_API}\u002Fv1\u002Fapps\u002F${this.app}\u002Fmachines`, { headers: this.h });\n    if (!r.ok) throw new FlyError(r.status, await r.text()); return r.json();\n  }\n  async createMachine(config: MachineConfig, region: string): Promise\u003CFlyMachine> {\n    const r = await fetch(`${FLY_API}\u002Fv1\u002Fapps\u002F${this.app}\u002Fmachines`, {\n      method: 'POST', headers: this.h, body: JSON.stringify({ region, config }) });\n    if (!r.ok) throw new FlyError(r.status, await r.text()); return r.json();\n  }\n  async waitForState(id: string, state: string, timeout = 30): Promise\u003Cvoid> {\n    const r = await fetch(`${FLY_API}\u002Fv1\u002Fapps\u002F${this.app}\u002Fmachines\u002F${id}\u002Fwait?state=${state}&timeout=${timeout}`,\n      { headers: this.h });\n    if (!r.ok) throw new FlyError(r.status, `Wait for ${state} timed out`);\n  }\n}\n```\n\n## Error Wrapper\n```typescript\nexport class FlyError extends Error {\n  constructor(public status: number, message: string) { super(message); this.name = 'FlyError'; }\n}\nexport async function safeCall\u003CT>(operation: string, fn: () => Promise\u003CT>): Promise\u003CT> {\n  try { return await fn(); }\n  catch (err: any) {\n    if (err instanceof FlyError && err.status === 429) { await new Promise(r => setTimeout(r, 2000)); return fn(); }\n    if (err instanceof FlyError && err.status === 401) throw new FlyError(401, 'Invalid FLY_API_TOKEN');\n    throw new FlyError(err.status ?? 0, `${operation} failed: ${err.message}`);\n  }\n}\n```\n\n## Request Builder\n```typescript\nclass DeployBuilder {\n  private regions: string[] = []; private config: Partial\u003CMachineConfig> = {};\n  toRegions(...r: string[]) { this.regions = r; return this; }\n  withImage(img: string) { this.config.image = img; return this; }\n  withGuest(cpus: number, mem: number) { this.config.guest = { cpu_kind: 'shared', cpus, memory_mb: mem }; return this; }\n  async execute(client: FlyClient): Promise\u003CFlyMachine[]> {\n    return Promise.all(this.regions.map(async r => {\n      const m = await client.createMachine(this.config as MachineConfig, r);\n      await client.waitForState(m.id, 'started'); return m;\n    }));\n  }\n}\n\u002F\u002F Usage: await new DeployBuilder().toRegions('iad','lhr','nrt').withImage('app:latest').withGuest(1,256).execute(client);\n```\n\n## Response Types\n```typescript\ntype MachineState = 'created' | 'starting' | 'started' | 'stopping' | 'stopped' | 'destroying' | 'destroyed';\ninterface FlyMachine {\n  id: string; name: string; state: MachineState; region: string;\n  config: MachineConfig; created_at: string; updated_at: string;\n}\ninterface MachineConfig {\n  image: string; guest: { cpu_kind: string; cpus: number; memory_mb: number };\n  services: Array\u003C{ ports: Array\u003C{ port: number; handlers: string[] }>; internal_port: number }>;\n  env: Record\u003Cstring, string>;\n}\ninterface FlyVolume { id: string; name: string; region: string; size_gb: number; attached_machine_id: string | null; }\n```\n\n## Testing Utilities\n```typescript\nexport function mockMachine(overrides: Partial\u003CFlyMachine> = {}): FlyMachine {\n  return { id: 'mach-001', name: 'test-machine', state: 'started', region: 'iad',\n    config: { image: 'app:latest', guest: { cpu_kind: 'shared', cpus: 1, memory_mb: 256 }, services: [], env: {} },\n    created_at: '2025-01-01T00:00:00Z', updated_at: '2025-01-01T00:00:00Z', ...overrides };\n}\n```\n\n## Error Handling\n| Pattern | When to Use | Example |\n|---------|-------------|---------|\n| `safeCall` wrapper | All Machines API calls | Catches network + API errors uniformly |\n| Retry on 429 | Bulk machine creation | 2s delay before retry |\n| `waitForState` timeout | After create\u002Fstart\u002Fstop | Prevents hanging deploys |\n| Region fallback | Multi-region deploy failure | Skip failed region, continue others |\n\n## Resources\n- [Machines API Reference](https:\u002F\u002Ffly.io\u002Fdocs\u002Fmachines\u002Fapi\u002Fmachines-resource\u002F)\n\n## Next Steps\nApply patterns in `flyio-core-workflow-a`.\n",{"name":5,"tags":24,"author":28,"license":15,"version":29,"description":30,"allowed-tools":31,"compatible-with":32},[25,26,27],"saas","edge-compute","flyio","Jeremy Longshore \u003Cjeremy@intentsolutions.io>","1.0.0","Apply production-ready Fly.io Machines API patterns for TypeScript with typed\nclients, machine lifecycle management, and multi-region orchestration.\nTrigger: \"fly.io Machines API\", \"fly.io SDK patterns\", \"fly.io API client\".\n","Read, Write, Edit","claude-code","main","99825ad3f3bcc6597ddcc7294a14e6e922f2b67b","skills\u002Fsaas-packs--flyio-pack--flyio-sdk-patterns",0,"https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills","https:\u002F\u002Fgithub.com\u002Fjukeyman","https:\u002F\u002FRJBUSINESSSOLUTIONS.ORG","Credit and Finance Expert | Developer\r\n\r\nI'm Rick Jefferson, a seasoned credit and finance expert with over a decade of experience in financial literacy,","2026-07-13 07:03:29",{"source":8,"skillName":5,"commands":43,"prompt":53,"zipAvailable":54},[44,47,50],{"tool":45,"command":46},"npx","npx skills add jukeyman\u002Fjukeyman-skills --skill flyio-sdk-patterns",{"tool":48,"command":49},"bunx","bunx skills add jukeyman\u002Fjukeyman-skills --skill flyio-sdk-patterns",{"tool":51,"command":52},"pnpm","pnpm dlx skills add jukeyman\u002Fjukeyman-skills --skill flyio-sdk-patterns","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsaas-packs--flyio-pack--flyio-sdk-patterns\u002FSKILL.md",true,[],[57,64,71,78,85,93],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":19},"01M79ANS2SM329NEP5ZCX106RR","zustand-store-creator","Create zustand store creator operations. Auto-activating skill for Frontend Development.\nTriggers on: zustand store creator, zustand store creator\nPart of the Frontend Development skill category. Use when working with zustand store creator functionality. Trigger with phrases like \"zustand store creator\", \"zustand creator\", \"zustand\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzustand-store-creator\u002FSKILL.md",[],[],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":19},"01M79AMZKP4YDEZ7EHG1Y7PP74","zero-trust-config-helper","Configure with zero trust config helper operations. Auto-activating skill for Security Advanced.\nTriggers on: zero trust config helper, zero trust config helper\nPart of the Security Advanced skill category. Use when configuring systems or services. Trigger with phrases like \"zero trust config helper\", \"zero helper\", \"zero\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzero-trust-config-helper\u002FSKILL.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":19},"01M79AMJSBCEJQNBTYNAHYN5HM","zapier-integration-helper","Assist with zapier integration helper operations. Auto-activating skill for Business Automation.\nTriggers on: zapier integration helper, zapier integration helper\nPart of the Business Automation skill category. Use when working with APIs or building integrations. Trigger with phrases like \"zapier integration helper\", \"zapier helper\", \"zapier\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzapier-integration-helper\u002FSKILL.md",[],[],{"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":19},"01M79AHJZGVMARS13VFQYRR1MP","yaml-config-validator","Validate yaml config validator operations. Auto-activating skill for DevOps Basics.\nTriggers on: yaml config validator, yaml config validator\nPart of the DevOps Basics skill category. Use when configuring systems or services. Trigger with phrases like \"yaml config validator\", \"yaml validator\", \"yaml\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fyaml-config-validator\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":89,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":19},"01M79AHGDZRN0020RDQSQDPAM8","xvary-stock-research","Thesis-driven equity analysis from public SEC EDGAR and market data; \u002Fanalyze, \u002Fscore, \u002Fcompare workflows with bundled Python tools (Claude Code, Cursor, Codex).","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxvary-stock-research\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxvary-stock-research\u002FSKILL.md",[],[],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":19},"01M79AHCYJ9FV9RMHQ24HDRN33","xss-vulnerability-scanner","Scan xss vulnerability scanner operations. Auto-activating skill for Security Fundamentals.\nTriggers on: xss vulnerability scanner, xss vulnerability scanner\nPart of the Security Fundamentals skill category. Use when working with xss vulnerability scanner functionality. Trigger with phrases like \"xss vulnerability scanner\", \"xss scanner\", \"xss\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxss-vulnerability-scanner\u002FSKILL.md",[],[]]