By carlonicora
Skills for building apps with nestjs-neo4jsonapi + nextjs-jsonapi: architecture rules, module generators, diagram import, plan writing, and architecture audits
Use BEFORE editing or creating any TypeScript file under apps/api/src/features, apps/web/src/features, or packages/*/src in a nestjs-neo4jsonapi + nextjs-jsonapi monorepo. Routes to the layer-specific reference doc (entity, DTO, repository, service, controller, model, interface, service, component) and surfaces NestJS+Neo4j+JSON:API rules. Required reading before backend or frontend feature work.
Use when generating feature modules from an Arrows.app diagram or any Neo4j-style entity-relationship JSON (a `{nodes, relationships, style}` export) in a nestjs-neo4jsonapi + nextjs-jsonapi monorepo. Triggers include "generate modules from this diagram", "import the arrows/ER JSON", "scaffold from <name>.json", or turning a graph data-model export into modules.
Use when creating, scaffolding, or generating a new feature module or entity in a nestjs-neo4jsonapi + nextjs-jsonapi monorepo — backend (NestJS), frontend (Next.js), or both. Triggers include "create a new module", "scaffold an entity", "generate the backend/frontend for X", "add a feature module", or building a new feature that needs CRUD code.
Use when auditing uncommitted changes for architecture compliance — before committing, before handing work back to the user, after generating or implementing a module, or whenever asked to verify/audit/review a diff against the nestjs-neo4jsonapi + nextjs-jsonapi architecture rules.
Use when about to write an implementation plan in this project — typically right after brainstorming finishes a spec, or when the brainstorming flow asks if it should write the plan, or when the user asks for a plan. Wraps superpowers:writing-plans with nja-architecture compliance — it enforces inline citations to canonical examples, a structured self-audit before the plan is saved, skill-wins-over-plan in sub-agent dispatch, and an architecture audit step inside the final verification task.
Modifies files
Hook triggers on file write and edit operations
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
A Claude Code plugin that teaches Claude how applications built on
@carlonicora/nestjs-neo4jsonapi
and @carlonicora/nextjs-jsonapi
are structured — so it builds, plans, generates, and audits code that follows those
frameworks' conventions instead of drifting away from them.
These skills are application-agnostic: they describe the way the two libraries work, not any single product. Drop the plugin into any monorepo that consumes both libraries.
| Skill | Use when |
|---|---|
nja-architecture | Before editing or creating any TypeScript file under apps/api/src/features, apps/web/src/features, or packages/*/src. Routes to the layer-specific reference doc (entity, DTO, repository, service, controller, model, interface, service, component) and surfaces the NestJS + Neo4j + JSON:API rules. The single source of truth — the other skills defer to it. |
nja-generate | Creating, scaffolding, or generating a new feature module or entity (backend, frontend, or both). Drives the generate-module / generate-web-module generators from a single JSON "module shape". |
nja-arrows | Generating modules from an Arrows.app diagram (or any {nodes, relationships, style} graph/ER JSON export). Translates the diagram into confirmed structure/*.json — asking per node for what the diagram can't encode — then hands off to nja-generate. |
nja-writing-plan | Writing an implementation plan. Wraps superpowers:writing-plans with architecture compliance: inline citations to canonical examples, a structured self-audit, skill-wins-over-plan dispatch, and an audit step in the final verification task. |
nja-verify | Auditing uncommitted changes against the architecture rules — before committing, before handing work back, or after generating/implementing a module. Read-only: it reports violations with evidence, it does not fix them. |
nja-architecture is the authority; nja-generate, nja-writing-plan, and nja-verify
all invoke it and cite its reference docs.
The plugin is self-enforcing on install — three layers, escalating from advisory to
deterministic. All require jq on PATH; hooks run harness-side and cost zero model
context.
Scoped to nja projects only. The plugin installs at user scope, so its hooks see every repo — but they go completely inert unless the current repo is actually an nja project (any tracked
package.jsondepends on@carlonicora/nestjs-neo4jsonapior@carlonicora/nextjs-jsonapi, or the repo has annja.config.json). So editing an unrelated project — even one using Radix or NestJS — is never affected. (nja-lintrun manually always checks whatever you pass it, by design.)
1. PreToolUse reminder (hooks/remind-architecture.sh) — fires before every
Edit/Write/MultiEdit. When the target file matches the nja-architecture routing
table (e.g. an *.repository.ts under apps/api/src/features), it injects a reminder to
invoke the skill and points at the exact reference doc. Soft — reminder only, never
blocks.
2. nja-lint (scripts/nja-lint.sh) — a zero-dependency, deterministic checker for
the greppable anti-patterns in nja-architecture/references/anti-patterns.md
(fetch() to the app's own API, manual SKIP/LIMIT, hand-written Cypher with no
buildDefaultMatch() — a cross-tenant company-scope leak, asChild, @radix-ui imports,
controllers importing repositories; plus WARN-level heuristics like raw result.records
access and @IsString() on date DTOs).
Two tiers — BLOCKING (calibrated near-zero false positives) and WARN (heuristic).
The fetch rule targets only literal own-API calls, so S3 presigned uploads and local
functions named fetch() are not flagged. Run it directly:
# check specific files, or omit args to check `git status` (the uncommitted diff)
nja/scripts/nja-lint.sh apps/api/src/features/crm/account/repositories/account.repository.ts
Suppress a genuine false positive with a comment containing nja-lint-ignore on that line.
3. Stop gate (hooks/architecture-gate.sh) — runs nja-lint over the uncommitted
diff when Claude tries to end its turn. If any BLOCKING violation remains, it blocks
completion and feeds the violation list back, so a turn cannot be declared "done" with
mechanical architecture violations in the diff. It's grep-fast (sub-second) — no build or
tests — and is soft on non-git directories and when warnings are the only finding.
# Add the marketplace
/plugin marketplace add carlonicora/nja
# Install the plugin
/plugin install nja@nja
npx claudepluginhub carlonicora/nja --plugin njaUltra-compressed communication mode. Cuts ~75% of tokens while keeping full technical accuracy by speaking like a caveman.
Memory compression system for Claude Code - persist context across sessions
Multi-model consensus engine integrating OpenAI Codex CLI, Gemini CLI, and Claude CLI for collaborative code review and problem-solving.
Curate auto-memory, promote learnings to CLAUDE.md and rules, extract proven patterns into reusable skills.