/writing-typescript
Idiomatic TypeScript development. Use when writing TypeScript code, Node.js
$ npx -y skills add alexei-led/cc-thingz --skill writing-typescript --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/writing-typescript
Context preview
The summary Claude sees to decide when to auto-load this skill.
Idiomatic TypeScript development. Use when writing TypeScript code, Node.js
SKILL.md
writing-typescript.SKILL.mddescription: Idiomatic TypeScript development. Use when writing TypeScript code, Node.js
services, React apps, or TypeScript design advice. Emphasizes strict typing, boundary
validation, composition, fast feedback, behavior tests, and project-configured tooling.
NOT for Go, Python, Rust, plain HTML/CSS/JS, or server-rendered templates (use writing-web).
name: writing-typescript
TypeScript Development
Scope
- Use for `.ts` and `.tsx`, Node.js services, React apps, typed APIs, and TypeScript design advice.
- Do not use for Go, Python, Rust, plain HTML/CSS/JS, or server-rendered templates.
- Follow the repository's TypeScript version, tsconfig, package manager, framework, test runner, and lint rules.
- Do not add dependencies or switch frameworks unless the project already uses them or the user approves.
Reference Reads
- Read only the references needed for the task.
- Read `references/principles.md` for non-trivial TypeScript changes or reviews.
- Read `references/patterns.md` for data models, validation, async flow, or module boundaries.
- Read `references/react.md` for `.tsx`, hooks, component state, forms, performance, or React tests.
- Read `references/testing.md` before adding or changing TypeScript tests.
- Read `references/linting.md` before changing lint config, lint commands, or slow lint workflows.
Defaults
- Preserve strict typing; do not weaken compiler options to pass checks.
- Use `unknown` for untrusted input. Avoid `any`; isolate it only for unavoidable interop.
- Validate API, JSON, env, storage, and form data at the boundary before typed use.
- Use discriminated unions for variants, async state, and domain states.
- Use guard clauses and focused helpers. Avoid deep nesting, global state, and mixed concerns.
- Use the project's error conventions; prefer unions or `Result` for recoverable failures.
- Pass dependencies explicitly; avoid inheritance, singletons, and hidden module state.
- Avoid unsafe casts, non-null assertions, broad index signatures, boolean-flag state, and new app enums where literal unions fit.
Comments and JSDoc
- Use JSDoc or TSDoc for exported APIs and non-obvious public properties or methods.
- Avoid merely restating property, parameter, or type names.
- Add implementation comments only for non-obvious constraints, invariants, side effects, tradeoffs, or interoperability quirks.
- Keep comments short. Move longer rationale to docs, issue links, or design notes.
- Do not comment obvious code.
- Keep tests readable without comments; add one only for unobvious fixtures, timers, concurrency, browser setup, or regression context.
Testing and Verification
- For behavior changes, include success and failure tests. For React, cover affected user-visible states.
- Use focused test, typecheck, and lint commands for the changed file, package, or workspace while editing.
- Run the project's configured typecheck, tests, lint, and format checks for the changed package or workspace before final output.
- Keep coverage, end-to-end tests, and expensive debug diagnostics off the hot path unless they are the task.
- Report checks run, failures, and unchecked risks. Do not claim success without a clean check or an explicit reason it was skipped.
Failure Handling
- If project root is unclear, identify the nearest `package.json` and `tsconfig.json`; in monorepos, state the selected package.
- If strict compiler options are absent, do not silently weaken new code. State the gap and keep the change locally type-safe.
- If validation needs a schema/form library not already used, ask before adding it; otherwise use a narrow type guard.
- If typecheck or tests fail, quote the exact diagnostic or failing assertion, state the cause, and fix the type/model boundary before widening types.
- Do not run destructive shell commands. For broad or risky changes, state the risk and ask before acting.
Final Response
- Files changed:
- Checks:
- Skipped checks:
- Risks/follow-ups:
Read more
description: Idiomatic TypeScript development. Use when writing TypeScript code, Node.js services, React apps, or TypeScript design advice. Emphasizes strict typing, boundary validation, composition, fast feedback, behavior tests, and project-configured tooling. NOT for Go, Python, Rust, plain HTML/CSS/JS, or server-rendered templates (use writing-web). name: writing-typescript
TypeScript Development
Scope
- Use for `.ts` and `.tsx`, Node.js services, React apps, typed APIs, and TypeScript design advice.
- Do not use for Go, Python, Rust, plain HTML/CSS/JS, or server-rendered templates.
- Follow the repository's TypeScript version, tsconfig, package manager, framework, test runner, and lint rules.
- Do not add dependencies or switch frameworks unless the project already uses them or the user approves.
Reference Reads
- Read only the references needed for the task.
- Read `references/principles.md` for non-trivial TypeScript changes or reviews.
- Read `references/patterns.md` for data models, validation, async flow, or module boundaries.
- Read `references/react.md` for `.tsx`, hooks, component state, forms, performance, or React tests.
- Read `references/testing.md` before adding or changing TypeScript tests.
- Read `references/linting.md` before changing lint config, lint commands, or slow lint workflows.
Defaults
- Preserve strict typing; do not weaken compiler options to pass checks.
- Use `unknown` for untrusted input. Avoid `any`; isolate it only for unavoidable interop.
- Validate API, JSON, env, storage, and form data at the boundary before typed use.
- Use discriminated unions for variants, async state, and domain states.
- Use guard clauses and focused helpers. Avoid deep nesting, global state, and mixed concerns.
- Use the project's error conventions; prefer unions or `Result` for recoverable failures.
- Pass dependencies explicitly; avoid inheritance, singletons, and hidden module state.
- Avoid unsafe casts, non-null assertions, broad index signatures, boolean-flag state, and new app enums where literal unions fit.
Comments and JSDoc
- Use JSDoc or TSDoc for exported APIs and non-obvious public properties or methods.
- Avoid merely restating property, parameter, or type names.
- Add implementation comments only for non-obvious constraints, invariants, side effects, tradeoffs, or interoperability quirks.
- Keep comments short. Move longer rationale to docs, issue links, or design notes.
- Do not comment obvious code.
- Keep tests readable without comments; add one only for unobvious fixtures, timers, concurrency, browser setup, or regression context.
Testing and Verification
- For behavior changes, include success and failure tests. For React, cover affected user-visible states.
- Use focused test, typecheck, and lint commands for the changed file, package, or workspace while editing.
- Run the project's configured typecheck, tests, lint, and format checks for the changed package or workspace before final output.
- Keep coverage, end-to-end tests, and expensive debug diagnostics off the hot path unless they are the task.
- Report checks run, failures, and unchecked risks. Do not claim success without a clean check or an explicit reason it was skipped.
Failure Handling
- If project root is unclear, identify the nearest `package.json` and `tsconfig.json`; in monorepos, state the selected package.
- If strict compiler options are absent, do not silently weaken new code. State the gap and keep the change locally type-safe.
- If validation needs a schema/form library not already used, ask before adding it; otherwise use a narrow type guard.
- If typecheck or tests fail, quote the exact diagnostic or failing assertion, state the cause, and fix the type/model boundary before widening types.
- Do not run destructive shell commands. For broad or risky changes, state the risk and ask before acting.
Final Response
- Files changed:
- Checks:
- Skipped checks:
- Risks/follow-ups:
Portable skills, agents, hooks, and Pi-native extensions for Claude Code, Codex CLI, GitHub Copilot, Cursor, Grok, and Pi. Gemini is retired.
Repo: alexei-led/cc-thingz
Other skills on cc-thingz.
- /browser-automation
Use this for browser exploration, validation, screenshots, recordings, frontend debugging, accessibility checks, and E2E/user-flow testing. Do not delete, reset, or mutate non-test data without explicit user confirmation.
Open skill - /playwright-skill
Support-only helper for `browser-automation`. Provides Playwright primitives: dev-server detection, a script runner (`scripts/run.js`), screenshot CLIs, and helper utilities (`scripts/lib/helpers.js`).
Open skill - /committing-code
Scope: inspect changes, group them, and create normal commits only. Do not rewrite history, amend existing commits, force-push, or stage secrets. Ground the proposal in git status, diff, and recent log output.
Open skill - /documenting-code
Scope: documentation files, agent instruction files, and useful code comments only. Not for code-quality review; use `reviewing-code` for that.
Open skill - /fixing-code
Follow the base skill. This Claude overlay only defines tool use and execution details.
Open skill - /improving-tests
Follow the base skill. This Claude overlay only defines tool use and execution details.
Open skill

