一键导入
test-suite
Clone test suite repo (if needed), run full test suite, and report results. Use before pushing to ensure nothing is broken.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Clone test suite repo (if needed), run full test suite, and report results. Use before pushing to ensure nothing is broken.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Pre-push checklist — write tests for changes, run full suite, verify docs, push. Use before every git push.
Analyze code changes, generate unit and integration tests, add them to the judgement-tests repo. Run after every feature, fix, or refactor — no matter how small.
基于 SOC 职业分类
| name | test-suite |
| description | Clone test suite repo (if needed), run full test suite, and report results. Use before pushing to ensure nothing is broken. |
| disable-model-invocation | true |
| allowed-tools | Bash(python3 -m pytest *) Bash(npx vitest *) Bash(npx tsc *) Bash(python3 -c *) Bash(git clone *) Bash(git -C * pull *) Bash(ls *) Bash(find * -name *) Bash(cp *) Bash(mkdir *) Bash(rm *) Bash(cd *) |
Run the full test suite before pushing. This skill ensures the judgement-tests repo is available locally and runs all tests against the current code.
Check if judgement-tests is cloned as a sibling directory:
ls ../judgement-tests/backend 2>/dev/null && echo "FOUND" || echo "NOT_FOUND"
git clone https://github.com/jvalin17/judgement-tests.git ../judgement-tests
git -C ../judgement-tests pull --ff-only
python3 -c "from pydantic import BaseModel; print('pydantic OK')"
If this fails, stop and tell the user to run: python3 -m pip install --force-reinstall pydantic pydantic-core
python3 -m pytest backend/tests/ -v
All must pass. If any fail, stop and report failures. Do NOT continue to the suite.
cd frontend && npx vitest run
All must pass. If any fail, stop and report failures. Do NOT continue to the suite.
cd frontend && npx tsc -b
Must produce zero errors. If any fail, stop and report.
JUDGEMENT_REPO=$(pwd) python3 -m pytest ../judgement-tests/backend/ -v --rootdir=../judgement-tests
All must pass. Report any failures.
Copy suite test files into main repo, run, then clean up:
# Copy test files
find ../judgement-tests/frontend/src -name "*.test.*" -type f | while IFS= read -r src_file; do
rel="${src_file#../judgement-tests/frontend/src/}"
dest="frontend/src/$rel"
mkdir -p "$(dirname "$dest")"
cp "$src_file" "$dest"
echo "$rel" >> frontend/src/.suite-tests-copied
done
cd frontend && npx vitest run
Then clean up the copied files:
if [ -f frontend/src/.suite-tests-copied ]; then
while IFS= read -r file; do
rm -f "frontend/src/$file"
done < frontend/src/.suite-tests-copied
rm -f frontend/src/.suite-tests-copied
fi
Print a summary:
=== Test Suite Results ===
Backend smoke: ✓ (X passed)
Frontend smoke: ✓ (X passed)
TypeScript: ✓ (no errors)
Backend suite: ✓ (X passed)
Frontend suite: ✓ (X passed)
=========================
All tests passed — safe to push.
If ANY step failed, end with:
=== BLOCKED ===
Do NOT push. Fix the failures above first.