Skip to main content
prompt GP ChatGPT

TypeScript Library taste — Claude & Claude.ai prompt: TS library

A prompt that pins down conventions for a TypeScript library: pnpm, strict tsconfig, tsup, vitest, Changesets. Useful when a project needs one style from the first commit.

Open on GitHub

What TypeScript Library taste does

This is a prompt listing default choices for a TypeScript library. Each rule carries a confidence score: pnpm as the package manager and strict mode with noUncheckedIndexedAccess in tsconfig sit at 0.95, while building with tsup to emit both ESM and CJS plus .d.ts files sits at 0.90. The low scores matter too. Biome instead of ESLint plus Prettier is 0.70, and publishing with npm provenance from GitHub Actions is 0.75 — the author flags where a rule is debatable.

Packaging and tests come next. The exports map goes into package.json rather than leaning on main, the package is marked "sideEffects": false for tree shaking, and runtime dependencies stay near zero. Tests run on vitest with *.test.ts files kept next to the source. Changesets handles versioning and changelogs, versions start at 0.1.0 and follow semver strictly once stable. Named exports beat default exports, and types come in through import type.

Untrusted input gets validated with zod, with types inferred from the schemas. Before every release, CI runs publint and arethetypeswrong — skip that and a broken exports map ships to npm, which is reason enough to keep the step. The README stays short: an install line, a minimal example, an API table. The prompt targets Claude and Claude.ai and ships no installable file, so you paste the text into a chat as a system instruction or an opening message.

What it helps with

  • set one convention set for a new TypeScript library
  • configure strict mode and noUncheckedIndexedAccess in tsconfig
  • build ESM and CJS with tsup plus .d.ts output
  • check the exports map before publishing to npm
  • move a project off ESLint and Prettier onto Biome

Example prompts for the agent

  • Apply these rules and scaffold a new TypeScript package for me
  • Check my package.json and tsconfig against these rules and list the gaps
  • Build the library with tsup and add vitest and Changesets following these rules

How to install TypeScript Library taste

How to use

Paste the text at the start of a chat or into project instructions

Questions about TypeScript Library taste

How do I install TypeScript Library taste in Claude?

There is no install command: you paste the prompt text into a Claude chat as a system instruction or an opening message.

What does TypeScript Library taste do?

It sets default choices for a TypeScript library: pnpm, a strict tsconfig, tsup, vitest, Changesets, zod, and publint plus arethetypeswrong in CI.

What do the confidence scores mean?

Each rule carries a number between 0.70 and 0.95. A low value, such as 0.70 for Biome over ESLint and Prettier, signals a debatable rule worth discussing.

Source text

prompts.csv · CC0-1.0
# TypeScript library taste
- Use pnpm as the package manager. Confidence: 0.95
- Enable strict mode and noUncheckedIndexedAccess in tsconfig. Confidence: 0.95
- Build with tsup and emit both ESM and CJS with .d.ts files. Confidence: 0.90
- Declare the exports map in package.json instead of relying on main. Confidence: 0.90
- Test with vitest and keep tests next to source as *.test.ts. Confidence: 0.90
- Use Changesets for versioning and changelogs. Confidence: 0.85
- Lint and format with Biome instead of ESLint plus Prettier. Confidence: 0.70
- Keep runtime dependencies at zero where practical. Confidence: 0.85
- Mark the package with "sideEffects": false to enable tree shaking. Confidence: 0.85
- Prefer named exports over default exports. Confidence: 0.90
- Validate untrusted input with zod and infer types from the schemas. Confidence: 0.80
- Run publint and arethetypeswrong in CI before every release. Confidence: 0.80
- Use type-only imports (import type) for types. Confidence: 0.85
- Publish with npm provenance enabled from GitHub Actions. Confidence: 0.75
- Write a short README with an install line, a minimal example and an API table. Confidence: 0.90
- Start versions at 0.1.0 and follow semver strictly once stable. Confidence: 0.70

© f · CC0-1.0 · f/prompts.chat

Similar prompts

All prompts for Programming languages →

From the same set77

The whole set →
Python Packaging taste A prompt that hands the model a fixed set of Python packaging rules: pyproject.toml, src/, uv, Ruff. Useful when a new package needs one consistent style. GP ChatGPT ★ 174,597repo stars Open Source Release Checklist Builder (YAML) This prompt turns an upcoming open-source release into a YAML checklist for versions, tests, artifacts, security notes, rollback, and announcements. GP ChatGPT ★ 174,597repo stars Dockerfile and CI taste A prompt that lists rules for Dockerfiles and CI: multi-stage builds, non-root user, image scanning. Useful when you ask an AI to write or review a build config. GP ChatGPT ★ 174,597repo stars Senior Code Reviewer (severity-ranked) A code review prompt that ranks findings from blockers down to nits and closes with a verdict. Useful when you need to know what in a patch actually breaks. GP ChatGPT ★ 174,597repo stars Claude Web Page Redesign Planning Prompt A prompt that makes the model audit the current markup and code first, then hand back a redesign plan in markdown. No edits get made. GP ChatGPT ★ 174,597repo stars Automated Text Typing Every 5 Minutes with Python This prompt turns the chat into a Python automation engineer that writes a script typing your text on a timer. Handy when the same line has to go into another window without you touching the keyboard. GP ChatGPT ★ 174,597repo stars Fix LaTeX dollars This prompt sorts every $ in Markdown into currency, math or shell code and escapes only the currency ones. Useful when your build throws warnings. GP ChatGPT ★ 174,597repo stars Vector-Based Space Combat System A prompt that turns the chat into a game mechanics engineer: give it a high-speed combat concept, get movement and projectile logic back. GP ChatGPT ★ 174,597repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor