Skip to content
Skills Library
Personal productivity · Research

query

/query

Answer questions about the wiki by searching, reading, and synthesizing relevant scraps with `[[Title]]` citations. Use this when the user wants to query the wiki, ask what they have written about a topic, compare scraps, find related notes, or pull a synthesized overview from existing scraps.

Repository
scraps ↗
Licence
MIT
Last repository change
27.10.2026

Assessment and security

90/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content25 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
2
Deprecation

No signals detected. Repository changed on 27.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Answer questions about the wiki by searching, reading, and synthesizing relevant scraps with `[[Title]]` citations. Use this when the user wants to query the wiki, ask what they have written about a topic, compare scraps, find related notes, or pull a synthesized overview from existing scraps.

Arguments

/query [question]
Original author description

Answer questions about the wiki by searching, reading, and synthesizing relevant scraps with `[[Title]]` citations. Use this when the user wants to query the wiki, ask what they have written about a topic, compare scraps, find related notes, or pull a synthesized overview from existing scraps.

How it works

  1. When to use
  2. Workflow
  3. Citation rules
  4. CLI used
  5. Further reading
Original SKILL.md headings · 76 lines, 640 words
SKILL.md preview
---
name: query
description: Answer questions about the wiki by searching, reading, and synthesizing relevant scraps with `[[Title]]` citations. Use this when the user wants to query the wiki, ask what they have written about a topic, compare scraps, find related notes, or pull a synthesized overview from existing scraps.
allowed-tools: Read, Bash, Glob, Grep
user-invocable: true
argument-hint: [question]
---

# 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 "<key>" --json` for each candidate, passing the hit's `key` back
   - 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 "<key>" --heading "<heading>" --json body`
   - For graph-shaped questions, also use:
     - `scraps links "<key>" --json` (outbound)
     - `scraps backlinks "<key>" --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

6. **Stop**
   - Do not auto-offer to save the answer. If the user wants the synthesis saved as a new scrap, they invoke the `ingest` skill on the answer markdown.

## Citation rules

- Every non-trivial claim should trace to a `[[Title]]` citation.
- If a claim has no source in the wiki, mark it as outside the wiki ("not in the current scraps"); do not bluff.
- Cite with the exact `key` value returned by `scraps search --json` / `scraps get --json`, as `[[key]]`, so the citation resolves cleanly. The `title` is what readers see and is not a link target.
- A key already carries its context folder (`[[Ctx/Name]]`).
- `scraps links --json` may return a `heading`; use it for targeted reads, but cite the scrap as `[[Title]]` or `[[Ctx/Title]]` unless the answer specifically needs a heading reference.

## CLI used

- `scraps search <query> [--logic and|or] --json`
- `scraps get <key> [--heading <heading>] --json [fields]` (`<key>` is the scrap's path without `.md`, as results return it; `<name> --ctx <ctx>` is still accepted)
- `scraps links <key> --json` (returns `{ kind, key, title, ctx, heading }` refs)
- `scraps backlinks <key> --json`
- `scraps tag list --json`
- `scraps tag backlinks <tag> --json`
- `scraps todo [--status open|done|deferred|all] --json`

These commands are shown with `--json` because this skill consumes structured output — without it Scraps prints human-formatted text that is unstable to parse, so `--json` is part of the command, not an option. Use `scraps <cmd> --help` only as a fallback for a rare flag not listed here, not as a routine discovery step; for deeper syntax or spec questions, consult the `scraps-llm-wiki-schema` agent (it reads the official docs).

## Further reading

- Scraps docs: <https://boykush.github.io/scraps/>
- Karpathy's *Ingest / Query / Lint* framing: <https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f>
- Composition with other primitives, dialogue / catch-up patterns, and primitive boundaries: see the `scraps-llm-wiki-schema` agent.

Versions

RepositoryScoreLicence
This page · boykush/scraps90MIT
h1994st/rllvm100Apache-2.0
garrytan/gbrain100MIT
garrytan/gbrain100MIT
proteanhq/protean100Apache-2.0
oxy-hq/airlayer100Apache-2.0
erayozenn/BigHead-2ndBrain100MIT
lambdalisue/cclens100MIT
oxy-hq/airlayer100Apache-2.0

Database snapshot: 13.11.2026 · package version 2b7b16123ab8 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 90wiki-query
    Answers a question against an Obsidian-based LLM knowledge wiki. Performs index-first search, reads relevant pages, synthesizes an answer with citations, and optionally files the synthesis back as a new wiki page. Triggers when the user runs /wiki:query or asks a question that…
  • 100wiki-query
    Ask the Obsidian LLM wiki (wiki/concept/) a question and get a synthesized answer with [[ ]] sources; good cross-page answers go back into the wiki. Use when asking the wiki (wiki に聞いて), or when past daily-research notes would answer faster than grep.
  • 100wiki-query
    Pull from your accumulated business knowledge instead of starting from scratch. Triggers when the owner says "what do I know about X", "what's my thinking on Y", "pull up the wiki on Z", "what's in my wiki about [topic]", or runs /wiki-query. Reads the wiki index, identifies…
  • 100wiki-query
    Query the wiki to answer questions. Searches wiki pages, synthesizes answers with citations, and optionally files valuable answers back as new wiki pages. Use when the user asks a question about the knowledge base.
  • 88wiki-query
    Answer a question using the compiled wiki knowledge base, synthesising a response with [[wikilink]] citations. Always use this skill when the user says /wiki-query, 'what does my wiki say about', 'what do I know about', 'check my notes on', 'search my wiki for', or 'what's the…
  • 100wiki-query
    Use when asking a question against a personal wiki built with wiki-init and wiki-ingest. Do not answer from general knowledge — always read the wiki pages first.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.