mims-harvard/tooluniverse

devtu-code-optimization

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. checking schema correctness, looking up API-specific bug fixes.

First seen Mar 8, 2026

Installation

$ npx skills add mims-harvard/tooluniverse --skill devtu-code-optimization

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from mims-harvard/tooluniverse · top by installs.

npx skills add mims-harvard/tooluniverse

Browse all from mims-harvard/tooluniverse

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 1.7K
License LICENSE
Default branch main
Open issues 9
Status Active

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,996 B
  • docs SUMMARY.md 2,954 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 257 installs

SKILL.md

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 lazyregistrystatic.py and defaultconfig.py
  • ruff check src/tooluniverse/<file>.py passes
  • python -c "from tooluniverse.<module> import <Class>" passes
  • python -m tooluniverse.cli run <Tool> '<realargsjson>' 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

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
  • 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