Self improve

From aaronjmars/aeon · View interactive version

Self improve is an AI agent skill from the GitHub repository aaronjmars/aeon. Improve the agent itself, or audit its recent performance - better skills, prompts, workflows, and config, plus a quality/reliability/memory-hygiene review of what it did and what failed

How to use this skill

Skill file

${var} — Mode selector, optionally with a focus area, as mode or mode:focus.

- empty or improve → improve mode: find and fix the highest-impact issue from recent logs, then propose + apply the fix via PR (default).

- improve:<area> (or a bare area like notifications) → improve mode focused on that specific area (e.g. heartbeat, notifications, memory).

- audit → audit mode: review what the agent did, what failed, and what to improve; save a full review and apply safe, obvious fixes directly.

- audit:<area> → audit mode focused on that specific area (e.g. reliability, memory).

Setup (both modes)

Parse ${var} into a mode and an optional focus area:

Then:

If a focus area is set, concentrate the run on that area.


Mode: improve (default)

Improve the agent itself based on recent performance. ONE change per run.

Steps

  1. Check for open improvement PRs - don't pile up unreviewed work. Run the count as its own Bash call (see Shell shape in the Network note):

```bash

gh pr list --state open --json title,number --jq '[.[] | select(.title | test("^(fix|feat|chore)\\("; "i"))] | length'

```

It prints OPEN_PRS. If there are already 3+ open improvement PRs, log "self-improve: 3+ open PRs, waiting for review" and exit. Don't create more debt.

  1. Identify what to improve. If the focus area is empty, scan for issues:
  1. Understand the area you're fixing. Read the relevant files:

Understand the current behavior before changing anything.

  1. Implement the fix. Make minimal, targeted changes:

Do NOT:

4b. Dry-run gate. Before opening the PR, execute the improved skill once with synthetic secrets, so a regression never reaches production having run only with real credentials. Write the skill you edited in literally as <SKILL>. One call (the script's default verdict path is output/.dry-run/<SKILL>.json, so no DRYRUN_VERDICT= prefix is needed):

```bash

./scripts/dry-run.sh run <SKILL>

```

A non-zero exit is not the verdict; carry on and read the file. Read output/.dry-run/<SKILL>.json: passed: true (or skipped: true, when the SKILL_DRYRUN repo variable is 0) continues. passed: false means revert the edit and stop (log self-improve: dry-run gate failed for <SKILL> with the verdict reasons[]; do not open the PR). Put the verdict under a ## Dry-run section in the PR body. The gate is structural (exit, output, declared mode, declared requires:); no real credential enters the run.

  1. Create a branch and PR, each command as its own call:

```bash

git checkout -b fix/self-improve-${today}

```

```bash

git add -A

```

```bash

git commit -m "fix: [description of what was improved]

Problem: [what was failing/degraded]

Fix: [what was changed]

Evidence: [log entries, error messages, success rates]"

```

Open a PR:

```bash

gh pr create --title "fix: [short description]" \

--body "## Problem

[What was failing or degraded — cite specific log entries or error messages]

## Fix

[What was changed and why]

## Evidence

```

  1. Notify. Send via ./notify:

```

self-improve: [what was fixed] - PR: [url]

```

  1. Log (see the shared ## Log section below).

Guidelines


Mode: audit

Audit what the agent did, what failed, and what to improve. Produce a full review, apply safe fixes, and surface recommendations.

Steps

Read memory/MEMORY.md for context and goals. Read ALL memory/logs/ entries from the last 7 days.

  1. Audit quality of outputs:
  1. Audit reliability:
  1. Audit memory hygiene:
  1. Generate improvement recommendations:
  1. Save the full review to output/articles/self-review-${today}.md.
  2. Apply any safe, obvious improvements directly:
  1. Send a summary via ./notify:

```

Self Review - ${today}

Quality: assessment

Reliability: X/Y skills ran

Actions taken: what was fixed

Recommendations: top 2-3 suggestions

```

  1. Log (see the shared ## Log section below).

Log

After completing the run, append a log entry to memory/logs/${today}.md under a single ### self-improve heading, with a discriminator line naming the mode that ran:

### self-improve
- **Mode:** improve  (or: audit)

Then, for improve mode:

- **Target:** [what was improved]
- **Problem:** [what was failing]
- **Fix:** [what was changed]
- **PR:** [url]

For audit mode:

- **Review:** output/articles/self-review-${today}.md
- **Quality:** [assessment]
- **Reliability:** [X/Y skills ran]
- **Actions taken:** [what was fixed directly]
- **Recommendations:** [top 2-3]

Network note

Write mode. Both branches touch the repo (improve opens a PR via git/gh; audit writes output/articles/self-review-${today}.md and may prune MEMORY.md/feeds.yml). For the GitHub API, use the gh CLI (gh pr list, gh pr create) — it handles auth internally, so no $SECRET ever touches the command line (a bare secret on the line is what the Bash permission layer refuses; there is no network sandbox). No pre-fetch or post-process side-channel is needed.

Shell shape. Each Bash call is one allowed command (pipes are fine). The run refuses a call that sets a variable (OPEN_PRS=$(gh pr list ...), a DRYRUN_VERDICT=... prefix), starts with bash, or joins commands with ;, && or ||, and each refusal costs a model turn. So run the PR count as a bare gh pr list call and read the number it prints, run the dry-run gate as one ./scripts/dry-run.sh run <SKILL> call with the skill name written in literally, and run each git step as its own call.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.