Agent skill

Typescript

by web-infra-dev in web-infra-dev/rstest

TypeScript anti-slop guardrails. An agent skill from web-infra-dev/rstest.

MITAuto-check passedWriting & Content

Install Typescript

skills CLI
$ npx skills add web-infra-dev/rstest --skill typescript -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install web-infra-dev/rstest typescript --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/web-infra-dev/rstest.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/typescript .claude/skills/typescript && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
typescript
GitHub stars
505
Token cost
~1.3k tokens
SKILL.md length
483 words
Files
1
Skills in repo
9
Repo updated
First seen
Licence
MIT

At a glance

TypeScript anti-slop guardrails. An agent skill from web-infra-dev/rstest.

  • Works in 9 steps: No Restating Comments → No Unnecessary Defensive Code → Minimize as → …
  • Tasks that involve Humanizing AI text
  • SKILL.md covers 1. No Restating Comments, 2. No Unnecessary Defensive Code, 3. Minimize as and 4. Minimize any, plus 6 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Typescript is an agent skill from web-infra-dev/rstest. TypeScript anti-slop guardrails. Use when writing or reviewing .ts, .tsx, and .mts files. Covers patterns that Biome, tsc, and rslint do not catch.

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Writing & Content, covering Humanizing AI text, React components and LLM guardrails. It works with TypeScript. The repository describes itself as: The JavaScript testing framework powered by Rspack. The licence is MIT.

When your agent uses it

  • Tasks that involve Humanizing AI text
  • Tasks that involve React components
  • Tasks that involve LLM guardrails

Example prompts

  • “/typescript”

Workflow steps

9 steps, taken from the step headings in SKILL.md.

  1. No Restating Comments
  2. No Unnecessary Defensive Code
  3. Minimize as
  4. Minimize any
  5. No One-Use Abstractions
  6. No Catch-and-Rethrow Without Context
  7. Single Source of Truth — Prevent Drift
  8. Search Before Creating Utilities
  9. No Over-Engineered Types

What it can do on your machine

Read from SKILL.md and the folder at commit d56bf97. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Typescript loads about 1.3k tokens when it runs. Until then it costs about 40 tokens; SKILL.md has 483 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~40
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from web-infra-dev/rstest at commit d56bf97, republished under its MIT licence (© web-infra-dev). 483 words, ~1,304 tokens.

