400-frontend-ui

400-frontend-ui is a cursor rule for Cursor from arango-solutions/arango-sparql-py. It costs 0 tokens per session (736 once invoked), scanned A, original, MIT.

A set of frontend coding rules for building a Vite, React, and TypeScript application that edits SPARQL queries and displays RDF data as graphs. SPARQL is a query language for linked data, while RDF represents information as connected subject–predicate–object statements.

In plain words
What is it for?
Use it when adding SPARQL editing, RDF graph visualization, ontology schema views, query results, history, connection dialogs, and related panels to the application.
Why use it?
It keeps a new frontend consistent with an existing Cypher-based interface while accounting for the different way RDF graphs and their literal values should be displayed.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it when adding SPARQL editing, RDF graph visualization, ontology schema views, query results, history, connection dialogs, and related panels to the application.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/arango-solutions/arango-sparql-py/400-frontend-ui
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.

Clone the repo
git clone --depth 1 https://github.com/arango-solutions/arango-sparql-py

Made for: Cursor.

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 400-frontend-ui

README.md
[![agentmods](https://agentmods.dev/badge/rules/arango-solutions/arango-sparql-py/400-frontend-ui.svg)](https://agentmods.dev/rules/arango-solutions/arango-sparql-py/400-frontend-ui)
Your own site
<a href="https://agentmods.dev/rules/arango-solutions/arango-sparql-py/400-frontend-ui"><img src="https://agentmods.dev/badge/rules/arango-solutions/arango-sparql-py/400-frontend-ui.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 736 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.00000 $0.00736
Opus 5 $0.00000 $0.00368
Sonnet 5 $0.00000 $0.00147
Haiku 4.5 $0.00000 $0.00074

Measured 7d ago against content hash 17cea04ab48e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

400-frontend-ui 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 7d 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.

.cursor/rules/400-frontend-ui.mdc · 59 lines

How it starts

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

Frontend rules

Stack (mirror arango-cypher-py/ui/)

  • Vite + React 19 + TypeScript, ESM-only.
  • Editor: CodeMirror 6 with @codemirror/legacy-modes/mode/sparql for syntax highlighting. Mirror the structure of references/arango-cypher-py/ui/src/components/CypherEditor.tsx in a new SparqlEditor.tsx.
  • Graph viz: Cytoscape.js, mirror references/arango-cypher-py/ui/src/components/CytoscapeGraph.tsx.
  • Tailwind v4 via @tailwindcss/vite (same as Cypher UI).

Component map (1:1 with Cypher UI where it carries over)

  • SparqlEditor.tsxCypherEditor.tsx
  • AqlEditor.tsx ← keep as-is, it's language-agnostic.
  • CytoscapeGraph.tsx — extended for RDF (see below).
  • SchemaGraph.tsx / CytoscapeSchemaGraph.tsx — render OWL classes
    • properties from the ontology endpoint.
  • MappingPanel.tsx, ParameterPanel.tsx, ResultsPanel.tsx, QueryHistory.tsx, SampleQueries.tsx, ConnectionDialog.tsx, TenantSelector.tsx, SchemaWarningBanner.tsx, ClauseOutline.tsx, theme.ts — port verbatim with SPARQL-flavored copy.

RDF graph rendering rule (the key UX delta vs Cypher)

  • In strict RDF every literal is a node. That clutters Cytoscape badly.
  • Default render mode: collapse RDF literal nodes into properties on their subject node. Edges to literals become key/value pairs in the subject's tooltip / side panel.
  • Provide a UI toggle ("Show literals as nodes") that opts back into the raw triple view for power users.
  • IRI nodes keep their full IRI as a hover tooltip; the displayed label is the local name (after # or last /), or rdfs:label when present.

Lang module

  • ui/src/lang/sparql.ts — wires the legacy SPARQL mode + a hover/completion provider that pulls term definitions from the ontology endpoint. Mirror cypher.ts / cypher-completion.ts / cypher-hover.ts.

API client

  • ui/src/api/ mirrors the Cypher project's API folder: typed wrappers around /translate, /execute, /execute-aql, /validate, /explain, /nl/sparql, /schema/owl, /connect. Use fetch with credentials: "include" and pass through the session token header.

Read the full file on GitHub · 59 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. 7d ago First seen · 59 lines · 0 tokens per session scan A 17cea04ab48e

Subscribe to this mod's changes

400-frontend-ui is a cursor rule published in the GitHub repository arango-solutions/arango-sparql-py (2 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 736 tokens. 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.