---
name: nuxt-protokit
description: Use when building schema-driven prototypes with nuxt-protokit (@websideproject/nuxt-protokit) - provides definePrototype, usePrototype, ProtoTool, collections, derived values, and visualizations for rapid SaaS tool prototyping.
license: MIT
title: nuxt-protokit
canonical_url: https://skilld.dev/gh/onmax/nuxt-skills/nuxt-protokit
last_updated: 2026-11-02T09:02:11.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> Supporting files, fetch one when the Skill refers to it: [references/components.md](https://skilld.dev/api/skills-raw/onmax/nuxt-skills/nuxt-protokit/references/components.md), [references/composables.md](https://skilld.dev/api/skills-raw/onmax/nuxt-skills/nuxt-protokit/references/composables.md), [references/extensions.md](https://skilld.dev/api/skills-raw/onmax/nuxt-skills/nuxt-protokit/references/extensions.md), [references/headless.md](https://skilld.dev/api/skills-raw/onmax/nuxt-skills/nuxt-protokit/references/headless.md), [references/module-authoring.md](https://skilld.dev/api/skills-raw/onmax/nuxt-skills/nuxt-protokit/references/module-authoring.md), [references/offline-first.md](https://skilld.dev/api/skills-raw/onmax/nuxt-skills/nuxt-protokit/references/offline-first.md), [references/schema.md](https://skilld.dev/api/skills-raw/onmax/nuxt-skills/nuxt-protokit/references/schema.md), [references/visualizations.md](https://skilld.dev/api/skills-raw/onmax/nuxt-skills/nuxt-protokit/references/visualizations.md).
>
> If the user asked to install this Skill, run `npx skilld install onmax/nuxt-skills/nuxt-protokit`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/nuxt-protokit`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/onmax/nuxt-skills/nuxt-protokit) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/nuxt-protokit`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/nuxt-protokit --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/nuxt-protokit --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# nuxt-protokit

Schema-driven rapid prototyping for Nuxt 4. Turn a TypeScript schema into a persistent, interactive SaaS tool in minutes — backed by Y.js CRDT + IndexedDB, auto-synced across tabs, with optional server sync.

## When to Use

- Defining a `PrototypeSchema` with fields, collections, derived values, or visualizations
- Writing `usePrototype()` or `useProtoCollection()` composables
- Using `<ProtoTool>`, `<ProtoDashboard>`, `<ProtoCrudModal>`, `<ProtoCalendar>`, `<ProtoViz>` components
- Configuring offline persistence, encryption, namespace isolation, or corruption recovery
- Creating custom field/viz extensions with `defineProtokitExtension`
- Using headless mode (`defineHeadlessSchema`) without UI components

## Quick Start

```ts
// schema.ts
import { definePrototype } from '@websideproject/nuxt-protokit'

export const schema = definePrototype({
  key: 'my-tool',
  title: 'My Tool',
  shortTitle: 'My Tool',
  description: 'Description',
  icon: 'i-heroicons-calculator',
  fields: {
    revenue:  { type: 'number', label: 'Revenue',  default: 0, format: 'money' },
    growth:   { type: 'range',  label: 'Growth %', default: 10, min: 0, max: 100 },
    plan:     { type: 'select', label: 'Plan',     default: 'starter',
                options: ['starter', 'pro', 'enterprise'] },
  },
  derived: {
    projectedRevenue: {
      deps: ['revenue', 'growth'],
      compute: ctx => ctx.fields.revenue * (1 + ctx.fields.growth / 100),
    },
  },
})
```

```vue
<!-- pages/my-tool.vue -->
<script setup>
import { schema } from '~/schema'
const proto = usePrototype(schema)
</script>

<template>
  <ProtoTool :schema="schema" :prototype="proto" />
</template>
```

## Available Guidance

| File | Topics |
|------|--------|
| **[references/schema.md](https://skilld.dev/api/skills-raw/onmax/nuxt-skills/nuxt-protokit/references/schema.md)** | PrototypeSchema, all field types, CollectionSchema, DerivedDef, DashboardLayout, ProtoAction |
| **[references/composables.md](https://skilld.dev/api/skills-raw/onmax/nuxt-skills/nuxt-protokit/references/composables.md)** | usePrototype, useProtoCollection, useProtoDoc, namespace, encryption options |
| **[references/components.md](https://skilld.dev/api/skills-raw/onmax/nuxt-skills/nuxt-protokit/references/components.md)** | ProtoTool, ProtoDashboard, ProtoCrudModal, ProtoCalendar, ProtoViz, ProtoActionBar |
| **[references/visualizations.md](https://skilld.dev/api/skills-raw/onmax/nuxt-skills/nuxt-protokit/references/visualizations.md)** | All 12 viz types with config interfaces and examples |
| **[references/offline-first.md](https://skilld.dev/api/skills-raw/onmax/nuxt-skills/nuxt-protokit/references/offline-first.md)** | Y.js + IndexedDB, multi-tab sync, encryption, corruption recovery, server sync |
| **[references/extensions.md](https://skilld.dev/api/skills-raw/onmax/nuxt-skills/nuxt-protokit/references/extensions.md)** | defineProtokitExtension, custom field/viz type registration |
| **[references/headless.md](https://skilld.dev/api/skills-raw/onmax/nuxt-skills/nuxt-protokit/references/headless.md)** | defineHeadlessSchema, programmatic usage without UI components |
| **[references/module-authoring.md](https://skilld.dev/api/skills-raw/onmax/nuxt-skills/nuxt-protokit/references/module-authoring.md)** | Building a Nuxt module that ships custom fields/viz: protokit:register-extension hook, plugin pattern |

## Progressive Loading

Load only what you need:

- Defining fields, collections, or layout? → [references/schema.md](https://skilld.dev/api/skills-raw/onmax/nuxt-skills/nuxt-protokit/references/schema.md)
- Writing `usePrototype` or composable options? → [references/composables.md](https://skilld.dev/api/skills-raw/onmax/nuxt-skills/nuxt-protokit/references/composables.md)
- Using `<ProtoTool>`, `<ProtoCrudModal>`, `<ProtoCalendar>`? → [references/components.md](https://skilld.dev/api/skills-raw/onmax/nuxt-skills/nuxt-protokit/references/components.md)
- Configuring `visualizations: []` in schema? → [references/visualizations.md](https://skilld.dev/api/skills-raw/onmax/nuxt-skills/nuxt-protokit/references/visualizations.md)
- Encryption, multi-tenant, corruption? → [references/offline-first.md](https://skilld.dev/api/skills-raw/onmax/nuxt-skills/nuxt-protokit/references/offline-first.md)
- Custom field or viz type? → [references/extensions.md](https://skilld.dev/api/skills-raw/onmax/nuxt-skills/nuxt-protokit/references/extensions.md)
- No UI, programmatic storage? → [references/headless.md](https://skilld.dev/api/skills-raw/onmax/nuxt-skills/nuxt-protokit/references/headless.md)
- Building a Nuxt module that ships extensions? → [references/module-authoring.md](https://skilld.dev/api/skills-raw/onmax/nuxt-skills/nuxt-protokit/references/module-authoring.md)

**DO NOT read all files at once.** Load based on current task.

## Related Skills

- **`nuxt`** — Nuxt 4 routing, server routes, middleware
- **`nuxt-ui`** — @nuxt/ui components for surrounding page layout
- **`vue`** — Vue 3 composables, reactivity patterns

## Module Config (`nuxt.config.ts`)

```ts
export default defineNuxtConfig({
  modules: ['@websideproject/nuxt-protokit'],
  protokit: {
    serverSync: true,          // default — syncs to /api/yjs
    // serverSync: false       // local-only, no HTTP
    // serverSync: { enabled: true, baseUrl: '/api/yjs' }
  }
})
```

_Token efficiency: Main skill ~400 tokens. Each reference file ~800–1400 tokens._
