self-optimization

self-optimization is a skill for Claude Code from a5c-ai/babysitter. It costs 32 tokens per session (361 once invoked), scanned A, original, MIT.

A learning system that stores execution patterns, compares them with new work, and adjusts future routing and agent choices over time.

In plain words
What is it for?
Use it to retrieve similar past trajectories, judge their relevance, store new patterns, and adapt agent behavior through feedback.
Why use it?
It helps an agent reuse useful experience across sessions while reducing the risk of losing older patterns when learning new ones.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool.

Good fit Use it to retrieve similar past trajectories, judge their relevance, store new patterns, and adapt agent behavior through feedback.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/a5c-ai/babysitter/self-optimization
About the project

Babysitter is a workflow engine for AI coding agents that enforces predefined steps, quality checks, human approvals, and decision records. It is used to coordinate complex, repeatable agent workflows across supported coding tools. The catalogue contains skills, agents, instructions, settings, a plugin, and an MCP integration for its workflow.

a5c-ai/babysitter · 1,788 stars · on GitHub · a5c.ai

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 a5c-ai/babysitter --skill self-optimization
Clone the repo
git clone --depth 1 https://github.com/a5c-ai/babysitter

Made for: Claude Code.

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 self-optimization

README.md
[![agentmods](https://agentmods.dev/badge/skills/a5c-ai/babysitter/self-optimization/github.svg)](https://agentmods.dev/skills/a5c-ai/babysitter/self-optimization)
Your own site
<a href="https://agentmods.dev/skills/a5c-ai/babysitter/self-optimization"><img src="https://agentmods.dev/badge/skills/a5c-ai/babysitter/self-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 self-optimization

Your own site · 80×15
<a href="https://agentmods.dev/skills/a5c-ai/babysitter/self-optimization"><img src="https://agentmods.dev/badge/skills/a5c-ai/babysitter/self-optimization.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 361 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 pass 7 Sept 2026
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.00032 $0.00361
Opus 5 $0.00016 $0.00180
Sonnet 5 $0.00006 $0.00072
Haiku 4.5 $0.00003 $0.00036

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

Security

Grade A, and why

self-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.

library/methodologies/ruflo/skills/self-optimization/SKILL.md · 43 lines

What it actually says

  • Improving routing and agent selection over time
  • Adapting to new project patterns without forgetting old ones
  • Building cross-session intelligence

SONA Cycle

  1. Extract Patterns - Mine execution data for recurring patterns
  2. RETRIEVE - Search ReasoningBank for matching trajectories
  3. JUDGE - Evaluate trajectory applicability in current context
  4. DISTILL - Compress and store new entries
  5. Adapt - Update weights with EWC++ regularization

Anti-Forgetting (EWC++)

  • Elastic Weight Consolidation prevents overwriting previously learned patterns
  • Fisher information matrix tracks parameter importance
  • Configurable regularization penalty for new adaptations

RL Algorithms

Q-Learning, SARSA, PPO, DQN, A2C, TD3, SAC, DDPG, Rainbow

Agents Used

  • agents/optimizer/ - Performance tuning
  • agents/adaptive-queen/ - Real-time adaptation

Tool Use

Invoke via babysitter process: methodologies/ruflo/ruflo-intelligence

Files

What ships with it

1 file 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 First seen · 43 lines · 32 tokens per session scan A 7fdf372ed802

Subscribe to this mod's changes

self-optimization is a skill published in the GitHub repository a5c-ai/babysitter (1,788 stars, last pushed 7d ago), licensed MIT. It adds 32 tokens to every session and 361 once invoked, about $0.0002 per session on Opus 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

reflect

Mines a session for durable learnings. Trigger on "reflect on this session" or "/reflect" only; never infer intent from session end or friction.

bostonaholic/team · 34 tokens

list-learned-actions

Explicit Codex workflow: List persisted reusable actions, UI skeletons, and legacy feedback memories before composing device primitives.

Lykhoyda/rn-dev-agent · 29 tokens

agent-memory-coordinator

Agent skill for memory-coordinator - invoke with $agent-memory-coordinator.

ruvnet/ruflo · 19 tokens

tutti-agent-workspace-app

Build or evolve a complex agent-enabled Tutti workspace app repository. Use for Tutti apps with web/server/shared monorepos, @tutti-os/agent-acp-kit local agent runtimes, kit-owned TUTTICLI agent/composer discovery, dynamic agent catalogs, run-scoped MCP tool gateways, app-owned package builders, web-first debugging…

tutti-os/tutti · 106 tokens

distill-session-knowledge

Offline-mine this project's pi session JSONL logs into reusable, verified knowledge: extracts faults, decisions, corrections, procedures and docs, promotes only recurring patterns, and routes artifacts into skillmanage, memory and docs. Use on "mine my sessions", "distill session knowledge", "extract lessons from…

BlackBeltTechnology/pi-agent-dashboard · 78 tokens

nest

Designing LLM-optimized folder structures: audits and restructures directories for context efficiency, progressive disclosure, and prompt cache performance. Not for general repo structure (Grove).

simota/agent-skills · 37 tokens