Claude-skill-registry atft-code-quality
Enforce lint, formatting, typing, testing, and security hygiene across the ATFT-GAT-FAN codebase.
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/atft-code-quality" ~/.claude/skills/majiayu000-claude-skill-registry-atft-code-quality && rm -rf "$T"
manifest:
skills/data/atft-code-quality/SKILL.mdsource content
ATFT Code Quality Skill
Mission
- Maintain production-readiness by catching regressions before merge or deployment.
- Automate formatting, static analysis, and targeted test execution.
- Surface remediation paths for failing checks with minimal GPU disruption.
Trigger Phrases
- “Run quality gate”, “lint/format the repo”, “execute tests”, “type check”, “pre-commit”.
- Requests mentioning Ruff, mypy, pytest, security audit, or dependency hygiene.
Quality Pipeline
- Workspace scan
git status --shorttools/project-health-check.sh --section quality
- Formatting & Lint
ruff check src/ --fixruff format src/ tests/
- Type Safety
mypy src/gogooku3 scripts/
if TypeScript integration touched.pyright
- Testing Layers
pytest tests/unit -n auto -qpytest tests/integration -m "not slow"
for risk module.python test_short_selling.py --strict
- Security & Secrets
(once) thenpip install bandit safetybandit -qr src/
with baselinedetect-secrets scan
.security/detect-secrets.baseline
- Pre-commit Sweeps
pre-commit run --all-files
.pre-commit run --hook-stage manual conventional-pre-commit
Specialized Workflows
Fast Feedback (single file change)
.ruff check src/gogooku3/<module>.py --fix
.pytest tests/unit/test_<module>.py -k <case>
.mypy src/gogooku3/<module>.py
GPU-Sensitive Checks
- For CUDA kernels or Torch compile edits:
.pytest tests/integration/test_gpu_training.py::test_compile_path --maxfail=1 - Validate memory usage script:
.python tools/gpu_memory_report.py --dry-run
Dependency Hygiene
(if edited).pip-compile requirements.in
.python tools/dependency_audit.py --fail-on-critical- Update lockfiles and note changes in
.docs/ops/dependency_log.md
Failure Handling
- Lint failure → reference Ruff rule from output, fix quickly; prefer
.ruff --fix-only RULE - Type errors → add precise type hints, update
only with justification in docstring.mypy.ini - Flaky tests → rerun with
; mark withpytest -k test_name --lf
only when documented in@pytest.mark.flaky
.tests/README.md - Security findings → rotate secrets, update
, notify DevSecOps via.env.example
.security/alerts.md
Codex Collaboration
- Launch
for architectural refactors or elusive bug hunts../tools/codex.sh "Perform deep static audit of src/gogooku3" - Use
when triaging stubborn CI failures.codex exec --model gpt-5-codex "Review failing pytest logs and propose fixes" - Reflect Codex recommendations into permanent lint/type rules and note significant changes in
.quality/last_quality_report.md
Exit Criteria
- All commands exit 0.
- Updated artifacts recorded in
.quality/last_quality_report.md - Provide summary + next steps in PR description or change log.