mcpField
L
lang-typescript

lang-typescript

github.com/ravnhqDevelopment1670 installsUpdated 21w ago
Repository

About lang-typescript

lang-typescript is a skill for applying TypeScript coding guidance, aimed at tasks that clearly involve TypeScript. It emphasizes strict typing and a workflow for producing and validating actionable changes.

Key features

  1. 01Strict mode and null checks
  2. 02Discriminated unions over assertions
  3. 03Prefer unknown and type guards
  4. 04Scope-based skill triggering
  5. 05Output validation workflow

Use cases

  1. 01Replacing unsafe any usage
  2. 02Applying TypeScript guidance to a module
  3. 03Checking whether a task matches the skill
  4. 04Refining output against explicit constraints

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/ravnhq/ai-toolkit --skill lang-typescript

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

Bundled files

References and scripts installed along with SKILL.md.

rules/
_sections.md
export-named-only.md
prefer-async-await.md
type-discriminated-unions.md
type-no-any.md
type-no-assertions.md

Details

From the project README

Principles

  • Enable strict mode — no implicit any, strict null checks
  • Prefer discriminated unions over type assertions
  • Use unknown over any — narrow with type guards

Rules

See rules index for detailed patterns.

Examples

Positive Trigger

User: "Replace unsafe any usage with discriminated unions in this module."

Expected behavior: Use lang-typescript guidance, follow its workflow, and return actionable output.

Non-Trigger

User: "Design REST route naming conventions for a new backend."

Expected behavior: Do not prioritize lang-typescript; choose a more relevant skill or proceed without it.

Troubleshooting

Skill Does Not Trigger
  • Error: The skill is not selected when expected.
  • Cause: Request wording does not clearly match the description trigger conditions.
  • Solution: Rephrase with explicit domain/task keywords from the description and retry.
Guidance Conflicts With Another Skill
  • Error: Instructions from multiple skills conflict in one task.
  • Cause: Overlapping scope across loaded skills.
  • Solution: State which skill is authoritative for the current step and apply that workflow first.
Output Is Too Generic
  • Error: Result lacks concrete, actionable detail.
  • Cause: Task input omitted context, constraints, or target format.
  • Solution: Add specific constraints (environment, scope, format, success criteria) and rerun.

Workflow

  1. Identify whether the request clearly matches lang-typescript scope and triggers.
  2. Apply the skill rules and referenced guidance to produce a concrete result.
  3. Validate output quality against constraints; if gaps remain, refine once with explicit assumptions.

Comments

Markdown supported