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 |
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
PCR / qPCR primer and oligo design — design forward/reverse primers for a target region (SantaLucia nearest-neighbor thermodynamics), compute melting temperature (Tm) and annealing temperature (Ta), check GC content, and screen an oligo for hairpins and primer-dimers. Use when you need primers for a sequence, want to QC an existing primer pair, or need the Tm of an oligo. Covers the primer-design rules (Tm matching, GC clamp, 3'-end, length) and the tools' constraint quirks.
tools
Pharmacokinetic (PK) analysis of concentration-time data — non-compartmental analysis (NCA) for Cmax, Tmax, AUC (0-t and 0-∞), terminal half-life, clearance (CL), volume of distribution (Vd), MRT, and absolute bioavailability (F). Also one-compartment fitting. Use when you have plasma/serum drug concentrations over time after a dose and need PK parameters, or to compute bioavailability from IV + oral AUCs. NOT for ADMET property prediction from structure (use tooluniverse-admet-prediction).
tools
Molecular cloning assembly design — Gibson Assembly (overlap design for seamless multi-fragment joining) and Golden Gate Assembly (Type IIS / BsaI / BbsI design with unique 4-bp fusion overhangs). Use when you need to plan how to join DNA fragments into a construct, design assembly overlaps/overhangs, or decide between cloning methods. Covers the domestication (internal-site removal), overhang-uniqueness, and overlap-Tm rules. For PCR primers to generate the fragments, see tooluniverse-primer-design.
tools
Meta-analysis / evidence synthesis — pool effect sizes across studies (odds ratios, risk ratios, hazard ratios, mean differences, correlations, GWAS betas) with fixed- or random-effects models, quantify heterogeneity (Q, I², τ²), and build a forest plot. Use when you have results from MULTIPLE studies and need a single pooled estimate, or to synthesize evidence from a systematic review / multiple GWAS / replicated experiments. Handles the error-prone effect-size + standard-error preparation (converting OR/HR/CI, two-group means±SD, proportions, and correlations into the (effect, SE) the pooling step needs).