- Home
- Skills
- Alinaqi
- Claude Bootstrap
- Typescript
typescript_skill
- Shell
450
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill alinaqi/claude-bootstrap --skill typescript- SKILL.md4.9 KB
Overview
This skill provides an opinionated TypeScript starter tailored for strict mode projects with ESLint and Jest integrated. It enforces strong type safety, consistent project layout, and automated quality checks across CI and pre-commit hooks. The configuration aims for secure, maintainable code and predictable developer experience.
How this skill works
It enables TypeScript strict compiler options and a strict ESLint configuration to catch type and style issues early. The package scripts and GitHub Actions run linting, type checks, and Jest tests (with coverage enforcement) on pushes and pull requests. Pre-commit hooks run linting, formatting, type checks, and changed-file tests to prevent low-quality code entering the repo.
When to use it
- Starting a new TypeScript project that must prioritize correctness and security.
- Bootstrapping services or libraries where API contracts and runtime validation are important.
- Teams that require automated CI checks and pre-commit enforcement to maintain quality.
- Codebases that benefit from discriminated unions, branded types, and runtime validation patterns.
- Projects that want a consistent structure separating pure business logic from side effects.
Best practices
- Enable full TypeScript strict mode and fail the build on type errors.
- Separate core business logic (pure functions) from infra/side-effect code for easier testing.
- Use discriminated unions and branded types to model domain-safe identifiers and results.
- Prefer runtime validation libraries like Zod for parsing external input instead of trusting types alone.
- Enforce ESLint rules that ban explicit any, excessive complexity, and implicit returns.
- Run lint, typecheck, and tests in CI and as pre-commit hooks to catch regressions early.
Example use cases
- API service where src/core contains business rules and src/infra contains HTTP and DB adapters.
- Monorepo package that must export a stable, well-typed public API from src/core/index.ts.
- Secure form handling using Zod schemas to validate and infer types for request payloads.
- Library development with strict lint rules and tests to keep public surface minimal and predictable.
- Continuous integration pipelines that block merges with failing type checks, lint errors, or low coverage.
FAQ
Run tsc --noEmit locally and include npm run typecheck as a CI step; pre-commit hooks should also run tsc --noEmit to block commits with type errors.
When should I use branded types versus plain strings?
Use branded types for domain identifiers to prevent accidental mixing of different ID types at compile time; use plain strings only when there is no cross-domain risk.