tina-schema-sync
TinaCMS Schema Sync
Regenerate TinaCMS artifacts locally and commit them after schema changes. This handles the hybrid deployment strategy where tinacms build is skipped on Vercel and artifacts are pre-committed.
When to Use
- After editing
tina/config.ts(adding fields, blocks, collections) - After upgrading
@tinacms/cli - When
pnpm tina:buildfails with "Unable to seed" (content references unknown block types) - When Vercel deploys succeed but new blocks don't render
Prerequisites
- TinaCloud credentials in
.env.local:NEXT_PUBLIC_TINA_CLIENT_ID="..." TINA_TOKEN="..." - If
.env.localdoesn't exist, run./scripts/pull-secrets.shor copy from.env.exampleand fill in values from TinaCloud dashboard.
Procedure
Step 1: Source credentials
source .env.local
Verify they're set:
echo $NEXT_PUBLIC_TINA_CLIENT_ID | head -c 10
echo $TINA_TOKEN | head -c 10
Step 2: Run the dev server to regenerate artifacts
NEXT_PUBLIC_TINA_CLIENT_ID="$NEXT_PUBLIC_TINA_CLIENT_ID" \
TINA_TOKEN="$TINA_TOKEN" \
npx tinacms dev --noWatch --noTelemetry
Wait for "TinaCMS Dev Server is active" message, then stop the server (Ctrl+C or kill the process).
Why tinacms dev instead of tinacms build? The build command connects to TinaCloud for indexing. If the content already references new block types that TinaCloud's schema doesn't know about, the build fails with "Unable to seed." The dev server generates artifacts locally without requiring TinaCloud to re-index first.
Step 3: Verify artifacts were regenerated
git status tina/
You should see changes in:
tina/__generated__/client.tstina/__generated__/types.tstina/tina-lock.json
Also check public/admin/ for changes.
Step 4: Verify new types exist
If you added a new block type (e.g., ContentTypes):
grep "ContentTypes" tina/__generated__/types.ts
Step 5: Commit all three artifact groups
git add tina/__generated__/ tina/tina-lock.json public/admin/
git commit -m "chore(tina): regenerate artifacts for [describe schema change]"
Critical: tina/tina-lock.json is the file TinaCloud reads to understand the schema on deploy. If you commit generated types but forget the lock file, deploys will fail or new block types will not render.
Step 6: Push
git push
TinaCloud picks up the lock file from the pushed commit and indexes the schema correctly.
Troubleshooting
"Unable to seed content/pages/home.mdx"
The content file references a block type the cloud schema doesn't know about. This is the exact scenario this skill handles. Use tinacms dev (Step 2), not tinacms build.
Dev server won't start
- Check credentials are set (Step 1)
- Check port 4001 isn't in use:
lsof -i :4001 - Check port 6970 isn't in use:
lsof -i :6970
Types generated but lock file unchanged
The schema change may not have been saved. Verify tina/config.ts was written before running the dev server.
Checklist
Before pushing, verify:
-
tina/__generated__/client.tshas changes -
tina/__generated__/types.tshas new type definitions -
tina/tina-lock.jsonhas changes -
public/admin/updated (if applicable) - All four are staged and committed together
More from baphomet480/claude-skills
kitchen-sink-design-system
Kitchen Sink design system workflow for Next.js and React projects, with secondary support for Astro, SvelteKit, Nuxt, and static HTML. Use when asked for a Kitchen Sink page, Design System, UI Audit, Style Guide, or Component Inventory, or when a project needs a component inventory plus component creation and a sink page implementation. Covers CVA variant architecture, Tailwind v3/v4 token systems, shadcn/ui integration, and TinaCMS content modeling.
40deep-research
Conduct comprehensive, multi-round research that produces rich visual reports. Use when asked for "deep research", "comprehensive analysis", "compare frameworks", "evaluate options", "research the state of X", or any task requiring investigation across 10+ sources. NOT for quick lookups — this is a 5-15 minute deep dive that produces a briefing-quality artifact with screenshots, diagrams, tables, and cited findings.
37design-lookup
Search and retrieve CSS components, SVG icons, design patterns, and visual inspiration from the web. Use when the user asks to find, look up, or search for CSS snippets, SVG icons, UI components, loading spinners, animations, design inspiration, or any visual/frontend design resource. Triggers on requests like "find me a CSS button", "look up an SVG spinner", "search for a card component", "find a wave divider SVG", or "get design inspiration for a dashboard".
34nextjs-tinacms
Build Next.js 16 + React 19 + TinaCMS sites with visual editing, blocks-based page builder, and complete SEO. Use this skill whenever the user mentions TinaCMS, Tina CMS, Next.js with a CMS, visual editing with Next.js, click-to-edit, content-managed Next.js site, blocks pattern page builder, or migrating to Next.js + TinaCMS. Also trigger for TinaCMS schema design, self-hosted TinaCMS, TinaCMS media configuration, or any TinaCMS troubleshooting. Covers Day 0-2 setup from scaffolding through production deployment on Vercel.
32cloudflare-pages
Deploy static sites to Cloudflare Pages with custom domains and CI/CD. Use when the user wants to deploy a site to Cloudflare Pages, add a custom domain to a Pages project, set up GitHub Actions CI/CD for Cloudflare Pages, roll back a deployment, or verify deployment status. Triggers on "deploy to Cloudflare", "Cloudflare Pages", "add custom domain", "pages deploy", or any Cloudflare Pages hosting workflow.
31local-ocr
Local OCR pipeline for AI agents featuring auto-rotation, deskew, and searchable PDF generation via ocrmypdf and Tesseract.
23