optimizer_skill

This skill analyzes and optimizes an agent's code by adjusting its system prompt and tool configuration to boost performance, reliability, and security.
  • Python

1.1k

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill inclusionai/aworld --skill optimizer

  • SKILL.md26.8 KB

Overview

This skill analyzes an existing agent codebase and automatically applies targeted patches to improve performance, quality, security, and functionality. It prioritizes the agent's system_prompt and mcp_config.py to correct behavior and expand capabilities, using AST-driven analysis and atomic code edits. The workflow includes discovery, deep analysis, snapshotting, patching, verification, and re-registration of the optimized agent.

How this skill works

The skill locates the target agent via the agent registry, then runs AST-based inspections to surface structural, complexity, performance, and security issues. It crafts focused, single-file patch operations and uses a snapshot-before-change strategy to ensure safe rollbacks. After applying patches, it verifies results and dynamically re-registers the updated agent for immediate use.

When to use it

  • Agent produces incorrect or inconsistent behavior (wrong steps, missed constraints)
  • Agent lacks a capability due to missing tools in mcp_config.py
  • Code has clear performance or security hotspots discovered by static analysis
  • You need a safe, auditable way to change an agent (snapshots + atomic patches)
  • You want to fuse patterns from built-in agents to create a specialized agent

Best practices

  • Always prioritize fixes to system_prompt and mcp_config.py before changing runtime logic
  • Use regular-expression queries for all AST searches to get accurate locations and context
  • Create a compressed snapshot of the agent directory before any modifications
  • Make each patch atomic: one logical block in one file per operation
  • Include the terminal tool in mcp_config.py for dependency management and file I/O operations

Example use cases

  • Fix an agent that skips required workflow steps by strengthening the Methodology & Workflow section in system_prompt
  • Add a web-search or PDF-reading tool to mcp_config.py to enable new capabilities
  • Reduce a function's high cyclomatic complexity by refactoring a single function and applying an atomic patch
  • Inject a dynamic current-date variable into system_prompt so the agent is aware of the correct time zone and cutoff date
  • Fuse the foundation search agent prompt with a specialist agent's domain logic to create a tuned, high-quality agent

FAQ

I inspect the system_prompt and mcp_config.py first; most behavioral and capability issues are fixed by prompt tweaks or adding tools. Code logic is modified only if necessary.

How do you keep changes safe and reversible?

I always generate a compressed snapshot of the agent directory before applying any patches, and I apply small, single-file atomic patches to simplify rollbacks and verification.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
optimizer skill by inclusionai/aworld | VeilStrat