prongs
GitHub

Start here

Getting started

Add Prongs to a React and Tailwind project in a few minutes: UI first, then errors and logs, then the check and your agents. You need Node 22.18 or newer for the CLI.

Read https://www.prongs.dev/docs/getting-started.md and help me apply it to my app.

Choose your start

New project

Start with the starter, then build a first page.

Existing project

Add the starter, then see what check would change in your code.

With an agent

Give your agent the rules, then let it build.

1. Add the components

Terminal
npm install -D prongs
npx prongs add
npm install @prongsjs/core @prongsjs/ui tailwind-merge

Install prongs as a dev dependency first: npx will not run it from outside the project without that, and it fails with a prompt about missing packages.

@prongsjs/ui is ESM-only. Next.js and Vite load it, but a CommonJS script that calls require cannot, so import it from an ES module or through your bundler.

add copies components and a starter registry into components/prongs, and writes prongs.json. In a Next.js project it also points links at next/link. The files are yours: edit them like any other code. It also edits your global stylesheet (app/globals.css, or the one it finds), to import the theme, so review that change with the rest of the install.

The starter covers what nearly every interface needs. If you are building a SaaS app, a blog, a landing page, a dashboard or a gallery, add the matching packs too: npx prongs add saas.

It also writes theme.css, the colours the registry uses, and imports it into your global CSS right after Tailwind. If you already define these colours, your own values win. It adds surfaces that layer themselves; see Theme and surfaces.

2. Build a page

TSX
import { Action, Field, Layout, Text } from '@/components/prongs';

export default function SignIn() {
return (
<Layout intent="layout.task">
<Text intent="heading.page">Sign in</Text>
<Layout intent="layout.form">
<Layout intent="layout.field">
<Text intent="text.label" as="label" htmlFor="email">Email</Text>
<Field intent="field.email" id="email" />
</Layout>
<Action intent="action.submit">Sign in</Action>
</Layout>
</Layout>
);
}

Each intent decides the element too: layout.task renders <main>, layout.form renders <form>, field.email sets type, inputMode and autoComplete, and action.submit is a type="submit" button.

3. Add errors and logs

Terminal
npm install @prongsjs/errors @prongsjs/logs   # the packages the registry imports
npx prongs add logs # audit, security, incident, job and debug intents, plus log()
npx prongs add errors # request, auth, record, conflict, failure… intents, plus fail()

The same idea, past the UI. Logs apply anywhere code runs; errors apply where something answers a request, and add logs too. Every failure then gets the right status and message, and every event the right level. The Errors and Logs guides explain the rest.

4. Check it

Terminal
npx prongs check

check reports unknown intents, intents on the wrong component, styled raw elements, visual inline styles and more, each with a suggested fix. Adding Prongs to an app that already exists? Record today’s findings first, so only new ones fail:

Terminal
npx prongs check --update-baseline
npx prongs check --suggest # repeated problems, grouped into intents worth adding
npx prongs add-intent action.archive --refs control.secondary --description "..." # add one of your own

5. Teach your agents

Terminal
npx prongs spec --agents    # PRONGS.md, plus a short block in AGENTS.md (CLAUDE.md points at it)
npx prongs install-hooks # check every file Claude Code or Cursor edits

With hooks installed, an agent that writes a styled <button> is told, right after the edit, to use <Action> and which intents fit.

6. See your intents

Terminal
npx prongs add gallery

Adds a page (at /prongs in Next.js, development only) that renders every intent in your registry live, in your own theme, with its states and its “not for… use instead” links. It reads the registry at runtime, so it is never out of date.