Agent skill

Ban Type Assertions

by Factory-AI in Factory-AI/factory-plugins

Ban as type assertions in a package via the @typescript-eslint/consistent-type-assertions lint rule, replacing them with compiler-verified type-safe alternatives.

No licenceAuto-check passedDevelopment

Install Ban Type Assertions

skills CLI
$ npx skills add Factory-AI/factory-plugins --skill ban-type-assertions -a claude-code

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

GitHub CLI
$ gh skill install Factory-AI/factory-plugins ban-type-assertions --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/Factory-AI/factory-plugins.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/typescript/skills/ban-type-assertions .claude/skills/ban-type-assertions && 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
ban-type-assertions
GitHub stars
110
Token cost
~1.7k tokens
SKILL.md length
578 words
Files
1
Skills in repo
13
Repo updated
First seen
Licence
None found

At a glance

Ban as type assertions in a package via the @typescript-eslint/consistent-type-assertions lint rule, replacing them with compiler-verified type-safe alternatives.

  • Works in 8 steps: Enable the Rule → Enumerate Violations → Research Before Fixing → …
  • Enabling the assertion ban in a new package
  • SKILL.md covers Core Philosophy, Quick Reference, Workflow and Verification, plus 1 more section
  • Calls npm

What it does

Ban Type Assertions is an agent skill from Factory-AI/factory-plugins. Ban as type assertions in a package via the @typescript-eslint/consistent-type-assertions lint rule, replacing them with compiler-verified type-safe alternatives. Use when enabling the assertion ban in a new package or fixing violations in an existing one.

Its SKILL.md is about 1.7k 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 Development, covering Linting and formatting and Type safety. It works with ESLint, TypeScript and Zod. The repository describes itself as: Official Factory plugins marketplace.

When your agent uses it

  • Enabling the assertion ban in a new package
  • Fixing violations in an existing one

Example prompts

  • “/ban-type-assertions”

Requirements

  • Node.js

Workflow steps

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

  1. Enable the Rule
  2. Enumerate Violations
  3. Research Before Fixing
  4. Fix Violations Using the Pattern Hierarchy
  5. Use Strict Schemas, Not Permissive Ones
  6. Promote Shared Schemas to @factory/common
  7. Fix Test Mocks to Match Schemas
  8. Parse at the Boundary, Inside Error Handling

What it can do on your machine

Read from SKILL.md and the folder at commit d362dc1. 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

    Shell commands in SKILL.md call:

    • npm

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

  • Network

    No URLs in SKILL.md. Its commands use npm, which can reach the network depending on how they are called.

    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

Ban Type Assertions loads about 1.7k tokens when it runs. Until then it costs about 70 tokens; SKILL.md has 578 words of instructions outside code blocks.

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

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

Without a licence we can't republish the file, so here is its outline and opening line. It has 578 words (~1,722 tokens).

“Enable @typescript-eslint/consistent-type-assertions with assertionStyle: 'never' in a package and replace all as X casts with patterns the compiler can verify.”

— opening of SKILL.md by Factory-AI
name
ban-type-assertions

Read the full SKILL.md on GitHub

Files

Just SKILL.md in plugins/typescript/skills/ban-type-assertions of Factory-AI/factory-plugins.

Open the folder on GitHubat commit d362dc1

Compare with similar skills

Ban Type Assertions 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.

Ban Type Assertions compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Ban Type Assertions this skillFactory-AI/factory-plugins110—~1.7kAutomated safety check: PassNone
Obsidian Plugin Development Guidelinesgapmiss/obsidian-plugin-skill190—~4.5kAutomated safety check: PassMIT
Typescript Styletjx666/vscode-mcp106—~961Automated safety check: PassCustom licence
No Explicit Anythedaviddias/Front-End-Checklist74k—~565Automated safety check: PassMIT
OpenObserve ESLint and TypeScript Fixesopenobserve/openobserve22k—~5.1kAutomated safety check: PassAGPL-3.0
Run Pre Commit Checksmicrosoft/vscode-python-environments141—~898Automated safety check: PassMIT

Similar skills

  • Obsidian Plugin Development Guidelines

    gapmiss/obsidian-plugin-skill

    Rules and references for building Obsidian plugins: ESLint rules, TypeScript practices, memory cleanup, API choices, UI standards and the community submission process.

    190 GitHub stars~4.5k tokensUpdated 13 days ago
    DevelopmentAuto-check passed
  • Typescript Style

    tjx666/vscode-mcp

    TypeScript code style and repo conventions for VSCode MCP — inference vs explicit types, ESM import suffixes, zod schema contracts, async VSCode/Node APIs, JSON-safe IPC results, JSDoc for public…

    106 GitHub stars~961 tokensUpdated 2 mo ago
    DevelopmentAuto-check passed
  • No Explicit Any

    thedaviddias/Front-End-Checklist

    A skill your agent uses when reviewing TypeScript files for type safety regressions, during code review of functions that handle external data, or when the codebase has ESLint warnings for…

    74k GitHub stars~565 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • A playbook for fixing ESLint and TypeScript errors in the OpenObserve web frontend, with rule-by-rule guidance and typing conventions.

    22k GitHub stars~5.1k tokensUpdated today
    DevelopmentAuto-check passed
  • Run Pre Commit Checks

    microsoft/vscode-python-environments

    Official

    Run the mandatory pre-commit checks before committing code. An agent skill from microsoft/vscode-python-environments.

    141 GitHub stars~898 tokensUpdated today
    Testing & QAAuto-check passed
  • Typescript Patterns

    softspark/ai-toolkit

    TypeScript types: generics, discriminated unions, Zod, satisfies, branded types.

    179 GitHub stars~1.6k tokensUpdated today
    Frontend & DesignAuto-check passed

