query

A question-answering workflow for a Scraps wiki, a collection of linked Markdown notes. It searches relevant notes, reads them, and writes a summary that cites its sources with links such as [[Title]].

In plain words
What is it for?
Finding notes about a topic, comparing notes, identifying related information, and producing source-linked summaries.
Why use it?
It makes answers traceable instead of relying on memory or requiring the user to search notes manually.

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/boykush/scraps/query
Any agent
npx skills add boykush/scraps --skill query
Clone the repo
git clone --depth 1 https://github.com/boykush/scraps

Made for: Claude Code, Codex.

Per session 61 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,130 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.00061 $0.01130
Opus 5 $0.00030 $0.00565
Sonnet 5 $0.00012 $0.00226
Haiku 4.5 $0.00006 $0.00113

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

Security

Grade A, and why

query 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.

plugins/llm-wiki/skills/query/SKILL.md · 83 lines

How it starts

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

Query

Answer a question against the wiki and return a citation-rich synthesis.

Implements Karpathy's Query primitive for Scraps: search the wiki, read relevant scraps, and synthesize an answer that references its sources by [[Title]]. Citations make the answer auditable and ready to be filed back as a new scrap if the user chooses.

When to use

  • "What do I have on X?" / "What did I write about Y?"
  • "Compare X and Y across my notes"
  • "Summarize what I know about Z"
  • "Find scraps related to W"

Workflow

  1. Understand the question

    • Identify the core topic and any constraints (time range, ctx folder, tag, etc.)
    • If the question is ambiguous, ask one clarifying question before searching
  2. Search (broad → narrow)

    • scraps search "<keyword>" --json for each main keyword
    • Try multiple phrasings if the first search returns few results
    • For tag-driven questions: scraps tag backlinks "<tag>" --json
  3. Select candidates

    • From search results, pick the 5–15 most relevant scraps
    • Prefer scraps that span the question (different ctx, different tags) over many near-duplicates
  4. Read selected scraps

    • scraps get "<title>" [--ctx <ctx>] --json for each candidate
    • Use field projection to save context when appropriate, e.g. --json body, --json headings, or --json code_blocks
    • If a link result includes heading, read just that section with scraps get "<title>" [--ctx <ctx>] --heading "<heading>" --json body
    • For graph-shaped questions, also use:
      • scraps links "<title>" --json (outbound)
      • scraps backlinks "<title>" --json (inbound)
  5. Synthesize with citations

    • Write the answer in plain Markdown
    • Cite every claim that comes from a scrap as [[Title]] (or [[Ctx/Title]] when needed)
    • Do not invent information beyond what the scraps and the user's question support
    • Choose the output shape that fits the question:
      • prose paragraph for narrative questions
      • GFM table for comparisons
      • bullet list for enumerations
      • mermaid diagram for relationships

Read the full file on GitHub · 83 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 · 83 lines · 61 tokens per session scan A a198695ea375

Subscribe to this mod's changes

query is a skill published in the GitHub repository boykush/scraps (47 stars, last pushed 2d ago), licensed MIT. It adds 61 tokens to every session and 1,130 once invoked, about $0.0003 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

okf

Author, maintain, and consume Open Knowledge Format (OKF) knowledge bundles — portable markdown + YAML frontmatter that both humans and agents read. Use when capturing project knowledge (services, APIs, schemas, metrics, runbooks, decisions) into an OKF bundle, when updating one after code or docs change, or when a…

scaccogatto/okf-skills · 127 tokens

validate

Check that an Open Knowledge Format (OKF) bundle is conformant with the v0.2 spec (§11). Use when asked to validate, lint, or check an OKF bundle, or before committing changes to one. Runs a deterministic Python checker — not an eyeball pass. Also migrates a v0.1 bundle to v0.2 in place with --migrate.

scaccogatto/okf-skills · 82 tokens

visualize

Render an Open Knowledge Format (OKF) bundle as a single self-contained, interactive HTML graph (viz.html) — concepts as nodes coloured/sized by type, markdown links and bundle-internal sources as edges, a wiki-style detail panel with rendered markdown, v0.2 trust/lifecycle/provenance metadata, and "Links to" / "Cited…

scaccogatto/okf-skills · 108 tokens

audhd-executive-function

AUDHD executive function accommodations. Apply to all output the founder will act on.

assafkip/kipi-system · 23 tokens

learn-from-correction

Propose a principle edit to a skill or persona file based on a (agentoutput, humanoutput) correction pair. Outputs a proposal markdown for human review - never auto-edits the target file.

assafkip/kipi-system · 45 tokens

research-mode

Anti-hallucination research mode. Toggle on to enforce citation requirements, source grounding, and "I don't know" behavior. Toggle off for creative work.

assafkip/kipi-system · 35 tokens