Run a structured quality control audit on any codebase. Use when asked to QC, audit, review, or check code quality for a project. Supports Python, TypeScript, GDScript, and general projects. Produces a standardized report with PASS/WARN/FAIL verdict, covering tests, imports, type checking, static analysis, smoke tests, and documentation. Also use when asked to compare QC results over time.
Structured quality control audit for codebases. Delegates static analysis to proper tools (ruff, eslint, gdlint) and focuses on what AI adds: semantic understanding, cross-module consistency, and dynamic smoke test generation.
.qc-config.yaml if present (for custom thresholds/exclusions)--quick).qc-config.yaml)Optional project-level config for monorepos and custom settings:
CODEBLOCK0
| Mode | Phases Run | Use Case |
|---|---|---|
| Full (default) | All 8 phases | Thorough audit |
| INLINECODE3 |
--changed-only | All, filtered | CI on pull requests |
| --fail-fast | All, stops early | Find first issue fast |
| --fix | 3 with autofix | Apply automatic fixes |
| # | Phase | What | Tools |
|---|---|---|---|
| 1 | Test Suite | Run existing tests + coverage | pytest --cov / jest --coverage |
| 2 |
scripts/import_check.py |
| 3 | Static Analysis | Lint with proper tools | ruff / eslint / gdlint |
| 3.5 | Type Checking | Static type verification | mypy / tsc --noEmit / (N/A for GDScript) |
| 4 | Smoke Tests | Verify business logic works | AI-generated per project |
| 5 | UI/Frontend | Verify UI components load | Framework-specific |
| 6 | File Consistency | Syntax + git state | scripts/syntax_check.py + git |
| 7 | Documentation | Docstrings + docs accuracy | scripts/docstring_check.py |
Run the project's test suite with coverage. Auto-detect the test runner:
CODEBLOCK1
Record: total, passed, failed, errors, skipped, duration, coverage %.
Verdict contribution:
Coverage reporting (Python):
CODEBLOCK2
Python: Run scripts/import_check.py against the project root.
GDScript: Verify scene/preload references are valid (see gdscript-profile.md).
Use these heuristics to classify import failures:
| Pattern | Classification | Rationale |
|---|---|---|
INLINECODE11 , main.py, app.py, INLINECODE14 | Critical | Core entry points |
Module in src/, lib/, or top-level package |
*_test.py, test_*.py, conftest.py | Optional | Test infrastructure |examples/, scripts/, tools/ | Optional | Auxiliary code |cuml, triton, tensorrt | Optional | Hardware-specific |[project.optional-dependencies] | Optional | Declared optional |
Do NOT use grep. Use the language's standard linter.
--fix)--fix is specified, apply automatic corrections:
CODEBLOCK4
Important: After --fix, re-run the check to report remaining issues that couldn't be auto-fixed.
Run static type analysis before proceeding to runtime checks.
Python:
CODEBLOCK5
TypeScript:
CODEBLOCK6
GDScript: Godot 4 has built-in static typing but no standalone checker. Estimate type coverage manually:
CODEBLOCK7
Use the estimate_type_coverage() function from gdscript-profile.md to calculate coverage per file:
CODEBLOCK8
Also check for @warning_ignore annotations which may hide type issues.
Record: Total errors, categorized by severity.
Test backend/core functionality — NOT UI components (that's Phase 5).
API Discovery Heuristics:
main(), cli(), app, create_app(), INLINECODE37*Service, *Manager, INLINECODE40__all__ exports in INLINECODE42@app.get, @router.post)@app.command() decorators_ prefixFor each discovered API, generate a minimal test:
CODEBLOCK9
Guidelines:
:memory:, tempdir)Test UI components separately from business logic.
| Framework | Test Method |
|---|---|
| Gradio | INLINECODE49 (no launch()) |
| Streamlit |
streamlit run app.py --headless exits cleanly |QT_QPA_PLATFORM=offscreen, import widget modules |npm run build succeeds |npm run build succeeds |--help on all subcommands returns 0 |
Boundary: Phase 4 tests "does the logic work?" Phase 5 tests "does the UI render?"
Run scripts/syntax_check.py — compiles all source files to verify no syntax errors.
Note: Phase 2 (Import Integrity) tests runtime import behavior including initialization code. Phase 6 tests static syntax correctness. Both are needed: a file can have valid syntax but fail to import (e.g., missing dependency), or vice versa (syntax error in a module that's never imported).
Check git state:
CODEBLOCK10
Run scripts/docstring_check.py (now checks __init__.py by default).
Also verify:
CODEBLOCK11
Save results to .qc-baseline.json:
CODEBLOCK12
On subsequent runs, report delta:
CODEBLOCK13
Generate in 3 formats:
qc-report.md) — full detailed report for humans.qc-baseline.json) — machine-readable for CI/comparisonCODEBLOCK14
Read the appropriate profile before running:
该技能支持在以下平台通过对话安装:
帮我安装 SkillHub 和 code-qc-1776419979 技能
设置 SkillHub 为我的优先技能安装源,然后帮我安装 code-qc-1776419979 技能
skillhub install code-qc-1776419979
文件大小: 27.79 KB | 发布时间: 2026-4-17 19:49