一键导入
code-review
// Expert code review of current git changes with a senior engineer lens. Detects SOLID violations, security risks, Python anti-patterns, and ML/distributed training issues. Tailored for the Relax reinforcement learning framework.
// Expert code review of current git changes with a senior engineer lens. Detects SOLID violations, security risks, Python anti-patterns, and ML/distributed training issues. Tailored for the Relax reinforcement learning framework.
Diagnose Relax training launch scripts for misconfigured flags that hurt performance (time/MFU) or waste GPU memory (cards needed). Use when user asks to review/audit/check a training script, mentions "perf doctor", suspects a config is slow or OOM-prone, or wants a sanity check before launching. Produces a two-section markdown report (Performance + Memory) with cited flags, severity, and concrete fixes.
Develop and debug the Relax reinforcement learning project. Use this skill whenever modifying code in the relax/ directory, or running remote training jobs on a Ray cluster for validation. Also use it when the user mentions training, debugging training runs, submitting Ray jobs, or fixing training errors.
Connect to a remote Ray cluster head node via SSH (paramiko) to execute commands, check cluster status, inspect logs, and debug training jobs. Use this skill when the user asks to SSH into a remote machine, check Ray cluster status, or run remote commands on the Ray head node.
Guide for creating Claude Code skills following Anthropic's official best practices. Use when user wants to create a new skill, build a skill, write SKILL.md, update an existing skill, or needs skill creation guidelines. Provides structure, frontmatter fields, naming conventions, and new features like dynamic context injection and subagent execution.
自动排查 Ray 调度的分布式训练任务 hang 问题。使用当训练任务无响应、资源利用率异常、任务长时间无进度时。自动收集集群状态、任务调用栈、Actor 状态,分析阻塞链条并定位根因。
Write and maintain bilingual (English + Chinese) documentation for the Relax project. Use when user asks to create, update, or translate documentation pages. Ensures format correctness (VitePress, sidebar config, bilingual parity) and content correctness (matches actual codebase, no fabricated features).
| name | code-review |
| description | Expert code review of current git changes with a senior engineer lens. Detects SOLID violations, security risks, Python anti-patterns, and ML/distributed training issues. Tailored for the Relax reinforcement learning framework. |
Perform a structured review of the current git changes with focus on SOLID principles, architecture, removal candidates, security risks, and Python-specific issues. Tailored for the Relax project (PyTorch distributed training, Ray actors, ML pipeline code).
Default to review-only output unless the user asks to implement changes.
For project structure, coupling points, and key files, see AGENTS.md.
| Level | Name | Description | Action |
|---|---|---|---|
| P0 | Critical | Security vulnerability, data loss risk, correctness bug, training corruption | Must block merge |
| P1 | High | Logic error, significant SOLID violation, performance regression, gradient issues | Should fix before merge |
| P2 | Medium | Code smell, maintainability concern, minor SOLID violation, missing type hints | Fix in this PR or create follow-up |
| P3 | Low | Style, naming, documentation, minor suggestion | Optional improvement |
git status -sb, git diff --stat, and git diff to scope changes.rg or grep to find related modules, usages, and contracts.Edge cases:
relax/ subpackages are modified, verify import compatibility first.references/solid-checklist.md for specific prompts.references/removal-plan.md for template.references/security-checklist.md for coverage.references/code-quality-checklist.md for coverage.references/python-ml-checklist.md for coverage.## Code Review Summary
**Files reviewed**: X files, Y lines changed
**Overall assessment**: [APPROVE / REQUEST_CHANGES / COMMENT]
---
## Findings
### P0 - Critical
(none or list)
### P1 - High
1. **[file:line]** Brief title
- Description of issue
- Suggested fix
### P2 - Medium
...
### P3 - Low
...
---
## Removal/Iteration Plan
(if applicable)
Clean review: If no issues found, state what was checked and any residual risks.
After presenting findings, ask user how to proceed:
Important: Do NOT implement any changes until user explicitly confirms.
| File | Purpose |
|---|---|
solid-checklist.md | SOLID smell prompts and refactor heuristics for Python |
security-checklist.md | Python security and runtime risk checklist |
code-quality-checklist.md | Python-specific error handling, performance, boundary conditions |
removal-plan.md | Template for deletion candidates and follow-up plan |
python-ml-checklist.md | PyTorch/ML-specific issues for distributed training |