query

query is a skill for Claude Code from semantica-agi/semantica. It costs 31 tokens per session (614 once invoked), scanned A, original, MIT.

A command for searching and querying Semantica, a knowledge graph that stores connected entities and relationships. It supports SPARQL, Cypher-like queries, and keyword search.

In plain words
What is it for?
Use it to run structured SPARQL or Cypher-like queries, search by keywords, filter entities by type, and view matching nodes, relationships, paths, and relevance scores.
Why use it?
It provides one way to find graph entities or inspect relationships without writing separate search and graph-query code.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the semantica plugin — 17 skills, 3 agents, 2 hooks shipped together

Good fit Use it to run structured SPARQL or Cypher-like queries, search by keywords, filter entities by type, and view matching nodes, relationships, paths, and relevance scores.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/semantica-agi/semantica/query
About the project

Semantica is an open-source infrastructure layer that turns enterprise data into structured context and knowledge graphs, where ontologies define meaning and graph reasoning connects facts and decisions. It is intended for AI systems and agents that need traceable, governed, and explainable context in high-stakes domains. The catalogue add-ons provide agent workflows, hooks, and plugins for operating Semantica.

semantica-agi/semantica · 14,272 stars · on GitHub · getsemantica.ai

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.

Any agent
npx skills add semantica-agi/semantica --skill query
Clone the repo
git clone --depth 1 https://github.com/semantica-agi/semantica

Made for: Claude Code.

Or install semantica, the plugin that ships this one along with the rest of its 17 skills, 3 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 query

README.md
[![agentmods](https://agentmods.dev/badge/skills/semantica-agi/semantica/query/github.svg)](https://agentmods.dev/skills/semantica-agi/semantica/query)
Your own site
<a href="https://agentmods.dev/skills/semantica-agi/semantica/query"><img src="https://agentmods.dev/badge/skills/semantica-agi/semantica/query/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 query

Your own site · 80×15
<a href="https://agentmods.dev/skills/semantica-agi/semantica/query"><img src="https://agentmods.dev/badge/skills/semantica-agi/semantica/query.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 31 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 614 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00031 $0.00614
Opus 5.5 $0.00012 $0.00246
Sonnet 5.5 $0.00006 $0.00123
Haiku 4.5 $0.00003 $0.00061

Measured 1mo ago against content hash 52381bbffa07, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

query 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 1mo 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.

plugins/skills/query/SKILL.md · 85 lines

How it starts

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

/semantica:query

Query the graph. Usage: /semantica:query <task> [args]

Which API you want depends on where the graph lives.


search "<keywords>" — the in-memory ContextGraph

This is the one that works with no external server.

import os
from semantica.context import ContextGraph

graph = ContextGraph()
graph.load_from_file(os.path.expanduser("~/.semantica/kg.json"))   # load_from_file does not expand ~

results = graph.query("vendor selection", skip=0, limit=20)

Related lookups on the same object:

graph.find_nodes(...)          graph.find_node(...)
graph.find_related_nodes(...)  graph.get_neighbors(node_id)
graph.find_similar_nodes(...)  graph.get_nodes_by_label(label)

Decision-specific queries belong to /semantica:decision.


sparql "<query>" — RDF triple stores

from semantica.triplet_store import TripletStore

store = TripletStore(backend="oxigraph")       # embedded; needs semantica[tripletstore-oxigraph]
# or backend="blazegraph" | "jena" | "rdf4j" with endpoint="http://..."
result = store.execute_query(sparql)

For query planning, optimisation, and caching over a backend:

from semantica.triplet_store import QueryEngine, OxigraphStore

# QueryEngine needs an object exposing execute_sparql() — the raw backend,
# not the TripletStore wrapper above (which only exposes execute_query()).
backend = OxigraphStore()

qe = QueryEngine()
plan   = qe.plan_query(sparql)
tuned  = qe.optimize_query(sparql)
result = qe.execute_query(sparql, store_backend=backend)
stats  = qe.get_query_statistics()

Blazegraph / Jena / RDF4J need no extra — semantica.triplet_store speaks SPARQL over HTTP using the core requests dependency.


cypher "<query>" — labeled property graphs

from semantica.graph_store import Neo4jStore    # needs semantica[graph-neo4j]

store = Neo4jStore(uri=..., user=..., password=...)
result = store.execute_query(query, parameters={...})

Also available: FalkorDBStore, ApacheAgeStore, AmazonNeptuneStore, and GraphManager / GraphStore for backend-agnostic access.

Read the full file on GitHub · 85 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. 1mo ago Changed · +35 lines · +5 tokens per session 52381bbffa07
  2. 1mo ago First seen · 50 lines · 26 tokens per session scan A ff906b009af0

Subscribe to this mod's changes

query is a skill published in the GitHub repository semantica-agi/semantica (14,272 stars, last pushed today), licensed MIT. It adds 31 tokens to every session and 614 once invoked, about $0.0001 per session on Opus 5.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-30.

Related

Other skills, from other repositories

langchain-oracledb-helper

Scaffold a langchain-oracledb store layer — multi-collection OracleVS wrapper, metadata-as-string monkeypatch, embedder-dim assertion, OracleChatHistory subclass (langchain-oracledb does not ship one). Use when a project needs Oracle as its LangChain vector store and chat-history backend.

oracle-devrel/oracle-ai-developer-hub · 72 tokens

build-paths

Top-level router for the build-paths skill set. Asks the user one question (which path?), then dispatches to beginner/, intermediate/, or advanced/. Use when the user wants to scaffold an Oracle-AI-DB project but hasn't picked a difficulty yet.

oracle-devrel/oracle-ai-developer-hub · 57 tokens

data-pipelines

Apply Data Pipelines Pocket Reference practices (James Densmore). Covers Infrastructure (Ch 1-2: warehouses, lakes, cloud), Patterns (Ch 3: ETL, ELT, CDC), DB Ingestion (Ch 4: MySQL, PostgreSQL, MongoDB, full/incremental), File Ingestion (Ch 5: CSV, JSON, cloud storage), API Ingestion (Ch 6: REST, pagination, rate…

booklib-ai/booklib · 241 tokens

knowledge-org

A guide to organising large bodies of knowledge so an AI system can navigate relationships, summaries, and layers instead of searching only flat text chunks. It covers tree indexes, knowledge graphs, file-like structures, incremental updates, and long-term memory layouts.

bojieli/ai-agent-book · 96 tokens

bad-case-to-dpo

A guide to turning failed production agent runs into training and evaluation data. It explains how to find the first mistake, create preference examples for DPO (Direct Preference Optimization), and check that a fix does not damage other tasks.

bojieli/ai-agent-book · 168 tokens

similarity-search-patterns

Implement efficient similarity search with vector databases. Use when building semantic search, implementing nearest neighbor queries, or optimizing retrieval performance.

foryourhealth111-pixel/Vibe-Skills · 30 tokens