Agent skill

Extract Knowledge

by lexler in lexler/skill-factory

Extracts what the session learned into prose that stands alone, or reviews existing text through the same distortion lenses.

Apache-2.0Auto-check passed

Install Extract Knowledge

skills CLI
$ npx skills add lexler/skill-factory --skill extract-knowledge -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install lexler/skill-factory extract-knowledge --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/lexler/skill-factory.git skills-src && mkdir -p .claude/skills && cp -r skills-src/output_skills/ai/extract-knowledge .claude/skills/extract-knowledge && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
extract-knowledge
GitHub stars
239
Token cost
~1.4k tokens
SKILL.md length
827 words
Files
1
Skills in repo
25
Repo updated
First seen
Licence
Apache-2.0

At a glance

Extracts what the session learned into prose that stands alone, or reviews existing text through the same distortion lenses.

  • Works in 4 steps: Read the argument. A topic means extract… → Draft the extraction. Capture what the… → Run the lens gate below and keep a… → …
  • SKILL.md covers Seats, Steps and Lens gate
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Extract Knowledge is an agent skill from lexler/skill-factory. Extracts what the session learned into prose that stands alone, or reviews existing text through the same distortion lenses.

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The licence is Apache-2.0.

Example prompts

  • “Use the extract-knowledge skill to extract what the session learned into prose that stands alone, or reviews existing text through the same…”
  • “/extract-knowledge”

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Read the argument. A topic means extract that topic. No argument means extract everything important. Existing text or a file path means…
  2. Draft the extraction. Capture what the session learned: decisions with their why, corrections and preferences the user stated, insights…
  3. Run the lens gate below and keep a visible verdict list: a bulleted list, one lens per line — its name, then "clean" or the defect found…
  4. Output the text in chat, or return it if another agent invoked you. Persistence belongs to the caller: hand over prose, and let the caller…

What it can do on your machine

Read from SKILL.md and the folder at commit 8017333. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Extract Knowledge loads about 1.4k tokens when it runs. Until then it costs about 36 tokens; SKILL.md has 827 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~36
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from lexler/skill-factory at commit 8017333, republished under its Apache-2.0 licence (© lexler). 827 words, ~1,352 tokens.

