agentleFS
jakubtobiaszjakubtobiasz/second-brain-template/.agents/skills/query/SKILL.md

query

Skill0 starsChanged 7 days agoMITView on GitHub

Answer a question from the second brain wiki with [[wikilink]] citations and a required Gaps section, save substantial answers to 50-outputs/queries/, and offer to file new insight back into the wiki. Use when the owner asks "what do I know about X", "what does my brain say about", "compare X and Y", "summarize my notes on", asks any question that the vault might answer, or says "file that back".

39 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use attach-db, install-duckdb and 6 more.

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.
  • duckdbSkill

    attach-db

    Attach a DuckDB database file for use with /duckdb-skills:query. Explores the schema (tables, columns, row counts) and writes a SQL state file so subsequent queries can restore this session automatically via duckdb -init.

    Also in 3 projects that use this

  • carlopiSkill

    install-duckdb

    Install or update DuckDB extensions. Each argument is either a plain extension name (installs from core) or name@repo (e.g. magic@community). Pass --update to update extensions instead of installing.

    Also in 3 projects that use this

  • carlopiSkill

    read-file

    Read and explore any data file (CSV, JSON, Parquet, Avro, Excel, spatial, …) by filename only — resolves the path automatically. Uses DuckDB + the magic extension for format auto-detection. Installs magic if needed.

    Also in 4 projects that use this

  • seongjaeryuSkill

    save

    Complete and save your current thinking to Bindly

    Also in 4 projects that use this

  • AnthropicSkill

    start

    Set up your bio-research environment and explore available tools. Use when first getting oriented with the plugin, checking which literature, drug-discovery, or visualization MCP servers are connected, or surveying available analysis skills before starting a new project.

    Also in 4 projects that use this

  • MicrosoftSkill

    doctor

    Diagnose an Amplifier CLI environment through the CLI doctor agent. USE WHEN a user requests CLI runtime, settings or missing-capability inspection. DO NOT USE for project bugs or other hosts.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

9 rules. 0 are common, 3 are distinctive, and 6 are very specific to this project.

  • 0

    Common

    Most of the 32 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 6

    Very specific

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

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

    Read index.md; pick candidate pages by title/summary.

    line 11
  2. Distinctive:

    qmd installed: write a structured query yourself.

    line 13
  3. Very specific:

    If qmd query/vsearch fails (models, GPU) or the embed hasn't caught up yet, fall back to qmd search.

    line 19
  4. Very specific:

    Read the candidates fully, then follow ## Related links one hop if they look relevant.

    line 21
  5. Very specific:

    Only if the wiki is thin: check 10-raw/ sources directly (qmd search "<terms>" -c raw), and say you did ("the wiki doesn't cover this yet.

    line 22
  6. Very specific:

    Write 50-outputs/queries/YYYY-MM-DD-short-title.md from 90-system/templates/query.md.

    line 43
  7. Very specific:

    Run scripts/qmd-sync.sh so past answers are searchable.

    line 45
  8. Distinctive:

    Never present general knowledge as if it came from the vault.

    line 57
  9. Distinctive:

    Never edit wiki pages during the answer itself.

    line 58

“Common” is measured: kept by at least 6 in 10 of the 32 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

Query: ask the wiki

The wiki is the first source, not the raw files and not your general knowledge. Rules: AGENTS.md §3, §6.

1. Find

  1. Read index.md; pick candidate pages by title/summary.
  2. Widen with search (AGENTS.md §5a):
    • qmd installed: write a structured query yourself; don't paste the owner's sentence:
      qmd query $'intent: <what you need, and what to avoid>\nlex: <exact terms, names, aliases>\nvec: <paraphrase in source-like wording>' -n 10
      Exact names/titles → qmd search "<terms>" -n 10. Default collections are wiki, projects, journal and outputs; narrow with -c wiki. Fetch hits with qmd multi-get "#id1,#id2" before relying on them; snippets are leads. If qmd query/vsearch fails (models, GPU) or the embed hasn't caught up yet, fall back to qmd search.
    • No qmd: grep -ril "<term>\|<synonym>" 20-wiki/ 30-projects/.
  3. Read the candidates fully, then follow ## Related links one hop if they look relevant.
  4. Only if the wiki is thin: check 10-raw/ sources directly (qmd search "<terms>" -c raw), and say you did ("the wiki doesn't cover this yet; from the raw source …"). That gap is itself a finding: suggest ingesting/re-ingesting.

2. Answer

  • Lead with the direct answer, then the support.
  • Cite inline as [[page-name]] for every non-obvious claim. Cite source pages for specific numbers/quotes.
  • Respect ## Contradictions sections: present both sides, don't pick silently.
  • Mark general knowledge that is not from the vault: "(not in vault)". Mark inferences: "(inference)".
  • Choose the format that fits: prose, comparison table, timeline, checklist, Mermaid diagram, Marp slides.

3. Gaps (required for every substantial answer)

## Gaps
- What the wiki could not answer, and what kind of source would fill it.
- Stale or single-source claims the answer relied on.

An empty Gaps section is almost always wrong. Look harder.

4. Save (if substantial)

Substantial = new synthesis, comparison, decision support, or anything over a few paragraphs. Skip saving for quick lookups ("when did I ingest X?").

  • Write 50-outputs/queries/YYYY-MM-DD-short-title.md from 90-system/templates/query.md.
  • Append to log.md: ## [YYYY-MM-DD] query | <question, shortened> with a - saved: 50-outputs/queries/… line.
  • Run scripts/qmd-sync.sh so past answers are searchable.

5. Offer to file back

End with one line: "Want me to file this back?", with a concrete proposal:

  • A new 20-wiki/syntheses/<name>.md page (template synthesis.md), or
  • Specific additions to existing pages (name them).

On "yes": write it like an ingest (citations, sources:, bidirectional links, index.md, log.md entry ## [YYYY-MM-DD] query | filed back: <title>), and set filed_back: true in the saved query file. Then run scripts/qmd-sync.sh. Synthesis pages cite the wiki source pages behind them, not the query file.

Hard constraints

  • Never present general knowledge as if it came from the vault.
  • Never edit wiki pages during the answer itself; changes only happen through file-back, with the owner's yes.

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.