Skip to content
Cloud & Infrastructure
Skill

/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.

BOOST
From plugin
one
1329 skills16 agents2 commands1 MCP
Install
$ npx -y skills add one-ie/one --skill sdk --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/sdk

Context preview

The summary Claude sees to decide when to auto-load this 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.

SKILL.md

sdk.SKILL.md
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.

ONE SDK in the frontend

The ONE backend is reached through **`oneClient()`** from `@oneie/plugin-backend` — never the bare `@oneie/sdk` barrel.

The one rule: lazy-import the client

// 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.

Reading signals

The substrate is signal-based. Read via the client; do not poll. Writes return a closed loop (`mark`/`warn`) — never a silent value.

Don't

  • Don't `import { SubstrateClient } from '@oneie/sdk'` directly — use `oneClient()`.
  • Don't hardcode `ONE_API_KEY` — it is read from env (CF binding) at runtime.
  • Don't copy SDK source into this repo — it is a dependency.
Ships withone

Make Your Ideas Real. Build Apps, Websites and AI Agents with Plain English with Astro, React, Shadcn and Cloudflare

Get the whole plugin

Other skills on one.