mcpField
N
neo-typescript

neo-typescript

github.com/benknightdarkDevelopment739 installsUpdated 4d ago
Repository

About neo-typescript

neo-typescript is an AI Agent skill for writing, modifying, and reviewing TypeScript with attention to strict type safety, maintainability, and ESM/CJS interoperability. It uses project configuration and task-specific reference guides to shape code and reviews.

Key features

  1. 01Project tsconfig inspection
  2. 02Task-based reference guide loading
  3. 03Type-safe code generation and review
  4. 04ESM/CJS interoperability checks
  5. 05Unit test assertion guidance

Use cases

  1. 01Review TypeScript project configuration
  2. 02Refactor code using strict type rules
  3. 03Check module interoperability risks
  4. 04Generate advanced types with test assertions

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/benknightdark/neo-skills --skill neo-typescript

After installing, type/neo-typescriptin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

evals/
eval_queries.json
evals.json
references/
advanced-meta-types.md
compatibility-and-interop.md
type-system-basics.md

Details

From the project README

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:

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)

Comments

Markdown supported