Pikku react

From pikkujs/pikku · View interactive version

Pikku react is an AI agent skill from the GitHub repository pikkujs/pikku. React frontend on a Pikku backend: PikkuProvider, usePikkuQuery, usePikkuMutation, usePikkuRPC, agent and workflow hooks. Rendering fetched values is pikku-tailwind; copy is pikku-i18n.

How to use this skill

Skill file

Pikku React

The hook names and their argument types come from your generated api.gen.ts —

read it for what this app actually exposes. This skill is the part it cannot

tell you: which hook a given need calls for, and where the generated client

stops.

Pick the reference

| You are… | Read |

| ----------------------------------------------------------------------------------------- | --------------------------- |

| Wiring the app root, resolving the server URL, authenticating, or subscribing to realtime | references/client.md |

| Fetching, mutating or paginating data | references/react-query.md |

| Starting a workflow and showing its progress | references/workflows.md |

Reach for what

| Need | Use |

| ------------------------------------------ | -------------------------------------------------------- |

| Render data, dedupe and cache | usePikkuQuery |

| Trigger a write and wait for the result | usePikkuMutation |

| Paginate | usePikkuInfiniteQuery |

| One-off call from an event handler | usePikkuRPC() |

| Hit a REST endpoint rather than an RPC | usePikkuFetch() |

| Talk to one named AI agent | usePikkuAgent(name) → .run / .stream / .approve |

| Run one named workflow | usePikkuWorkflow(name) → .start / .run / .status |

| A workflow long enough to need progress UI | references/workflows.md |

| Subscribe to events, SSE or a channel | usePikkuRealtime() |

A workflow that finishes in a moment can be awaited; one that does not needs

start-plus-observe, or the component holds a pending state with nothing to show.

What NOT to do

with full types; a hand-rolled RPC client or a hand-written

useQuery({ queryKey, queryFn }) reimplements it worse.

runs once at the app root and the instance flows through context — and

usePikkuRPC() outside <PikkuProvider> throws.

deduplication, caching and unmounting; a manual effect handles none of them.

at generation time, and a computed one is not type-checked.

refetchInterval callback dedupes across components and stops on a terminal

state in one place.

mismatch is the backend's input/output schema; fix it there.

i18n message — see pikku-i18n.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.