agent-wiki-compare-out…
Compare successful and failed normalized agent trajectories to derive evidence-backed agent-wiki guidelines. Use when Codex has…
Must be used near the end of any non-trivial turn that produced potentially reusable tools, guidance, errors, workarounds, or workflows, so those lessons are saved for future turns.
Claude Code
$ npx -y skills add AgentToolkit/altk-evolve --skill learn --agent claude-code
Codex
$ npx skills add AgentToolkit/altk-evolve --skill learn -a codex -y
Cursor
$ npx skills add AgentToolkit/altk-evolve --skill learn -a cursor -y
Gemini CLI
$ npx skills add AgentToolkit/altk-evolve --skill learn -a gemini-cli -y
GitHub Copilot
$ npx skills add AgentToolkit/altk-evolve --skill learn -a github-copilot -y
OpenCode
$ npx skills add AgentToolkit/altk-evolve --skill learn -a opencode -y
Windsurf
$ npx skills add AgentToolkit/altk-evolve --skill learn -a windsurf -y
name: learn description: Must be used near the end of any non-trivial turn that produced potentially reusable tools, guidance, errors, workarounds, or workflows, so those lessons are saved for future turns.
This skill analyzes the current conversation to extract actionable instructions that would help on similar tasks in the future. It **identifies errors encountered during the conversation** - tool failures, exceptions, wrong approaches, retry loops - and provides recommendations to prevent those errors from recurring. This skill should take note of the concrete solution which solved a concrete problem, not an abstract idea. When the successful resolution involves a non-trivial workaround, parser, command sequence, or fallback pipeline that could be used to avoid wasted effort, capture that solution as a reusable artifact first, then save entities that point future agents to use it.
Use this skill after completing meaningful work in the turn, especially when encountering:
Examples of artifacts that must be immediately created once proven as the successful solution include:
Unless that artifact happens to be:
First, use the /evolve-lite:save-trajectory skill to save the current conversation to `.evolve/trajectories/`. Capture the exact path from its output as `saved_trajectory_path`. You will attach this exact path to each entity's `trajectory` field in Step 6.
After saving, read `saved_trajectory_path` with the Read tool and analyze that saved trajectory rather than relying only on live context. If the trajectory cannot be saved or read, output zero entities and exit. Do not invent a trajectory path.
Identify from the saved trajectory loaded in Step 0:
Scan the conversation for these error signals:
1. **Tool or command failures**: Non-zero exit codes, error messages, exceptions, stack traces 2. **Permission or access errors**: "Permission denied", "not found", sandbox restrictions 3. **Wrong initial approach**: First attempt abandoned in favor of a different strategy 4. **Retry loops**: Same action attempted multiple times with variations before succeeding 5. **Missing prerequisites**: Missing dependencies, packages, or configs discovered mid-task 6. **Silent failures**: Actions that appeared to succeed but produced wrong results
For each error found, document:
| | Error Example | Root Cause | Resolution | Prevention Guideline | |---|---|---|---|---| | 1 | `jq: command not found` | System tool unavailable in environment | created a python script to resolve the problem | Save the python script and use it in similar scenarios | | 2 | `git push` rejected (no upstream) | Branch not tracked to remote | Added `-u origin branch` | Always set upstream when pushing a new branch | | 3 | Tried regex parsing of HTML, got wrong results | Regex cannot handle nested tags | Switched to BeautifulSoup | Use a proper HTML parser, never regex |
Before writing entities, determine whether the successful approach should be saved as a reusable artifact.
Create or update a local reusable artifact when any of these are true:
Prefer one of these artifact forms:
When turning an ad hoc command or script into a reusable artifact, remove incidental one-off inputs such as literal file names, IDs, answer values, or temporary paths. Keep the reusable procedure that was actually exercised in the session, and do not add capabilities that were not validated by the work.
If you create an artifact, record:
Before extracting, look at what has already been saved for this project. Earlier Stop hooks in the same session (or prior sessions) may have recorded guidelines that cover the same ground — re-extracting them is wasteful and pollutes the library.
Use the **Glob tool** to enumerate existing guideline files: `.evolve/entities/**/*.md`. Then use the **
Evolve helps AI agents learn from experience. It turns past trajectories into reusable guidelines that help agents complete future tasks, without changing model weights.
Compare successful and failed normalized agent trajectories to derive evidence-backed agent-wiki guidelines. Use when Codex has…
Read all atomic guidelines in wiki-twobatch/guidelines/ and propose themed clusters that group near-duplicates. Writes cluster…
Consult an agent-wiki for guidelines relevant to the task at hand. The wiki itself documents how to retrieve from it (AGENTS.md).…
Read a normalized Claude Code trajectory JSON and extract reusable guidelines into wiki-twobatch/guidelines/. Use when mining…
Ingest one or more agent trajectories (raw bob/claude traces or normalized JSON) into an agent-wiki end-to-end — convert,…
Read a normalized Claude Code trajectory JSON and write an episodic summary page to wiki-twobatch/summaries/. Use when…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.