improve-agent

Hardens an existing agent by probing, judging, and editing it against its own instructions.

Updated Sep 9, 2026
One-click install
npx skills add https://github.com/martin-cousseau/refund-arena --skill improve-agent-martin-cousseau
Or copy as Structured Prompt for Agentβ–Ό
Please help me install this Agent Skill.
Skill: improve-agent
Source: https://github.com/martin-cousseau/refund-arena/tree/main/backend/.agents/skills/improve-agent
Command: npx skills add https://github.com/martin-cousseau/refund-arena --skill improve-agent-martin-cousseau

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Agents often drift from the behavior their instructions promise, and manually writing test cases to catch that drift is slow and incomplete. This Skill autonomously derives probes from an agent's INSTRUCTIONS and its real recorded usage, runs them against the live container, judges the responses, edits the agent file, and re-probes until behavior matches intent β€” no user-supplied test cases needed. ## Core Features & Use Cases - Autonomous probe generation: Mines real session and eval data from the database, then derives 8–12 probes per agent covering golden paths, edge cases, tool selection, and adversarial inputs like prompt injection. - Closed-loop hardening: Runs probes via the live HTTP API, judges PASS/FAIL by root cause, applies one targeted edit per iteration (instructions, tools, model, or history), restarts the container, and re-probes β€” capped at 5 iterations. - Safe state management: Snapshots and sweeps durable rows that probes leave in learning components and the platform-builder, so testing never pollutes shared stores. - Use Case: A support agent keeps issuing refunds its policy forbids. Run this Skill to generate adversarial refund probes, identify the missing instruction rule, tighten the agent file, and verify the fix with regression probes. ## Quick Start Ask the agent to run /improve-agent on a target agent slug to harden it against its stated instructions.

Frequently Asked Questions about improve-agent

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I test an AI agent against its own instructions?β–Ό

Derive 2–3 probes per rule in the agent's INSTRUCTIONS plus adversarial cases, run them against the live agent endpoint, and judge each response PASS/FAIL against expected behavior. This Skill automates that loop, including mining real usage from the database for realistic probe scenarios.

How to fix an agent that ignores its prompt instructions?β–Ό

Group probe failures by cause β€” missing rule, wrong tool selection, hallucination, or injection β€” then apply one lever per iteration: narrow the instructions, remove a misused tool, adjust context mode, or change the model as a last resort. Restart the container and re-run only the failed probes.

Can I improve an agent without writing test cases manually?β–Ό

Yes. This Skill generates probes automatically from the agent's INSTRUCTIONS and from real user sessions recorded in the database, requiring no user-supplied test cases. Expected behavior always comes from the instructions, never from recorded answers.

What happens when agent probes leave data in the database?β–Ό

Probes can create durable rows in learning components and the platform-builder. The workflow snapshots state before the first probe and sweeps newly created rows after the last, using fixtures no real team would have on file.

When should I stop iterating on agent prompt fixes?β–Ό

Cap iterations at five, and stop early when all probes pass or when the same probe fails three times on the same lever. Repeated failure on one lever signals a tool gap, model limit, or missing data rather than a prompt problem.