knowledge-extract

knowledge-extract is a skill for Claude Code from tu11aa/squadrant. It costs 46 tokens per session (1,148 once invoked), scanned A, original, MIT.

A procedure for extracting candidate rules from changed knowledge-base sources. It reads selected source sections, writes proposed rules as JSON, and passes them to a command that verifies their wording against the source.

In plain words
What is it for?
Use it during a knowledge-base ingestion pass to identify new or changed rules, handle section limits, and keep local-only sources on an approved local model.
Why use it?
It separates human judgement about what a source means from mechanical checks such as quote verification, matching existing rule IDs, and source anchoring. This helps prevent rules that are not supported by the text.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the squadrant plugin — 27 skills shipped together

Good fit Use it during a knowledge-base ingestion pass to identify new or changed rules, handle section limits, and keep local-only sources on an approved local model.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tu11aa/squadrant/knowledge-extract
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add tu11aa/squadrant --skill knowledge-extract
Clone the repo
git clone --depth 1 https://github.com/tu11aa/squadrant

Made for: Claude Code.

Or install squadrant, the plugin that ships this one along with the rest of its 27 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for knowledge-extract

README.md
[![agentmods](https://agentmods.dev/badge/skills/tu11aa/squadrant/knowledge-extract/github.svg)](https://agentmods.dev/skills/tu11aa/squadrant/knowledge-extract)
Your own site
<a href="https://agentmods.dev/skills/tu11aa/squadrant/knowledge-extract"><img src="https://agentmods.dev/badge/skills/tu11aa/squadrant/knowledge-extract/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for knowledge-extract

Your own site · 80×15
<a href="https://agentmods.dev/skills/tu11aa/squadrant/knowledge-extract"><img src="https://agentmods.dev/badge/skills/tu11aa/squadrant/knowledge-extract.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,148 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00046 $0.01148
Opus 5.5 $0.00018 $0.00459
Sonnet 5.5 $0.00009 $0.00230
Haiku 4.5 $0.00005 $0.00115

Measured 23d ago against content hash 0026ebd5a122, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

knowledge-extract scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 23d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugin/skills/knowledge-extract/SKILL.md · 46 lines

How it starts

The opening of the file, as written. The whole thing — 46 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Knowledge Extract

You do the judgement step of rule ingestion. Code does everything mechanical: change detection, conversion, quote verification, id matching, classification, anchoring. Your output is a JSON file of candidates; squadrant knowledge apply rejects anything not grounded in the source text.

Works from any agent: it is plain CLI plus a JSON file.

Steps

  1. Get the plan. squadrant knowledge ingest <kb> --json (add --dry-run first on a big first ingest to see the token estimate). The plan lists, per source: ref, converted (path to the markdown you read), sections (start/end char spans, heading), priority, optional domain hint, and an existing list of live rules (id, domain, statement).
    • A source with sensitivity: local-only appears only if you were told a local model is available (--local-model). Run it only on that local model; never on a hosted one. Otherwise it is listed under skipped: leave it alone and say so in your report.
    • carriedSections > 0 means the pass was capped (maxSectionsPerPass); the next ingest hands out the rest.
  2. Read each section of converted (use the char span) and extract rules: statements that bind behaviour. Skip background prose.
  3. For each candidate emit:
    • source: the plan's ref, exactly.
    • quote: copy the source sentence verbatim. Do not paraphrase, merge sentences or fix typos. A quote that is not found is dropped and logged as ungrounded.
    • statement: one imperative sentence. rationale: optional, one or two lines.
    • modality: must | must-not | should | may. domain: a lowercase slug (use the source's hint if present).
    • id: if an existing rule says the same thing, reuse its id; otherwise mint a stable domain.topic.slug (lowercase, dots/dashes). Never invent a new id for a rule that already exists. The code overrides your id when the quote overlaps an existing rule's span, but reuse it anyway.
    • meaning: for a reused id, "same" if the wording changed but not the obligation, "changed" if the obligation changed (this routes it to review; the old version stays active). When unsure, say "changed".
    • contradicts: ids of existing rules this one conflicts with.
    • triggers: keywords (terms in the source), expanded (synonyms and related identifiers a developer would grep for), when (one sentence: when does this rule matter), optional globs.
    • loc: where in the document (p.12 §4.2).
  4. Write the file and apply:

Read the full file on GitHub · 46 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 23d ago Changed · +2 lines 0026ebd5a122
  2. 26d ago First seen · 44 lines · 46 tokens per session scan A 959691a57b61

Subscribe to this mod's changes

knowledge-extract is a skill published in the GitHub repository tu11aa/squadrant (2 stars, last pushed yesterday), licensed MIT. It adds 46 tokens to every session and 1,148 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-11.

Related

knowledge-extract compared with skills from other repositories

knowledge-extract next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
knowledge-extracttu11aa/squadrantSkill2yesterdayMITA46Claude Code
imagegenopenai/codexSkill133kyesterdayApache-2.0A113Codex
playwright-climicrosoft/playwrightSkill99kyesterdayApache-2.0A19Claude Code
local-ai-agentsmicrosoft/ai-agents-for-beginnersSkill79k4d agoMITA200Claude Code, Codex
systematic-debuggingobra/superpowersSkill313k3d agoMITA21Claude Code
next-cache-components-adoptionvercel/next.jsSkill143kyesterdayMITA95Claude Code
next-partial-prefetching-adoptionvercel/next.jsSkill143kyesterdayMITA103Claude Code