skills/devtu-code-optimization/SKILL.md
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.
npx skillsauth add mims-harvard/tooluniverse devtu-code-optimizationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Always run Skill(skill="simplify") after writing or modifying code.
return_schema has oneOf: [{data+metadata}, {error}]try: has except: at exact same indentation levelpython3 -c "import json; json.load(open('f.json'))")_lazy_registry_static.py and default_config.pyruff check src/tooluniverse/<file>.py passespython -c "from tooluniverse.<module> import <Class>" passespython -m tooluniverse.cli run <Tool> '<real_args_json>' returns expected dataSkill(skill="simplify") on all modified files| Category | Signal | Reference |
|---|---|---|
| Silent param ignored | API accepts but drops filter | code-patterns.md — Client-Side Filter |
| Wrong API field/endpoint | 0 results or 404 | api-fixes.md — Quick Lookup Table |
| Schema invalid | null type, missing oneOf | code-patterns.md — Schema Patterns |
| Undisclosed normalization | Auto-transform hidden from user | code-patterns.md — Normalization Disclosure |
| try/except indent | SyntaxError at runtime | code-patterns.md — try/except section |
| Truncation buried | Data count hidden in notes | 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 — Hosted Model-API Tools |
| R subprocess tool | '\.' unrecognized escape from Rscript -e | code-patterns.md — R-subprocess Tools |
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 <N> --json mergeable # must be MERGEABLE before done
main directlymims-harvard/ToolUniverse — verify with git remote -vtools
Generate the success criteria for a task or question, then review work against them. Given a task, goal, or open-ended question, decompose it into scenarios, evaluation perspectives, and fine-grained weighted YES/NO criteria using the Recursive Expansion Tree (RET) method; if work is supplied, score it criterion-by-criterion and surface what is missing or could be better. Use when asked to self-review or check your own work, judge whether a task is done well or completely, build a definition-of-done or completeness checklist, create an evaluation rubric or grading criteria, score or grade answers to a question, set up an LLM-as-judge rubric, or when the user mentions self-review, completeness check, success criteria, evaluation criteria, scoring rubric, Qworld, or the RET algorithm.
tools
Find the real protein target(s) of a peptide from its sequence — peptide target deorphanization / off-target identification, for ANY target class (GPCR, ion channel, protease, cytokine/growth-factor receptor, enzyme, integrin), not only GPCRs. Use when a peptide has a phenotype but does not bind its hypothesized target, when a peptide binds a target in one species or assay but not another, or to screen candidate targets for an orphan peptide. A target-class router steers a multi-route keyless pipeline (PROSITE/ELM motif, BLAST homology, HGNC/InterPro/GPCRdb/GtoPdb target-family enumeration, OpenTargets phenotype anchor, EnsemblCompara/Alliance cross-species reconciliation) plus optional NVIDIA-NIM co-folding (Boltz2, AlphaFold2-Multimer, OpenFold3) for structural confirmation.
tools
Install or update ToolUniverse in Claude Science — create the conda env, install the tooluniverse pip package, and (re)build the tooluniverse-research skill by fetching the current workflow library from GitHub. Use for first-time setup, upgrading the ToolUniverse version, refreshing the bundled workflows after an upstream release, or reinstalling on a new machine.
tools
Install, set up, verify, update, pin, uninstall, or troubleshoot the ToolUniverse plugin on OpenAI Codex. ALWAYS consult this skill for any of those — don't answer from memory, because the exact marketplace name (mims-harvard/ToolUniverse), the "codex plugin marketplace add" then "codex plugin add -m tooluniverse" flow, Codex's startup auto-upgrade behavior, the uvx tooluniverse MCP server, and the API-key env vars are easy to get wrong. Use it whenever someone wants to get ToolUniverse (or "the 1000+ scientific tools" / "the harvard tools") working on Codex, says the Codex plugin or its tools/skills won't load, hits a uvx or MCP-server startup error, asks how Codex updates it, wants to pin or remove it, or finds it running an old tool version — even if they never say the word "plugin". Not for the Claude Code plugin (use tooluniverse-claude-code-plugin), for running research with the tools, or for authoring new tools or skills.