/nzyme:architecturefrom nzyme
The reference architecture of a product repo built on @nzyme — sets up a new repo, brings an existing one up to date element by element (monorepo layout, Nx and parallel worktrees, the nzyme submodule, setup scripts, lint and format, VS Code, Claude Code, GitHub, Nuxt app, UI package, e2e, secrets, and technologies such as Drizzle), keeps the repo's `ARCHITECTURE.md`, and writes the repo's own skill per area, each inlining nzyme's practice document for that area. Takes a free-form request; there are no modes or subcommands to remember.
Ships in nzyme. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
One entry point for "build it the way nzyme apps are built". The user says what they want in their own words — "set up a new repo for a Nuxt app", "bring this repo up to date", "we're starting the UI for the booking flow", "we're adding a Postgres database" — and the request plus the state of the repo decide what is in play. There is nothing to choose up front.
Every path below is relative to this skill's directory (the base directory Claude Code announces when
the skill loads): references/nx.md, assets/ARCHITECTURE.md.tmpl. The exception is a practice
document, written nzyme/docs/practice/<area>.md relative to the repo root, the path a repo skill
inlines; with no submodule yet, read it from this skill at ../../../../docs/practice/<area>.md.
When this skill runs inside a repo whose nzyme/plugins/nzyme/skills/architecture/ exists, that copy
is the reference: it matches the nzyme commit the repo pins. Read references and assets from there.
Look before asking: is this a git repo, is it empty, is there an nzyme/ submodule, a root
package.json, an ARCHITECTURE.md, .claude/skills/? Then match the request against the element
table below. The result is one of these situations, or a combination of them:
references/repo-skills.md), then hand over. This
skill does not build the feature; code-level work follows the repo skills, which load on their own.Ask when it is unsettled: no row matches, or two readings of the request would write different
files. Ask one question that names the readings. A choice ARCHITECTURE.md records with a reason is
settled — never ask it again or propose changing it unless the request reopens it.
git init # if not a repo yet
git submodule add https://github.com/kedrzu/nzyme.git nzyme
Versions (Bun, @types/bun, tsgo, oxlint, oxfmt, eslint, nx) always come from nzyme/package.json,
never from this skill's text. Submodule wiring: references/submodule.md.
The single routing source. Each element appears once; its reference says what the reference state is and where each placeholder value comes from.
Repo elements — the default architecture; all in play for a new repo and a general update.
| Element | Request signals | Repo signals | Reference |
|---|---|---|---|
| Monorepo layout | workspace, tsconfig, Bun, ignores | root package.json workspaces, tsconfig*.json, bunfig.toml, .gitignore, .gitattributes, .editorconfig | references/monorepo.md |
| Nx and parallel worktrees | build, cache, Nx, worktrees, slow machine | nx.json, project.json, Nx inputs guard test | references/nx.md |
| nzyme submodule | submodule, nzyme version, bump nzyme | .gitmodules, nzyme/ | references/submodule.md |
| Setup scripts | setup, onboarding, Paseo, scripts | setup.sh, setup.build.sh, package.json scripts, paseo.json | references/setup-scripts.md |
| Lint and format | lint, format, oxlint, oxfmt, ESLint | .oxlintrc.json, .oxfmtrc.json, eslint.config.mjs | references/lint-format.md |
| VS Code | editor, VS Code, format on save | .vscode/ | references/vscode.md |
| Claude Code | Claude, agents, skills, permissions, CLAUDE.md | .claude/settings.json, .claude/.gitignore, .claude/git.json, .claude/skills/nzyme, CLAUDE.md, docs/decisions/ | references/claude-code.md |
| GitHub | PR, CI, GitHub Actions, submodule bump | .github/ | references/github.md |
| Architecture document | architecture, document the repo | ARCHITECTURE.md, docs/architecture/ | references/architecture-doc.md |
App elements — in play when the request asks for them or the repo has them.
| Element | Request signals | Repo signals | Reference | Practice document |
|---|---|---|---|---|
| Nuxt app | Nuxt, app, SPA, SSR, pages, routing | nuxt.config.ts in a package | references/nuxt-app.md | nzyme/docs/practice/ui.md |
| UI package | UI, components, screen, design system, Storybook | a package with .storybook/ or *.stories.tsx | references/ui-package.md | nzyme/docs/practice/ui.md |
| e2e | e2e, end-to-end, Playwright | playwright.config.ts | references/e2e.md | nzyme/docs/practice/testing.md |
Technology elements — applied only when the repo uses that technology, never by default. A new platform or technology (Cloudflare, Supabase, …) is added here as one more row.
| Element | Request signals | Repo signals | Reference | Practice document |
|---|---|---|---|---|
| SQL with Drizzle | database, Postgres, SQL, Drizzle, migrations | drizzle-orm or drizzle-kit in a package.json | nzyme/docs/practice/drizzle.md | nzyme/docs/practice/drizzle.md |
| Secrets | secret, API key, token, credentials, password | @nzyme/secrets, defineEnvVariable holding credentials, a dotenv file with credentials | references/secrets.md | nzyme/docs/practice/secrets.md |
| Third-party APIs | integration, vendor API, OpenAPI, GraphQL, webhook client | an OpenAPI spec or .graphql SDL in a package, @nzyme/openapi | nzyme/docs/practice/api-clients.md | nzyme/docs/practice/api-clients.md |
A backend (server package, hosting, deployment) is not part of the default architecture and has no
element; build it when the repo needs it, and record its shape in ARCHITECTURE.md.
The same steps for every element, in a new repo and an old one:
ARCHITECTURE.md (or its docs/architecture/ split). A choice recorded there with a
reason is the repo's; skip that difference.{{name}} and the npm scope
from the root package.json (asked once in a new repo), versions from nzyme/package.json, the
rest as the reference says.package.json, nx.json, settings): key-wise merge. Add or correct the keys the reference
owns; keep repo-only keys, array entries, scripts, permissions, inputs and targets.CLAUDE.md is checked first (references/claude-code.md, "Proposing a CLAUDE.md change").ARCHITECTURE.md (references/architecture-doc.md): an accepted element as the
repo's state, a declined one as the repo's choice with its reason. Both are written as what the repo
does and why — never as a deviation from nzyme or a default.Idempotence is the test of the protocol: re-running it on a repo it just brought up to date shows no diff and writes nothing.
zsh setup.sh, then the repo's lint check, format check and typecheck. Fix what the applied
changes broke; report anything else.CLAUDE.md links ARCHITECTURE.md.git:setup and then dev:setup: dev:setup
checks what git:setup writes, and both record only commands they have run, which is why they
come after the checks. They are user-invoked, so read them by path:
~/.claude/plugins/marketplaces/kedrzu-skills/plugins/{git,dev}/skills/setup/SKILL.md, or
gh api repos/kedrzu/skills/contents/plugins/<plugin>/skills/setup/SKILL.md --jq .content | base64 -d.
Read this way nothing gets substituted: ${CLAUDE_PLUGIN_ROOT} is that plugin's directory and
$ARGUMENTS is empty. Both stop without writing on a repo already covered. What they would write
is a difference like any other: steps 4-6 of the apply protocol, ahead of their own "write and
report". If neither source is reachable, say so and name the two commands for the user to run.
On a request about a piece of work, a missing git-workflow or verify is one line in the report.references/repo-skills.md): create the missing ones and
bring the rest up to date, through steps 4-6 of the apply protocol.git-workflow exists, it owns commits.references/architecture-doc.md — ARCHITECTURE.md: structure, recording choices, when to split.references/repo-skills.md — the repo skill per area: which areas, what it holds, the inline line;
assets/repo-skill.md.tmpl.assets/*.tmpl — file templates with {{…}} placeholders; a dotfile's asset drops the dot
(gitignore.tmpl).assets/ARCHITECTURE.md.tmpl (opens in a new tab)assets/CLAUDE.md.tmpl (opens in a new tab)assets/app-package.json.tmpl (opens in a new tab)assets/bunfig.toml.tmpl (opens in a new tab)assets/claude-gitignore.tmpl (opens in a new tab)assets/claude-settings.json.tmpl (opens in a new tab)assets/editorconfig.tmpl (opens in a new tab)assets/eslint.config.mjs.tmpl (opens in a new tab)assets/gitattributes.tmpl (opens in a new tab)assets/gitignore.tmpl (opens in a new tab)assets/nx.json.tmpl (opens in a new tab)assets/oxfmtrc.json.tmpl (opens in a new tab)assets/oxlintrc.json.tmpl (opens in a new tab)assets/package.json.tmpl (opens in a new tab)assets/paseo.json.tmpl (opens in a new tab)assets/project.json.tmpl (opens in a new tab)assets/repo-skill.md.tmpl (opens in a new tab)assets/setup.build.sh.tmpl (opens in a new tab)assets/setup.sh.tmpl (opens in a new tab)assets/tsconfig.esm.json.tmpl (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub kedrzu/nzyme --plugin nzymeOther plugins' skills for the same job