agentsclimarketplace

Kb query

Skill Iabstergo1/pdf-to-study-kb/.agents/skills/kb-query

对话式 agent(Claude Code / Codex)驱动的本地知识库编译器:把 PDF/DOCX/PPTX/Markdown 增量编译进一个去重、互联、可复现的 Obsidian 学习知识库。

Install
npx -y skills add Iabstergo1/pdf-to-study-kb --skill kb-query

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

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.

SKILL.md

4.3 KB, as published. Nobody here has run it

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.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.