typescript-project-setup
Skill1 starsChanged 6 days agoMITView on GitHub
How to set up a new TypeScript project
- Installs packages
In this repository4 other files it gives its agents.
- AGENTS.mdAGENTS.md
- typescript-build-referencesSkill
- typescript-strictSkill
- typescript-updateSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 2 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 11
Run npx tsc --init to create a tsconfig.json file
- Very specific: line 12
Read the tsconfig.json it generates and make the edits suggested in that file:
- Very specific: line 13
If running server-side or local scripts, add node to types and npm install --save-dev @types/node
- Very specific: line 15
If using vite, esbuild, or similar bundlers, set moduleResolution to bundler
- Distinctive: line 16
If you have more specific info from the bundler info, defer to it instead
- Very specific: line 17
Create a src directory and add your TypeScript files there
- Very specific: line 18
Add a build script to your package.json that runs tsc
- Distinctive: line 19
If using a bundler, add the appropriate build script for it as well
- Very specific: line 21
If you're running TypeScript code on the commandline, tsx is no longer necessary or recommended if node 22.18.0 or later is installed.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
<!-- prettier-ignore-start -->To set up a new repo with TypeScript, follow these steps unless you have reason to deviate from them:
npm install --save-dev typescript@latest(or use the user's package manager of choice)- Run
npx tsc --initto create atsconfig.jsonfile - Read the tsconfig.json it generates and make the edits suggested in that file:
- If running server-side or local scripts, add
nodetotypesandnpm install --save-dev @types/node - Set
rootDirtosrcandoutDirtodist - If using vite, esbuild, or similar bundlers, set
moduleResolutiontobundler- If you have more specific info from the bundler info, defer to it instead
- If running server-side or local scripts, add
- Create a
srcdirectory and add your TypeScript files there - Add a build script to your
package.jsonthat runstsc - If using a bundler, add the appropriate build script for it as well
If you're running TypeScript code on the commandline, tsx is no longer necessary or recommended if node 22.18.0 or later is installed.
Enable erasableSyntaxOnly and rewriteRelativeImportExtensions in the tsconfig and run e.g. node src/index.ts directly.
<!-- prettier-ignore-end -->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.

