agentleFS
Iabstergo1Iabstergo1/pdf-to-study-kb/.claude/skills/kb-query/SKILL.md

kb-query

Skill2 starsChanged 9 days agoMITView on GitHub

Read-only query of the existing study knowledge base, persisting a query-session (without writing any vault file). Use when the user asks "what does the KB say about X / search my wiki / what was that Y I learned / has Z ever been covered". Read-only; to keep a conclusion in the wiki, follow up explicitly with kb-save.

6 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use kb-ingest.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • shaowen310Skill

    kb-ingest

    Thin orchestrator that turns PowerPoint `.pptx` slides into knowledge-base-ready, slide-level JSONL chunks for RAG / agent pipelines. Delegates extraction to the pptx2md skill, then parses the Markdown per the deterministic output contract (slide anchors, field extraction, image/encoding rules) into one record per slide with title, body, images, and metadata. Triggers on: "把PPT做成知识库", "PPT转知识库给AI用", "ingest PPTX into KB", "build RAG dataset from slides", "把幻灯片切片入库". Best for building agent/RAG knowledge bases, search indexes, or training corpora from slide decks. Do NOT use for translating PPTX (use the pptx-translate skill) or for plain markdown export without chunking (use the pptx2md skill).

    Also in 4 projects that use this

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 0 are distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 6 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read: wiki/index.generated.md, wiki/concepts/_registry.yaml, and the relevant concept/topic/comparison/synthesis/source/lesson pages.

    line 20
  2. Very specific:

    If the answer might be worth saving, read docs/skill-runtime/save-back-policy.md to decide whether to emit a save candidate.

    line 21
  3. Very specific:

    Run check-session after writing the query-session.

    line 51
  4. Very specific:

    No change under wiki/.

    line 71

“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

kb-query — read-only query + query-session persistence

Answer the user's questions about existing KB content. Read-only: it writes no file under wiki/, but it must persist a query-session for later kb-save and for audit. The execution layer is scripts/pipeline.py; this skill only orchestrates, surfaces acceptance, and constrains artifacts.

1. Triggers / Non-triggers

  • Triggers: "what does the KB say about X", "search my wiki", "what was that Y I learned", "has Z ever been covered".
  • Non-triggers: ingesting a new source (use ingest); writing a query result back (use kb-save); working the Review-Queue (use kb-review); a semantic health check (use wiki-lint-semantic); plain summary/translate/explain of external text (a normal answer — no query-session unless the user explicitly queries the wiki).

2. Inputs

  • The user's question; optional domain, concept name, source name, page path, or time range.
  • Read: wiki/index.generated.md, wiki/concepts/_registry.yaml, and the relevant concept/topic/comparison/synthesis/source/lesson pages.
  • If the answer might be worth saving, read docs/skill-runtime/save-back-policy.md to decide whether to emit a save candidate.

3. Outputs

  • An in-chat answer citing the relevant vault pages (wikilinks) and source location (source §section / page).
  • The query-session files under pipeline-workspace/query-sessions/<run_id>/.
  • It does not write wiki/, does not touch log.md, does not promote, does not create proposed pages.

4. Dependencies

  • Protocols: docs/skill-runtime/save-back-policy.md (save-candidate admission), docs/skill-runtime/schema.md (page types).
  • CLI: scripts/pipeline.py check-session --id <run_id> to self-check the query-session.
  • Saving is handed to kb-save only; this skill does not inline save logic.

5. Persisted artifacts

Under pipeline-workspace/query-sessions/<run_id>/:

  • question.md: the original question.
  • answer.md: this answer.
  • related_pages.json: the list of vault page paths involved.
  • candidate_write_set.json: pages worth saving (synthesis/comparison/learning-path candidates), else [].
  • evidence_refs.json: [{"source": "...", "sections": ["..."]}]; [] if no source evidence.

6. CLI commands

python scripts/pipeline.py check-session --id <run_id>

Run check-session after writing the query-session; on failure, fix the session files and do not treat a failed session as a save basis.

7. Workflow

Sub-unitInputOutputAcceptancePersistedFailure stop
Q1 locate materialquestion + index/registryrelevant page listpaths exist, prefer published contentrelated_pages.json draftvault/index missing
Q2 answerrelevant page bodiesanswer with wikilinks / source locationno source-less claims; separate established vs inferredanswer.md draftsay so if evidence is thin
Q3 save-candidate judgementanswer + save-back-policycandidate_write_set/evidence_refsplain explanation / one-off fact → []JSON filesempty if candidate has no evidence
Q4 session self-checksession dircheck-session resultcheck-session passesfull query-session dirself-check fails

8. Failure stops / recovery

wiki/index.generated.md or registry missing; relevant pages missing; query-session write fails; check-session fails; the user asks to write the wiki mid-query (stop this skill, switch to kb-save); never emit a save candidate without source evidence. Recovery: re-run check-session after fixing the session files; the session dir is the durable handoff to kb-save.

9. Acceptance criteria

  • No change under wiki/.
  • The five query-session files exist and the JSON parses.
  • Paths in related_pages.json really exist.
  • candidate_write_set.json is [] for plain explanation / translation / one-off facts.
  • python scripts/pipeline.py check-session --id <run_id> passes.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.