new-package
Skill0 starsChanged 43 days agoMITView on GitHub
Scaffold a new workspace package under packages/ or apps/ with the house shape (catalog deps, base tsconfig, source-direct exports, vitest) and add it to the AGENTS.md monorepo map. Use when the user says "new package", "add a package", "create an app", or "scaffold a package". Also use unprompted when code you are adding belongs in no existing workspace package.
- Installs packages
5 other projects use a version of this.
Adopted by
Most recently taken up by
- LedgerHQ/ledger-livetheir own version, first seen Nov 9, 2026
- jthorare/agentic-workflowtheir own version, first seen Oct 25, 2026
- joi-fairshare/agentic-workflowtheir own version, first seen Oct 13, 2026
- petarzarkov/dunxtheir own version, first seen Oct 9, 2026
- ninoverse/claude-mit-go-templatetheir own version, first seen Oct 2, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- LedgerHQ/ledger-live★ 627same name
- petarzarkov/dunx★ 93same name
- joi-fairshare/agentic-workflow★ 3same name
- jthorare/agentic-workflow★ 3same name
- ninoverse/claude-mit-go-template★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository21 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- first-runSkill
- fix-ciSkill
- new-adrSkill
- new-specSkill
- prSkill
- releaseSkill
- sync-templateSkill
- update-depsSkill
- verify-docsSkill
- first-runSkill
- fix-ciSkill
- new-adrSkill
- new-packageSkill
- new-specSkill
- prSkill
- releaseSkill
- sync-templateSkill
- update-depsSkill
- verify-docsSkill
The file
We split this skill into the rules it gives an agent
7 rules. 0 are common, 2 are distinctive, and 5 are very specific to this project.
0
Common
Most of the 5 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 13
Create package.json in this exact shape, every version catalog::
- Very specific: line 36
Keep vite: vitest 4 peers on vite >= 6 and fails at startup without an explicit entry.
- Very specific: line 58
Create vitest.config.ts: copy packages/example-package/vitest.config.ts if it still exists, else a minimal defineConfig({ test: {} }).
- Very specific: line 61
Create the entry file and a test for it with at least one real test, so the done gate is green.
- Distinctive: line 71
Add one line to the AGENTS.md "Monorepo map": the path, then its purpose after a colon, as the existing lines do.
- Very specific: line 82
Run pnpm install (CI installs with a frozen lockfile and fails if it misses the new member).
- Distinctive: line 93
If the request names the package and its placement, use them.
“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
New workspace package
Scaffold under packages/<name> (shared library) or apps/<name> (deployable
app or service). Placement alone registers it; the workspace globs cover both.
- Directory is kebab-case; the package name takes the scope the existing
workspace packages use:
@<scope>/<name>(@repo/<name>out of the box). Create
package.jsonin this exact shape, every versioncatalog::{ "name": "@<scope>/<name>", "type": "module", "version": "0.0.0", "private": true, "exports": { ".": "./src/index.ts" }, "scripts": { "test": "vitest run", "test:watch": "vitest", "typecheck": "tsc --noEmit" }, "devDependencies": { "@types/node": "catalog:", "typescript": "catalog:", "vite": "catalog:", "vitest": "catalog:" } }Keep
vite: vitest 4 peers on vite >= 6 and fails at startup without an explicit entry.@vitest/coverage-v8is omitted repo-wide because its transitive vite peer dedupes to vitepress's vite 5 and crashesvitest --coverage; re-add it once vitepress moves off vite 5 (see thevitenote inpnpm-workspace.yaml).Exports stay source-direct; add a
buildscript only when the package must emitdist/(turbo discovers it). No per-packagelint; lint runs repo-wide. Internal cross-package deps use"workspace:*". Add any other dependency withpnpm add <dep> --filter <package>(-Dfor a dev one):catalogMode: strictwrites itscatalog:entry and reference, then runpnpm lint:fix. A new dependency is a load-bearing choice to record (new-adr skill).An app under
apps/dropsexports, adds"start": "node src/main.ts", and lists the workspace packages it uses underdependenciesas"workspace:*"; seeapps/example-app.- Create
tsconfig.json, exactly:{ "extends": "../../tsconfig.base.json", "exclude": ["node_modules", "dist"] }It lists noinclude, so every TypeScript file in the package is typechecked, abin/script or a root config as much assrc/andtest/(pnpm test:gatesfails a package tsconfig that leaves one out). - Create
vitest.config.ts: copypackages/example-package/vitest.config.tsif it still exists, else a minimaldefineConfig({ test: {} }). Coverage is omitted until vitepress leaves vite 5 (the note in that file says why). - Create the entry file and a test for it with at least one real test, so
the done gate is green. A library gets
src/index.tsandtest/index.test.ts, which imports../src/index.ts(relative imports carry explicit.tsextensions). An app getssrc/main.ts, the file itsstartscript runs, andtest/main.test.ts, which spawns it with node asapps/example-appdoes. Tests live intest/, never insrc/: Vitest's default glob finds them with no config, and a colocated test is an ESLint error. If this replacespackages/example-packageorapps/example-app(which depends on the package), delete or rename the sample in the same change and fix the other's dependency. - Add one line to the AGENTS.md "Monorepo map": the path, then its purpose
after a colon, as the existing lines do. When this replaces a sample,
rewrite every line that names it: its map line and the AGENTS.md Commands
entry that starts the sample app. A README made from an older template
names the samples too; the step 7 check below finds those lines, but not
its sentence under "Where things live" that says the samples show the
house shape, so rewrite that once neither sample is left. If the package
needs its own conventions, write
<package>/AGENTS.mdand<package>/CLAUDE.mdcontaining only@AGENTS.md: the pairing is how Claude Code finds a nested rulebook; when Codex and Gemini load the nestedAGENTS.mdis under "Nested rulebooks" indocs/template/agent-surfaces.md. - Run
pnpm install(CI installs with a frozen lockfile and fails if it misses the new member). When this replaced a sample,git grep -n --untracked -e <sample> -- . ':!.claude/skills' ':!.agents/skills' ':!docs/internal/decisions' ':!CHANGELOG.md'must then print nothing for each sample replaced (example-package,example-app) but lines in the First run section ofdocs/public/getting-started.md(or of an older template's README) while it stands; the install has already rewrittenpnpm-lock.yaml. The decision records andCHANGELOG.mdhold history, so a sample they name stays as written. Then runpnpm verify. If the package adds externally observable behavior, spec it (new-spec skill).
If the request names the package and its placement, use them.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

