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.
66
80%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Critical
Do not install without reviewing
Fix and improve this skill with Tessl
tessl review fix ./skills/devtu-code-optimization/SKILL.mdAlways 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 donemain directlymims-harvard/ToolUniverse — verify with git remote -v164aaf1
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.