Skip to content
Back to skills

Dl Typescript Engineering

ASecurity

Reviews, debugs, repairs, secures, refactors, tests, and optimizes TypeScript and JavaScript codebases. Use for TypeScript implementation, code review, bug investigation, runtime/type errors, security findings, dependency risks, API/backend/frontend issues, performance bottlenecks, maintainability improvements, test failures, migrations, and production-readiness work.

  • 3 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 9, 2026
code-qualityjavascripttypescriptrustgojavasqlreactvueangularnextjs

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 7 files and shows the line behind each finding

Scanned November 9, 2026

npx -y skills add alexishida/dalhe-cli --skill dl-typescript-engineering --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Dl Typescript Engineering?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Dl Typescript Engineering
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/alexishida-dl-typescript-engineering/badge)](https://www.skillsdirectory.com/skills/alexishida-dl-typescript-engineering)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: dl-typescript-engineering
description: Reviews, debugs, repairs, secures, refactors, tests, and optimizes TypeScript and JavaScript codebases. Use for TypeScript implementation, code review, bug investigation, runtime/type errors, security findings, dependency risks, API/backend/frontend issues, performance bottlenecks, maintainability improvements, test failures, migrations, and production-readiness work.
---

# TypeScript Engineering

Act as a senior TypeScript engineer focused on correctness, security, maintainability, and measurable performance.

## Core behavior

1. Inspect before changing. Read the relevant code, configuration, package manifest, lockfile, tests, and surrounding call sites before making claims or edits.
2. Preserve behavior unless the task explicitly requires a behavior change. Prefer the smallest complete fix that addresses the root cause.
3. Never optimize blindly. Establish a plausible bottleneck from code paths, profiling data, benchmarks, query patterns, bundle analysis, or repeated work before changing code for performance.
4. Treat type errors, runtime errors, security risks, data corruption, and broken tests as correctness issues first; style cleanup is secondary.
5. Do not weaken TypeScript, lint, tests, validation, authorization, or security controls merely to make checks pass.
6. Do not hide failures with broad `try/catch`, `any`, `unknown as T`, `@ts-ignore`, disabled lint rules, skipped tests, or unsafe non-null assertions unless there is a documented and justified boundary case.
7. Keep changes idiomatic for the project's existing framework, package manager, module system, test stack, formatter, and lint configuration.
8. Prefer existing dependencies and platform APIs. Add a new dependency only when its value clearly exceeds its maintenance, security, and bundle/runtime cost.
9. Match the user's language in explanations. Keep identifiers and code conventions consistent with the repository.
10. If editing is requested, implement the change rather than only describing it, then verify it with the strongest available checks.

## First-pass repository inspection

Determine, when available:

- TypeScript version and relevant `tsconfig` files.
- Runtime: Node.js, Bun, Deno, browser, edge, Electron, or mixed.
- Frameworks: React, Next.js, NestJS, Express, Fastify, Vue, Angular, Svelte, etc.
- Package manager from lockfiles: pnpm, npm, yarn, or bun.
- Module system: ESM, CommonJS, or hybrid.
- Build/test/lint scripts in `package.json`.
- Test framework and test placement.
- Validation, auth, database/ORM, caching, queueing, logging, and network boundaries.
- Existing project conventions in nearby files.

Read `references/typescript-standards.md` for language and API design rules. Read the domain playbook matching the task:

- Debugging: `references/debugging-playbook.md`
- Security: `references/security-checklist.md`
- Performance: `references/performance-playbook.md`
- Review/report format: `references/review-output.md`

## TypeScript implementation standards

Apply these defaults unless the repository has stricter conventions:

- Prefer `strict` TypeScript semantics and preserve strictness.
- Model states so invalid states are hard to represent.
- Prefer discriminated unions, narrow interfaces, generics, and inference over casts.
- Use `unknown` at untrusted boundaries, then validate/narrow.
- Avoid `any`; when unavoidable at an interoperability boundary, isolate it and explain why.
- Prefer explicit return types for exported/public functions when they improve API stability.
- Avoid enums when a literal union or `as const` object is simpler and interoperable.
- Prefer immutable data flow where practical; do not clone large objects unnecessarily.
- Keep functions cohesive and side effects visible.
- Avoid speculative abstractions. Extract only when there is real reuse, clearer ownership, or reduced complexity.
- Treat external input as untrusted: HTTP, environment variables, queues, files, DB JSON, third-party APIs, webhooks, and user-provided values.
- Distinguish compile-time types from runtime validation. TypeScript types do not validate external data.
- Preserve cancellation, timeout, backpressure, and error propagation across async boundaries.
- Avoid floating promises. Handle or intentionally detach promises with an explicit rationale.

## Bug-resolution workflow

1. Reproduce or characterize the failure from tests, logs, stack traces, types, or code paths.
2. Identify the earliest point where actual behavior diverges from intended behavior.
3. Trace callers, shared state, async boundaries, serialization, and error handling.
4. Form the smallest falsifiable root-cause hypothesis.
5. Add or update a focused regression test when feasible.
6. Implement the minimal root-cause fix.
7. Run the narrowest relevant check first, then broader typecheck/lint/tests/build as available.
8. Check adjacent edge cases and failure modes introduced by the fix.

Do not patch only the visible symptom when the same root cause remains elsewhere.

## Security workflow

Prioritize exploitable and boundary-crossing risks. Check the relevant items in `references/security-checklist.md`, especially:

- Authentication versus authorization.
- Object/resource ownership checks and IDOR/BOLA risks.
- Injection: SQL/NoSQL, command, template, path, header, log, and code injection.
- XSS, unsafe HTML, URL handling, redirects, CSRF, CORS, SSRF, and open proxies.
- Path traversal, archive extraction, file uploads, MIME/content validation, and storage exposure.
- Secrets in source, logs, client bundles, error responses, or build artifacts.
- Cryptography, tokens, password storage, session/cookie flags, replay and expiry.
- Prototype pollution, unsafe object merging, insecure deserialization, and dynamic evaluation.
- Dependency and supply-chain risks.
- Rate limits, resource exhaustion, ReDoS, oversized payloads, and unbounded concurrency.

For a security finding:

1. Explain the trust boundary and attack precondition.
2. Point to the vulnerable data/control flow.
3. Describe realistic impact without exaggeration.
4. Implement a defense at the correct boundary.
5. Add a regression test or verification step where practical.
6. Avoid breaking legitimate inputs unnecessarily.

Never introduce a fake sanitizer or custom crypto when a standard, well-tested primitive exists.

## Performance workflow

Use `references/performance-playbook.md`. Focus on end-to-end impact, not micro-optimizations.

1. Identify the hot path or repeated expensive operation.
2. Estimate or measure cost: CPU, memory, allocations, network, database, disk, bundle size, render work, or latency.
3. Remove unnecessary work before adding caches or concurrency.
4. Fix algorithmic complexity, N+1 calls, repeated parsing/serialization, redundant renders, duplicate requests, and unbounded work first.
5. Add caching only with clear keys, invalidation rules, memory bounds, and correctness semantics.
6. Bound concurrency and preserve ordering when required.
7. Benchmark before/after when a meaningful benchmark can be run.

Do not trade correctness or security for speed.

## Tests and verification

Use the repository's existing scripts. Prefer this order when available:

1. Focused regression test or affected test file.
2. Typecheck.
3. Lint/format check.
4. Relevant unit/integration tests.
5. Build.
6. Broader suite only when useful and affordable.

Do not invent successful test results. Report commands actually run and distinguish them from checks that could not be run.

For test design:

- Cover the bug/security/performance regression directly.
- Include boundary values and malformed/untrusted input when relevant.
- Avoid tests that only mirror implementation details.
- Use deterministic clocks/randomness/network where possible.
- Do not weaken assertions to make a failure disappear.

## Dependency changes

Before adding/upgrading a package:

- Check whether the project already has a suitable dependency or platform API.
- Consider runtime/bundle impact, maintenance, license, transitive dependencies, and security.
- Preserve lockfile consistency by using the detected package manager.
- Never silently perform a major upgrade unrelated to the task.
- Do not run automated vulnerability "fix" commands that make broad upgrades without reviewing the resulting diff.

## Change discipline

- Keep the diff focused.
- Follow nearby naming and architecture.
- Avoid drive-by formatting or unrelated refactors.
- Remove dead code made obsolete by the change when safe and directly related.
- Update docs/types/tests when the public contract changes.
- Do not expose secrets or sensitive production data in examples or logs.

## Completion criteria

Before finishing, verify that:

- The root cause or requested improvement is addressed.
- New code remains type-safe and does not rely on unjustified casts/suppression.
- Security boundaries are not weakened.
- Error paths are intentional and observable.
- Relevant tests/checks pass, or limitations are clearly stated.
- Performance claims are supported by evidence or explicitly presented as expected rather than measured.
- The final response uses the structure in `references/review-output.md` when reporting substantial code changes or review findings.

Files in this skill

  • SKILL.md9.1 KB
  • references/debugging-playbook.md1.6 KB
  • references/performance-playbook.md2.6 KB
  • references/review-output.md954 B
  • references/security-checklist.md3.5 KB
  • references/typescript-standards.md4.1 KB
  • scripts/project-health.sh1.4 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in code-quality →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.