agent-wiki-compare-out…
Compare successful and failed normalized agent trajectories to derive evidence-backed agent-wiki guidelines. Use when Codex has…
Save the current conversation as a trajectory JSON file in OpenAI chat completion format for analysis and fine-tuning
Claude Code
$ npx -y skills add AgentToolkit/altk-evolve --skill evolve-lite-save-trajectory --agent claude-code
Codex
$ npx skills add AgentToolkit/altk-evolve --skill evolve-lite-save-trajectory -a codex -y
Cursor
$ npx skills add AgentToolkit/altk-evolve --skill evolve-lite-save-trajectory -a cursor -y
Gemini CLI
$ npx skills add AgentToolkit/altk-evolve --skill evolve-lite-save-trajectory -a gemini-cli -y
GitHub Copilot
$ npx skills add AgentToolkit/altk-evolve --skill evolve-lite-save-trajectory -a github-copilot -y
OpenCode
$ npx skills add AgentToolkit/altk-evolve --skill evolve-lite-save-trajectory -a opencode -y
Windsurf
$ npx skills add AgentToolkit/altk-evolve --skill evolve-lite-save-trajectory -a windsurf -y
name: evolve-lite:save-trajectory description: Save the current conversation as a trajectory JSON file in OpenAI chat completion format for analysis and fine-tuning
This skill saves the current session's conversation history as a JSON file in OpenAI chat completion format. The trajectory is saved to `.evolve/trajectories/` in the project root. This enables trajectory analysis, fine-tuning data collection, and session review.
Review all messages in the current conversation from start to finish. For each message, identify its type:
Convert each message to the appropriate format:
**User text message:**
{"role": "user", "content": "the user's message text"}**Assistant text response (no thinking):**
{"role": "assistant", "content": "the assistant's response text"}**Assistant text response (with thinking):**
{"role": "assistant", "content": "the assistant's response text", "thinking": "the thinking/reasoning text"}**Assistant tool call (no visible text):**
{
"role": "assistant",
"content": null,
"tool_calls": [
{
"id": "tool_call_id_here",
"type": "function",
"function": {
"name": "ToolName",
"arguments": "{\"param\": \"value\"}"
}
}
]
}**Assistant tool call with text:**
{
"role": "assistant",
"content": "text before/after the tool call",
"tool_calls": [
{
"id": "tool_call_id_here",
"type": "function",
"function": {
"name": "ToolName",
"arguments": "{\"param\": \"value\"}"
}
}
]
}**Tool result:**
{"role": "tool", "tool_call_id": "tool_call_id_here", "content": "the tool output text"}Strip `<system-reminder>...</system-reminder>` tags and their contents from all message content. Use a non-greedy multiline match (e.g., `re.sub(r'<system-reminder>[\s\S]*?</system-reminder>', '', text).strip()`). If after stripping, a message has empty content and no tool calls, omit it.
Wrap the messages array in a trajectory envelope:
{
"model": "<model-id-from-session>",
"timestamp": "2025-01-15T10:30:00Z",
"session_id": "<session-id-from-session>",
"messages": [...]
}Write the trajectory JSON to a temporary file using the **Write** tool, then pass the file path to the helper script:
1. Write the JSON to `.evolve/tmp/trajectory_input.json` using the Write tool (create the directory if needed) 2. Run the helper script with the file path as an argument:
tmp=.evolve/tmp/trajectory_input.json; mkdir -p .evolve/tmp; python3 .bob/skills/evolve-lite-save-trajectory/scripts/save_trajectory.py "$tmp" --delete-input
**Important**: Do NOT use inline Python scripts, heredocs, or stdin piping to pass the trajectory JSON. Always use the Write tool to create a temp file first. This avoids escaping issues with backslashes, quotes, and newlines in conversation content.
The script will:
After saving, you should see output like:
Trajectory saved: /path/to/project/.evolve/trajectories/trajectory_2025-01-15T10-30-00.json Messages: 12
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.