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.
npx agentmods add rules/arango-solutions/arango-sparql-py/000-project-contextgit clone --depth 1 https://github.com/arango-solutions/arango-sparql-pyWrote 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.
[](https://agentmods.dev/rules/arango-solutions/arango-sparql-py/000-project-context)<a href="https://agentmods.dev/rules/arango-solutions/arango-sparql-py/000-project-context"><img src="https://agentmods.dev/badge/rules/arango-solutions/arango-sparql-py/000-project-context.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00735 | $0.00735 |
| Opus 5 | $0.00367 | $0.00367 |
| Sonnet 5 | $0.00147 | $0.00147 |
| Haiku 4.5 | $0.00073 | $0.00073 |
Grade A, and why
000-project-context 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 5d 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.
How it starts
The opening of the file, as written. The whole thing — 62 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Project: arango-sparql-py
You are an expert Semantic Web and ArangoDB developer building arango-sparql-py,
a Python microservice that transpiles SPARQL 1.1 queries into ArangoDB AQL.
This project is the modernization of the legacy JavaScript Foxx service
arango-sparql and the sister project to arango-cypher-py.
Hard guardrails (non-negotiable)
- DO NOT use ANTLR or roll a custom SPARQL parser. Always use
rdflib.plugins.sparql.parser.parseQuery()to obtain the SPARQL AST (Algebra), then walk it with a Python visitor. - Never hand-concatenate AQL. All AQL must be emitted via the
parameterized AQL query builder (mirroring
arango-cypher-py's pattern) so bind variables are the only injection-safe path. - Do not invent translation rules. The semantic mapping of SPARQL
constructs to AQL must be ported from the legacy
references/arango-sparql/src/lib/*-translator.jsfiles. When in doubt, read the JS first and translate the behavior, not the syntax. - Match
arango-cypher-pyarchitecture. FastAPI app factory, route modules, pydantic request/response models, multitenancy guards,uv+pyproject.tomldependency management, andpytestharness layout must be structurally identical so a developer who knows one repo can read the other immediately.
Reference repos (sibling projects)
When you need to understand a pattern, consult these — they are symlinked
into references/:
references/arango-cypher-py/— the architecture template (FastAPI, nl2cypher, eval harness, UI shell, pyproject layout).references/arango-sparql/— the legacy Foxx service whose SPARQL→AQL translation semantics are being ported (read-only source of truth for query translation behavior).references/arango-schema-mapper/— generates the OWL/Turtle ontology this service consumes for URI→collection resolution.
Directory anchors
arango_sparql/— Python package (mirror ofarango_cypher/).arango_sparql/service/— FastAPI app + routes (mirror ofarango_cypher/service/).arango_sparql/nl2sparql/— NL→SPARQL pipeline (mirror ofarango_cypher/nl2cypher/).tests/— pytest harness;tests/w3c/is the SPARQL DAWG runner (analog ofarango-cypher-py/tests/tck/).ui/— Vite + React + TypeScript frontend (mirror ofarango-cypher-py/ui/).
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.
- 5d ago First seen · 62 lines · 735 tokens per session scan A c7a038dc02fc
000-project-context is a cursor rule published in the GitHub repository arango-solutions/arango-sparql-py (2 stars, last pushed 18d ago), licensed MIT. It adds 735 tokens to every session, about $0.0037 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.
Other cursor rules, from other repositories
prefer-assertions-over-defensive-checks
Prefer assertions over defensive checks when data is guaranteed to be valid.
as-contract-cast-smell
// ❌ WRONG — bypasses the family ContractSerializer seam const contract = JSON.parse(raw) as Contract; const contract = JSON.parse(raw) as Contract .
no-backward-compatibility
Do not add backward-compatibility shims or migration scaffolding.
postgresql
This guide defines the definitive best practices for writing clean, performant, and maintainable PostgreSQL SQL, focusing on modern conventions and avoiding common pitfalls.
query-optimization
查詢優化、EXPLAIN、index 設計與 RLS 效能測量.
ehs-ims-conventions
EHS IMS app — RBAC, data layer, tRPC, migrations, AI boundaries.