/semantic-search:consult-semantic-okf-tursofrom semantic-search
Provides an agent with read-only local tools and context to inspect, filter, query, compare, and cite an existing Turso-backed Semantic OKF knowledge database. Use when Codex needs exact record discovery, concept reading, attribute filters, SQL joins or aggregation, RDF statement traversal, provenance tracing, cross-source synthesis, schema inspection, or grounded answers from semantic/knowledge.db. This skill never builds, repairs, refreshes, synchronizes, or modifies knowledge.
Ships in semantic-search. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Answer from one published knowledge.db using local Turso Database queries while preserving revision, source, graph, and evidence boundaries.
SKILL.md, references/, scripts/, and declared Python requirements.pyturso, and require PRAGMA query_only=1 before any consultation query.SELECT, WITH, or EXPLAIN statement in raw SQL mode. Reject mutation, transaction, attachment, extension, and file-access surfaces.verify command once for the database revision used as evidence.stats or schema only when the source or column surface is not yet known.records for exact identifiers, source filters, types, typed attributes, lexical discovery, and concept content.triples --graph data or read-only SQL over rdf_statements for traversal and semantic joins. Select ontology or provenance explicitly when required.artifact for the stored semantic plan, source manifest, ontology, shapes, or validation report.concept_id, concept_path, source_id, and source_path evidence.Run from this skill directory, or prefix every path with the skill root.
python -m venv .venv
source .venv/bin/activate
python -m pip install -r scripts/requirements.txt
python scripts/runtime_smoke.py
On Windows PowerShell, activate with .\./.venv/Scripts/Activate.ps1. If pyturso is unavailable, return the runtime diagnostic. Do not fall back to sqlite3 or legacy libsql, because that would bypass the declared engine contract.
Place the global --validate flag before the subcommand.
python scripts/query_turso_knowledge.py semantic/knowledge.db verify --format json
python scripts/query_turso_knowledge.py semantic/knowledge.db stats --format json
python scripts/query_turso_knowledge.py semantic/knowledge.db records \
--source-id papers --type "Research Paper" --all --format json
python scripts/query_turso_knowledge.py semantic/knowledge.db records \
--contains "retrieval strategy" --show-content --limit 10 --format json
python scripts/query_turso_knowledge.py semantic/knowledge.db records \
--attribute status '"active"' --format paths
--show-body returns normalized record body text. --show-content returns the complete stored concept Markdown. Prefer the latter when evidence depends on frontmatter or exact concept text.
python scripts/query_turso_knowledge.py semantic/knowledge.db triples \
--graph data --predicate https://example.org/ontology/status \
--object active --format json
python scripts/query_turso_knowledge.py semantic/knowledge.db triples \
--graph provenance --subject SUBJECT_IRI --all --format json
Do not union graph names by default. data contains accepted domain statements, ontology contains reviewed schema, and provenance contains lineage. Shapes and validation reports are stored as artifacts and are never ordinary domain facts.
Write complex queries in a file outside the immutable database directory and bind values as JSON parameters:
python scripts/query_turso_knowledge.py semantic/knowledge.db sql \
--query-file query.sql \
--param source='"papers"' \
--param minimum=3 \
--format json
Inline example:
python scripts/query_turso_knowledge.py semantic/knowledge.db sql \
--query "SELECT concept_type, COUNT(*) AS records FROM records GROUP BY concept_type ORDER BY records DESC" \
--format json
Use explicit aliases so every result column name is unique. The helper caps output unless --all is intentional. It enforces both SQL screening and Turso's connection-level query-only mode.
Before returning an answer, confirm:
concept_id, concept_path, source, locator, and supporting value exists in the returned database rows;agents/openai.yaml (opens in a new tab)references/cross-source-synthesis.md (opens in a new tab)references/querying.md (opens in a new tab)references/source-boundaries.md (opens in a new tab)scripts/_turso_read.py (opens in a new tab)scripts/query_turso_knowledge.py (opens in a new tab)scripts/requirements.in (opens in a new tab)scripts/requirements.txt (opens in a new tab)scripts/runtime_smoke.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
12 skills in this plugin
/build-semantic-okf-rust-malletBuilds and independently validates an atomic Semantic OKF/RDF snapshot plus a non-authoritative retrieval projection with RustMallet sparse-Gibbs LDA, Bag of Words, Okapi BM25, PPMI query expansion, and diversity-aware reranking. Use when Codex needs fixed-seed probabilistic topics without embeddings or hosted model calls, or needs to compare RustMallet against deterministic classical topic communities. This standalone skill owns construction only and never answers from a published snapshot./build-semantic-okf-rust-mallet-evolvedBuilds and independently validates an atomic Semantic OKF/RDF snapshot plus a non-authoritative retrieval projection with RustMallet sparse-Gibbs LDA, Bag of Words, Okapi BM25, PPMI query expansion, and diversity-aware reranking. Use when Codex needs fixed-seed probabilistic topics without embeddings or hosted model calls, or needs to compare RustMallet against deterministic classical topic communities. This standalone skill owns construction only and never answers from a published snapshot.Other plugins' skills for the same job
/build-semantic-okf-tantivyBuilds and independently validates an atomic Semantic OKF/RDF snapshot plus the deterministic, non-authoritative classical projection consumed by the frozen Tantivy BM25 consultant. Use when Codex must construct, reproduce, diagnose, or optimize a snapshot specifically for consult-semantic-okf-tantivy without modifying the frozen consultation skill. This standalone skill owns construction only and never answers from a published snapshot.npx claudepluginhub gvillarroel/plugins --plugin semantic-search