static-code-analysis-typescript
БесплатноБез исполняемых скриптовНе проверенCreates, reviews, and modernizes static code analysis setups for Node.js and TypeScript repositories, covering ESLint flat config, typescript-eslint…
от jaktestowac★ 124 звезды на GitHubОб этом скилле
Static Code Analysis for TypeScript Projects
Use this skill when you need to create, review, fix, or modernize static code analysis in a Node.js + TypeScript repository.
It is designed for repositories that use or should use:
eslint(flat config)typescript-eslinttypescripttsconfig.jsonprettiereslint-plugin-simple-import-sort(import sorting via ESLint)huskylint-stagedpackage.jsonscripts- CI quality gates (GitHub Actions)
When to Use
Use this skill when the user asks things like:
- "set up static analysis for TypeScript"
- "add ESLint / typescript-eslint / Prettier"
- "review our lint, tsc, husky, or lint-staged setup"
- "fix package.json scripts for code quality"
- "prepare CI checks for linting and type checking"
- "standardize naming for static code analysis scripts"
- "audit whether this repo follows current best practices"
- "set up import sorting"
- "replace trivago import sorting plugin"
- "add a CI quality gate workflow"
Goals
This skill should help produce a setup that is:
- explicit
- reproducible
- CI-friendly
- fast enough for local development
- strict enough to catch issues early
- easy to understand from
package.json,README.md, and the config files - portable across Playwright, Cypress, and general TypeScript projects
Recommended Outcome
A strong baseline should usually include:
- ESLint flat config (
eslint.config.mjs) typescript-eslintfor TypeScript-aware linting- direct
typescriptdependency whentscis used directly - strict
tsconfig.json - clear split between formatting and linting responsibilities
- import sorting via ESLint (
eslint-plugin-simple-import-sort) huskyhook for local guardrailslint-stagedfor staged-file workflows- CI commands that do not mutate files
- explicit Node version support in
package.json#engines - a CI quality gate (integrated into an existing workflow when one exists)
Concrete baseline files (eslint.config.mjs, package.json scripts, tsconfig, Prettier, Husky, VS Code settings, CI workflows) live in ./resources/example-configs.md.
Procedure
1. Inspect the existing setup
Check at least these files when they exist:
package.jsoneslint.config.*(or legacy.eslintrc*)tsconfig.json.prettierrc*.prettierignore.husky/*.github/workflows/*.vscode/settings.json.vscode/extensions.jsonREADME.md- any existing audit or decision documents
Identify:
- what tools are already installed
- whether the repo uses flat config or legacy ESLint config
- whether
typescriptis direct or transitive - whether
tscis used as a real gate - whether
prettieris standalone, inside ESLint, or split by file type - whether commit hooks validate the whole repo or only staged files
- whether CI enforces the same checks as local hooks
- how import sorting is handled (Prettier plugin, ESLint plugin, VS Code, or not at all)
- whether VS Code
source.organizeImportscould conflict with other import sorting
2. Classify the current architecture
Choose the current model before editing anything:
- Model A - Separate responsibilities: ESLint for code quality; Prettier for formatting;
prettier --checkused directly;eslint-config-prettieravoids rule conflicts. - Model B - ESLint also enforces Prettier in TypeScript:
eslint-plugin-prettierruns formatting checks inside ESLint, often paired with a separate Prettier CLI check for non-TS files. - Model C - Mixed or inconsistent: scripts overlap, responsibilities are unclear, TS formatting may be checked twice or not clearly at all.
When possible, make the final state explicit in docs so the split is understandable.
3. Normalize dependency expectations
For TypeScript repositories, prefer these principles:
- if the repo runs
tsc, addtypescriptdirectly indevDependencies - if ESLint is used, make the config style explicit and modern (flat config)
- if
typescript-eslintis installed, ensure versions are compatible with ESLint and TypeScript - if tooling requires newer Node versions, declare them in
package.json#engines
Typical direct dev dependencies: eslint, @eslint/js, typescript-eslint, typescript, prettier, eslint-config-prettier, eslint-plugin-simple-import-sort, globals, husky, lint-staged, optionally eslint-plugin-prettier and repo-specific plugins such as eslint-plugin-playwright.
If the repository contains Playwright tests, strongly consider:
eslint-plugin-playwright- Playwright-specific rule tuning in ESLint
- ignoring generated Playwright artifacts such as
playwright-report/**andtest-results/**
4. Assess import sorting
Check how imports are currently sorted:
- No sorting → add
eslint-plugin-simple-import-sort @trivago/prettier-plugin-sort-imports→ migrate toeslint-plugin-simple-import-sort(Babel parser, no Prettier 4 support)@ianvs/prettier-plugin-sort-imports→ consider
Установить static-code-analysis-typescript в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл static-code-analysis-typescript?
Creates, reviews, and modernizes static code analysis setups for Node.js and TypeScript repositories, covering ESLint flat config, typescript-eslint, tsconfig, Prettier, import sorting, Husky, lint-staged, package.json quality scripts, and CI quality gates. Use when setting up or auditing linting, formatting, type-checking, commit hooks, or GitHub Actions quality checks in a TypeScript project.
Как установить скилл static-code-analysis-typescript?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл static-code-analysis-typescript запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic