Synthèse automatique
Analyse l'historique des sessions d'agents IA pour identifier des workflows récurrents et générer automatiquement des compétences.
Points forts
- Extraction de motifs concrets à partir de multiples sources d'historique
- Génération automatisée de fichiers SKILL.md prêts à l'emploi
- Déduplication et filtrage du bruit pour des résultats pertinents
Limites
- Nécessite un accès aux fichiers d'historique et des permissions d'exécution
- Peut être lent sur de grands volumes de données
- Les motifs extraits dépendent de la qualité des prompts utilisateur
Quand vous souhaitez automatiser des tâches répétitives en transformant vos habitudes de codage en compétences réutilisables.
Pour une analyse rapide de sessions isolées ou quand l'historique ne contient pas de motifs récurrents significatifs.
Analyse de sécurité
SûrThe skill only reads and analyzes the user's own session history with explicit approval, uses trusted scripts, and explicitly instructs sanitization of secrets. No destructive, exfiltration, or obfuscated actions are present. Bash usage is limited to running provided, controlled scripts.
Aucun point d'attention détecté
Comment cette analyse est faiteExemples
Analyze my last 30 days of Claude Code history and find what I do repeatedly.Merge my session history from Claude Code and Cursor, then generate skills from common workflows.What are the most common patterns in my coding sessions related to git operations?name: skill-distill description: >- Analyzes AI agent session history across Claude Code, Codex CLI, pi-mono, and Cursor to discover recurring workflows and auto-generate Agent Skills. Use this skill whenever you want to mine your coding history for patterns worth turning into skills, even if you just say something like "what do I keep doing over and over" or "find patterns in my history". Invoke manually with /skill-distill. allowed-tools: Read, Write, Edit, Bash, Glob, Grep, WebFetch disable-model-invocation: true user-invocable: true
Skill Distill
Analyze session history across AI coding tools, find recurring patterns, and generate new skills from them.
Safety
- Never paste raw log content into a skill. Paraphrase and sanitize all examples.
- Before reading any history file, list the exact files for the user and get explicit approval.
- Mask secrets (tokens, passwords, keys) found in commands. Never copy stdout/stderr into skills.
- Use
[and]instead of angle brackets in generated YAML frontmatter and skill bodies.
Workflow
Run these 6 phases in order. Confirm with the user before starting Phase 5.
Progress checklist:
- [ ] Phase 1: Data Collection
- [ ] Phase 2: Pattern Extraction
- [ ] Phase 3: Suitability Evaluation
- [ ] Phase 4: User Selection
- [ ] Phase 5: Skill Generation
- [ ] Phase 6: Quality Validation
Phase 1: Data Collection
Consent Gate
Before reading anything, present these choices and get approval:
- Which tools: Claude Code, Codex CLI, pi-mono, Cursor (any combination, default: all)
- Scope: current project or all projects
- Time range: last N days
- Files to read: list them explicitly per tool
Running the Extractors
All scripts live in this skill's directory and output normalized JSONL:
{"source", "display", "timestamp", "project", "sessionId"}
For single-source runs:
| Tool | Command |
|------|---------|
| Claude Code | python3 {skill-dir}/filter-history.py --days {N} --project "{path}" --noise-filter |
| Codex CLI | python3 {skill-dir}/extract-codex-history.py --days {N} --project "{path}" |
| pi-mono | python3 {skill-dir}/extract-pi-history.py --days {N} --project "{path}" |
| Cursor | python3 {skill-dir}/extract-cursor-history.py --days {N} --project "{path}" |
For multi-source runs (preferred):
python3 {skill-dir}/merge-histories.py --days {N} --sources claude,codex,pi,cursor --project "{path}" --noise-filter --stats
The merge script calls the individual extractors and deduplicates the output. Use --stats to show per-source counts.
If Claude Code's history.jsonl is too large for the Read tool (>256KB), the filter script handles it. For Cursor, ensure sqlite3 is available and Cursor is not running (locked DB).
Phase 2: Pattern Extraction
Analyze the normalized prompts for concrete, recurring task patterns. Focus on what the user actually repeats, not broad categories.
Three-Axis Extraction
WHAT - The goal the user wants to achieve. Examples: "commit with appropriate granularity", "fix lint errors", "review PR feedback"
HOW - The method or workflow repeatedly specified. Examples: "spin up agent team for parallel work", "create git worktree for isolation" HOW patterns cross-cut multiple WHATs. This cross-cutting nature is strong evidence of skillification value.
FLOW - Session-level prompt chains forming a cohesive workflow. Examples: "identify issues -> address each -> commit" repeated across 4 sessions.
Extraction Steps
- Exclude noise: /clear, /resume, /status, /usage, /plugin, /init, /mcp, empty prompts, bare
[Pasted text]. - For each prompt, identify the WHAT (goal). If it also specifies a HOW (means), count it under both.
- Group by sessionId, sort chronologically, summarize prompt chains. Record flows appearing 3+ times as FLOW patterns.
- Name each pattern as verb + object.
- For HOW patterns, record which WHATs they combined with.
- For each pattern, record which tools it appeared in.
Counting Rules
- WHAT/HOW contained within a FLOW: count on the FLOW side only.
- Only independently-appearing WHAT/HOW count as standalone WHAT/HOW.
- Still record the cross-cutting nature of HOW even when it appears inside a FLOW.
Cross-Tool Bonus
Patterns appearing in 2+ tools are tool-agnostic and especially valuable. Note the tools for every pattern.
Output Per Pattern
- Pattern name (verb + object), axis (WHAT/HOW/FLOW), occurrence count
- Sources (which tools), 2-3 representative prompts, common steps
- FLOW only: flow steps as arrows, contained WHAT/HOW patterns
- HOW only: which WHATs it combined with
- Variations across occurrences
Phase 3: Suitability Evaluation
Cross-Reference Existing Skills
- Glob for
~/.claude/skills/*/SKILL.mdand.claude/skills/*/SKILL.md. - Read name + description from each.
- Classify patterns: Fully covered (exclude), Partially covered (keep the gap), Not covered (keep).
Scoring (Internal)
Evaluate each pattern on:
- Frequency: occurrence count
- Consistency: HIGH (nearly identical each time), MEDIUM (shared core, varying details), LOW (different each time)
- Automatable steps: fraction that is routine/templatable
- Cross-tool reach: patterns in more tools score higher
Ranking (Internal - Do Not Show)
- Recommend: FLOW with freq >= 3 and consistency MEDIUM+, or WHAT with high freq and HIGH consistency, or any pattern in 3+ tools
- Worth skillifying: medium freq or MEDIUM consistency, or HOW across 3+ WHATs, or pattern in 2 tools
- Not suitable: LOW consistency with low automation rate
Present to User
Show a simple list without scores:
Recommended for skillification:
1. [Pattern name] (Nx, tools: X + Y) - [description]
Worth skillifying:
2. [Pattern name] (Nx, tools: X) - [description]
Include 1-2 representative prompts per candidate. Note when a FLOW contains a WHAT/HOW.
Phase 4: User Selection
- Ask which patterns to skillify (multiple OK).
- Show matching prompts from the relevant sources.
- Confirm for each selection:
- Scope: which part of the workflow to cover
- Variation handling: options within one skill vs. separate skills
- Placement: global (
~/.claude/skills/) or project-specific (.claude/skills/) - Trigger phrases for the description
- If more context is needed, read 2-3 individual session files.
Phase 5: Skill Generation
Rules
- Never paste raw session content into a skill.
- Never include angle brackets in YAML frontmatter or body. Use
[and]. - Never include secrets, tokens, or private identifiers.
- Paraphrase all examples.
Structure
{skill-name}/
SKILL.md # Main procedure (required)
scripts/ # Helper scripts (if needed)
references/ # Supplementary docs (if needed)
SKILL.md Requirements
Frontmatter must include at minimum:
---
name: my-skill
description: >-
What this skill does and when to use it. Include trigger phrases.
allowed-tools: Read, Bash, Grep
disable-model-invocation: true
user-invocable: true
---
Body must include:
- Clear numbered workflow steps
- Error handling for common failures
- At least 2 usage examples
- Under 500 lines total
Note in the skill which tools the pattern was observed in, for context.
Placement
- Global:
~/.claude/skills/{skill-name}/ - Project-specific:
.claude/skills/{skill-name}/
Phase 6: Quality Validation
- Fetch best practices from
https://platform.claude.com/docs/en/agents-and-tools/agent-skills/best-practicesusing WebFetch. - Check the generated skill against those guidelines.
- Fix any issues and re-validate.
- Report the result. If everything passes, say "All checks passed."
Troubleshooting
| Problem | Fix | |---------|-----| | Cursor SQLite fails | Check that sqlite3 exists and Cursor is not running | | pi-mono sessions missing | Verify ~/.pi/agent/sessions/ exists; expand time range | | history.jsonl too large | Use filter-history.py (handles files >256KB) | | JSON parse error | Narrow scope or change time range | | No sessions found | Expand time range or switch to all-projects scope |
Du fichier au premier essai
Le téléchargement contient exactement le contenu affiché sur cette fiche. Cette copie peut différer de la dernière version du dépôt source.
Consulter la source et ses fichiers annexesCe téléchargement contient uniquement SKILL.md. Les scripts, références, modèles et dépendances éventuels ne sont pas inclus. Récupérez les fichiers nécessaires depuis la source en conservant leur arborescence avant de poursuivre.
1. Télécharger le fichier
Télécharger SKILL.mdDepuis la racine d’un projet de test, enregistrez le fichier sous .skill-downloads/skill-distillation-from-history-mryiqgfb/SKILL.md, ou utilisez la commande suivante. Ce dossier sert à examiner la skill avant son installation.
Commande pour macOS/Linux ou WSL : un shell POSIX et curl sont nécessaires. Sous Windows sans WSL, utilisez le bouton de téléchargement et créez le dossier manuellement.
mkdir -p '.skill-downloads/skill-distillation-from-history-mryiqgfb' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/skill-distillation-from-history-mryiqgfb/download' --output '.skill-downloads/skill-distillation-from-history-mryiqgfb/SKILL.md.part' && mv '.skill-downloads/skill-distillation-from-history-mryiqgfb/SKILL.md.part' '.skill-downloads/skill-distillation-from-history-mryiqgfb/SKILL.md'2. Vérifier les prérequis
Lisez SKILL.md avant de l’utiliser. Si le fichier cite des scripts ou services externes, examinez-les et préparez les accès nécessaires dans votre environnement de test.
Outils déclarés par l’auteur (à vérifier dans votre agent) : Read, Write, Edit, Bash, Glob, Grep, WebFetch
Aucune section de prérequis reconnue dans ce fichier. Cela ne signifie pas qu’il est autonome : les bibliothèques, outils et accès peuvent être cités ailleurs dans le contenu ou dans le dépôt source.
Les plateformes de la fiche sont des indications du catalogue. Les chemins ci-dessous suivent la documentation des outils ; ils ne prouvent pas que cette skill y a été exécutée. Aucune version minimale de ces outils n’est attestée pour cette fiche.
3. Charger la skill
Après vérification, copiez le dossier complet dans le projet avec l’une des commandes ci-dessous, puis ouvrez une nouvelle session de l’outil. La commande s’arrête si un dossier du même nom existe déjà : comparez les fichiers avant de le remplacer.
Claude Code
test -f '.skill-downloads/skill-distillation-from-history-mryiqgfb/SKILL.md' && test -s '.skill-downloads/skill-distillation-from-history-mryiqgfb/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/skill-distill' && cp -R '.skill-downloads/skill-distillation-from-history-mryiqgfb' '.claude/skills/skill-distill'Cursor
test -f '.skill-downloads/skill-distillation-from-history-mryiqgfb/SKILL.md' && test -s '.skill-downloads/skill-distillation-from-history-mryiqgfb/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/skill-distill' && cp -R '.skill-downloads/skill-distillation-from-history-mryiqgfb' '.cursor/skills/skill-distill'Codex
test -f '.skill-downloads/skill-distillation-from-history-mryiqgfb/SKILL.md' && test -s '.skill-downloads/skill-distillation-from-history-mryiqgfb/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/skill-distill' && cp -R '.skill-downloads/skill-distillation-from-history-mryiqgfb' '.agents/skills/skill-distill'OpenSkills
OpenSkills doit déjà être installé. La procédure locale install/read est contrôlée avec OpenSkills 1.5.0, qui exige Node.js ≥ 20.6.0. Aucun slug du catalogue n’est résolu automatiquement.
Installation officielle d’OpenSkillsopenskills install './.skill-downloads/skill-distillation-from-history-mryiqgfb'openskills read 'skill-distillation-from-history-mryiqgfb'La lecture doit afficher le contenu du fichier installé et son dossier de base. Elle ne lance ni la skill ni ses dépendances.
Pour un agent qui lit AGENTS.md, synchronisez ensuite l’index. Cette commande modifie AGENTS.md : relisez le diff avant de l’utiliser.
openskills syncMode manuel ou autre outil : joignez SKILL.md à une conversation, ou ouvrez-le dans un agent capable de lire les fichiers. Ajoutez les ressources annexes nécessaires. Il n’existe pas de dossier universel reconnu par tous les outils.
4. Faire un premier essai
Utilisez une entrée courte et fictive : un endpoint d’API, un petit document ou un brief d’interface. Dans une nouvelle conversation, joignez le fichier ou donnez son chemin à l’agent, puis adaptez cette demande :
Lis .skill-downloads/skill-distillation-from-history-mryiqgfb/SKILL.md et applique ses instructions à cet exemple : [décrire une entrée de test]. Indique les fichiers, dépendances ou accès qui manquent. Produis le résultat demandé par la skill sans inventer de données ni exécuter de script non examiné.Résultat attendu : une sortie correspondant aux instructions de la skill, ou une liste précise des prérequis manquants. Une simple confirmation de lecture ne valide pas le premier usage. Si une ressource externe est indisponible, ce parcours reste à tester.
Bonnes pratiques React Hook Form
Developpement
Maîtrisez React Hook Form : évitez les anti-patterns, gérez les abonnements, et traitez correctement reset, dirty state et entrées contrôlées.
Migration Emotion vers Mantine
Developpement
Migrer les styled-components Emotion vers des composants Mantine avec style props et modules CSS. Pour convertir .styled.tsx ou supprimer les imports @emotion.
Détecteur de dérive de périmètre
Developpement
Analyse les diffs git par rapport à une intention pour détecter la dérive de périmètre, fichiers non liés et PR trop larges, puis suggère de garder, diviser ou justifier.