技能库
智客分类:写作与研究
devtu-code-optimization
Devtu Code Optimization
代码质量模式和工具Universe工具开发指南. 在工具 University 项目中应用写入、修复或重构工具 Python 代码。 编码80+调试回合的课目. 与 devtu-fix-tool并用并用并用 devtu-自演. 触发:执行工具修正,写出新的工具类,审查工具代码质量,检查计划正确性,查找API特定错误修正.
SKILL.md / Agent 安装方式 SKILL.md 原文
263 安装量
官方网址:skills.sh
技能介绍
先看中文介绍;官方 description 原文单独保留,不改写 SKILL.md。
做什么
代码质量模式和工具Universe工具开发指南. 在工具 University 项目中应用写入、修复或重构工具 Python 代码。 编码80+调试回合的课目. 与 devtu-fix-tool并用并用并用 devtu-自演. 触发:执行工具修正,写出新的工具类,审查工具代码质量,检查计划正确性,查找API特定错误修正.
何时用
官方 description 未单独写出 Use when。按规范,代理会在用户任务与这段 description 的关键词匹配时激活本技能。
代理如何加载
按 Agent Skills 渐进披露:启动时只加载 name 与 description(约 100 token);任务匹配后才读入整份 SKILL.md 正文;scripts/、references/、assets/ 仅在需要时再读。 本文件正文结构:ToolUniverse Code Optimization、Pre-Commit Checklist、Key Fix Categories、References、Git & PR Workflow。 其中含规范建议的小节:分步指令。
文件分析
文件分析:除 SKILL.md 外,正文引用了 references/api-fixes.md、references/code-patterns.md,属于带资源的技能包,这些文件按需再读。
官方 description(原文)
Code quality patterns and guidelines for ToolUniverse tool development. Apply when writing, fixing, or refactoring tool Python code in the ToolUniverse project. Encodes lessons from 80+ debug rounds. Use alongside devtu-fix-tool and devtu-self-evolve. Triggers: implementing tool fixes, writing new tool classes, reviewing tool code quality, checking schema correctness, looking up API-specific bug fixes.
ToolUniverse Code Optimization Pre-Commit Checklist Key Fix Categories References Git & PR Workflow
来源分类:skills.sh agent-skill
来源与网址
namedevtu-code-optimization
descriptionCode quality patterns and guidelines for ToolUniverse tool development. Apply when writing, fixing, or refactoring tool Python code in the ToolUniverse project. Encodes lessons from 80+ debug rounds. Use alongside devtu-fix-tool and devtu-self-evolve. Triggers: implementing tool fixes, writing new tool classes, reviewing tool code quality, checking schema correctness, looking up API-specific bug fixes.
发现技能 客户端向 Agent 提供名称与描述目录。
匹配与调用 用户指定或任务匹配后,载入 SKILL.md 指令。
按需加载 按步骤读取参考文档、使用脚本与素材。
指令中引用的文件 · 2 references/api-fixes.mdreferences/code-patterns.md以下路径提取自原文;文件是否齐全请以来源仓库中的完整目录为准。
具体调用语法与可用工具以目标 Agent 客户端为准。 查看调用机制说明 ↗
先选择目标 Agent 和安装范围,保留技能包的附属文件,安装后检查客户端能否发现该技能。
该技能引用了附属文件,请从来源获取完整目录;仅复制 SKILL.md 可能缺少依赖。
交给 Agent 安装
复制安装指令给支持 Agent Skills 的代理,确认其中的目标目录与客户端匹配。
把 Agent Skill「devtu-code-optimization」安装到我的项目:SKILL.md 原文与官方 description 见 https://zicq.com/zh/skills/skl-4215612c33fdcde0-Devtu-%E4%BB%A3%E7%A0%81%E4%BC%98%E5%8C%96.html
请存为 .cursor/skills/devtu-code-optimization/SKILL.md 或 .claude/skills/devtu-code-optimization/SKILL.md,frontmatter 的 name 与 description 保持原样,不要改写。
该技能还带 scripts/、references/、assets/ 等文件,请从 https://github.com/mims-harvard/tooluniverse 取完整目录,不要只建一个 SKILL.md。
复制安装提示词 GitHub 完整包 ↗
终端安装 · Skills CLI
需要 Node.js 与 npx。先查看仓库技能列表,确认实际名称。
npx skills add 'https://github.com/mims-harvard/tooluniverse' --list
复制查看命令
目标客户端
安装时交互选择 Codex Claude Code Cursor
安装范围
当前项目 我的所有项目
npx skills add 'https://github.com/mims-harvard/tooluniverse' --skill 'devtu-code-optimization' 复制安装命令
CLI 会交互选择目标 Agent,默认安装到项目;用户级安装使用 -g。先通过查看命令核对仓库内容,再用 npx skills list 检查已安装技能。
SKILL.md 原文 可复制,不会改动源文件
复制 SKILL.md
恢复原文
阅读排版
---
name: devtu-code-optimization
description: >
Code quality patterns and guidelines for ToolUniverse tool development.
Apply when writing, fixing, or refactoring tool Python code in the ToolUniverse project.
Encodes lessons from 80+ debug rounds. Use alongside devtu-fix-tool and devtu-self-evolve.
Triggers: implementing tool fixes, writing new tool classes, reviewing tool code quality,
checking schema correctness, looking up API-specific bug fixes.
---
# ToolUniverse Code Optimization
Always run `Skill(skill="simplify")` after writing or modifying code.
## Pre-Commit Checklist
- [ ] `return_schema` has `oneOf: [{data+metadata}, {error}]`
- [ ] Test examples use real IDs (no DUMMY/PLACEHOLDER)
- [ ] `try:` has `except:` at exact same indentation level
- [ ] No trailing commas in JSON (`python3 -c "import json; json.load(open('f.json'))"`)
- [ ] New tool class registered in `_lazy_registry_static.py` and `default_config.py`
- [ ] `ruff check src/tooluniverse/.py` passes
- [ ] `python -c "from tooluniverse. import "` passes
- [ ] `python -m tooluniverse.cli run ''` returns expected data
- [ ] Ran `Skill(skill="simplify")` on all modified files
## Key Fix Categories
| Category | Signal | Reference |
|---|---|---|
| Silent param ignored | API accepts but drops filter | [code-patterns.md](code-patterns.md) — Client-Side Filter |
| Wrong API field/endpoint | 0 results or 404 | [api-fixes.md](api-fixes.md) — Quick Lookup Table |
| Schema invalid | null type, missing oneOf | [code-patterns.md](code-patterns.md) — Schema Patterns |
| Undisclosed normalization | Auto-transform hidden from user | [code-patterns.md](code-patterns.md) — Normalization Disclosure |
| try/except indent | SyntaxError at runtime | [code-patterns.md](code-patterns.md) — try/except section |
| Truncation buried | Data count hidden in notes | [code-patterns.md](code-patterns.md) — Truncation |
| Hosted model API (NIM) | async 404 on poll, JSON-wrapped output, 200+inner-failure, "not found for account" | [code-patterns.md](code-patterns.md) — Hosted Model-API Tools |
| R subprocess tool | `'\.' unrecognized escape` from `Rscript -e` | [code-patterns.md](code-patterns.md) — R-subprocess Tools |
## References
- **[references/api-fixes.md](references/api-fixes.md)** — Per-API bug fixes (GtoPdb, CIViC, GTEx, ENCODE, CPIC, etc.)
- **[references/code-patterns.md](references/code-patterns.md)** — Reusable Python patterns (schema, filtering, pagination, normalization)
## Git & PR Workflow
```bash
git fetch origin && git stash && git rebase origin/main && git stash pop
git push --force-with-lease origin fix/round-XX-bugs
gh pr view --json mergeable # must be MERGEABLE before done
```
- Never push to `main` directly
- Never have multiple open fix PRs
- Commit messages: "Feature" or "Fix" — never "Bug"
- No AI attribution in commits
- Repo: `mims-harvard/ToolUniverse` — verify with `git remote -v`
相关技能
写作与研究
从文本中删除 AI 生成的写入标记 。 编辑或审查文本时使用,使其声音更自然和人文写作. 基于维基百科的全面"AI写作的标志"指南. 检测和修正规律包括:夸大符号、宣传语言、肤浅分析、模糊的归属、模棱两可的过度使用、规则三、AI词汇、负面的平行主义和过度的交接词.
写作与研究
OpenClaw 的默认网络搜索 。 搜索网络跨越了10个引擎——Google,Reddit,GitHub,arXiv,Hacker News等——使用Prismfy. 包括免费等级,不需要信用卡。 包括用于网络搜索、配额检查和引擎/时间/域过滤器的捆绑 " search.sh …
写作与研究
监控博客和RSS/Atom的种子.
写作与研究
AI-优化了使用Tavily Search API的网络搜索. 需要全面网络研究,时事搜索,域名特定搜索,或AI生成的回答摘要时使用. Tavily是LLM消费的优化型,具有清洁的结构化结果,答案生成,以及原始内容提取. 最适合研究任务、新闻查询、实况调查和收集权威来源.