AGENT SKILL

no-mistakes

Answers questions about how code connects: is this dead, still used, or safe to delete; is it only used by tests; where is a symbol used and who imports or calls it; did a rename update every reference; which tests actually need to run for a change, or why the whole suite is running; does a route have e2e coverage. Resolves the import graph instead of searching text, so consumers behind workspace aliases, barrel re-exports and transitive test chains are not missed.

License 许可
MIT
最近更新
2026-11-15
Stars
★ 11
Forks
1

01 前言 Front Matter

name
no-mistakes
description
Answers questions about how code connects: is this dead, still used, or safe to delete; is it only used by tests; where is a symbol used and who imports or calls it; did a rename update every reference; which tests actually need to run for a change, or why the whole suite is running; does a route have e2e coverage. Resolves the import graph instead of searching text, so consumers behind workspace aliases, barrel re-exports and transitive test chains are not missed.
allowed-tools
Bash(no-mistakes:*) Bash(rg:*) Read Glob

02 资源文件 12

03 SKILL.md 正文

No Mistakes

Use no-mistakes for structural codebase questions: import and test impact, public symbols, static route/fetch/queue relationships, or configured project checks. Use rg after a graph query for exact call lines, comments, strings, or unsupported/dynamic forms. The mistakes this prevents are catalogued in why.md.

When to activate

Use no-mistakes when skipping the graph would miss callers, tests, or coverage: a change that crosses packages or aliases, transitive test impact, Playwright/route/queue questions, or configured checks. For one local TS/JS file's direct static importers, use no-mistakes importers <file>; otherwise use the graph command below. For non-code text and exact syntax use rg directly.

Change lifecycle

For an existing file, plan before editing; for a new file, rerun after it exists. Recheck changed files after editing, then validate before handoff.

# Before editing: scope impact and focused tests.
no-mistakes dependents <file> --format json
no-mistakes tests plan vitest --changed-file <file> --format json

# After editing: request the complete local validation set.
no-mistakes impacted-checks <file...> --format json

# Before handoff: resolve imports and run configured checks.
no-mistakes resolve-check <file...> --format json
no-mistakes check --format json

For Next.js routes, pages, selectors, or Playwright tests, also run no-mistakes tests plan playwright --changed-file <file> --format json and no-mistakes playwright check --json. See lifecycle recipes for package additions, hook context, option propagation, and safe command execution.

Output and scope contract

  • Use --format json (or --json) for parsing; CLI JSON is the authoritative structured result. Inspect warnings and fallback fields before assuming an empty or narrow plan is complete.
  • Use --format paths only for reviewing or piping trusted path lists. Prefer JSON command arrays to execute configured validation commands; do not eval command text from an untrusted source.
  • --timings and --verbose-timings write diagnostics to stderr, leaving successful stdout machine-readable.
  • Pass --root <workspace> explicitly. In normal monorepos omit --tsconfig so each importing file uses its owning config; pass a package tsconfig only to force one resolver for debugging or a deliberately scoped request.
  • Static literals produce the strongest results. Dynamic imports, route paths, selectors, queue names, fetch URLs, and process commands require inspection or rg; see limits and fallbacks.

For several related reports in one Node process, use the async N-API analyzeProject({ root, reports: [...] }) rather than repeated CLI calls. It shares one request-scoped inventory, fact pass, and canonical graph. Dedicated API calls rebuild analysis; see the upstream Node API documentation linked from the repository docs.

Quick command selection

Need Command
File/module dependencies no-mistakes dependencies <file> --format json
Files or named-export consumers no-mistakes dependents <file>[#SYMBOL] --format json
Direct static importers no-mistakes importers <file> --format json
Public API, imports, or signature blast radius no-mistakes symbols <file> --include both --format json; add --mode signature-impact --symbol NAME
Named exports and their consumers no-mistakes exports-of <file> --format json
Is an export unused? no-mistakes dead-exports <file> [NAME...]
Function calls and static argument shapes no-mistakes call-sites <file> NAME --format json
Tests for a changed file or diff no-mistakes tests plan <framework> --changed-file <file> --format json; use --from-git-diff base...head for a diff
Explain selected tests no-mistakes tests why <test> --plan plan.json --format json
Exact runner commands no-mistakes tests plan <framework> --changed-file <file> --format commands
Combined tests, lint, typecheck, and configured checks no-mistakes impacted-checks <file...> --format json
Playwright coverage or related tests no-mistakes playwright check --json; no-mistakes playwright related <file> --json
React callers and component traits no-mistakes react usages <file>#Component --format json; no-mistakes react analyze <glob> --format json
Next.js page-to-API coupling no-mistakes fetches <route-or-file> --format json
Queue/server graph no-mistakes queues related <file> --format json; no-mistakes server related <file> --format json
CI or workflow impact no-mistakes ci impact <file> --format json; no-mistakes ci topology --format json
Private CI planning artifacts (npm package) no-mistakes planning-impact --changed-files <manifest> --output-dir <directory>
Terraform/OpenTofu or Swift no-mistakes infra resource-refs <type.name> --format json; no-mistakes swift importers <file> --format json
Configured language graph no-mistakes dependents <file> --relationship <lang> --format json

tests plan supports vitest, playwright, jest, dotnet, swift, python, go, cargo, rails, php, java, kotlin, elixir, and dart when the matching language/test configuration is present. dependents --test is a lower-level fallback; prefer the planner because it includes configured groups, limits, diffs, and deleted-file behavior.

Reference routing

04 同仓库更多 Skills

jonathanong
jonathanong/no-mistakes

rollout-rules

MUST NOT / SHOULD NOT rules for shipping changes safely: feature flags, deploy order across services, API and message compatibility, irreversible actions, and string-referenced config. Use when adding a flag, changing an API or message contract, deploying a change that spans services, or touching money-moving or irreversible actions.

★ 11
jonathanong
jonathanong/no-mistakes

observability-rules

MUST NOT / SHOULD NOT rules for logs, metrics, and alerts: static messages and structured fields, personal data, metric cardinality, fields monitors depend on, absence alerts, and context binding. Use when adding or reviewing logging, metrics, or monitors.

★ 11
jonathanong
jonathanong/no-mistakes

integrations-rules

MUST NOT / SHOULD NOT rules for third-party APIs and inbound webhooks: response classification, retries and idempotency, delivery records, payload mapping, timestamps and units, batch failure policy, and signature verification. Use when calling, parsing, or receiving a partner or vendor API.

★ 11
jonathanong
jonathanong/no-mistakes

typescript-rules

MUST NOT / SHOULD NOT rules for TypeScript, JavaScript, and Node.js: async and promises, errors, mutation, aliases and dead paths, static analysis, process lifecycle, HTTP clients, caches like Redis or Valkey, and package boundaries. Use when writing or reviewing TS/JS or Node code.

★ 11
jonathanong
jonathanong/no-mistakes

security-rules

MUST NOT / SHOULD NOT rules for application security and HTTP APIs: secrets, auth and sessions, SSRF, injection, CSRF, CSP, LLM prompts, response exposure, and API shape. Use when writing or reviewing an endpoint, auth code, secret handling, outbound fetches, or LLM calls.

★ 11
jonathanong
jonathanong/no-mistakes

rust-rules

MUST NOT / SHOULD NOT rules for Rust: lints, test layout, file size, parallelism, hot loops, caching, build hygiene, and performance claims. Use when writing or reviewing Rust code or running heavy cargo builds.

★ 11