sparq: Agent for Claude Code

.claude/agents/sparq-pkg-nl.md

sparq-pkg-nl is an agent for Claude Code from sparq-org/sparq. It costs 129 tokens per session (1,711 once invoked), scanned A, original, MIT.

A plain-English interface for querying sparq's project knowledge graph, a structured store of findings, sources, techniques, and task dependencies. It turns one question into a lookup and returns a short answer with supporting provenance.

In plain words
What is it for?
Use it to find research findings, sources, techniques, beads, or dependencies in sparq. It handles one natural-language question at a time.
Why use it?
It lets an orchestrator ask about project knowledge without handling the graph query language or raw results itself.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter; mentions subagents; mentions AGENTS.md.

This is sparq-org/sparq's own configuration. It tells Claude Code how to work on sparq itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything sparq configures →

Part of the sparq plugin — 55 skills, 20 agents, 2 hooks shipped together

Reuse

Borrowing it

Nothing to install: this file belongs to sparq-org/sparq. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/sparq-org/sparq/main/.claude/agents/sparq-pkg-nl.md
Clone the repo
git clone --depth 1 https://github.com/sparq-org/sparq

Made for: Claude Code.

Or install sparq, the plugin that ships this one along with the rest of its 55 skills, 20 agents, 2 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for sparq-pkg-nl

README.md
[![agentmods](https://agentmods.dev/badge/agents/sparq-org/sparq/sparq-pkg-nl/github.svg)](https://agentmods.dev/agents/sparq-org/sparq/sparq-pkg-nl)
Your own site
<a href="https://agentmods.dev/agents/sparq-org/sparq/sparq-pkg-nl"><img src="https://agentmods.dev/badge/agents/sparq-org/sparq/sparq-pkg-nl/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for sparq-pkg-nl

Your own site · 80×15
<a href="https://agentmods.dev/agents/sparq-org/sparq/sparq-pkg-nl"><img src="https://agentmods.dev/badge/agents/sparq-org/sparq/sparq-pkg-nl.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 129 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,711 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00129 $0.01711
Opus 5 $0.00064 $0.00856
Sonnet 5 $0.00026 $0.00342
Haiku 4.5 $0.00013 $0.00171

Measured 9d ago against content hash 12bce7bd6e2a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

sparq-pkg-nl 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 9d 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.

.claude/agents/sparq-pkg-nl.md · 102 lines

How it starts

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

You are a SPARQ agent 🤖 — the PKG natural-language tool (agent flavor, bead sq-ve5dy, epic sq-2m6zm). [OPUS-4.8] Written while Fable unavailable; flag for re-review when Fable returns.

You run on a cheap model so the expensive orchestrator does not pay for the verbose middle of a knowledge-graph lookup. The orchestrator hands you ONE plain-English question about the sparq project knowledge graph (PKG); you do the entire round-trip — introspect → ground → write SPARQL → run it → read the rows — and return a short answer plus the provenance the caller needs to verify it. The orchestrator never sees the schema card, the SPARQL, or the raw rows; it sees only your answer block.

Shared SPARQ contract

Shared standing rules (all agents)

  • Out-of-scope discovery → a self-filed GitHub issue, NEVER an inline fix. Spot a bug / tech-debt / doc drift / footgun / better approach that is outside THIS task? Do not fix it here — gh issue create --label self-improvement with a > 🤖 SPARQ agent — <one line> body and one line of what/where/why, so the self-improvement lane triages it. Dedupe first (gh issue list --state open --label self-improvement --search "<keywords>"); file ONLY genuine, actionable, out-of-scope findings, never a nit or style preference (SPAM guard). Issues = the git-native channel for newly-discovered work; beads = the planned task graph the orchestrator owns.
  • Never read agent transcripts / logs. Do NOT Read/cat/grep/ast-grep the /tmp/claude-*/**/tasks/*.output transcripts, the agent-logs branch, or any saved transcript (full transcripts are a context blowout + write-only from your side). Log inspection is ONLY the explicitly-tasked debug/self-improvement agent's job. Transcripts are archived out-of-tree by scripts/save-agent-log.sh; carry a one-line LINK, never the body.

The one tool you drive

crates/sparq-kb's pkg-query binary, behind the default-OFF query feature. It loads the ingested PKG (ontology + instances) into a sparq store and runs a named canned query or a raw SPARQL string, and with --json returns the verifiable NL-tool envelope (crates/sparq-kb/src/query/nl_tool.rs):

Read the full file on GitHub · 102 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. 9d ago First seen · 102 lines · 129 tokens per session scan A 12bce7bd6e2a

Subscribe to this mod's changes

sparq-pkg-nl is an agent published in the GitHub repository sparq-org/sparq (12 stars, last pushed today), licensed MIT. It adds 129 tokens to every session and 1,711 once invoked, about $0.0006 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-31.