Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    TypeScript Code Doctor

    1

    Improve TypeScript reliability through precise types, runtime validation, safe narrowing, and focused tests.

    $9.99

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    TypeScript Code Doctor

    TypeScript Code Doctor

    Example session with this skill installed

    A TypeScript API client casts JSON responses to a User interface without validation. Recommend a safer design and tests.

    • Read your context and instructions
    • Compiled the typescript code doctor

    TypeScript Code Doctor: practical plan

    Safer API boundary

    A TypeScript interface is erased at runtime, so response.json() as User does not validate untrusted data. Parse the response as unknown, validate required fields and constraints, then return a typed value or a structured error.

    Design

    Define a runtime schema for ID, display name, account state and optional fields. Reject invalid enum values and unexpected nulls according to the API contract. Keep transport errors distinct from validation errors.

    Tests

    • Valid minimal and full payloads
    • Missing required field
    • Wrong primitive type
    • Null where not allowed
    • Unknown enum value
    • Extra fields and forward-compatible additions
    • Non-2xx response and malformed JSON

    Type design

    Prefer discriminated unions for account states and avoid broad any. Use unknown at external boundaries and derive types from the schema when practical.

    Rollout

    Add validation telemetry without logging personal payloads. Track rejection rates and coordinate contract changes with the API owner. Keep a compatibility policy for additive fields and versioned breaking changes.

    Measurement and review

    Record the baseline, source, date range, denominator and owner. Use one primary measure plus quality guardrails; compare like-for-like cohorts and disclose missing data. Treat estimates as scenarios, not observed outcomes.

    Risks and controls

    Check relevance, consent, disclosure, workload and downside before scaling. Keep an evidence trail, obtain human review for material commitments, and pause if trust, quality or compliance signals deteriorate.

    Next steps

    1. Confirm the goal, audience and available capacity.
    2. Gather the minimum evidence for a first test.
    3. Assign an owner, budget and review date.
    4. Run a small pilot, record outcomes and decide whether to iterate, expand or stop.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Create a practical, evidence-led TypeScript Code Doctor workflow. Improve TypeScript reliability through precise types, runtime validation, safe narrowing, and focused tests. Distinguish observations from assumptions, request missing inputs, give actionable recommendations with owners and measurable outcomes, and flag uncertainty. Avoid fabricated metrics, unsupported guarantees, deceptive tactics and unnecessary personal data.

    Type erasure means compile-time success does not guarantee runtime security or data integrity. Requires project config files for toolchain-accurate diagnosis.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 1 month ago

    Permissions

    Read Files
    Write Files
    Network Access
    Listed1 month ago

    What's inside

    Frequently Asked Questions

    Unlike standard prompts that may suggest 'quick fixes' like type assertions, this skill focuses on architectural integrity, replacing 'any' types with branded types and discriminated unions to ensure your code is actually safe at runtime.

    The skill is compatible with all major TypeScript environments, including Node.js, React, Next.js, and Svelte, and it specializes in complex setups like Turborepo or Nx monorepos.

    Yes, the Code Doctor integrates with validation libraries like Zod and Yup to build runtime guards, ensuring that external API data matches your internal type definitions to prevent production crashes.

    To provide accurate refactoring, the skill requires access to your `tsconfig.json` and `package.json` files to understand your specific compiler settings and dependency tree.

    You receive the full TS-SCOPE analysis module, the DIAGNOSTIC-RX error mapping engine, and the REPAIR refactoring logic, along with documentation on implementing the TSDOC-100 safety standards.

    While it is excellent at hardening types and fixing module conflicts, it cannot detect runtime race conditions or enforce logic-based security permissions, as these fall outside the scope of the TypeScript type system.

    New in Prompt & Skill Engineering