用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/NVIDIA-NeMo/RL --skill error-handling命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | error-handling |
| description | Error handling guidelines for NeMo-RL. Covers exception specificity, minimal try bodies, and else blocks. |
| when_to_use | Writing or reviewing exception handling; 'try-except', 'catch all exceptions', 'bare except', 'how to handle errors', during code review. |
When using try-except blocks, limit the except to the smallest set of errors possible.
Don't:
try:
open(path, "r").read()
except:
print("Failed to open file")
Do:
try:
open(path, "r").read()
except FileNotFoundError:
print("Failed to open file")
When adding a config option or branch, ask: what does the worst plausible misconfiguration do? If it silently
produces wrong results rather than an error, add a setup-time assert/raise so it fails loudly at startup
instead of corrupting a run.
Examples of silent-wrong worth guarding:
prev_logprobs while a loss flag zeroes it (advantage degrades to
garbage with no error).KeyError mid-run instead of a
setup-time check).Prefer failing at setup() time over a deep-in-the-loop crash; prefer a crash over silent garbage. If you
truly can't validate, surface a logged warning rather than nothing.
基于 SOC 职业分类