Skip to content
Back to search

pracht

A framework for Preact that deploys anywhere

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/JoviDeCroock/pracht with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/JoviDeCroock/pracht'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/jovidecroock--pracht/badge.svg)](/listings/jovidecroock--pracht)

HTML

<a href="/listings/jovidecroock--pracht"><img src="/api/listings/jovidecroock--pracht/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 171 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. <p align="center">
  2. <a href="https://github.com/JoviDeCroock/pracht">
  3. <img src="./assets/banner.svg" alt="pracht — One app graph, for browsers and for agents." width="720">
  4. </a>
  5. </p>
  6. <p align="center">
  7. <a href="https://www.npmjs.com/package/@pracht/core"><img src="https://img.shields.io/npm/v/@pracht/core?color=8b5cf6&label=%40pracht%2Fcore" alt="npm version"></a>
  8. <a href="https://github.com/JoviDeCroock/pracht/actions/workflows/ci.yml"><img src="https://github.com/JoviDeCroock/pracht/actions/workflows/ci.yml/badge.svg" alt="CI status"></a>
  9. </p>
  10. # pracht
  11. **One app graph, projected to browsers and to agents.** _(pracht /praxt/ — Dutch & German for splendor. Also: how you've always mispronounced Preact.)_
  12. Other frameworks render your app for humans and leave agents to scrape it. Pracht resolves your routes, loaders, API routes, and capabilities into one explicit graph, then projects that graph two ways: components for people, and typed, trust-gated tools for agents — over HTTP, [WebMCP](https://developer.chrome.com/docs/ai/webmcp), remote MCP, and `llms.txt`. It is a Preact framework, so the human half is small; it is an explicit framework, so the agent half is something you declare rather than something that gets scraped off you.
  13. ```bash
  14. npm create pracht@latest my-app
  15. ```
  16. **[Documentation](https://pracht.resynapse.dev/docs)** · [Quick start](https://pracht.resynapse.dev/docs/getting-started) · [Why pracht](https://pracht.resynapse.dev/docs/why-pracht) · [Example app tour](https://pracht.resynapse.dev/docs/demo-comparison) · [llms.txt](https://pracht.resynapse.dev/llms.txt)
  17. Connect your coding agent to the docs: `claude mcp add --transport http pracht-docs https://pracht.resynapse.dev/mcp`
  18. ## Why pracht
  19. - **One explicit app graph** — a typed `defineApp()` manifest wires routes, shells, middleware, and capabilities. What runs where is never a mystery, and because the graph is resolved rather than inferred, tooling can read it. Prefer file-based routing? Opt in to the pages router and skip the manifest entirely.
  20. - **The graph is projected to agents, not scraped from them** — one `defineCapability()` contract becomes a server call, an HTTP endpoint, a WebMCP page tool, and a tool on your app's own remote MCP endpoint, listed for discovery in a generated `llms.txt`. Same validation, same middleware, same effect class on every transport.
  21. - **Trust ships with the surface** — Web Bot Auth (RFC 9421) verified agent identity, per-capability policies, a prepare/commit confirmation gate for destructive effects, one structured audit event per dispatch, and `pracht eval` to prove agent flows in CI.
  22. - **Preact-first** — 0 KB of client JavaScript on a static route, 8.1 KB gzip with islands, 17.4 KB fully hydrated with the router. Measured by `pnpm bench` in this repo and gated in CI, not asserted.
  23. - **Per-route render and hydration modes** — SPA, SSR, SSG, and ISG, and full, islands, or no hydration, chosen per route. No global default fighting you.
  24. - **Vite-native** — instant HMR, fast builds, multi-environment output out of the box.
  25. - **Performance budgets built in** — `pracht build --analyze` reports per-route client JS (gzip + raw), and per-route `budgets` fail the build when a route ships too much.
  26. - **Env safety built in** — typed `serverEnv`/`publicEnv` helpers with a `PRACHT_PUBLIC_` prefix rule, and builds fail when client bundles reference non-public env vars.
  27. - **Optional content collections** — `@pracht/content` gives loaders and build plugins one server-only registry for routes, locales, source/compiled representations, caching, and emitted assets.
  28. - **Markdown images without runtime JavaScript** — `@pracht/markdown` compiles ordinary relative Markdown images through `@pracht/image` into cached responsive WebP variants for SSR, SSG, and hydration-disabled routes.
  29. - **Deploy anywhere** — one codebase, one build, five production-ready adapters (Node, Cloudflare Workers, Netlify, Vercel, and pure static export).
  30. ## At a glance
  31. Two routing styles, your choice:
  32. **Manifest routing** — full control, explicit wiring:
  33. ```ts
  34. // src/routes.ts
  35. import { defineApp, group, route, timeRevalidate } from "@pracht/core";
  36. export const app = defineApp({
  37. shells: {
  38. app: () => import("./shells/app.tsx"),
  39. public: () => import("./shells/public.tsx"),
  40. },
  41. middleware: {
  42. auth: () => import("./middleware/auth.ts"),
  43. },
  44. routes: [
  45. group({ shell: "public" }, [
  46. route("/", () => import("./routes/home.tsx"), { render: "ssg" }),
  47. route("/pricing", () => import("./routes/pricing.tsx"), {
  48. render: "isg",
  49. revalidate: timeRevalidate(3600),
  50. }),
  51. ]),
  52. group({ shell: "app", middleware: ["auth"] }, [
  53. route("/dashboard", () => import("./routes/dashboard.tsx"), { render: "ssr" }),
  54. route("/settings", () => import("./routes/settings.tsx"), { render: "spa" }),
  55. ]),
  56. ],
  57. });
  58. ```
  59. One manifest. Four render strategies. No renaming folders to change behavior.
  60. **Pages router** — file-based, zero manifest:
  61. ```ts
  62. // vite.config.ts
  63. export default defineConfig({
  64. plugins: [pracht({ pagesDir: "/src/pages", adapter: nodeAdapter() })],
  65. });
  66. ```
  67. ```
  68. src/pages/
  69. index.tsx → /
  70. blog/[slug].tsx → /blog/:slug
  71. ```
  72. Same render modes, same adapters — just let the filesystem drive. Directory
  73. `_app.tsx` files provide shells, a root `_middleware.ts` wraps every page, and
  74. modules in `src/capabilities/` plus `agents` / `constraints` from
  75. `src/pages/_app.config.ts` provide the same agent surface as a manifest app.
  76. Eject when you need per-route shell or middleware assignment, explicit route
  77. ids, path-prefix groups, or webhook ISG policies. See
  78. [Pages router](https://pracht.resynapse.dev/docs/pages-router).
  79. ## Create an app
  80. ```bash
  81. npm create pracht@latest my-app
  82. ```
  83. The prompts cover the target directory, hosting adapter (Node.js, Cloudflare Workers, Vercel, Netlify, or a pure static export), router (manifest or pages), and optional Tailwind CSS. For non-interactive runs pass flags instead — e.g. `--template=tailwind` (or `--template=minimal`), `--adapter=node`, `--no-git`, `--yes`. See [packages/start/README.md](packages/start/README.md) for the full list.
  84. The starter gives you:
  85. - `pracht dev` — local SSR + HMR, a `/_pracht` devtools page with the resolved route/API graph plus a live capability-traffic log with explicit agent attribution (JSON at `/_pracht.json`), and `Server-Timing` middleware/loader/render phase timings on every dev SSR response
  86. - `pracht build` — client/server output plus SSG/ISG prerendering, with `--analyze` for a per-route client JS report and budget enforcement
  87. - `pracht preview` — build and serve the production build locally
  88. - `pracht inspect [routes|api|capabilities|agents|build] --json` — resolved app graph metadata; `agents` summarizes the configured agent surface (transports, policies, MCP, llms.txt)
  89. - `pracht generate route|shell|middleware|api` — framework-native scaffolding; `generate route` also emits a Playwright smoke test when the app has an e2e setup
  90. - `pracht verify` — fast framework-aware checks with `--changed` and `--json`, including `defineApp({ constraints })` enforcement and app-graph snapshot freshness
  91. - `pracht plan` — semantic app-graph diff against a base git ref (`--write` refreshes the committed `.pracht/app-graph.json` snapshot; `--markdown` for PR comments)
  92. - `pracht report` — PR-ready markdown assembled from the graph diff, verify results, and bundle budgets
  93. - `pracht doctor` — app wiring checks with optional JSON output
  94. - Optional Tailwind CSS wiring, a git repo with an initial commit, and (for the Node adapter) a multi-stage `Dockerfile`
  95. ## AI-assisted development
  96. Pracht is built to be operated by coding agents as much as by humans — and for the humans reviewing what agents produce:
  97. - **Provable changes** — a committed app-graph snapshot (`.pracht/app-graph.json`) plus `pracht plan` gives reviewers an intent-level diff of routes, render modes, shells, middleware, and API endpoints; `pracht report` turns it into the factual half of a PR description. See [Coding agents](https://pracht.resynapse.dev/docs/coding-agents#the-app-graph-snapshot).
  98. - **Machine-enforced invariants** — `defineApp({ constraints })` declares rules like `requireMiddleware("/app/**", "auth")` that `pracht verify` enforces deterministically, so no author (human or LLM) can merge a violation.
  99. - **MCP server** — `pracht dev-mcp` starts a stdio [Model Context Protocol](https://modelcontextprotocol.io) server so agents can natively inspect the resolved app graph, run doctor/verify diagnostics, diff and snapshot the graph (plan/report), read the authoring guide (get_docs), and scaffold routes, shells, middleware, and API handlers. See [the authoring MCP server](https://pracht.resynapse.dev/docs/coding-agents#the-authoring-mcp-server) for registration and tools.
  100. - **Authoring guide for agents** — `pracht llms --write` drops the framework's conventions into `llms.txt` so any coding agent picks them up.
  101. - **Capabilities, WebMCP & remote MCP** — `@pracht/capabilities` lets you define a typed application operation once (JSON Schema contract, effect class, middleware) and project it to server code, a generated HTTP endpoint, a WebMCP page tool for in-browser agents, an MCP tool at your app's own `/mcp` endpoint for agents that never open a browser, and the human UI via `<Form capability>` — private by default, with `pracht verify` enforcing the security defaults and effect-driven revalidation keeping the page consistent after mutations. The same pipeline can be mounted in non-Pracht applications with `createCapabilityHost()`. See [Capabilities](https://pracht.resynapse.dev/docs/capabilities) and [WebMCP and remote MCP](https://pracht.resynapse.dev/docs/mcp-tools).
  102. - **Agent trust layer** — Web Bot Auth (RFC 9421) verified agent identity on the request context with observe/require policies, a prepare/commit confirmation flow for destructive capabilities, capability audit events, and `pracht eval` for scripted agent-task checks in CI — over the capability HTTP projection or, with `"transport": "mcp"`, over the app's own remote MCP endpoint. See [Agent trust](https://pracht.resynapse.dev/docs/agent-trust), [Audit trail](https://pracht.resynapse.dev/docs/agent-audit), and [Testing agent flows](https://pracht.resynapse.dev/docs/agent-eval).
  103. - **llms.txt** — the opt-in `llmsTxt` plugin option emits an [llms.txt](https://llmstxt.org) index of your pages, API routes, and HTTP-exposed capabilities at build time and serves it live in dev. See [Agents overview](https://pracht.resynapse.dev/docs/agents).
  104. - **Claude Code skills** — 33 skills for scaffolding, auditing, testing, debugging, and deploying pracht apps live in [skills/](skills/README.md). See the [agent skills](#agent-skills) section below.
  105. ## Agent skills
  106. The skills are distributed three ways (see the [catalog](skills/README.md)):
  107. - **Discovery endpoint** — every skill is published at `https://pracht.resynapse.dev/skills/<name>/SKILL.md`, listed with SHA-256 digests in the manifest at [`/.well-known/agent-skills/index.json`](https://pracht.resynapse.dev/.well-known/agent-skills/index.json) and advertised via a `Link: rel="agent-skills"` header.
  108. - **create-pracht** — `npm create pracht@latest` seeds four core skills into new apps' `.claude/skills/` and writes a `.mcp.json` registering `pracht dev-mcp` (yes-default prompt, `--agent-tools=full` for the whole catalog, `--no-agent-tools` to skip).
  109. - **In this repo** — `.claude/skills` symlinks to [skills/](skills/README.md), so Claude Code loads them automatically for contributors.
  110. ## Repo map
  111. - [VISION_MVP.md](VISION_MVP.md) — scope and product direction
  112. - [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) — framework internals
  113. - [docs/ROUTING.md](docs/ROUTING.md) — manifest and matching model
  114. - [docs/RENDERING_MODES.md](docs/RENDERING_MODES.md) — SSR, SSG, ISG, SPA behavior
  115. - [docs/PERFORMANCE.md](docs/PERFORMANCE.md) — bundle analysis and per-route client JS budgets
  116. - [docs/DATA_LOADING.md](docs/DATA_LOADING.md) — loaders, forms, client hooks
  117. - [docs/CONTENT.md](docs/CONTENT.md) — server-only collections and official Markdown integration
  118. - [docs/API_VALIDATION.md](docs/API_VALIDATION.md) — Standard Schema validation for API routes, typed `apiFetch()`
  119. - [docs/OPENAPI.md](docs/OPENAPI.md) — optional OpenAPI 3.1 JSON/UI endpoints and build output
  120. - [docs/CAPABILITIES.md](docs/CAPABILITIES.md) — typed capabilities, HTTP projection, WebMCP page tools
  121. - [docs/REMOTE_MCP.md](docs/REMOTE_MCP.md) — serving capabilities as MCP tools over Streamable HTTP
  122. - [docs/AGENT_TRUST.md](docs/AGENT_TRUST.md) — Web Bot Auth, effect-class confirmation flow, audit hook, `pracht eval`
  123. - [docs/CAPABILITY_GRAPH.md](docs/CAPABILITY_GRAPH.md) — the capability graph product bet: proposal, decision log, staged plan
  124. - [docs/LLMS_TXT.md](docs/LLMS_TXT.md) — generated llms.txt: pages, API endpoints, capabilities
  125. - [docs/STYLING.md](docs/STYLING.md) — CSS Modules, Tailwind, CSS-in-JS limitations
  126. - [docs/ADAPTERS.md](docs/ADAPTERS.md) — Node, Cloudflare, Netlify, Vercel, and static-export deployment paths
  127. - [docs/IMAGES.md](docs/IMAGES.md) — responsive `<Image>`, runtime loaders, and static variants
  128. - [packages/i18n/README.md](packages/i18n/README.md) — `@pracht/i18n`: locale-detection middleware, typed dictionaries, hreflang helpers
  129. - [packages/query/README.md](packages/query/README.md) — `@pracht/query`: TanStack Query with server-fetched queries hydrated into the browser cache
  130. - [packages/session/README.md](packages/session/README.md) — `@pracht/session`: encrypted cookie or store-backed sessions, middleware, and password hashing
  131. - [docs/MCP.md](docs/MCP.md) — built-in MCP server for coding agents (development time)
  132. - [docs/AGENT_WORKFLOW.md](docs/AGENT_WORKFLOW.md) — constraints, app-graph snapshots, `pracht plan`/`report`
  133. - [docs/ENV.md](docs/ENV.md) — typed env access, `PRACHT_PUBLIC_` prefix rule, leak detection
  134. - [packages/start/README.md](packages/start/README.md) — starter CLI details
  135. - [packages/test/README.md](packages/test/README.md) — `@pracht/test` unit-testing utilities for loaders, API routes, middleware, and forms
  136. ## Contributing
  137. Use the GitHub issue templates for bug reports and feature requests. When opening a pull request, follow [.github/PULL_REQUEST_TEMPLATE.md](.github/PULL_REQUEST_TEMPLATE.md).

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.