/harlan-agent-kit:pkg-conformfrom harlan-agent-kit
Conforms or scaffolds TypeScript packages and Nuxt modules with standardized architecture, workspace catalogs, CI, ESLint, Vitest, playgrounds, and fixtures.
Ships in harlan-agent-kit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Conform a package to standardized architecture, or scaffold a new one.
Before any edit, read and follow the worktree isolation contract.
Keep mutation in a task-owned wt worktree with a live claim. Keep the primary checkout read only.
/pkg-conform # conform existing project
/pkg-conform my-package # scaffold new package
Check for package.json in cwd to determine new vs existing.
Check for packages: in pnpm-workspace.yaml to detect monorepo vs single repo.
Check for @nuxt/module-builder in devDependencies to detect Nuxt module -> apply Nuxt-specific patterns.
Determine project type from the absolute path of the working directory:
| Path pattern | Type | Description |
|---|---|---|
*/pkg/* | Package | Published library/module -- needs exports, build, release |
*/sites/* or */site/* | Site | Nuxt app -- private, no exports, deploy not publish |
If path doesn't match either pattern, fall back to heuristics: private: true + nuxt in deps -> Site, otherwise Package.
The project type selects the rule set. Package-only rules (exports, obuild, test:attw, prepack, release) never apply to Sites. Site-only rules (nuxi scripts, generate, preview) never apply to Packages.
catalog:, check that the catalog version satisfies all consumers in the monorepo. A single catalog: entry shared across packages with different version requirements will break.tsc from the build, types won't be validated. Always keep typecheck as a separate script.module: preserve in tsconfig -- this is correct for packages built with obuild, but breaks Nuxt apps that need module: esnext or defer to .nuxt/tsconfig.json. Don't apply package tsconfig rules to sites..cjs.pnpm install after catalog changes -- lockfile must be regenerated. If you edit pnpm-workspace.yaml catalogs, always run pnpm install before running any other commands.dev:prepare order -- must run before typecheck or test. Missing this causes confusing "module not found" errors from auto-generated types.*/pkg/* vs */sites/*) can fail for unusual directory structures. Always verify the detected type before applying rules.paths-ignore: ['**/*.md'] at the event is fine.
An explicit paths list may include Markdown.
GitHub forbids paths and paths-ignore on the same event.Always prefer UnJS ecosystem packages over Node.js builtins:
| Instead of | Use | Import |
|---|---|---|
path | pathe | import { join, resolve } from 'pathe' |
console.log/warn/error | consola | import { consola } from 'consola' |
fetch | ofetch | import { $fetch } from 'ofetch' |
fs.readFile (JSON) | pkg-types | import { readPackageJSON } from 'pkg-types' |
Object.assign defaults | defu | import { defu } from 'defu' |
require.resolve | mlly | import { resolveImports } from 'mlly' |
EventEmitter | hookable | import { createHooks } from 'hookable' |
yargs/commander | citty | import { defineCommand } from 'citty' |
cosmiconfig | c12 | import { loadConfig } from 'c12' |
git clone templates | giget | import { downloadTemplate } from 'giget' |
Principles: ESM-only, minimal deps, full TypeScript, universal (Node/browser/edge)
Every project carries the same root documents and the same docs lifecycle. Read
root-docs.md before creating, moving, or
renaming any Markdown at the root or under docs/.
AGENTS.md is the only file an agent loads every turn, so it routes rather than
explains. Scaffold it from templates/AGENTS.md.
See references/pkg-package-json.md for single repo and monorepo root templates.
See references/site-package-json.md for template, optional scripts, and rules.
See references/site-structure.md for Nuxt 4 directory layout.
See references/site-configs.md for nuxt.config.ts, tsconfig, eslint, .npmrc, .gitignore templates.
test/
unit/ # unit tests
*.test.ts
e2e/ # e2e/integration tests
*.test.ts
fixtures/ # test data
@nuxt/module-builder detected)| Context | Location | Access | Registration |
|---|---|---|---|
| Build-time | src/module.ts | @nuxt/kit, nuxt config | runs during nuxi build |
| App runtime | src/runtime/app/ | Vue, useNuxtApp() | addPlugin(), addImports() |
| Server runtime | src/runtime/server/ | H3, Nitro | addServerHandler(), addServerPlugin() |
| Shared | src/runtime/shared/ | Pure JS only | import via alias |
See references/nuxt-module-template.md for full module.ts template with registration examples.
See references/nuxt-module-structure.md for directory layout and runtime rules.
See references/ for detailed templates:
../../references/code-comments.md - the comment contract for any code this skill writesreferences/pkg-package-json.md - single repo and monorepo package.json templatesreferences/catalogs.md - pnpm workspace catalogsreferences/configs.md - package config file templates (eslint, vitest, tsconfig, obuild)references/github-actions.md - CI/CD workflows (Package only)Site references (when project type is Site):
references/site-package-json.md - package.json template, rules, optional scriptsreferences/site-structure.md - Nuxt 4 directory layout and conventionsreferences/site-configs.md - nuxt.config.ts, tsconfig, eslint, npmrc, editorconfig, gitignorereferences/site-github-actions.md - the shared CI gate, deploy gating, self-hosted runner rulesNuxt module references (when @nuxt/module-builder detected):
references/nuxt-module-structure.md - directory layout and runtime rulesreferences/nuxt-module-template.md - full src/module.ts templatereferences/nuxt-configs.md - vitest, tsconfig, build.config, package.json for Nuxtreferences/nuxt-test-patterns.md - playground, fixtures, e2e tests../../references/root-docs.md - the root document set, docs lifecycle, and brief contracttemplates/AGENTS.md - the router templatepnpm-workspace.yaml - default catalog, ignoredBuiltDependencies, shellEmulatorpackage.json - type: module, migrate deps to catalog:, add packageManager.github/workflows/test.yml - action versions and Markdown path filtering.editorconfig - standard config.gitignore - standard patternseslint-plugin-harlanzw. Package: eslint.config.mjs; Site: eslint.config.jstsconfig.json - Package: module: preserve, moduleDetection: force; Site: extends .nuxt/tsconfig.jsonlint-staged in devDeps, pre-commit runs lint-stagedAGENTS.md - router shape, 30 to 80 lines. No CLAUDE.md, no CONTEXT.md. See ../../references/root-docs.mddocs/arch/, open work to docs/work/*/pkg/*)vitest.config.ts - coverage config, projects if unit + e2etsconfig.json - add types: ["node", "vitest/globals"]build.config.ts - obuild with explicit entry points.d.mts + .mjs), no CJSobuild, dev:prepare, test:attw, lint:fix, prepack, release.github/workflows/release.yml - action versions, bumpp --output=CHANGELOG.md*/sites/* or */site/*)package.json - private: true, engines.node set to latest stable even-numbered Node (e.g. >=22.0.0, >=24.0.0), no exports/main/types/filesdev (nuxi dev), build (nuxi prepare && nuxi build), postinstall (nuxt prepare), lint, lint:fix, typecheck (nuxt typecheck)pnpm.overrides - vite set to ^8.0.0nuxt.config.ts - future.compatibilityVersion: 5, compatibilityDate, standard module stacktsconfig.json - just { "extends": "./.nuxt/tsconfig.json" }eslint.config.js - antfu config with node/prefer-global/process and node/prefer-global/buffer off.npmrc - shamefully-hoist=true.gitignore - includes .nuxt/, .output/, .data/, .wrangler/, wrangler.toml.editorconfig - 2-space indent, LF, UTF-8, trim trailing whitespace (except .md)content.config.ts - Zod schemas for content collections (if using @nuxt/content)app/ directory - Nuxt 4 structure (app.vue, pages/, layouts/, components/, composables/).github/workflows/ci.yml - calls the shared gate and skips Markdown-only changes in the shape its required checks allow. See references/site-github-actions.md.When @nuxt/module-builder detected, also check (extends Package checklist):
Structure:
17. [ ] src/module.ts - main module entry exists
18. [ ] src/runtime/app/ - client/SSR code directory
19. [ ] src/runtime/server/ - Nitro server code directory
20. [ ] src/types.ts - module options types
21. [ ] playground/ - nuxt.config.ts, app.vue, pages/
22. [ ] test/fixtures/basic/ - nuxt.config.ts
Config:
23. [ ] pnpm-workspace.yaml - add nuxt: catalog
24. [ ] package.json - nuxt module exports, peerDependencies
25. [ ] tsconfig.json - extends .nuxt/tsconfig.json
26. [ ] vitest.config.ts - use defineVitestProject for e2e
27. [ ] build.config.ts - nuxt externals including #imports
28. [ ] eslint.config.mjs - ignore fixtures/playground
29. [ ] .gitignore - nuxt build dirs
Scripts:
30. [ ] typecheck - uses nuxt typecheck (not tsc)
31. [ ] dev:prepare - prepares module + playground
32. [ ] prepare:fixtures - prepares test fixtures
33. [ ] .github/workflows/test.yml - includes the prepare step and Markdown path filtering
Determine from cwd path whether this is a Package (*/pkg/*) or Site (*/sites/*, */site/*).
Read the config files directly (one batch of parallel Read calls) and compare against the checklist. The comparison is cross-cutting (catalog ↔ lockfile ↔ exports ↔ tsconfig interact), so read inline to keep the whole picture in context. Exception: for a large monorepo where one read pass is unwieldy, delegate per-package walks to subagent_type=Explore.
Read for all project types:
pnpm-workspace.yaml, package.json — deps, catalogs, packageManager, type.github/workflows/*.yml — action versions against v6 standardseslint.config.{js,mjs}, tsconfig.json, .editorconfig, .gitignoreIf Package, also read: build.config.ts, vitest.config.ts, package exports, release scripts.
If Site, also read: nuxt.config.ts, app/ structure (pages/, layouts/, components/), .npmrc.
If Nuxt module (Package + @nuxt/module-builder), also read: src/module.ts (registration methods, resolver, options), src/runtime/app/ (composables/plugins/imports), src/runtime/server/ (handlers/plugins/middleware — verify no Vue deps), playground/ + test/fixtures/ (nuxt.config, prepare scripts, test patterns).
Based on the review, apply necessary updates using the appropriate checklist (Package or Site).
Package verification:
Bash(background): pnpm install
Bash(background): pnpm lint
Bash(background): pnpm typecheck
Then sequentially (depends on install):
Bash: pnpm build
Bash: pnpm test --run
Site verification:
Bash(background): pnpm install
Bash(background): pnpm lint
Bash(background): pnpm typecheck # Uses nuxt typecheck
Then sequentially:
Bash: pnpm build # nuxi build
Nuxt module verification:
Bash: pnpm dev:prepare && pnpm prepare:fixtures
Bash(background): pnpm lint
Bash(background): pnpm typecheck # Uses nuxt typecheck
Bash: pnpm test:run
references/catalogs.md (opens in a new tab)references/configs.md (opens in a new tab)references/github-actions.md (opens in a new tab)references/nuxt-configs.md (opens in a new tab)references/nuxt-module-structure.md (opens in a new tab)references/nuxt-module-template.md (opens in a new tab)references/nuxt-test-patterns.md (opens in a new tab)references/pkg-package-json.md (opens in a new tab)references/site-configs.md (opens in a new tab)references/site-github-actions.md (opens in a new tab)references/site-package-json.md (opens in a new tab)references/site-structure.md (opens in a new tab)templates/AGENTS.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
TypeScript, Nuxt, ESLint, Vitest, pnpm
package-scaffolding, nuxt-module, monorepo, workspace-catalog
npx claudepluginhub harlan-zw/harlan-agent-kit --plugin harlan-agent-kit35 skills in this plugin
/adversarial-reviewReview one pull request adversarially, hand permitted defects to Repair, verify the remote head, and publish the Harlan Agent Kit bot status. Use for rigorous pre-merge PR review./agent-feedbackImprove one Agent skill from explicit Review feedback. Use only for the agent-feedback Routine./agent-retroWeekly retro of Harlan GitHub Agent sessions. Group transcripts by goal, find repeated and wasted work, and rank fixes to the controller, prompts, skills, or model. Use for agent retro, session review, agent efficiency, or self-improvement runs./brand-labExplore brand directions for a product on one private HTML page: a logo and small UI motifs, three or more variations each, with picks and rationale. Use when the user wants to rethink or strengthen a brand, logo, or brand motif, compare brand variations side by side, or says the branding feels basic./browserUse Harlan's browsers with the correct identity. Use before browser testing, signed-in automation, screenshots, or Chrome connection recovery. Covers prompt-free Clients and Agent Chrome, shared Harlan Chrome, dev-browser, and tab cleanup./ci-reviewInspect GitHub Actions logs for warnings and errors, triage their causes, and repair actionable findings. Use for the ci-review Routine and its Issue work.Other plugins' skills for the same job