query
What it does
This skill searches Semantica knowledge graphs, either in memory or in external RDF or graph databases. It is for people who want to find specific facts and connections in their graph.
When to use it
- ✓When you want to search your knowledge graph for a set of keywords.
- ✓When your graph is stored in an RDF triple store and you need a SPARQL query.
- ✓When your graph lives in a labeled property graph database and needs a Cypher query.
Skill link
https://github.com/semantica-agi/semantica/blob/main/plugins/skills/query/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Can you search my knowledge graph for everything related to vendor selection?”
5 new skills a week. 1 minute to read.
How it works
The agent loads the graph and runs your search across its items, or sends a SPARQL or Cypher query to the database you name. It returns the matching results.
Technical content (original SKILL.md)
Original text by the author, straight from 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.
Not installed in this environment — add the backend extra first, e.g.
pip install "semantica[graph-neo4j]".
FAQ
Do I need a database server for keyword search?
No. Keyword search works on a graph loaded into memory from a file.
What is SPARQL?
It is a query language used for linked-data graphs stored as RDF triples.
Which databases are mentioned?
The skill names the Oxigraph embedded store and other RDF stores such as Blazegraph, Jena and RDF4J.
Details
Original description by the author
Query Semantica knowledge graphs — in-memory ContextGraph search, SPARQL over RDF triple stores, and Cypher over LPG backends.
repo: semantica-agi/semantica
Popularity
- GitHub stars
- 14k
- Ranking position
- #11154
- License
- MIT
- Updated
- 11/2/2026
Comments
- …
More skills from this repository
semantica
14kGives your agent a full toolkit for knowledge graphs, covering extraction, reasoning, provenance, ontologies, policies and exports.
causal
14kHelps your agent trace cause-and-effect links in a knowledge graph, including chains of causes, what-if scenarios and influence scores.
change
14kShows your agent how a knowledge graph looked at an earlier date, and what changed between two dates or two ontology versions.
decision
14kHelps your agent record, search, explain and review decisions in a knowledge graph, from the first note through to its outcome.
Similar skills
discrawl
394kLets your agent search and summarize a saved local archive of Discord messages, check how fresh it is, and read direct messages.
clickhouse-io
280kHelps your agent optimize queries and schemas in ClickHouse databases. It applies best practices for high-performance analytical workloads. Use when analytical queries are too slow.
scientific-db-pubmed-database
280kHelps your agent search for scientific articles in the biomedical field. It's useful for research needing specific medical information.