devtu-code-optimization

devtu-code-optimization is a skill for Claude Code, Codex from mims-harvard/ToolUniverse. It costs 87 tokens per session (793 once invoked), scanned A, original, Apache-2.0.

A code-quality guide for developing ToolUniverse tools in Python. It covers validation, registration, schemas, error handling, tests, linting, and direct tool checks.

In plain words
What is it for?
Use it while writing, fixing, or refactoring ToolUniverse tool code, then verify the changed files, registrations, examples, and real tool calls.
Why use it?
It catches problems such as invalid configuration, ignored parameters, wrong API fields, malformed schemas, and untested imports before release.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it while writing, fixing, or refactoring ToolUniverse tool code, then verify the changed files, registrations, examples, and real tool calls.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mims-harvard/tooluniverse/devtu-code-optimization
About the project

ToolUniverse is a collection of tools, interfaces, and supporting components for building AI systems that perform scientific work. It is for developers creating AI scientist agents that use APIs, databases, machine-learning tools, and domain-specific utilities. The catalogue includes skills, commands, an MCP server, an agent, and a hook for working with the ecosystem.

mims-harvard/ToolUniverse · 1,739 stars · on GitHub · aiscientist.tools

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add mims-harvard/ToolUniverse --skill devtu-code-optimization
Clone the repo
git clone --depth 1 https://github.com/mims-harvard/ToolUniverse

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for devtu-code-optimization

README.md
[![agentmods](https://agentmods.dev/badge/skills/mims-harvard/tooluniverse/devtu-code-optimization/github.svg)](https://agentmods.dev/skills/mims-harvard/tooluniverse/devtu-code-optimization)
Your own site
<a href="https://agentmods.dev/skills/mims-harvard/tooluniverse/devtu-code-optimization"><img src="https://agentmods.dev/badge/skills/mims-harvard/tooluniverse/devtu-code-optimization/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for devtu-code-optimization

Your own site · 80×15
<a href="https://agentmods.dev/skills/mims-harvard/tooluniverse/devtu-code-optimization"><img src="https://agentmods.dev/badge/skills/mims-harvard/tooluniverse/devtu-code-optimization.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 87 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 793 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Rogue Agent · line 6
    Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.
    Fix: Prevent the skill from modifying its own code, SKILL.md, or configuration files. Treat skill files as read-only at runtime.
  • high Tool Misuse · line 49
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00087 $0.00793
Opus 5.5 $0.00035 $0.00317
Sonnet 5.5 $0.00017 $0.00159
Haiku 4.5 $0.00009 $0.00079

Measured 9d ago against content hash 7adbca637263, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

devtu-code-optimization scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/devtu-code-optimization/SKILL.md · 58 lines

How it starts

The opening of the file, as written. The whole thing — 58 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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/<file>.py passes
  • python -c "from tooluniverse.<module> import <Class>" passes
  • python -m tooluniverse.cli run <Tool> '<real_args_json>' 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 — 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

References

Read the full file on GitHub · 58 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago Changed 7adbca637263
  2. 1mo ago First seen · 58 lines · 87 tokens per session scan A d720f25cac5f

Subscribe to this mod's changes

devtu-code-optimization is a skill published in the GitHub repository mims-harvard/ToolUniverse (1,739 stars, last pushed today), licensed Apache-2.0. It adds 87 tokens to every session and 793 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

credit-note-fixer

Fix the tiny credit-note formatting bug and rerun the exact targeted test command.

openai/openai-agents-python · 21 tokens

bug-fixing

Fix defects in the Composio SDK repository with focused reproduction, root-cause analysis, regression tests, and narrow verification. Use when the user reports a bug, failing test, CI regression, runtime defect, or incorrect SDK behavior. Do not use for new feature design or broad refactors.

ComposioHQ/composio · 63 tokens

python-testing

Select and run Python SDK verification with nox, Makefile targets, Ruff, mypy, pytest markers, sanity tests, type inference checks, and build checks. Use when adding Python tests, diagnosing Python CI, or validating Python SDK/provider changes. Do not use for TypeScript-only checks.

ComposioHQ/composio · 62 tokens

cli-e2e

Write, modify, or debug Docker-based Composio CLI end-to-end tests under ts/e2e-tests/cli, including binary invocation, fixture isolation, output assertions, and package manifests. Use for CLI E2E test suites only; use cli-command for CLI source implementation.

ComposioHQ/composio · 62 tokens

potpie-debug-memory

Use while debugging or troubleshooting failures, flaky tests, incidents, production alerts, CI failures, local dev setup issues, repeated bugs, prior fixes, failed attempts, and verification history.

potpie-ai/potpie · 41 tokens

resolve-author-fix

Find the root cause, implement a focused fix, and prove behavior with targeted tests and recordings.

omnigent-ai/omnigent · 24 tokens