agentleFS
MicrosoftKnown publishermicrosoft/typescript-skills/plugins/typescript/skills/typescript-project-setup/SKILL.md

typescript-project-setup

Skill1 starsChanged 6 days agoMITView on GitHub

How to set up a new TypeScript project

  • Installs packages

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
  1. Very specific:

    Run npx tsc --init to create a tsconfig.json file

    line 11
  2. Very specific:

    Read the tsconfig.json it generates and make the edits suggested in that file:

    line 12
  3. Very specific:

    If running server-side or local scripts, add node to types and npm install --save-dev @types/node

    line 13
  4. Very specific:

    If using vite, esbuild, or similar bundlers, set moduleResolution to bundler

    line 15
  5. Distinctive:

    If you have more specific info from the bundler info, defer to it instead

    line 16
  6. Very specific:

    Create a src directory and add your TypeScript files there

    line 17
  7. Very specific:

    Add a build script to your package.json that runs tsc

    line 18
  8. Distinctive:

    If using a bundler, add the appropriate build script for it as well

    line 19
  9. Very specific:

    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.

    line 21

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md
<!-- 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 --init to create a tsconfig.json file
  • Read the tsconfig.json it generates and make the edits suggested in that file:
    • If running server-side or local scripts, add node to types and npm install --save-dev @types/node
    • Set rootDir to src and outDir to dist
    • If using vite, esbuild, or similar bundlers, set moduleResolution to bundler
      • If you have more specific info from the bundler info, defer to it instead
  • Create a src directory and add your TypeScript files there
  • Add a build script to your package.json that runs tsc
  • 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 -->

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.