一键导入
sdk
Use the ONE backend (@oneie/sdk) from this frontend via the plugin-backend wrapper. Invoke when reading/writing ONE data in API routes or SSR.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use the ONE backend (@oneie/sdk) from this frontend via the plugin-backend wrapper. Invoke when reading/writing ONE data in API routes or SSR.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Astro 7 conventions for ONE sites — plugin wiring via one.config.ts, OneChat/OneTrack placement, Cloudflare SSR. Invoke when editing .astro files or astro.config.mjs.
Summarises any document to the requested length.
React 19 conventions in ONE sites — client islands, @oneie/react hooks, no useEffect for ONE data. Invoke when editing .tsx components.
shadcn/ui under the ONE 6-token design system — CSS var tokens only, no hex, add components via the CLI. Invoke when editing src/components/ui/ or adding a primitive.
| name | sdk |
| description | Use the ONE backend (@oneie/sdk) from this frontend via the plugin-backend wrapper. Invoke when reading/writing ONE data in API routes or SSR. |
The ONE backend is reached through oneClient() from @oneie/plugin-backend — never the bare @oneie/sdk barrel.
// src/pages/api/things.ts
import { oneClient } from '@oneie/plugin-backend'
export async function GET() {
const client = await oneClient() // lazy — reads ONE_API_KEY at call time
const things = await client.list('thing')
return Response.json(things)
}
oneClient() lazy-imports @oneie/sdk inside the factory. Never import '@oneie/sdk' at module top-level in a route — the SDK runs telemetry at import and that crashes the Cloudflare Worker on init.
The substrate is signal-based. Read via the client; do not poll. Writes return a closed loop (mark/warn) — never a silent value.
import { SubstrateClient } from '@oneie/sdk' directly — use oneClient().ONE_API_KEY — it is read from env (CF binding) at runtime.