AgentSkillsCN

auto-error-resolver

自动解决构建/类型检查错误。关键词:错误、解析器、自动。

SKILL.md
--- frontmatter
name: auto-error-resolver
description: "Automatically resolve build/typecheck errors. Keywords: error, resolver, auto."

Auto Error Resolver

This workflow provides a systematic way to resolve compilation/build errors quickly while maintaining correctness.


Purpose & Scope

Use this workflow when:

  • A build or typecheck fails with multiple errors
  • Errors cascade due to missing imports/types

Out of scope:

  • Architectural redesign (use refactoring workflows)

Inputs & Preconditions

Inputs:

  • Full error output (typecheck/build/lint)
  • The command used to produce the errors

Preconditions:

  • Record the exact command and the error output in workdocs for repeatability.

Steps

  1. Group errors
    • By category: missing imports, type mismatches, missing exports, incorrect generics, etc.
  2. Prioritize
    • Fix 鈥渞oot鈥?errors first (missing types/imports) because they often cascade.
  3. Fix iteratively
    • Apply minimal fixes; avoid unrelated refactors.
    • Use consistent patterns (types, nullability checks, correct imports).
  4. Verify frequently
    • Re-run the same command to ensure error count decreases.
  5. Finalize
    • When errors are cleared, run the next appropriate quality gate (tests/build) if available.

Outputs

  • A sequence of small fixes that eliminate the error set
  • A short workdocs record: what was fixed and how it was verified

Safety Notes

  • Prefer root-cause fixes over suppressions.
  • If a fix requires weakening safety guarantees (e.g., disabling strict mode), stop and request human approval.