Skip to content

reactive/data-client / .agents/skills/data-client-endpoint-setup

data-client-endpoint-setup

Verified

Set up @data-client/endpoint for custom async operations. Wraps existing async functions with Endpoint for use with Data Client hooks. Use after data-client-setup detects non-REST/GraphQL async patterns.

FileKindSize
SKILL.mdskill md8.5 KB
evals/evals.jsonconfig2.2 KB
references.jsonconfig113 B
references/Endpoint.mdmarkdown20.9 KB
references/Endpoint.vue.mdmarkdown20.5 KB

evals/evals.json

View on GitHub
{
  "skill_name": "data-client-endpoint-setup",
  "evals": [
    {
      "id": 1,
      "name": "sdk-abort-signal-member",
      "source": "G4 in the Voyager migration (aeharding/voyager@6a15757): its feeds pass `{ signal }` to the threadiverse SDK, and an AbortSignal in the endpoint's arguments becomes part of its cache key.",
      "prompt": "Move this feed fetch onto Data Client. `PostView` (an Entity, `@/schemas/PostView`) exists, `DataProvider` wraps the app, and `client` is the app's threadiverse SDK instance. Write the endpoint in src/features/feed/endpoints.ts and rewrite the component to read through it. Keep the current behavior: switching sort aborts the request for the old sort.\n\n```tsx\n// src/features/feed/CommunityFeed.tsx\nimport { useEffect, useState } from 'react';\nimport { client } from '@/services/client';\nimport type { PostView } from '@/schemas/PostView';\nimport PostList from './PostList';\n\nexport default function CommunityFeed({ community, sort }: { community: string; sort: string }) {\n  const [posts, setPosts] = useState<PostView[]>();\n  useEffect(() => {\n    const controller = new AbortController();\n    client\n      .getPosts({ community_name: community, sort, signal: controller.signal })\n      .then(res => setPosts(res.posts));\n    return () => controller.abort();\n  }, [community, sort]);\n  if (!posts) return <Spinner />;\n  return <PostList posts={posts} />;\n}\n```",
      "expected_output": "An `Endpoint` whose arguments are only `{ community, sort }` (or the SDK's key fields), which reads `this.signal` and passes it to `client.getPosts`; the component reads with `useSuspense(useCancelling(endpoint, args), args)`.",
      "files": [],
      "assertions": [
        "The endpoint's arguments hold no `AbortSignal`: no `signal` parameter, and no `key` override written to drop one.",
        "The fetch function reads the signal from the endpoint (`this.signal`) and passes it to `client.getPosts`.",
        "The component aborts the old sort's request through `useCancelling(endpoint, args)` (or `endpoint.extend({ signal })`), with the same args passed to `useSuspense()`.",
        "The component reads with `useSuspense()` and has no `useEffect` or `useState` for the posts."
      ]
    }
  ]
}
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 196kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 193kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 193kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 193kUpdated Claude CodeCodexVerifiedInstall