Agent skill

Trajectory Skill Synthesizer

by AgentToolkit in AgentToolkit/altk-evolve

Turns a saved agent trajectory into a reusable skill with a SKILL.md and supporting scripts, so later sessions can call the workflow instead of rediscovering it.

Apache-2.0Auto-check passedAgent Workflows

Install Trajectory Skill Synthesizer

skills CLI
$ npx skills add AgentToolkit/altk-evolve --skill synthesize-skill -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install AgentToolkit/altk-evolve synthesize-skill --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/AgentToolkit/altk-evolve.git skills-src && mkdir -p .claude/skills && cp -r skills-src/platform-integrations/codex/plugins/evolve-lite/skills/evolve-lite/synthesize-skill .claude/skills/synthesize-skill && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
synthesize-skill
GitHub stars
122
Token cost
~2.2k tokens
SKILL.md length
1,176 words
Files
2 (incl. scripts)
Skills in repo
21
Repo updated
First seen
Licence
Apache-2.0

At a glance

Turns a saved agent trajectory into a reusable skill with a SKILL.md and supporting scripts, so later sessions can call the workflow instead of rediscovering it.

  • Works in 7 steps: Locate the Trajectory → Identify the Successful Workflow → Decide a Skill Name and Trigger → …
  • Promoting a hard-won workflow from a past session into a callable skill
  • SKILL.md covers Overview, When To Use, Workflow and Best Practices
  • Runs Python scripts from its folder; calls python3 and git

What it does

The skill reads a saved trajectory and writes a skill that captures the successful path the session found, placing it under .evolve/skills/ in a folder named for the skill. It is the executable counterpart to the learn skill: learn writes Markdown advice the next agent must interpret, while this one produces something the next agent can simply invoke. Suitable trajectories show a trial-and-error workflow that worked, a script rebuilt over several attempts, or an environment workaround.

It skips cases where the winning path was one trivial command, where the workflow embeds secrets or one-off inputs, or where a skill with the same trigger already exists. It runs in a forked context and cannot see the parent conversation, so it takes the trajectory path from its arguments or the invoking message, falling back to the newest transcript in .evolve/trajectories/. With none found, it produces nothing rather than inventing one. A scripts/synthesize.py file is bundled.

When your agent uses it

  • Promoting a hard-won workflow from a past session into a callable skill
  • Capturing a script the agent had to rebuild over several attempts
  • Saving an environment-specific workaround for later sessions in the same project

Example prompts

  • “Run synthesize-skill on the trajectory from today's database migration session.”
  • “Turn the saved transcript in .evolve/trajectories into a skill for our deploy workflow.”
  • “Check whether the last session's PDF conversion fix deserves its own skill.”

Requirements

  • A saved trajectory file, such as those kept in `.evolve/trajectories/`
  • Python to run the bundled synthesize.py script

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. Locate the Trajectory
  2. Identify the Successful Workflow
  3. Decide a Skill Name and Trigger
  4. Draft the SKILL.md
  5. Emit Supporting Scripts
  6. Finalize
  7. Confirm

What it can do on your machine

Read from SKILL.md and the folder at commit 9e5bb56. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python3
    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Trajectory Skill Synthesizer loads about 2.2k tokens when it runs. Until then it costs about 70 tokens; SKILL.md has 1,176 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~70
When it runs · the whole SKILL.md, loaded when a task matches
~2.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from AgentToolkit/altk-evolve at commit 9e5bb56, republished under its Apache-2.0 licence (© AgentToolkit). 1,176 words, ~2,244 tokens.

Download SKILL.mdSave it as .claude/skills/synthesize-skill/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
synthesize-skill
description
Convert a saved trajectory into a reusable agent skill (SKILL.md + supporting scripts) that future agents can invoke to skip rediscovered work. Use when a session captured a non-trivial workflow worth promoting from a free-text guideline to an executable skill.

Skill Synthesizer

Overview

This skill reads a saved trajectory and produces a reusable agent skill — a SKILL.md plus any supporting scripts — that captures the successful workflow the session discovered. The output goes to .evolve/skills/<skill-name>/ (canonical, evolve-managed). Future sessions on the same project can then invoke the skill directly instead of re-deriving the workflow.

This is the executable counterpart to the learn skill's free-text guidelines: learn writes Markdown the next agent has to read and decide what to do; synthesize-skill writes a skill the next agent can simply call.

When To Use

Use this skill when a trajectory captured:

  • A non-trivial workflow that succeeded after trial-and-error (the eventual happy path is worth promoting from free-text advice to an invocable artifact).
  • A reusable script or command sequence the model wrote during the session — particularly one the agent had to reconstruct over multiple attempts.
  • An environment-specific workaround (a missing system tool, a permissions wrinkle, a fallback pipeline) that future sessions in the same project will hit.

