improve-skill
Analyze coding agent session transcripts to improve existing skills or create new ones. Use when asked to improve a skill based on a session, or extract a new skill from session history.
What this skill does
# Improve Skill This skill helps analyze coding agent sessions to improve or create skills. It works with Claude Code, Pi, and Codex session files. ## Quick Start Extract the current session and generate an improvement prompt: ```bash # Auto-detect agent and extract current session ./scripts/extract-session.js ``` ## Session Extraction The `extract-session.js` script finds and parses session files from any of the three agents: ```bash # Auto-detect (uses most recent session for current working directory) ./scripts/extract-session.js # Specify agent type ./scripts/extract-session.js --agent claude ./scripts/extract-session.js --agent pi ./scripts/extract-session.js --agent codex # Specify a different working directory ./scripts/extract-session.js --cwd /path/to/project # Use a specific session file ./scripts/extract-session.js /path/to/session.jsonl ``` **Session file locations:** - **Claude Code**: `~/.claude/projects/<encoded-cwd>/*.jsonl` - **Pi**: `~/.pi/agent/sessions/<encoded-cwd>/*.jsonl` - **Codex**: `~/.codex/sessions/YYYY/MM/DD/*.jsonl` ## Workflow: Improve an Existing Skill When asked to improve a skill based on a session: 1. **Extract the session transcript:** ```bash ./scripts/extract-session.js > /tmp/session-transcript.txt ``` 2. **Find the existing skill** in one of these locations: - `~/.codex/skills/<skill-name>/SKILL.md` - `~/.claude/skills/<skill-name>/SKILL.md` - `~/.pi/agent/skills/<skill-name>/SKILL.md` 3. **Generate an improvement prompt** for a new session: ``` ═══════════════════════════════════════════════════════════════════════════════ COPY THE FOLLOWING PROMPT INTO A NEW AGENT SESSION: ═══════════════════════════════════════════════════════════════════════════════ I need to improve the "<skill-name>" skill based on a session where I used it. First, read the current skill at: <path-to-skill> Then analyze this session transcript to understand: - Where I struggled to use the skill correctly - What information was missing from the skill - What examples would have helped - What I had to figure out on my own <session_transcript> <paste transcript here> </session_transcript> Based on this analysis, improve the skill by: 1. Adding missing instructions or clarifications 2. Adding examples for common use cases discovered 3. Fixing any incorrect guidance 4. Making the skill more concise where possible Write the improved skill back to the same location. ═══════════════════════════════════════════════════════════════════════════════ ``` ## Workflow: Create a New Skill When asked to create a new skill from a session: 1. **Extract the session transcript:** ```bash ./scripts/extract-session.js > /tmp/session-transcript.txt ``` 2. **Generate a creation prompt** for a new session: ``` ═══════════════════════════════════════════════════════════════════════════════ COPY THE FOLLOWING PROMPT INTO A NEW AGENT SESSION: ═══════════════════════════════════════════════════════════════════════════════ Analyze this session transcript to extract a reusable skill called "<skill-name>": <session_transcript> <paste transcript here> </session_transcript> Create a new skill that captures: 1. The core capability or workflow demonstrated 2. Key commands, APIs, or patterns used 3. Common pitfalls and how to avoid them 4. Example usage for typical scenarios Write the skill to: ~/.codex/skills/<skill-name>/SKILL.md Use this format: --- name: <skill-name> description: "<one-line description>" --- # <Skill Name> Skill <overview and quick reference> ## <Section for each major capability> <instructions and examples> ═══════════════════════════════════════════════════════════════════════════════ ``` ## Why a Separate Session? The improvement prompt is meant to be copied into a **fresh agent session** because: 1. **Token efficiency** - The current session already has a lot of context; starting fresh means only the transcript and skill are loaded 2. **Clean analysis** - The new session can focus purely on improvement without being influenced by the current task 3. **Reproducibility** - The prompt is self-contained and can be shared or reused ## Tips for Good Skill Improvements When analyzing a transcript, look for: - **Confusion patterns** - Where did the agent retry or change approach? - **Missing examples** - What specific commands or code patterns were discovered? - **Workarounds** - What did the agent have to figure out that wasn't documented? - **Errors** - What failed and how was it resolved? - **Successful patterns** - What worked well and should be highlighted? Keep skills concise - focus on the most important information and examples.
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.