agent-wiki-compare-out…
Compare successful and failed normalized agent trajectories to derive evidence-backed agent-wiki guidelines. Use when Codex has…
Read a normalized Claude Code trajectory JSON and produce a wiki-resident SKILL.md page that future agents can invoke. Use when a trajectory captured a non-trivial successful workflow worth promoting from a free-text guideline to an executable, callable artifact.
Claude Code
$ npx -y skills add AgentToolkit/altk-evolve --skill agent-wiki-synthesize-skill --agent claude-code
Codex
$ npx skills add AgentToolkit/altk-evolve --skill agent-wiki-synthesize-skill -a codex -y
Cursor
$ npx skills add AgentToolkit/altk-evolve --skill agent-wiki-synthesize-skill -a cursor -y
Gemini CLI
$ npx skills add AgentToolkit/altk-evolve --skill agent-wiki-synthesize-skill -a gemini-cli -y
GitHub Copilot
$ npx skills add AgentToolkit/altk-evolve --skill agent-wiki-synthesize-skill -a github-copilot -y
OpenCode
$ npx skills add AgentToolkit/altk-evolve --skill agent-wiki-synthesize-skill -a opencode -y
Windsurf
$ npx skills add AgentToolkit/altk-evolve --skill agent-wiki-synthesize-skill -a windsurf -y
name: agent-wiki-synthesize-skill description: Read a normalized Claude Code trajectory JSON and produce a wiki-resident SKILL.md page that future agents can invoke. Use when a trajectory captured a non-trivial successful workflow worth promoting from a free-text guideline to an executable, callable artifact.
Promote a successful workflow from a saved trajectory into an **executable agent skill** living inside a wiki at `<wiki>/skills/<slug>/SKILL.md`. The output is the procedural counterpart to `agent-wiki-extract-guidelines`'s declarative pages: a guideline tells a future agent *what to do*; a synthesized skill is a structured workflow page the future agent can read and *execute directly*, optionally invoking sibling scripts via Bash.
This is the per-trajectory **promote-to-procedural** pass of the `agent-wiki` family. Run it after one or more trajectories captured the same recipe and you want future agents to invoke that recipe instead of re-deriving it.
> **Ingesting a whole batch end-to-end?** Prefer the `agent-wiki-ingest` > skill, which sequences summarize → extract → synthesize → **consolidate** > → catalog. It runs this skill at the right point (after extraction, before > consolidation) and guarantees the consolidation pass that clusters the > surviving atomics is never skipped. Use this standalone skill only to > promote a single trajectory's workflow.
Use this skill when a trajectory captured:
one custom script or non-obvious sequence — that produced the answer after trial-and-error. The eventual happy path is worth saving.
if the agent had to reconstruct it across multiple attempts.
parsing a binary format, walking a structured directory, reaching a specific tool fallback.
Skip this skill — let `agent-wiki-extract-guidelines` cover the case with a guideline alone — when:
A path that is either:
Default if no path is given: `trajectories/normalized`.
Use `Glob` to enumerate JSON files.
`Glob <wiki>/skills/*/SKILL.md` to see what's already there. **Don't re-author a skill with the same name** unless the trajectory's recipe materially refines or generalizes it.
Read the file. The fields you need:
Walk the messages and identify:
The **final, working** tool sequence — the one that produced the answer. Distinguish it from the trial-and-error leading up to it. Capture the exact tool calls, scripts, or command sequences verbatim.
What didn't work — the dead ends. You'll use this to author a *trigger description* so a future agent knows when to reach for this skill **instead of** the failing approaches.
What was missing or had to be installed (no `exiftool`, `pip install Pillow` needed, etc.).
If no clearly successful workflow is in the trajectory, output zero skills for it and continue.
The skill **name** must be:
`parse-png-dimensions`, `walk-zip-central-directory`)
what it does
The skill **description** (one line in frontmatter) describes the *task*, not the trajectory. Bad: "Solves the lens-model question from session 07d60d9f." Good: "Read camera-optics fields (lens model, focal length, aperture, ISO) from JPEG EXIF using stdlib `struct` when system EXIF tools are unavailable."
The **trigger** (frontmatter + `## When To Use`) describes the broad task context, not the narrow original request.
{
"name": "<kebab-case-name>",
"description": "<one-line task description>",
"trigger": "<situational context when this applies>",
"session_id": "<from JSON>",
"normalized_path": "<path to the JSON, relative to repo root>",
"related_summary": "summaries/<sid>.md",
"agent": "<from JSON, default 'claude-code'>",
"tags": ["<2-4 short tags>"],
"overview": "<1-2 sentences: what the skill does and when>",
"when_to_use": [
"<trigger condition 1>",
"<trigger condition 2>"
],
"workflow_steps": [
"<step 1: an instruction to the future agent>",
"<step 2: ...>"
],
"scripts": [
{
"name": "<action>.py",
"language": "python",
"content": "<full script contents>"
}
]
}Notes on each field:
to 1-2 sentences. Don't retell the original session.
future agent matches its current task against these.
instruction the agent will follow. Reference scripts as `Run \`bash <wiki>/skills/<name>/scripts/<file>.sh\`` (the helper resolves `<wiki>` at write time).
include it here. The helper writes it to `<wiki>/skills/<name>/scripts/<file>` and references it in the workflow body. Keep scripts minimal — strip inci
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.