Skip this skill — and let learn cover the case with a guideline alone — when:

  • The successful path was a single trivial command.
  • The workflow embeds secrets, tokens, or one-off user inputs that can't be safely generalized.
  • A skill with the same trigger already exists in .evolve/skills/ (use learn's guideline path to refine the existing skill instead of creating a duplicate).

Workflow

Step 0: Locate the Trajectory

This skill runs in a forked context. You cannot see the parent conversation directly — read the trajectory the parent passed in via args or via the Run evolve-lite:synthesize-skill on <path> instruction.

The trajectory path is either:

  • supplied directly as args to the skill invocation, or
  • stated in the parent's invocation message as The saved trajectory path is: <path> — take everything after the colon, strip surrounding whitespace and quotes.

If neither is present, scan .evolve/trajectories/ for the most recently modified claude-transcript_<session-id>.jsonl and use that. If .evolve/trajectories/ does not exist or is empty, output zero artifacts and exit — do not invent a trajectory.

Read the trajectory with the Read tool — do NOT shell out. The transcript is JSONL: one JSON object per line. Filter for "type": "assistant" and "type": "human" records and reconstruct the flow from message.content.

Step 1: Identify the Successful Workflow

Walk the trajectory and locate the final, working tool sequence — the one that actually produced the answer. Distinguish it from the trial-and-error leading up to it.

Capture:

  • What the user asked (the original prompt).
  • What ultimately worked — the exact tool calls, scripts, or command sequences that produced the answer. Quote them verbatim from the trajectory.
  • What didn't work — the dead-ends. You will use these to write a Triggers section so the future agent knows when to reach for this skill instead of the failing approaches.
  • Environment assumptions — what was missing or had to be installed (e.g. "no exiftool, pip install Pillow needed").

If no clearly successful workflow is in the trajectory (the session ended without reaching an answer, or the answer came from a single trivial call), output zero artifacts and exit.

Step 2: Decide a Skill Name and Trigger

The skill name must be:

  • kebab-case, action-oriented (extract-exif-metadata, parse-cloudwatch-logs, restart-stuck-deploy)
  • specific enough that a future agent reading just the name can guess what it does
  • not a duplicate of any existing entry under .evolve/skills/

The skill description (one line, in the SKILL.md frontmatter) should describe the task the skill solves, not the trajectory it came from. Bad: "Solves the focal-length question from session abc123." Good: "Extract EXIF metadata (focal length, GPS, lens, timestamps) from JPEG/HEIC images using Pillow when system EXIF tools are unavailable."

The trigger (in the SKILL.md body, under ## When To Use) should describe the broad task context, not the narrow original request — same rule as the learn skill's guidelines.

Before continuing, list .evolve/skills/ (use the Glob tool, not find / ls) and confirm your chosen name does not collide with an existing skill.

Step 3: Draft the SKILL.md

Author a SKILL.md with this exact frontmatter shape — the validator in Step 5 will reject it otherwise:

yaml
---
name: <kebab-case-name>
description: <one-line task description>
---

# <Title Case Name>

## Overview
<1–2 sentences: what the skill does and when to use it>

## When To Use
- <trigger 1>
- <trigger 2>

## Workflow
<step-by-step instructions for the agent>

Notes:

  • context: fork is omitted for synthesized skills. They run in the parent context so they can write files into the workspace and report back.
  • Do NOT inline the full successful script into the SKILL.md if it's more than ~10 lines — put it in a sibling scripts/ file (Step 4) and reference it from the SKILL.md.
  • The Workflow section should describe what to do to solve the task, not retell the original session. A future agent reading this should be able to act without ever seeing the trajectory.
Show full SKILL.md (421 more words)Show less
Step 4: Emit Supporting Scripts

If the successful workflow used a non-trivial script (more than a one-liner), write it as a sibling file under scripts/ of your draft skill directory. Use the already-validated code from the trajectory — do not invent variations. Strip incidental one-off inputs (literal file names, IDs, hard-coded outputs) and replace with arguments or stdin where appropriate.

Common shape:

text
.evolve/skills/<name>/
├── SKILL.md
└── scripts/
    └── <action>.py     # callable as `python3 scripts/<action>.py <args>`

If the workflow was a sequence of shell commands rather than a script, encode it as an executable shell script (scripts/<action>.sh) so future agents can invoke it as a single unit instead of replaying each command.

If no non-trivial script is needed (the workflow is a sequence of standard tool calls), skip this step — the SKILL.md alone is the skill.

Step 5: Finalize

Place your draft files (SKILL.md and any scripts) under a temporary directory inside the workspace, e.g. /tmp/synthesized-<name>/, then call:

bash
python3 "$(git rev-parse --show-toplevel 2>/dev/null || pwd)/plugins/evolve-lite/skills/evolve-lite/synthesize-skill/scripts/synthesize.py" finalize --src /tmp/synthesized-<name>/ --name <kebab-case-name> --trajectory <saved_trajectory_path>

The script will:

  • Validate the SKILL.md frontmatter (name and description required; name must match --name).
  • Reject the skill if a same-named skill already exists in .evolve/skills/ (overwriting requires --force).
  • Copy the directory into .evolve/skills/<name>/ (canonical).
  • Append a synthesize_skill event to .evolve/audit.log recording the new skill, the source trajectory, and the timestamp.
  • Print the destination path(s).

If the validator rejects the draft, fix the SKILL.md and retry — do not edit files under .evolve/skills/ directly.

Step 6: Confirm

After the script returns, list the destination directories with the Glob tool to confirm the files landed. Output a short summary:

  • The skill name and description.
  • The destination paths.
  • A one-line note on what future sessions should now be able to do that they couldn't before.

Best Practices

  1. One skill per workflow. If the trajectory contains two unrelated successful workflows, run synthesis twice with different names — do not pack them into one skill.
  2. Cite the trajectory. Include the --trajectory flag so the audit log records provenance; future maintainers can trace the skill back to the session that produced it.
  3. Don't promote one-shots. A skill is worth synthesizing only if the trigger is plausibly recurring. If the trajectory looks like a one-off, prefer the learn skill's guideline path instead.
  4. Don't paraphrase failure. The skill describes what worked. If you find yourself writing "this skill avoids the problem where exiftool isn't installed," restate it as "uses Pillow to extract EXIF; works in environments without system EXIF tools." Triggers describe when, not what failed.
  5. Keep scripts minimal. Strip incidental log lines, debug prints, and validation that wasn't actually exercised in the trajectory. If a feature wasn't validated, leave it out.

© AgentToolkit, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (scripts) in platform-integrations/codex/plugins/evolve-lite/skills/evolve-lite/synthesize-skill of AgentToolkit/altk-evolve.

  • SKILL.md
  • scripts/synthesize.py

Open the folder on GitHubat commit 9e5bb56

Compare with similar skills

Trajectory Skill Synthesizer next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Trajectory Skill Synthesizer compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Trajectory Skill Synthesizer this skillAgentToolkit/altk-evolve122—~2.2kAutomated safety check: PassApache-2.0
Reflect on Session Learningscursor/plugins10k5 repos~1.2kAutomated safety check: PassNone
Aiception Skill ExtractionNateBJones-Projects/OB14.7k—~2kAutomated safety check: NotesCustom licence
Session Skill Mininggetcrew44/crew44356—~5.3kAutomated safety check: PassMIT
Skill CreatorAzure/azqr79489 repos~8.2kAutomated safety check: PassApache-2.0
Claude Code Skill Developer Guidediet103/claude-code-infrastructure-showcase10k10 repos~3.5kAutomated safety check: PassMIT

Similar skills

  • Official

    Starts three parallel reviewer subagents over the current conversation transcript, then turns their findings into concrete edits to existing skills.

    10k GitHub starsUsed in 5 repos~1.2k tokens
    Agent WorkflowsAuto-check passed
  • Aiception Skill Extraction

    NateBJones-Projects/OB1

    Pulls reusable knowledge out of work sessions and turns it into new skills, checking existing notes and skills first to avoid duplicates.

    4.7k GitHub stars~2k tokensUpdated yesterday
    Agent WorkflowsAuto-check: notes
  • Session Skill Mining

    getcrew44/crew44

    Reviews past Codex or Claude Code sessions from a time range you choose and proposes skills to codify and memories to pin, as a summary plus structured JSON.

    356 GitHub stars~5.3k tokensUpdated 3 mo ago
    Agent WorkflowsAuto-check passed
  • Skill Creator

    Azure/azqr

    Official

    Create new skills, modify and improve existing skills, and measure skill performance.

    794 GitHub starsUsed in 89 repos~8.2k tokens
    Agent WorkflowsAuto-check passed
  • Claude Code Skill Developer Guide

    diet103/claude-code-infrastructure-showcase

    A guide to creating and managing Claude Code skills with auto-activation: skill-rules.json triggers, hooks, enforcement levels, YAML frontmatter and progressive disclosure.

    10k GitHub starsUsed in 10 repos~3.5k tokens
    Agent WorkflowsAuto-check passed
  • Darwin Skill Optimizer

    alchaincyf/darwin-skill

    Scores SKILL.md files on a nine-dimension rubric, then improves them in a keep-or-revert loop with independent judge agents, test prompts, git history and human checkpoints.

    6.2k GitHub starsUsed in 1 repo~4.7k tokens
    Agent WorkflowsAuto-check passed

More from AgentToolkit/altk-evolve

All 21 skills in this repo
  • Agent Wiki Compare Outcomes

    AgentToolkit/altk-evolve

    Contrasts successful and failed agent runs of the same task and derives guidelines backed by evidence from transcripts, tool calls and outcome judgments.

    122 GitHub stars~1.7k tokensUpdated today
    Auto-check passed
  • Evolve Memory Mirror

    AgentToolkit/altk-evolve

    Copies a memory the agent just saved into the shared evolve store with a retrieval trigger, so it can be shared across a team and audited like other entities.

    122 GitHub stars~922 tokensUpdated today
    Auto-check passed
  • Agent Wiki Consult

    AgentToolkit/altk-evolve

    Has the agent read a project wiki's AGENTS.md and pull the guidelines that fit the task it is about to start, instead of loading the wiki at session start.

    122 GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Agent Wiki Guideline Extractor

    AgentToolkit/altk-evolve

    Reads a normalized Claude Code trajectory JSON and turns its errors and solutions into reusable guideline pages in wiki-twobatch/guidelines.

    122 GitHub stars~2k tokensUpdated today
    Auto-check passed
  • Agent Wiki Ingest

    AgentToolkit/altk-evolve

    Ingest one or more agent trajectories (raw bob/claude traces or normalized JSON) into an agent-wiki end-to-end — convert, summarize, extract guidelines, synthesize skills, optionally compare…

    122 GitHub stars~4k tokensUpdated today
    Auto-check passed
  • Agent Wiki Summarize

    AgentToolkit/altk-evolve

    Read a normalized Claude Code trajectory JSON and write an episodic summary page to wiki-twobatch/summaries/.

    122 GitHub stars~1.9k tokensUpdated today
    Auto-check passed

Categories

Questions about Trajectory Skill Synthesizer

What does Trajectory Skill Synthesizer do?

Turns a saved agent trajectory into a reusable skill with a SKILL.md and supporting scripts, so later sessions can call the workflow instead of rediscovering it. evolve/skills/ in a folder named for the skill. It is the executable counterpart to the learn skill: learn writes Markdown advice the next agent must interpret, while this one produces something the next agent can simply invoke.

When should I use Trajectory Skill Synthesizer?

Trajectory Skill Synthesizer fits situations like: promoting a hard-won workflow from a past session into a callable skill; capturing a script the agent had to rebuild over several attempts; saving an environment-specific workaround for later sessions in the same project.

How do I install Trajectory Skill Synthesizer in Claude Code?

Run `npx skills add AgentToolkit/altk-evolve --skill synthesize-skill -a claude-code`. Or copy the skill folder (platform-integrations/codex/plugins/evolve-lite/skills/evolve-lite/synthesize-skill in AgentToolkit/altk-evolve) into .claude/skills/synthesize-skill in your project. Claude Code loads it when a task matches its description.

How do I install Trajectory Skill Synthesizer in Codex?

Run `npx skills add AgentToolkit/altk-evolve --skill synthesize-skill -a codex`. Or copy the skill folder (platform-integrations/codex/plugins/evolve-lite/skills/evolve-lite/synthesize-skill in AgentToolkit/altk-evolve) into .agents/skills/synthesize-skill in your project. Codex loads it when a task matches its description.

Can I use Trajectory Skill Synthesizer in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add AgentToolkit/altk-evolve --skill synthesize-skill -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/synthesize-skill, .gemini/skills/synthesize-skill, .github/skills/synthesize-skill and .opencode/skills/synthesize-skill in your project.

What does Trajectory Skill Synthesizer need to run?

Going by SKILL.md and its folder, Trajectory Skill Synthesizer needs Python for the scripts in its folder and the command-line tools its instructions call (python3 and git). Our summary lists: A saved trajectory file, such as those kept in `.evolve/trajectories/`; Python to run the bundled synthesize.py script.

Does Trajectory Skill Synthesizer access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Trajectory Skill Synthesizer safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Trajectory Skill Synthesizer use?

Trajectory Skill Synthesizer is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Trajectory Skill Synthesizer use?

About 2.2k tokens (SKILL.md is roughly 9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Trajectory Skill Synthesizer?

Skills that share tags, products or a category with Trajectory Skill Synthesizer: Reflect on Session Learnings (cursor/plugins, 10k stars), Aiception Skill Extraction (NateBJones-Projects/OB1, 4.7k stars), Session Skill Mining (getcrew44/crew44, 356 stars) and Skill Creator (Azure/azqr, 794 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Trajectory Skill Synthesizer?

AgentToolkit (a GitHub organization) maintains it in AgentToolkit/altk-evolve, which has 122 GitHub stars. The repository holds 21 skills in this directory. The repository was last updated on October 7, 2026.

Source: AgentToolkit/altk-evolve on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.