project-distill
Distill session insights into rules, skill improvements, and justfile recipes. Use when capturing learnings, extracting reusable patterns, or codifying workflow into .claude/rules.
What this skill does
# /project:distill Distill session insights into reusable project knowledge. ## When to Use This Skill | Use this skill when... | Use alternative when... | |------------------------|------------------------| | End of session, want to capture learnings | Need to write a blog post -> `/blog:post` | | Discovered a pattern worth reusing | Need to analyze git history for docs gaps -> `/git:log-documentation` | | Found a CLI workflow worth saving as a recipe | Need to configure a justfile from scratch -> `/configure:justfile` | | Want to update rules based on session experience | Need to check project infrastructure -> `/configure:status` | | Asked to "codify the workflow" or "analyze and promote session patterns to rules" | Need a one-off implementation, not a reusable rule -> implement directly | May also be auto-suggested at end-of-session when the cwd repo has `.claude/rules/` or a justfile and you signal wind-down — a Stop hook (`hooks/project-distill-nudge.sh`) injects a one-time offer to run `/project:distill --dry-run`. ## Core Principle: Update Over Add Before proposing any artifact, evaluate: Does it update an existing one? Does an existing one already cover this? Is this genuinely new and reusable? See [REFERENCE.md](REFERENCE.md) for detailed evaluation criteria. ## Context - Git repo detected: !`find . -maxdepth 1 -name '.git' -type d` - Justfile: !`find . -maxdepth 1 \( -name 'justfile' -o -name 'Justfile' \) -print -quit` - Rules directory: !`find .claude/rules -name '*.md' -type f` ## Parameters | Parameter | Description | |-----------|-------------| | `--rules` | Only analyze potential rule updates | | `--skills` | Only analyze potential skill updates | | `--recipes` | Only analyze potential justfile recipe updates | | `--all` | Analyze all three categories (default) | | `--dry-run` | Show proposals without applying changes | ## Tool Call Efficiency Minimize LLM round-trips: batch file reads in a single response, combine evaluation and redundancy checking in one pass, complete one category before starting the next. ## Execution Execute this session distillation workflow: ### Step 1: Analyze session activity 1. Review **conversation history** — tool calls, file edits, commands run, results 2. If in a git repo, run in parallel: `git log --oneline --max-count=20` and `git log --stat --oneline --max-count=10` 3. Identify patterns, catalog tools used, note pain points ### Step 2: Evaluate and check redundancy (single pass per category) When `--all`: complete rules -> skills -> recipes. Do not interleave. **Rules** (`.claude/rules/*.md`): Glob all rule files, Read ALL in one response, evaluate each insight against existing rules in one pass (update/skip/remove/merge/add). **Skills**: Glob relevant skill files (target specific plugins from Step 1), Read in one response, evaluate in one pass. **Recipes**: Run `just --dump --dump-format json`, evaluate session commands against loaded recipes in one pass. ### Step 3: Present proposals Categorize as: `[UPDATE]`, `[SKIP]`, `[NEW]`, or `[REDUNDANT]` with file paths and reasons. ### Step 4: Apply changes If `--dry-run`: skip this step. **In auto mode**: apply proposals directly without per-category `AskUserQuestion`. All targets are reversible via `git restore` — rule files, skill files, and justfile recipes are tracked in git, so a wrong edit can be undone with one command. This matches auto mode's "prefer action over planning" directive. **Retain `AskUserQuestion` for destructive operations** (`[REDUNDANT]` proposals that remove a rule or recipe). **In manual / interactive mode**: use `AskUserQuestion` to confirm each category before applying. The user can multi-select which `[UPDATE]` / `[NEW]` proposals to accept. **In plan mode**: neither default applies — the harness disallows non-readonly tool calls (including `AskUserQuestion`-then-apply) except writes to the active plan file. Write the proposal set to the active plan file as a single coherent block (Context + per-category `[UPDATE]` / `[NEW]` / `[REDUNDANT]` sections + a brief verification section), then call `ExitPlanMode` to surface for user approval. Do not apply directly. After the user approves the plan, fall back to the auto-mode or manual-mode flow above depending on which is active. ### Step 5: Report summary Output concise summary of changes made. ## Agentic Optimizations | Context | Command | |---------|---------| | Session diff summary | `git log --stat --oneline --max-count=10` | | Recent commits | `git log --oneline --max-count=20` | | List justfile recipes | `just --list` | | Dump justfile as JSON | `just --dump --dump-format json` | | Find rules | Glob `.claude/rules/*.md` | | Batch-read all rules | Glob then Read all results in one response |
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.