agentleFS
komlukkomluk/scaffolding/skills/distill/SKILL.md

distill

Skill15 starsChanged 2 months agoMITView on GitHub

Knowledge distillation methodology: candidate extraction, confidence scoring, tier routing, conversation-scoped mode. TRIGGER when: running /learn or /distill, deciding if an insight is memory-worthy, or scoring a knowledge candidate. SKIP: ad-hoc memory reads/writes (use agent-memory); vector storage (use semantic-memory-store).

39 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use overdrive, arrange and 9 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • nikafastovets-langSkill

    overdrive

    Push interfaces past conventional limits with technically ambitious implementations. Whether that's a shader, a 60fps virtual table, spring physics on a dialog, or scroll-driven reveals — make users ask "how did they do that?

    Also in 12 projects that use this

  • nikafastovets-langSkill

    arrange

    Improve layout, spacing, and visual rhythm. Fixes monotonous grids, inconsistent spacing, and weak visual hierarchy to create intentional compositions.

    Also in 6 projects that use this

  • QredenceSkill

    layout

    Diagnose or improve layout in selected Figma frames, screens, components, or Figma Make prototypes by clarifying reading order, grouping, hierarchy, spacing rhythm, density, adaptation, and content extremes. Use when UI feels crowded, flat, misaligned, hard to scan, structurally unclear, or unstable across sizes.

    Also in 5 projects that use this

  • tdiminoSkill

    shape

    Plan the UX and UI for a feature before writing code. Run a structured discovery interview, then produce a design brief (.design-context.md) that guides implementation. Establishes design direction, constraints, and strategy before any code is written. Triggers on plan the design, design brief, shape the UX, before we build, design discovery.

    Also in 6 projects that use this

  • MicrosoftSkill

    impeccable

    Use when the user wants to design, redesign, shape, critique, audit, polish, clarify, distill, harden, optimize, adapt, animate, colorize, extract, or otherwise improve a frontend interface. Covers websites, landing pages, dashboards, product UI, app shells, components, forms, settings, onboarding, and empty states. Handles UX review, visual hierarchy, information architecture, cognitive load, accessibility, performance, responsive behavior, theming, anti-patterns, typography, fonts, spacing, layout, alignment, color, motion, micro-interactions, UX copy, error states, edge cases, i18n, and reusable design systems or tokens. Also use for bland designs that need to become bolder or more delightful, loud designs that should become quieter, live browser iteration on UI elements, or ambitious visual effects that should feel technically extraordinary. Not for backend-only or non-UI tasks.

    Also in 6 projects that use this

  • termdockSkill

    recall

    Retrieves cross-session memories about past decisions, lessons, and patterns. Use when user asks about prior work, past decisions, or mentions a feature. Triggers include check memory, what did we decide, how did we solve.

    Also in 4 projects that use this

  • +1 more from nikafastovets-lang

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 36 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Apply: Create timestamped backup, then write merged content

    line 69

“Common” is measured: kept by at least 6 in 10 of the 36 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Distill Methodology

Guidelines for automated knowledge extraction and consolidation across memory systems.

Knowledge Candidate Criteria

An insight qualifies as a knowledge candidate when it meets ANY of these:

CriterionSourceExample
Cross-conversation pattern3+ context.md files contain the same insight"Redis pool exhaustion under SSE load"
Architectural decisiondesign.md contains explicit Decision/Rationale section"Use pgvector for semantic search"
Recurring gotcha/bugKeyword match in specs: gotcha, bug, pattern, lesson"POST 301 redirect strips body"
Stale referenceFile path in memory points to non-existent file"app/backend/old_module.py"
Cross-tier duplicateSame entry in both KNOWLEDGE.md and agent MEMORY.mdDuplicated bullet point

Confidence Scoring

OccurrencesConfidenceTier Recommendation
5+ conversations0.5 - 1.0shared (KNOWLEDGE.md)
3-4 conversations0.3 - 0.5shared (with review)
1-2 conversations0.1 - 0.2agent-specific MEMORY.md
Decision section0.7 fixedshared
Pattern keyword0.5 fixedshared
Stale reference0.9 fixedcleanup action

Auto-store threshold: candidates scoring >= 0.8 are auto-stored to the vector store (silent, cold layer) via semantic_store — see the memory-ingest Stop hook. This is the single source of truth for that threshold.

Tier Routing

TargetWhenPath
sharedCross-cutting insight useful to all agents.scaffolding/agent-memory/shared/KNOWLEDGE.md
agent:{name}Domain-specific to one agent.scaffolding/agent-memory/agents/{name}/MEMORY.md
OverflowKNOWLEDGE.md would exceed 200 linesRoute to most relevant agent file

Output Format

Candidates are structured as:

- content: The knowledge text (max 500 chars)
- source: File path or "conversations:N_occurrences"
- source_type: conversation | spec | memory | semantic
- confidence: 0.0-1.0
- target_tier: shared | agent:{name}
- tags: categorization tags

200-Line Limit Enforcement

KNOWLEDGE.md has a hard limit of 200 lines (auto-injected into every agent context). When merging would exceed this limit:

  1. High-confidence candidates (>= 0.7) get priority
  2. Lower-confidence candidates overflow to agent-specific files
  3. The orchestrator routes overflow to the most relevant agent based on tags

Dry-Run vs Apply

  • Dry-run (default): Report what would change, write nothing
  • Apply: Create timestamped backup, then write merged content
  • Restore: Revert files from any backup timestamp

Conversation-Scoped Distillation

The /learn command runs distillation against a single conversation rather than mining all of .scaffolding/conversations/. This mode is backend-free and self-contained — no session-log mining, no database.

Inputs for one conversation_id (a UUID xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx):

InputPathRole
Conversation memory.scaffolding/conversations/{id}/agent-memory/context.mdDecisions and findings recorded during the chain
Design decisions.scaffolding/conversations/{id}/specs/design.md (## Decisions section, if present)Architectural choices + rationale

Apply the Knowledge Candidate Criteria and Confidence Scoring above against these two files only. With a single conversation, the "Cross-conversation pattern" criterion does not apply; rely on the Decision-section and pattern-keyword criteria. If context.md is absent, there is nothing to distill — exit cleanly.

Skill Promotion Criterion

Each distilled candidate routes to one of two destinations:

Candidate shapeDestinationDecision rule
Situational insight, gotcha, or one-off decisionMemory entry — shared, agent:{name}, or conversation tier per the Tier Routing rules aboveThe knowledge is a fact about this codebase.
Repeatable procedure or methodologyNew skill — propose a /create-skill invocation with a pre-filled draftThe knowledge is a reusable how-to an agent would follow on future, unrelated tasks.

Promote to a skill only when the candidate is a generalizable procedure, not a single fact. A one-off fact ("module X has a 301 redirect bug") is a memory entry; a recurring procedure ("how to safely roll a zero-downtime migration") is a skill. When in doubt, prefer a memory entry — skills carry an auto-invocation cost and should stay few and sharp.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.