# Trace Distill

> Turn your AI agent's past mistakes and chat history into permanent, verified workflow improvements and rules.

Trace Distill is a free AI agent skill on Agensi by Neo Kzcod, in Business & Operations. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Neo Kzcod](https://www.agensi.io/creators/neo-kzcod)
- Category: [Business & Operations](https://www.agensi.io/skills/business-operations)
- Version: 1.0
- Last updated: 2026-12-04
- Security: scan passed (2026-12-04); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/trace-distill
- Tags: project-management, python, code-review, documentation, automation

## What it does

- Redacts sensitive data like API keys and passwords before analysis
- Identifies your specific coding habits to customize how the agent works
- Creates a verified report showing exactly which rules need updating
- Updates project instruction files to lock in better workflows
- Tracks if new rules actually improve the agent's performance over time

## Who it's for

- **Developers using AI coding assistants:** Turn your messy coding history into clean, reusable rules that actually work. Try: "Review my last 10 coding sessions and update my project rules."
- **Tech leads managing AI workflows:** Find out why your team's AI keeps making the same mistakes and fix the process. Try: "Analyze these logs to see why the agent keeps breaking the database schema."
- **Power users of AI agents:** Teach your AI assistant exactly how you like to work without repeating yourself. Try: "Extract my personal coding preferences from this chat export."

## About this skill

If your AI agent keeps making the same mistakes or forgetting your project rules, this skill fixes that. It looks at your past chat history, finds what went wrong, and turns those lessons into permanent instructions. Instead of just giving you a summary, it builds a verified report of what to change so your agent gets smarter over time.

### How it works
1. **Prepare the logs**: You provide the chat history or logs from your AI coding sessions.
2. **Clean and Index**: The skill removes sensitive data like passwords or keys and creates a list of every task you did.
3. **Review and Score**: It looks at what you asked for versus what the agent actually did, tagging successes and failures.
4. **Distill Lessons**: It finds patterns, like recurring errors or your specific preferences, and creates new rules.
5. **Update Rules**: With your permission, it updates your project files or global instructions so the agent follows the new workflow.

### Frameworks & tools
This skill uses Python scripts to process logs and organize data. It creates Markdown reports and JSON files to track your project's progress and rule updates.

### Why this beats prompting it yourself
Plain prompting often forgets past context or repeats bad habits. This skill uses a formal review process that requires evidence before changing a rule. It ensures that any new instruction is based on a real event, not just a guess, making your agent's behavior much more predictable.

### Use cases
- Stop an AI agent from using outdated library syntax in your project.
- Automatically update your coding standards as your project grows.
- Fix recurring logic errors by identifying exactly where the agent gets confused.
- Save your personal formatting preferences so you never have to correct them again.

### Known limitations
This skill requires your explicit permission at every major step. It cannot automatically scan private databases or folders without you pointing to them first.

## Technical details

Built for AI coding agents to process logs from sources like Claude Code or standard message exports. Uses adapt_logs.py for field-level redaction and build_index.py for incremental indexing. The workflow follows a strict four-stage gate: boundary setting, evidence binding with reviewed-cards.jsonl, high-reasoning distillation, and practice landing. It writes to project-specific Markdown files (e.g., CLAUDE.md) and generates retro-report.md using provided templates. Requires Python for script execution.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Trace Distill skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### What does this skill actually change about how my AI agent works?

This skill reviews your past chat logs to find where your agent made mistakes or ignored your preferences. It then creates verified rules and workflow improvements so the agent does not repeat those specific errors in future tasks.

### Do I need to provide any specific files to get started?

You need to provide your actual chat history or session logs as the starting point. The skill uses specialized Python scripts to process these files, so you just need to point it to your saved conversation data.

### What kind of files or reports will I see after the process is done?

You receive a detailed retrospective report and structured data files containing verified lessons. With your permission, it can also update your project documents or global instruction files like CLAUDE.md or AGENTS.md to apply the new rules.

### Are there any types of tasks or data this skill cannot handle?

It is not for creating simple chat summaries or setting up general memory. It also strictly avoids handling sensitive data like passwords or API keys, and it will not scan your private folders without you explicitly telling it which ones to look at.

### How do I tell my agent to begin the distillation process?

You can start by telling your agent to distill your coding task history into workflow improvements using this skill. You should specify the time range of the logs you want it to analyze and whether you want a report only or actual rule updates.

### Will this skill change my project rules automatically without asking me?

No, the skill follows a strict gatekeeping process where it must ask for your approval before moving between stages. It will show you the planned changes and ask for your explicit permission before updating any of your project files.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