More from Factory-AI/factory-plugins

All 13 skills in this repo
  • Autoresearch

    Factory-AI/factory-plugins

    Autonomous experiment loop for optimization research. An agent skill from Factory-AI/factory-plugins.

    110 GitHub stars~4.2k tokensUpdated 21 days ago
    Auto-check passed
  • Browser Navigation

    Factory-AI/factory-plugins

    Automate browser interactions for web testing, form filling, screenshots, and data extraction.

    110 GitHub stars~2.7k tokensUpdated 21 days ago
    Auto-check passed
  • Commit Security Scan

    Factory-AI/factory-plugins

    Analyze code changes for security vulnerabilities using LLM reasoning and threat model patterns.

    110 GitHub stars~2.3k tokensUpdated 21 days ago
    Auto-check passed
  • Create PR

    Factory-AI/factory-plugins

    Create a pull request with Conventional Commits formatting, a templated body, and local verification.

    110 GitHub stars~2.3k tokensUpdated 21 days ago
    Auto-check passed
  • Droid Control

    Factory-AI/factory-plugins

    Control terminal TUIs, browsers, and native desktop apps for testing, demos, QA, and computer-use tasks.

    110 GitHub stars~3.2k tokensUpdated 21 days ago
    Auto-check: notes
  • Fix Knip Unused Exports

    Factory-AI/factory-plugins

    Fix knip "Unused exports" violations. An agent skill from Factory-AI/factory-plugins.

    110 GitHub stars~2.5k tokensUpdated 21 days ago
    Auto-check passed

Categories

Questions about Ban Type Assertions

What does Ban Type Assertions do?

Ban as type assertions in a package via the @typescript-eslint/consistent-type-assertions lint rule, replacing them with compiler-verified type-safe alternatives. Ban Type Assertions is an agent skill from Factory-AI/factory-plugins. Ban as type assertions in a package via the @typescript-eslint/consistent-type-assertions lint rule, replacing them with compiler-verified type-safe alternatives.

When should I use Ban Type Assertions?

Ban Type Assertions fits situations like: enabling the assertion ban in a new package; fixing violations in an existing one.

How do I install Ban Type Assertions in Claude Code?

Run `npx skills add Factory-AI/factory-plugins --skill ban-type-assertions -a claude-code`. Or copy the skill folder (plugins/typescript/skills/ban-type-assertions in Factory-AI/factory-plugins) into .claude/skills/ban-type-assertions in your project. Claude Code loads it when a task matches its description.

How do I install Ban Type Assertions in Codex?

Run `npx skills add Factory-AI/factory-plugins --skill ban-type-assertions -a codex`. Or copy the skill folder (plugins/typescript/skills/ban-type-assertions in Factory-AI/factory-plugins) into .agents/skills/ban-type-assertions in your project. Codex loads it when a task matches its description.

Can I use Ban Type Assertions 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 Factory-AI/factory-plugins --skill ban-type-assertions -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ban-type-assertions, .gemini/skills/ban-type-assertions, .github/skills/ban-type-assertions and .opencode/skills/ban-type-assertions in your project.

What does Ban Type Assertions need to run?

Going by SKILL.md and its folder, Ban Type Assertions needs the command-line tools its instructions call (npm). Our summary lists: Node.js.

Does Ban Type Assertions access the network?

SKILL.md contains no URLs. Its commands use npm, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Ban Type Assertions 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 Ban Type Assertions use?

No licence was found for Ban Type Assertions or its repository. Without one, default copyright applies: ask the author before reusing or redistributing it.

How many tokens does Ban Type Assertions use?

About 1.7k tokens (SKILL.md is roughly 6.9k 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 Ban Type Assertions?

Skills that share tags, products or a category with Ban Type Assertions: Obsidian Plugin Development Guidelines (gapmiss/obsidian-plugin-skill, 190 stars), Typescript Style (tjx666/vscode-mcp, 106 stars), No Explicit Any (thedaviddias/Front-End-Checklist, 74k stars) and OpenObserve ESLint and TypeScript Fixes (openobserve/openobserve, 22k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Ban Type Assertions?

Factory-AI (a GitHub organization) maintains it in Factory-AI/factory-plugins, which has 110 GitHub stars. The repository holds 13 skills in this directory. The repository was last updated on September 15, 2026.

Source: Factory-AI/factory-plugins on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.