Download SKILL.mdSave it as .claude/skills/extract-knowledge/SKILL.md (or your agent's skills folder).
name
extract-knowledge
description
Extracts what the session learned into prose that stands alone, or reviews existing text through the same distortion lenses.
disable-model-invocation
true
argument-hint
topic | file | pasted text

STARTER_CHARACTER = 📝

Extract Knowledge

Turn what a session knows into prose that stands alone. The reader is a stranger: they were not in the session and they see only the text. Each lens below defends the stranger against one distortion.

Seats

Decide which seat you are in — it changes what you can verify.

  • Author seat: you did the work, so the knowledge is in your context. You can verify faithfulness directly, but you are half-blind to standalone failures because you cannot un-know the session. Compensate deliberately: reread the draft as the stranger, asking of every referent "do I know this if I only have the text?"
  • Reviewer seat: the argument points at text someone else wrote. You are the stranger, so standalone and prose failures are visible to you directly. For faithfulness, check claims against the source session or transcript if one is reachable; mark the claims you cannot verify instead of guessing.

Steps

  1. Read the argument. A topic means extract that topic. No argument means extract everything important. Existing text or a file path means take the reviewer seat and go straight to the lens gate.

  2. Draft the extraction. Capture what the session learned: decisions with their why, corrections and preferences the user stated, insights discovered, dead ends that cost time, and questions still open. Done when every insight in scope is either in the draft or consciously judged not worth the reader's time.

  3. Run the lens gate below and keep a visible verdict list: a bulleted list, one lens per line — its name, then "clean" or the defect found and fixed. A verdict names a defect caught in the draft; a lens that shaped the draft from the start still reports "clean". A lens without a verdict line was skipped, not passed. Done when the verdict list covers every lens in all three groups.

  4. Output the text in chat, or return it if another agent invoked you. Persistence belongs to the caller: hand over prose, and let the caller decide if and where it becomes a file. The extracted text is the only artifact — the verdict list and any questions to the user are chat output, and stay out of the text however it is saved or passed on.

Lens gate

Look through one lens at a time.

Standalone — the stranger was not there
  • Fourth-wall break — the text addresses the asker or narrates the process ("as requested", "I've now added"). → Rewrite from the reader's point of view, or delete the sentence.
  • Context leakage — a session-private referent appears as if the reader knows it: a scratch folder, an experiment label, "the audit". → Name it in terms the reader has, or drop the referent.
  • Change-relative framing — the text describes the delta ("now uses X", "the new approach") instead of the resulting state, so it is stale on arrival. → Write the timeless state.
  • Orphaned claim — a fact was lifted without the context that made it true: a dangling "it", an unstated precondition, a rule that only held in one setup. → Restore the condition or cut the claim.
  • Salience mismatch — content is ranked by how much session attention it got, not by what the reader needs; trivia sits level with the one thing that matters. → Reorder by reader importance and cut what does not serve the reader.
Show full SKILL.md (279 more words)Show less
Faithfulness — the record must match what happened
  • Fabrication — a claim that never happened in the session; where the source was silent, priors filled the gap. → Trace every claim to the session; delete what you cannot trace.
  • Commitment upgrade — "we discussed X" became "we decided X"; a maybe became an action item. → Restore the real speech act.
  • Confidence inflation — hedges, scope limits, and caveats were stripped, so one instance reads as a general rule. → Put the hedge and the scope back.
  • Success theater — failures, dead ends, objections, and open risks vanished; "done" claims exceed what was verified. → Record what failed and what is still open.
  • Detail corruption — a true claim carries a wrong actor, number, date, or sequence. → Check each specific against the source.
  • False causality — independent facts joined by an invented "because"; real causal structure flattened into a story. → Link only what was actually linked.
  • Sycophantic record — the text captures what the user asserted, not what was established; the framing beat the evidence. → Record the conclusion the evidence supports.
Prose — plain writing
  • Padding — the text can be compressed without losing information; detail exceeds the reader's curiosity. → Compress until every word earns its weight.
  • Diff narration — the text restates what its subject already shows: a commit narrating the diff, a comment narrating the code. → Keep only what the subject cannot say itself, usually the why.
  • Significance inflation — small things wear grandiose framing: "comprehensive", "robust", "production-ready". → State plainly what it is.
  • Slop style — slogan fragments ("No X, no Y."), snappy triads, "It's not X, it's Y", walls of bullets, bold everywhere. → Write simple English sentences.
  • Tooling residue — prompt text, raw diffs, or harness machinery leaked verbatim into the text. → Delete it.

© lexler, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in output_skills/ai/extract-knowledge of lexler/skill-factory.

Open the folder on GitHubat commit 8017333

Compare with similar skills

Extract Knowledge next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Extract Knowledge compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Extract Knowledge this skilllexler/skill-factory239—~1.4kAutomated safety check: PassApache-2.0
Learning to Learn (OpenMAIC)THU-MAIC/OpenMAIC40k—~502Automated safety check: PassMIT
Gsd Extract Learningsopen-gsd/gsd-core10k2 repos~225Automated safety check: NotesMIT
Scikit LearnK-Dense-AI/scientific-agent-skills48k1 repos~3.3kAutomated safety check: NotesBSD-3-Clause
Project Learnings Managergarrytan/gstack136k—~8.2kAutomated safety check: NotesMIT
Extractalirezarezvani/claude-skills28k—~1.4kAutomated safety check: PassMIT

Similar skills

  • A Chinese-language skill that embeds learning strategies like retrieval practice and self-explanation as a parallel goal inside an OpenMAIC subject lesson, without making study skills the topic.

    40k GitHub stars~502 tokensUpdated today
    EducationAuto-check passed
  • Gsd Extract Learnings

    open-gsd/gsd-core

    Extract decisions, lessons, patterns, and surprises from completed phase artifacts

    10k GitHub starsUsed in 2 repos~225 tokens
    Auto-check: notes
  • Scikit Learn

    K-Dense-AI/scientific-agent-skills

    Supports machine learning in Python with scikit-learn. An agent skill from K-Dense-AI/scientific-agent-skills.

    48k GitHub starsUsed in 1 repo~3.3k tokens
    Data & AnalyticsAuto-check: notes
  • Lets you review, search, prune and export the learnings gstack has collected across sessions, and surfaces them when a past fix or pattern comes up.

    136k GitHub stars~8.2k tokensUpdated today
    Agent WorkflowsAuto-check: notes
  • Extract

    alirezarezvani/claude-skills

    Turn a proven pattern or debugging solution into a standalone reusable skill with SKILL.md, reference docs, and examples.

    28k GitHub stars~1.4k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • [DEPRECATED - use continuous-learning-v2] Legacy v1 stop-hook skill extractor.

    274k GitHub stars~1.1k tokensUpdated 2 days ago
    Auto-check passed

More from lexler/skill-factory

All 25 skills in this repo
  • C4 Architecture Diagrams

    lexler/skill-factory

    Creates C4 model diagrams at every zoom level, from system landscape to code, in ASCII, Mermaid or Structurizr, for designing or documenting software architecture.

    239 GitHub stars~2.3k tokensUpdated 1 mo ago
    Auto-check passed
  • Launching Agent Teams

    lexler/skill-factory

    Plans and launches Claude Code agent teams with distinct roles, right-sized tasks and detailed spawn prompts, and says when subagents or worktrees fit better.

    239 GitHub stars~1.3k tokensUpdated 1 mo ago
    Auto-check passed
  • Claude Code Statusline Writer

    lexler/skill-factory

    Guides writing and debugging Claude Code status line scripts that read session JSON from stdin and print one line of text.

    239 GitHub stars~872 tokensUpdated 1 mo ago
    Auto-check passed
  • Catalog of obstacles, anti-patterns and patterns for working with AI coding agents, covering context management and reliability, from a published patterns collection.

    239 GitHub stars~1.5k tokensUpdated 1 mo ago
    Auto-check passed
  • Approval Testing Toolkit

    lexler/skill-factory

    Writes snapshot-style approval tests in Python, JavaScript, TypeScript or Java, comparing output against an approved file instead of writing individual assertions.

    239 GitHub stars~1.2k tokensUpdated 1 mo ago
    Auto-check passed
  • Hotspots

    lexler/skill-factory

    Find where a codebase actually costs time by mining its git history (Tornhill hotspot analysis).

    239 GitHub stars~1.2k tokensUpdated 1 mo ago
    Auto-check passed

Questions about Extract Knowledge

What does Extract Knowledge do?

Extracts what the session learned into prose that stands alone, or reviews existing text through the same distortion lenses. Extract Knowledge is an agent skill from lexler/skill-factory. Extracts what the session learned into prose that stands alone, or reviews existing text through the same distortion lenses.

How do I install Extract Knowledge in Claude Code?

Run `npx skills add lexler/skill-factory --skill extract-knowledge -a claude-code`. Or copy the skill folder (output_skills/ai/extract-knowledge in lexler/skill-factory) into .claude/skills/extract-knowledge in your project. Claude Code loads it when a task matches its description.

How do I install Extract Knowledge in Codex?

Run `npx skills add lexler/skill-factory --skill extract-knowledge -a codex`. Or copy the skill folder (output_skills/ai/extract-knowledge in lexler/skill-factory) into .agents/skills/extract-knowledge in your project. Codex loads it when a task matches its description.

Can I use Extract Knowledge in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add lexler/skill-factory --skill extract-knowledge -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/extract-knowledge, .gemini/skills/extract-knowledge, .github/skills/extract-knowledge and .opencode/skills/extract-knowledge in your project.

What does Extract Knowledge need to run?

SKILL.md names no scripts, command-line tools or credentials: Extract Knowledge is instructions for the agent only.

Does Extract Knowledge access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Extract Knowledge safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Extract Knowledge use?

Extract Knowledge is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Extract Knowledge use?

About 1.4k tokens (SKILL.md is roughly 5.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Extract Knowledge?

Skills that share tags, products or a category with Extract Knowledge: Learning to Learn (OpenMAIC) (THU-MAIC/OpenMAIC, 40k stars), Gsd Extract Learnings (open-gsd/gsd-core, 10k stars), Scikit Learn (K-Dense-AI/scientific-agent-skills, 48k stars) and Project Learnings Manager (garrytan/gstack, 136k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Extract Knowledge?

lexler (a GitHub user) maintains it in lexler/skill-factory, which has 239 GitHub stars. The repository holds 25 skills in this directory. The repository was last updated on August 26, 2026.

Source: lexler/skill-factory on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.