New to Claude Skills? Learn how to install them →

sickn33 on GitHub

Knowledge Extraction

Free

Transform AI responses into structured reference data.

Get this skill

Free · Opens the source repo

What Knowledge Extraction does

The Knowledge Extraction skill allows users to extract structured, quality-scored knowledge from AI models in real-time or from local open-source models using Ollama. This capability is particularly useful for professionals who require reliable reference data across various domains such as medical, legal, finance, and cybersecurity. By leveraging this skill, users can build a compounding knowledge base that not only answers targeted questions but also organizes and scores the responses for future reference.

The process begins with the installation of the bdistill package, after which users can initiate knowledge extraction sessions. The skill supports both preset domains and custom terms, allowing for flexibility in the types of knowledge being extracted. An adversarial mode is also available, which challenges the AI's responses to ensure the validity and reliability of the information being gathered. This mode is crucial for producing validated knowledge entries that can be trusted for critical applications.

Once knowledge is extracted, users can easily search and export the data in various formats, including CSV and Markdown. This structured output is not only useful for immediate reference but can also be integrated into larger datasets for machine learning or research purposes. The skill is designed to facilitate the generation of training data for traditional machine learning models, making it a valuable tool for data scientists and researchers alike.

Overall, the Knowledge Extraction skill is an essential tool for anyone looking to harness the power of AI models to create a structured and searchable knowledge base. Its ability to work seamlessly with both in-session AI models and local open-source alternatives makes it versatile and accessible for a wide range of professional applications.

When to use it

Use this skill when you need to gather structured knowledge from AI models for research, training data generation, or domain-specific inquiries.

When not to use it

This skill may not be suitable for tasks that require real-time decision-making or when the output needs to be environment-specific validated.

What you can build with it

Building a Knowledge Base

Use the skill to compile a comprehensive knowledge base from AI responses, ideal for research and reference.

Generating Training Data

Create structured datasets for machine learning models, ensuring each entry is validated and scored.

Cross-Model Comparison

Leverage the skill to compare knowledge across different AI models, enhancing your understanding of domain-specific information.

How to install Knowledge Extraction

View source

1. Install with the skills CLI

npx skills add sickn33/agentic-awesome-skills/bdistill-knowledge-extraction --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by sickn33

Knowledge Extraction

Extract structured, quality-scored domain knowledge from any AI model — in-session from closed models (no API key) or locally from open-source models via Ollama.

Overview

bdistill turns your AI subscription sessions into a compounding knowledge base. The agent answers targeted domain questions, bdistill structures and quality-scores the responses, and the output accumulates into a searchable, exportable reference dataset.

Adversarial mode challenges the agent's claims — forcing evidence, corrections, and acknowledged limitations — producing validated knowledge entries.

When to Use This Skill

  • Use when you need structured reference data on any domain (medical, legal, finance, cybersecurity)
  • Use when building lookup tables, Q&A datasets, or research corpora
  • Use when generating training data for traditional ML models (regression, classification — NOT competing LLMs)
  • Use when you want cross-model comparison on domain knowledge

How It Works

Step 1: Install

pip install bdistill
claude mcp add bdistill -- bdistill-mcp   # Claude Code

Step 2: Extract knowledge in-session

/distill medical cardiology                    # Preset domain
/distill --custom kubernetes docker helm       # Custom terms
/distill --adversarial medical                 # With adversarial validation

Step 3: Search, export, compound

bdistill kb list                               # Show all domains
bdistill kb search "atrial fibrillation"       # Keyword search
bdistill kb export -d medical -f csv           # Export as spreadsheet
bdistill kb export -d medical -f markdown      # Readable knowledge document

Output Format

Structured reference JSONL — not training data:

{
  "question": "What causes myocardial infarction?",
  "answer": "Myocardial infarction results from acute coronary artery occlusion...",
  "domain": "medical",
  "category": "cardiology",
  "tags": ["mechanistic", "evidence-based"],
  "quality_score": 0.73,
  "confidence": 1.08,
  "validated": true,
  "source_model": "Claude Sonnet 4"
}

Tabular ML Data Generation

Generate structured training data for traditional ML models:

/schema sepsis | hr:float, bp:float, temp:float, wbc:float | risk:category[low,moderate,high,critical]

Exports as CSV ready for pandas/sklearn. Each row tracks source_model for cross-model analysis.

Local Model Extraction (Ollama)

For open-source models running locally:

# Install Ollama from https://ollama.com
ollama serve
ollama pull qwen3:4b

bdistill extract --domain medical --model qwen3:4b

Security & Safety Notes

  • In-session extraction uses your existing subscription — no additional API keys
  • Local extraction runs entirely on your machine via Ollama
  • No data is sent to external services
  • Output is reference data, not LLM training format

Related Skills

  • @bdistill-behavioral-xray - X-ray a model's behavioral patterns

Limitations

  • Use this skill only when the task clearly matches the scope described above.
  • Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
  • Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.

Frequently asked questions about Knowledge Extraction

Similar skills