QA Check Skill
Run linting and unit tests after code changes and report the result. Never auto-fix; never run integration tests.
Step 1 — Commands documented by the project
Check these project-side sources in order; the first that yields runnable commands wins, then skip to Step 3.
- A project skill: the available skills include one whose description covers this project's testing, linting or QA (projects ship these in
.agents/skillsor.eca/skills). Load it witheca__skilland follow it. - Project instructions already in context: the project's
AGENTS.mdor.eca/rulesstate how to lint or run unit tests, in any wording.
Rules:
- Use only commands that appear verbatim in the project's text (backticks or a code block). Do not compose a command from prose.
- Prefer the unit-test command over a general test command when both are documented.
- If the sources mention tests but give no runnable command, treat them as absent and continue to Step 2.
Step 2 — Otherwise, discover in one call
Run exactly this single shell command from the repository root (git rev-parse --show-toplevel):
echo '--- files'; ls justfile Justfile Makefile pyproject.toml setup.py package.json pnpm-lock.yaml yarn.lock .venv/bin/activate venv/bin/activate 2>/dev/null; \
echo '--- recipes'; grep -hE '^(lint|test|unit-test)([[:space:]][^:]*)?:' justfile Justfile Makefile 2>/dev/null; \
echo '--- pyproject'; grep -E '^\[tool\.(ruff|pytest|flake8|pylint)' pyproject.toml 2>/dev/null; \
echo '--- scripts'; python3 -c 'import json;print(json.load(open("package.json")).get("scripts",{}))' 2>/dev/null; \
echo '--- test dirs'; ls -d tests/unit test/unit tests/integration test/integration 2>/dev/null
Choose from the output:
- setup prefix:
source .venv/bin/activate &&orsource venv/bin/activate &&if listed. JS package manager:pnpmifpnpm-lock.yaml,yarnifyarn.lock, elsenpm. - lint, first match:
just lint→make lint→ruff check .([tool.ruff]) →flake8→pylint .→<pm> run lint(script present) → skip. - unit tests, first match:
just unit-test→just test→make unit-test→make test→ pytest ([tool.pytest…]):pytest tests/unitorpytest test/unitif the dir exists, elsepytest --ignore=<integration dir>if one exists, elsepytest→python -m unittest(Python project without pytest) →<pm> run test:unit→<pm> run test→ skip.
If --- files listed nothing, report "Unable to determine project type" and stop.
Step 3 — Run and report
Run lint, then unit tests, from the repository root with the setup prefix. Report:
lint: pass / fail / skipped — with the tool's error output on failureunit tests: pass / fail / skipped — with the failing test output on failure- The commands used and their source: project skill, project instructions, or discovery.
If either check failed, say the errors need review before committing.