Skip to content
Back to skills

Neo Typescript

ASecurity

Use this skill when asked to write, review, debug, or architect TypeScript code, configure tsconfig.json compiler options, resolve ESM/CJS interop issues, optimize generics, or apply advanced conditional, mapped, and template literal type operators. Trigger even if the user just asks generic TS compiler or type compatibility questions.

  • 7 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added May 26, 2026
developmenttypescriptgonode

Security analysis

A100/100

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

Scanned May 27, 2026

npx -y skills add Benknightdark/neo-skills --skill neo-typescript --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Neo Typescript?

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

Security grade badge for Neo Typescript
[![Security: A β€” Skills Directory](https://www.skillsdirectory.com/api/skills/benknightdark-neo-typescript/badge)](https://www.skillsdirectory.com/skills/benknightdark-neo-typescript)

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: neo-typescript
description: >
  Use this skill when asked to write, review, debug, or architect TypeScript code, configure tsconfig.json compiler options, resolve ESM/CJS interop issues, optimize generics, or apply advanced conditional, mapped, and template literal type operators. Trigger even if the user just asks generic TS compiler or type compatibility questions.
license: MIT
metadata:
  author: ant-gravity-devs
  version: "1.0.0"
---

# Neo TypeScript Expert Skill

This skill guides the AI Agent to write code that adheres to the strictest type safety, high maintainability, and advanced meta-programming flexibility, while thoroughly preventing runtime issues such as ESM/CJS interoperability pitfalls.

## πŸ’‘ Gotchas
*   **Aliasing Writable Reference Bypasses Readonly**: In TypeScript, `readonly` only restricts the assignment to the property itself. The internal members of the referenced object/array remain mutable. Furthermore, a readonly object can be assigned to a writable alias, which completely bypasses compiler readonly checks.
*   **Fatal Crash via Partial esModuleInterop**: Enabling `allowSyntheticDefaultImports` without `esModuleInterop` allows code to pass compile-time type checks but causes an immediate runtime crash (TypeError: default is not a function) due to the lack of `__importDefault` emit helpers in transpile output.
*   **Double Default Trap for Library Creators**: Using `export default` in libraries forces Node.js ESM consumers to call `.default()` to access the module. The golden standard is to completely abandon `export default` and adopt `export =` or named exports instead.

## πŸ“‹ Static Code & Type Safety Review SOP

When asked to write, modify, refactor, or review TypeScript code, strictly execute the following workflow:

### Step 1 β€” Project Environment Perception (Perceive)
1. Inspect the project's `tsconfig.json` settings, focusing specifically on the configuration of `"strict": true`, `"strictNullChecks"`, and `"strictFunctionTypes"`.
2. Identify the target module format and resolution mechanism (`"moduleResolution"`).

### Step 2 β€” Core Type Routing (Reason)
Based on the specific technical domain of the task, **progressively disclose** and load the corresponding reference files in the skill. Do not load all files at once to save context token space:
*   **Basics, Narrowing, Classes, & Function Design** ➑️ Load [type-system-basics.md](references/type-system-basics.md)
*   **Generic Constraints, Variance, & Advanced Types from Types** ➑️ Load [advanced-meta-types.md](references/advanced-meta-types.md)
*   **Structural Compatibility, Decorators, & ESM/CJS Interop** ➑️ Load [compatibility-and-interop.md](references/compatibility-and-interop.md)

### Step 3 β€” Precise Code Generation & Review (Act)
1. Ensure all generated or modified code strictly adheres to the loaded reference guidelines (e.g., never declare optional callback parameters, ensure generic type parameters appear at least twice to establish correlation).
2. For advanced type generation, recommend clear unit test assertions based on the evals configuration.

---

## πŸ› οΈ Available Resources (Relative Paths)
*   [Type System Basics Guide](references/type-system-basics.md)
*   [Advanced Meta Types Guide](references/advanced-meta-types.md)
*   [Compatibility and Interop Guide](references/compatibility-and-interop.md)

Files in this skill

  • SKILL.md3.3 KB
  • evals/eval_queries.json2 KB
  • evals/evals.json1.8 KB
  • references/advanced-meta-types.md5.5 KB
  • references/compatibility-and-interop.md5.2 KB
  • references/type-system-basics.md5.5 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.

Comments

Loading comments…

Newsletter

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