scaffold-library
SkillWeb & browsingSetup library project structure with src, build config, exports, and tests
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the scaffold-library skill
What this skill tells your AI
The instructions your AI receives, as published by porcupine-md/anoa-browser in .claude/skills/core/scaffold-library/SKILL.md and read by ahel’s review.
Context
You will create a library "{{input.name}}" targeting {{input.runtime}}. Output format: {{input.format}}.
Instructions
-
Setup package.json
- name, version, description, license
- main (CJS), module (ESM), types
- exports field for dual package
- scripts: build, test, lint, prepublishOnly
- peerDependencies (not dependencies) for shared libs
-
Setup TypeScript config
tsconfig.jsonfor sourcetsconfig.build.jsonfor build output- Strict mode enabled
- Declaration files enabled
-
Setup build tool
- tsup or unbuild (simple, near-zero-config)
- Config for ESM + CJS output
- Source maps
- DTS generation
-
Create source structure
src/ ├── index.ts # Public API exports ├── types.ts # Shared types └── [modules]/ # Feature modules -
Setup testing
- Vitest config
- Example test file
- Coverage config
-
Setup linting
- ESLint config (if not already present)
- Prettier config (if not already present)
-
Create README stub
- Installation
- Quick start
- API reference placeholder
-
Setup CI (if jonggrang.json ci.provider != none)
- Build + test on PR
- Publish on tag/release
Script
#!/bin/bash
# Initialize if no package.json
if [ ! -f "package.json" ]; then
npm init -y
fi
# Install dev dependencies
npm install -D typescript tsup vitest @types/node
Validation
-
npm run buildsucceeds -
npm run testpasses - Output files generated (dist/)
- Types generated (.d.ts)
- ESM import works
- CJS require works (if format includes cjs)
- Exports field correct in package.json
Signals
- GitHub stars
- 23
- Forks
- 2
- Last commit
- Sep 2026
Advanced
- Catalog kind
- skill
- Gateway key
scaffold-library- Source
- github.com/porcupine-md/anoa-browser