Enforces a unified, production-ready project setup (scripts, linting, testing, biome, lefthook) across any JS/TS project (backend, frontend, CLI, etc.). This skill MUST be invoked when initializing a new project.
80%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Medium
Suggest reviewing before use
Fix and improve this skill with Tessl
tessl review fix ./skills/project-setup-standardizer/SKILL.mdThis skill is MANDATORY and must be invoked when creating a new project.
You are responsible for transforming an existing JavaScript/TypeScript project into a production-ready, standardized structure.
Your goal is NOT to suggest — you MUST apply and enforce the conventions below.
Before making any changes, detect the project type using these signals:
| Signal | Type |
|---|---|
dependencies contains react or vue | frontend |
devDependencies contains vite (without react/vue) | frontend |
dependencies contains @nestjs/core or express or fastify | backend |
bin field exists in package.json | CLI |
| None of the above | library |
Frontend projects get additional tools (stylelint, steiger). All other types share the base setup.
Before installing Biome, you MUST remove ESLint and Prettier if present:
.eslintrc*, .eslintignore, .prettierrc*, .prettierignorepackage.json dependencies/devDependencies: eslint, prettier, and all eslint-* / prettier-*
packagesYou MUST normalize package.json/scripts into clearly separated sections using visual separators.
Use this exact pattern:
"scripts": {
"________________ BUILD AND RUN ________________": "",
"build": "...",
"start:dev": "...",
"start:prod": "...",
"________________ FORMAT AND LINT ________________": "",
"lint": "biome check",
"lint:fix": "biome check --write",
"lint:fix:unsafe": "biome check --write --unsafe",
"ts:check": "tsc --noEmit",
"knip": "knip --production",
"check": "run-p ts:check lint:fix knip",
"________________ TEST ________________": "",
"test": "vitest run",
"test:watch": "vitest",
"test:cov": "vitest run --coverage",
"________________ OTHER ________________": "",
"prepare": "is-ci || lefthook install",
"update": "npx npm-check-updates -u && rimraf node_modules package-lock.json && npm i",
"postupdate": "npm run lint:fix && npm run check"
}If the project has distinct unit and e2e test layers, add:
"test:unit": "...",
"test:e2e": "...",
"test:all": "run-s test:unit test:e2e"Otherwise omit test:all — do not duplicate test under a different name.
check script → central quality gatets:check; if no tsconfig.json exists, create a minimal one (see section 7)knip for unused exports/deps detectionlint:fix in checkrun-p (from npm-run-all) for parallel execution — never npx run-pprepare MUST use is-ci || lefthook install to avoid CI failures when lefthook is not yet installedIf project type is frontend, additionally include:
"lint:fsd": "steiger ./src",
"lint:style": "stylelint '**/*.{css,scss}'",
"lint:style:fix": "npm run lint:style -- --fix",
"check": "run-p lint:style ts:check lint:fix knip lint:fsd"steigercheckUse vitest only.
Rules:
test:covYou MUST ensure biome.json exists with this content:
{
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"formatter": {
"enabled": true,
"indentStyle": "space",
"lineEnding": "lf"
},
"javascript": {
"formatter": {
"quoteStyle": "single"
}
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"correctness": {
"noUnusedImports": "error",
"noUnusedVariables": "error",
"noUnusedFunctionParameters": "error"
}
}
},
"files": {
"includes": [
"**",
"!node_modules",
"!dist"
]
},
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
}
}You MUST write lefthook.yml with this exact content:
pre-commit:
parallel: false
commands:
check:
run: npm run check
pre-push:
parallel: false
commands:
test-all:
run: npm run test:allRules:
check (lint + types + knip) gates every commitpre-push does NOT re-run check (already gated at commit)If tsconfig.json does not exist, create it:
{
"compilerOptions": {
"target": "ES2022",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"strict": true,
"noEmit": true,
"skipLibCheck": true
},
"include": [
"src",
"*.ts"
]
}Ensure these are installed (add any that are missing):
Core (all project types):
@biomejs/biometypescriptvitestlefthookis-cinpm-run-allkniprimrafnpm-check-updatesFrontend only:
stylelintsteigerYou MUST follow this order:
package.json scripts (section 3, or 4 for frontend)biome.json (section 6)lefthook.yml (section 7)tsconfig.json if missing (section 8)NEVER:
You must output:
package.json (only the scripts and devDependencies sections)biome.jsonlefthook.ymltsconfig.json (if created)All configs must be complete and copy-paste ready.
Your job is to enforce:
If something is ambiguous — choose the stricter option.
uxname/kodu
db733be
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.