[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M758TH0WAS54427W6P0Q79V2":3,"skill-same:01M758TH0WAS54427W6P0Q79V2":46},{"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":23,"commitSha":24,"skillDirectory":25,"forksCount":26,"repositoryHtmlUrl":27,"repositoryHomepageUrl":28,"ownerHtmlUrl":29,"ownerBlogUrl":28,"ownerDescription":30,"updatedAt":31,"install":32,"resources":45},"01M758TH0WAS54427W6P0Q79V2","http-client-abstraction",null,"Use @repo\u002Fapi-client SDK hooks (preferred) or raw fetch directly in domain-specific HTTP implementations (extension app only) — no generic HTTP wrapper layer needed","CliqRelay\u002Fcliqrelay","CliqRelay","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F290753656?v=4","01M758RPDEB11FEYA2XK17DSHA","01M758RPEKP0NKH6P43GD2FBDG",41,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FCliqRelay\u002Fcliqrelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ffrontend\u002Fhttp-client-abstraction\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: http-client-abstraction\ndescription: Use @repo\u002Fapi-client SDK hooks (preferred) or raw fetch directly in domain-specific HTTP implementations (extension app only) — no generic HTTP wrapper layer needed\n---\n\n# HTTP Client Abstraction\n\nThe HTTP client pattern applies **only in the extension app** (client-side). The web app uses `@repo\u002Fapi-client` via server functions (server-side fetch).\n\n## Primary Pattern: Use `@repo\u002Fapi-client` SDK Directly\n\nThe `@repo\u002Fapi-client` SDK uses `fetch` under the hood, so no manual HTTP implementations are needed. Use `api.*` for programmatic calls (background scripts, services) and auto-generated hooks for React components:\n\n```typescript\n\u002F\u002F ✅ DO — Use api.* for programmatic HTTP calls\nimport { api } from \"@repo\u002Fapi-client\";\n\nasync function deleteGuide(guideId: string) {\n  const response = await api.guides.deleteGuide(guideId);\n  if (response.status !== 200) {\n    console.error(\"Failed to delete guide:\", response.data);\n    return null;\n  }\n  return response.data.guide;\n}\n\n\u002F\u002F ✅ DO — Use auto-generated hooks in React components\nimport { useGetAllGuides, useCreateGuide } from \"@repo\u002Fapi-client\";\n\nfunction GuideManager() {\n  const { data, isLoading } = useGetAllGuides();\n  const createMutation = useCreateGuide({\n    mutation: {\n      onSuccess: () => { \u002F* handle success *\u002F },\n    },\n  });\n  \u002F\u002F ...\n}\n```\n\n### ✅ DO — Use api-client as the default (both `api.*` and hooks)\n### ❌ DON'T — Write manual `http-{domain}.service.ts` files for endpoints covered by api-client\n\n## Fallback Pattern: Direct `fetch` (Non-api-client Domains)\n\nFor endpoints **not covered by `@repo\u002Fapi-client`**, use raw `fetch` directly. No generic HTTP wrapper layer needed.\n\n```typescript\n\u002F\u002F Non-api-client endpoint (fallback only)\nasync function callExternalApi(url: string, body: unknown) {\n  const response = await fetch(url, {\n    method: \"POST\",\n    headers: { \"Content-Type\": \"application\u002Fjson\" },\n    body: JSON.stringify(body),\n  });\n\n  if (!response.ok) {\n    throw new Error(`Failed: ${response.status} ${response.statusText}`);\n  }\n\n  const data = await response.json();\n  \u002F\u002F Validate with Zod if needed\n  return data;\n}\n```\n\n## URL Construction Conventions (Fallback)\n\n```typescript\n\u002F\u002F ✅ DO — Append params as URL segments\n`${baseUrl}\u002F${resourceId}\u002Fscreenshot`\n\n\u002F\u002F ✅ DO — Append query strings\n`${baseUrl}?cursor=${cursor}`\n```\n\n## Rules\n\n### ✅ DO\n- Use `@repo\u002Fapi-client` (both `api.*` and hooks) as the default HTTP client pattern in the extension\n- For non-api-client domains: use `fetch` directly\n- Import types from `@repo\u002Fapi-client` or from `@\u002Fmodels` for fallback domains\n\n### ❌ DON'T\n- Don't write `http-{domain}.service.ts` files — use `@repo\u002Fapi-client` directly\n- Don't create factory functions for HTTP calls — the SDK handles everything\n- Don't create generic HTTP wrapper layers — keep it simple with direct `fetch` calls for fallback domains\n","# HTTP Client Abstraction\n\nThe HTTP client pattern applies **only in the extension app** (client-side). The web app uses `@repo\u002Fapi-client` via server functions (server-side fetch).\n\n## Primary Pattern: Use `@repo\u002Fapi-client` SDK Directly\n\nThe `@repo\u002Fapi-client` SDK uses `fetch` under the hood, so no manual HTTP implementations are needed. Use `api.*` for programmatic calls (background scripts, services) and auto-generated hooks for React components:\n\n```typescript\n\u002F\u002F ✅ DO — Use api.* for programmatic HTTP calls\nimport { api } from \"@repo\u002Fapi-client\";\n\nasync function deleteGuide(guideId: string) {\n  const response = await api.guides.deleteGuide(guideId);\n  if (response.status !== 200) {\n    console.error(\"Failed to delete guide:\", response.data);\n    return null;\n  }\n  return response.data.guide;\n}\n\n\u002F\u002F ✅ DO — Use auto-generated hooks in React components\nimport { useGetAllGuides, useCreateGuide } from \"@repo\u002Fapi-client\";\n\nfunction GuideManager() {\n  const { data, isLoading } = useGetAllGuides();\n  const createMutation = useCreateGuide({\n    mutation: {\n      onSuccess: () => { \u002F* handle success *\u002F },\n    },\n  });\n  \u002F\u002F ...\n}\n```\n\n### ✅ DO — Use api-client as the default (both `api.*` and hooks)\n### ❌ DON'T — Write manual `http-{domain}.service.ts` files for endpoints covered by api-client\n\n## Fallback Pattern: Direct `fetch` (Non-api-client Domains)\n\nFor endpoints **not covered by `@repo\u002Fapi-client`**, use raw `fetch` directly. No generic HTTP wrapper layer needed.\n\n```typescript\n\u002F\u002F Non-api-client endpoint (fallback only)\nasync function callExternalApi(url: string, body: unknown) {\n  const response = await fetch(url, {\n    method: \"POST\",\n    headers: { \"Content-Type\": \"application\u002Fjson\" },\n    body: JSON.stringify(body),\n  });\n\n  if (!response.ok) {\n    throw new Error(`Failed: ${response.status} ${response.statusText}`);\n  }\n\n  const data = await response.json();\n  \u002F\u002F Validate with Zod if needed\n  return data;\n}\n```\n\n## URL Construction Conventions (Fallback)\n\n```typescript\n\u002F\u002F ✅ DO — Append params as URL segments\n`${baseUrl}\u002F${resourceId}\u002Fscreenshot`\n\n\u002F\u002F ✅ DO — Append query strings\n`${baseUrl}?cursor=${cursor}`\n```\n\n## Rules\n\n### ✅ DO\n- Use `@repo\u002Fapi-client` (both `api.*` and hooks) as the default HTTP client pattern in the extension\n- For non-api-client domains: use `fetch` directly\n- Import types from `@repo\u002Fapi-client` or from `@\u002Fmodels` for fallback domains\n\n### ❌ DON'T\n- Don't write `http-{domain}.service.ts` files — use `@repo\u002Fapi-client` directly\n- Don't create factory functions for HTTP calls — the SDK handles everything\n- Don't create generic HTTP wrapper layers — keep it simple with direct `fetch` calls for fallback domains\n",{"name":5,"description":7},"main","f06510bcaf955afc66bbbc1606871e1a1576492e",".agents\u002Fskills\u002Ffrontend\u002Fhttp-client-abstraction",0,"https:\u002F\u002Fgithub.com\u002FCliqRelay\u002Fcliqrelay","https:\u002F\u002Fcliqrelay.com","https:\u002F\u002Fgithub.com\u002FCliqRelay","Capture and refine workflows instantly to help your teams and AI agents perform at their best.","2026-11-04 22:56:05",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add CliqRelay\u002Fcliqrelay --skill http-client-abstraction",{"tool":38,"command":39},"bunx","bunx skills add CliqRelay\u002Fcliqrelay --skill http-client-abstraction",{"tool":41,"command":42},"pnpm","pnpm dlx skills add CliqRelay\u002Fcliqrelay --skill http-client-abstraction","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FCliqRelay\u002Fcliqrelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ffrontend\u002Fhttp-client-abstraction\u002FSKILL.md",true,[],[47,54,61,68,75,82],{"skillNo":48,"name":49,"nameZh":6,"description":50,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":51,"categories":52,"keywords":53,"publishedAt":18},"01M758WG0JG18W5MZD6ZPM6PGG","typst","Typst document creation and package development. Use when: (1) Working with .typ files, (2) User mentions typst, typst.toml, or typst-cli, (3) Creating or using Typst packages, (4) Developing document templates, (5) Converting Markdown\u002FLaTeX to Typst","https:\u002F\u002Fgithub.com\u002FCliqRelay\u002Fcliqrelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ftypst\u002FSKILL.md",[],[],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":18},"01M758WACKQMHG2BFF7T758J12","shadcn","Manages shadcn components and projects — adding, searching, fixing, debugging, styling, and composing UI. Provides project context, component docs, and usage examples. Applies when working with shadcn\u002Fui, component registries, presets, --preset codes, or any project with a components.json file. Also triggers for \"shadcn init\", \"create an app with --preset\", or \"switch to --preset\".","https:\u002F\u002Fgithub.com\u002FCliqRelay\u002Fcliqrelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fshadcn\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":18},"01M758W82G2QQ5Q14FKYNHRXQW","handoff","Compact the current conversation into a handoff document for another agent to pick up.","https:\u002F\u002Fgithub.com\u002FCliqRelay\u002Fcliqrelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fproductivity\u002Fhandoff\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":18},"01M758W63H60EK55A93199B6NR","grilling","Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases.","https:\u002F\u002Fgithub.com\u002FCliqRelay\u002Fcliqrelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fproductivity\u002Fgrilling\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":18},"01M758W4HD4PF66929V7MDGKW8","grill-me","A relentless interview to sharpen a plan or design.","https:\u002F\u002Fgithub.com\u002FCliqRelay\u002Fcliqrelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fproductivity\u002Fgrill-me\u002FSKILL.md",[],[],{"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},"01M758VYC5CCTP7EA5VKE7YWM5","dont-waffle","Use this skill when answering questions, explaining concepts, writing technical responses, reviewing code, or helping with development tasks. Communicate in clear, simple, standard English. Keep answers concise and focused, remove unnecessary filler and repetition, explain technical ideas in plain language, and structure information so it is easy to read and understand. When showing code, present it clearly with enough context for the developer to understand what it does and where it belongs.","https:\u002F\u002Fgithub.com\u002FCliqRelay\u002Fcliqrelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fproductivity\u002Fdont-waffle\u002FSKILL.md",[],[]]