knowledge-compose

A pipeline step that turns an already collected research wiki into a structured report draft. A research wiki is a set of saved source pages and summaries; it can also use a manifest that maps sources to questions.

In plain words
What is it for?
Use it to compose reports from ingested web sources or from an existing wiki, check that evidence is cited, and save the resulting draft.
Why use it?
It assembles scattered research into one cited draft while supporting a wiki-only mode that does not browse the web again.

Skill for Claude CodeCodex

Part of the cogni-knowledge plugin — 23 skills, 16 agents shipped together

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.

agentmods
npx agentmods add skills/cogni-work/insight-wave/knowledge-compose
Any agent
npx skills add cogni-work/insight-wave --skill knowledge-compose
Clone the repo
git clone --depth 1 https://github.com/cogni-work/insight-wave

Made for: Claude Code, Codex.

Or install cogni-knowledge, the plugin that ships this one along with the rest of its 23 skills, 16 agents.

Per session 205 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 14,884 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00205 $0.14884
Opus 5 $0.00102 $0.07442
Sonnet 5 $0.00041 $0.02977
Haiku 4.5 $0.00020 $0.01488

Measured 3d ago against content hash fbcac0937ae6, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

knowledge-compose 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 3d 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.

cogni-knowledge/skills/knowledge-compose/SKILL.md · 487 lines

How it starts

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

Knowledge Compose

Phase 5 of the inverted pipeline. Reads the per-project plan.json + ingest-manifest.json + the populated wiki at <binding.wiki_path>/wiki/, dispatches wiki-composer once, and verifies the output files land on disk.

The default --source web path composes from this run's web-ingested sources (the ingest-manifest.json Phase 4 produced). --source wiki is the wiki-only rung — a full structured, verified report grounded only in the already-populated wiki (wiki/sources/*.md + wiki/syntheses/*.md + distilled pages) and the .cogni-knowledge/fetch-cache/, with no web crawl: it preserves the retired research-report --source wiki capability so that capability does not vanish when cogni-research is archived.

The wiki-only mode does not change the composer or the verify/finalize tail at all. Instead, Step 0 synthesizes an ingest-manifest.json from the bound wiki's wiki/sources/*.md pages — mapping each source to the current plan's sub-questions via the shared wiki-grounding discovery primitive (scripts/wiki-source-manifest.py) — so the dispatched wiki-composer reads a normal manifest and runs byte-for-byte identically whether that manifest came from a web crawl or from the wiki. The composer does not branch on source mode and needs no new input. (See --source in Parameters and the Step 0 pre-flight.)

The composer reads wiki/index.md + selected wiki/sources/*.md (lazily) + prior wiki/syntheses/*.md. Since the distillation interphase (knowledge-distill), it also reads the distilled wiki/{concepts,entities}/*.md pages (topic-matched, lazily) — these serve both as narrative framing and as citable cross-source evidence: when ≥2 sources converge on a fact the distilled page already captures, the composer cites the distilled page itself via its dcl-NNN claim id, so the convergence carries epistemic weight rather than a row of source markers. Distilled pages carry distilled_claims: (not pre_extracted_claims:), and a distilled-page citation is scored by the verifier against that claim's text. Distillation stays optional and fail-soft: when it hasn't run, the composer simply has no distilled pages to draw on and composes from sources + syntheses alone.

The composer also reads the type: question nodes at wiki/questions/*.md (topic-matched, lazily) — first-class wiki pages each recording one research question the base has already explored, with ## Findings [[links]] to the sources that answered it. These serve both as narrative framing and as a citable cross-source answer surface: a question node may carry an answer_claims: block (acl-NNN ids, synthesized by knowledge-distill), and when its backlinks[] list ≥2 distinct sources the composer cites the node directly via its acl-NNN claim — one citation carrying "N sources agree on the answer" — exactly mirroring the distilled-page rule just above. A single-source answer, or a question node with no answer_claims: block yet, stays framing-only: the composer reads it for orientation but cites the backing source page, never the node (an inline citation to a claim-less node would score unsupported). A question-node citation is scored by the verifier against that answer claim's text.

The composer then writes:

  • <project>/output/draft-v{N}.md — the draft, with clickable numbered [N] inline citations (wikilinks confined to the reference list).
  • <project>/.metadata/citation-records-v{N}.txt — one raw-text record per citation (the composer writes this; it never hand-builds JSON). This skill then runs citation-store.py build to serialize and validate <project>/.metadata/citation-manifest.json (schema 0.1.1, one {id, draft_position, draft_sentence, wiki_slug, claim_id, url} entry per citation). Escaping is owned by json.dumps, never the LLM — a straight " in a draft_sentence would otherwise break a hand-built manifest's json.loads and kill the verify phase.

Read the full file on GitHub · 487 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. 3d ago First seen · 487 lines · 205 tokens per session scan A fbcac0937ae6

Subscribe to this mod's changes

knowledge-compose is a skill published in the GitHub repository cogni-work/insight-wave (12 stars, last pushed 3d ago), licensed Apache-2.0. It adds 205 tokens to every session and 14,884 once invoked, about $0.0010 per session on Opus 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-08-30.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

obra/superpowers · 37 tokens

auto-perf-optimize

Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.

microsoft/vscode · 62 tokens

chat-perf

Run chat perf benchmarks and memory leak checks against the local dev build or any published VS Code version. Use when investigating chat rendering regressions, validating perf-sensitive changes to chat UI, or checking for memory leaks in the chat response pipeline.

microsoft/vscode · 51 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens