kw-explore

A research workflow that starts with a project or idea and uses academic papers to build a problem map and a design grounded in reusable principles.

In plain words
What is it for?
Use it when exploring a research project, reading a collection of papers, filling evidence gaps, or developing a principle-based solution.
Why use it?
It helps connect scattered research to a specific problem, identify missing knowledge, and turn findings into a practical design.

Skill for Claude CodeCodex

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/chenpg2/kw-engine/kw-explore
Any agent
npx skills add chenpg2/kw-engine --skill kw-explore
Clone the repo
git clone --depth 1 https://github.com/chenpg2/kw-engine

Made for: Claude Code, Codex.

Per session 121 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,465 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.00121 $0.01465
Opus 5 $0.00060 $0.00732
Sonnet 5 $0.00024 $0.00293
Haiku 4.5 $0.00012 $0.00146

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

Security

Grade A, and why

kw-explore 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 2d 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.

skills/kw-explore/SKILL.md · 103 lines

How it starts

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

/kw-explore — drive a research project with the principle library

This is the problem-driven loop. (/kw is the corpus-driven loop: absorb papers, synthesize globally. /kw-explore starts from the user's actual problem and pulls the library toward solving it.) It is the workflow that turns the engine from a knowledge library into a research accelerator.

You are the orchestrator. Dispatch the kw-* subagents for reading/distilling (model boundary below); do the framing/mapping/assembly reasoning yourself.

Separation of concerns (hard rule). Use-case outputs — the problem decomposition, the design, the handoff — go in the user's project (cwd). Reusable principles go into the linked knowledge base (kw status shows which one). Never mix: the knowledge base stays domain-general and reusable across projects.

Model boundary (same as /kw). The orchestrator never reads PDFs or calls read_*/search_*/ download_* MCP tools. Acquisition → kw-fetcher (sonnet); reading → kw-reader (sonnet); distilling → kw-distiller (opus). Pass model explicitly on every Agent dispatch.

Prerequisite: the project must be linked to a knowledge base. If kw status errors, run kw link <name-or-path> (or /kw-init) first.


Phase 0 — Frame the problem (the most important step)

A good decomposition is most of the value. Do not skip to fetching papers.

If a Question Card already exists (<project>/problems/<slug>/QUESTION.md, produced by /kw-question): the question's worth is already validated — do NOT re-litigate stakes/ falsifiability. Read the card and go straight to extracting the structural signature (below). If the user only has a vague idea and no card, and it's unclear whether the question is even worth pursuing, suggest running /kw-question first.

  1. Interview the user just enough to extract a problem signature: the structural axes of their problem, pushed toward the form the library indexes by — structural properties, not domain narrative. (E.g. not "vaginal microbiome typing" but "compositional/simplex-constrained data", "continuous spectrum + possible discrete sub-structure", "cross-population transferability", "must encode temporal dynamics".)
  2. Challenge the framing. Find the load-bearing structural difficulty, not the surface complaint. (The CST example: the real defect was "resolution too low — classifying in a space where the signal has already been integrated out", not "the clusters are wrong".)
  3. Write <project>/problems/<slug>/PROBLEM.md: the signature axes, plus what any solution MUST satisfy (the constraints — e.g. "must work on both targeted-amplicon AND shotgun data").
  4. Show the decomposition to the user and confirm it before proceeding. A wrong signature wastes the whole loop downstream.

Read the full file on GitHub · 103 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. 2d ago First seen · 103 lines · 0 tokens per session scan A f61372862f88

Subscribe to this mod's changes

kw-explore is a skill published in the GitHub repository chenpg2/kw-engine (11 stars, last pushed 2mo ago), licensed MIT. It adds 121 tokens to every session and 1,465 once invoked, about $0.0006 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.