Download SKILL.mdSave it as .claude/skills/typescript/SKILL.md (or your agent's skills folder).
name
typescript
description
TypeScript anti-slop guardrails. Use when writing or reviewing .ts, .tsx, and .mts files. Covers patterns that Biome, tsc, and rslint do not catch.
metadata.internal
true

TypeScript Anti-Slop Guardrails

Skip formatting and lint rules — tooling handles those. This skill targets patterns that produce valid-looking but poor-quality code.

When in doubt, copy the local pattern in the file you are editing rather than importing a style from elsewhere.

1. No Restating Comments

Comments that repeat what the next line does are noise. Only comment why, never what.

typescript
// wrong
// Set the current file path
context.setFilePath(filePath);
// Initialize the reporter
const reporter = new Reporter(config);

// right — let code speak; comment only non-obvious intent
// Force sequential execution — parallel runs corrupt shared fixture state
context.setFilePath(filePath);
const reporter = new Reporter(config);

Also avoid: section-header comments inside functions (// --- Validate ---), JSDoc that adds nothing beyond the signature, temporal markers (// added for, // Phase 1).

2. No Unnecessary Defensive Code

Do not add runtime checks that the type system already guarantees. Trust the types.

typescript
// wrong — param is already typed string
function resolvePattern(pattern: string): string {
  if (typeof pattern !== 'string') {
    throw new Error('pattern must be a string');
  }
  return glob(pattern);
}

// right — trust the type system
function resolvePattern(pattern: string): string {
  return glob(pattern);
}

Also avoid: redundant ?? [] / || {} on fields that are always initialized (normalize once at construction instead), null checks on values you just produced, try/catch around code that cannot throw.

3. Minimize as

Treat as as a last resort, not a way to silence errors. If you need as, the types are probably wrong.

typescript
// wrong — casting to escape a type error
const name = (config as any).testName;

// right — narrow or fix the type
if ('testName' in config) {
  const name = config.testName;
}
  • Never as any or as unknown as X unless at a proven interop seam or test-only partial mock.
  • If control flow already proved the type, the cast is redundant — remove it.
  • When a cast is truly needed, add a one-line comment explaining why.

4. Minimize any

noExplicitAny is off in this repository, so self-police. Prefer unknown + narrowing, or a generic, before reaching for any. Never let any leak into exported APIs, config types, or cross-package contracts.

5. No One-Use Abstractions

Do not extract a function, class, or type that is used exactly once, unless it genuinely improves readability at the call site.

typescript
// wrong — called once, five lines away
function formatTestName(name: string): string {
  return name.replace(/\.test$/, '');
}
// ... later:
const display = formatTestName(file);

// right — inline it
const display = file.replace(/\.test$/, '');

Also avoid: interfaces with single implementations, factory functions that create one thing, options objects with 10 optional fields for features that don't exist yet.

Threshold: extract when used in 3+ places, or when the extraction meaningfully shortens a complex function.

Show full SKILL.md (191 more words)Show less

6. No Catch-and-Rethrow Without Context

If a catch block doesn't add information or recover, delete the try/catch.

typescript
// wrong — catches and rethrows with just a message rewrite
try {
  await loadConfig(path);
} catch (error) {
  throw new Error(
    `Failed to load: ${error instanceof Error ? error.message : error}`,
  );
}

// right — use cause to preserve the chain
try {
  await loadConfig(path);
} catch (error) {
  throw new Error(`Failed to load config at ${path}`, { cause: error });
}

// also right — just don't catch if you add nothing
await loadConfig(path);

Also avoid: bare rethrow (catch (e) { throw e; }), empty catch blocks, catch blocks that only console.log.

7. Single Source of Truth — Prevent Drift

When two declarations describe the same thing — types, constants, defaults, validation rules — one must derive from the other. Duplicating independently causes drift: they match today, diverge silently tomorrow. Derive via extends, Pick, ReturnType, typeof, satisfies, or simply importing the canonical definition.

8. Search Before Creating Utilities

Before writing a helper function, search the codebase. If it exists, import it. If it exists but isn't exported, export it. Don't create a second isObject() or normalizeSlashes().

9. No Over-Engineered Types

  • Don't introduce deep conditional types, mapped types, or template literal types unless they clearly reduce complexity.
  • Don't create a reusable utility type for one call site.
  • Prefer the smallest type shape that explains the contract.
  • This repository uses both type and interface — follow nearby code.

Repository Conventions

  • Use import type for type-only imports.
  • Public config properties: use JSDoc with @default.
  • Preserve existing file-local patterns unless there is a clear bug or maintenance win.

© web-infra-dev, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/typescript of web-infra-dev/rstest.

Open the folder on GitHubat commit d56bf97

Compare with similar skills

Typescript next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Typescript compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Typescript this skillweb-infra-dev/rstest505—~1.3kAutomated safety check: PassMIT
Moai Domain Humanizemodu-ai/moai-adk1.2k—~4.7kAutomated safety check: PassApache-2.0
Install Anti Sloptrycompai/crm11k1 repos~881Automated safety check: PassMIT
Biome Anti Slopnightly-labs/openbot422—~1.5kAutomated safety check: PassCustom licence
Deslop TypescriptConsensys/c0105—~1.6kAutomated safety check: PassLGPL-3.0
Reduce Bundle Sizekcsujeet/ilamy-calendar351—~2.9kAutomated safety check: PassMIT

Similar skills

  • Moai Domain Humanize

    modu-ai/moai-adk

    AI text humanization and 윤문 (post-editing) specialist that detects and removes AI tells while preserving meaning, facts, and figures.

    1.2k GitHub stars~4.7k tokensUpdated today
    Writing & ContentAuto-check passed
  • Install Anti Slop

    trycompai/crm

    Install and configure the anti-slop Oxlint plugin in a local TypeScript or JavaScript repository.

    11k GitHub starsUsed in 1 repo~881 tokens
    Writing & ContentAuto-check passed
  • Biome Anti Slop

    nightly-labs/openbot

    Install and configure vendored Biome anti-slop GritQL rules in a local TypeScript or JavaScript repository.

    422 GitHub stars~1.5k tokensUpdated yesterday
    Writing & ContentAuto-check passed
  • Deslop Typescript

    Consensys/c0

    Run a final de-slopping pass on nearly finished JavaScript or TypeScript work before commit or PR.

    105 GitHub stars~1.6k tokensUpdated 1 mo ago
    Writing & ContentAuto-check passed
  • Reduce Bundle Size

    kcsujeet/ilamy-calendar

    Systematically reduce the shipped bundle size of a JS/TS library without sacrificing code readability or breaking consumer APIs.

    351 GitHub stars~2.9k tokensUpdated 4 days ago
    Frontend & DesignAuto-check passed
  • React Email

    viclafouch/meme-studio

    A skill your agent uses when creating HTML email templates with React components - welcome emails, password resets, notifications, order confirmations, newsletters, or transactional emails.

    110 GitHub starsUsed in 2 repos~3.6k tokens
    Backend & APIsAuto-check passed

More from web-infra-dev/rstest

All 9 skills in this repo
  • Create Draft Release Notes

    web-infra-dev/rstest

    Create or update draft GitHub release notes, or output organized Markdown when draft creation is unavailable.

    505 GitHub stars~2.3k tokensUpdated 7 days ago
    Auto-check passed
  • Create Release Blog

    web-infra-dev/rstest

    Generate a narrative version release blog post from commits within a tag range.

    505 GitHub stars~4.7k tokensUpdated 7 days ago
    Auto-check passed
  • API Doc Sync

    web-infra-dev/rstest

    Verify hand-written API doc signatures match the exported types.

    505 GitHub stars~1.7k tokensUpdated 7 days ago
    Auto-check passed
  • Testing

    web-infra-dev/rstest

    Testing workflow for the Rstest monorepo. An agent skill from web-infra-dev/rstest.

    505 GitHub stars~2.1k tokensUpdated 7 days ago
    Auto-check passed
  • Development

    web-infra-dev/rstest

    Feature and bug-fix development checklist for the Rstest monorepo.

    505 GitHub stars~2.8k tokensUpdated 7 days ago
    Auto-check passed
  • PR Creator

    web-infra-dev/rstest

    Create a pull request using repository branch rules, title conventions, templates, and concise English descriptions.

    505 GitHub stars~560 tokensUpdated 7 days ago
    Auto-check passed

Works with

Questions about Typescript

What does Typescript do?

TypeScript anti-slop guardrails. An agent skill from web-infra-dev/rstest. Typescript is an agent skill from web-infra-dev/rstest. TypeScript anti-slop guardrails.

When should I use Typescript?

Typescript fits situations like: tasks that involve Humanizing AI text; tasks that involve React components; tasks that involve LLM guardrails.

How do I install Typescript in Claude Code?

Run `npx skills add web-infra-dev/rstest --skill typescript -a claude-code`. Or copy the skill folder (.agents/skills/typescript in web-infra-dev/rstest) into .claude/skills/typescript in your project. Claude Code loads it when a task matches its description.

How do I install Typescript in Codex?

Run `npx skills add web-infra-dev/rstest --skill typescript -a codex`. Or copy the skill folder (.agents/skills/typescript in web-infra-dev/rstest) into .agents/skills/typescript in your project. Codex loads it when a task matches its description.

Can I use Typescript in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add web-infra-dev/rstest --skill typescript -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/typescript, .gemini/skills/typescript, .github/skills/typescript and .opencode/skills/typescript in your project.

What does Typescript need to run?

SKILL.md names no scripts, command-line tools or credentials: Typescript is instructions for the agent only.

Does Typescript access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Typescript safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Typescript use?

Typescript is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Typescript use?

About 1.3k tokens (SKILL.md is roughly 5.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Typescript?

Skills that share tags, products or a category with Typescript: Moai Domain Humanize (modu-ai/moai-adk, 1.2k stars), Install Anti Slop (trycompai/crm, 11k stars), Biome Anti Slop (nightly-labs/openbot, 422 stars) and Deslop Typescript (Consensys/c0, 105 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Typescript?

web-infra-dev (a GitHub organization) maintains it in web-infra-dev/rstest, which has 505 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on September 30, 2026.

Source: web-infra-dev/rstest on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.