/semantic-okf:consult-semantic-okffrom semantic-okf
Provides an agent with the general read-only context and local tools needed to navigate and consult an existing Semantic OKF knowledge folder efficiently. Use when Codex needs to discover records, read concepts, choose an authoritative semantic layer, run safe local SELECT or ASK queries, trace provenance, compare sources, or return grounded evidence. This skill never creates, repairs, refreshes, or modifies knowledge.
Ships in semantic-okf. 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.
Navigate and answer from one published Semantic OKF knowledge folder while preserving its revision and evidence boundaries.
SKILL.md, references/, scripts/, and declared Python requirements.semantic/build-report.json plus the declared read artifacts.semantic/records.jsonl before opening large concepts or graphs.semantic/data.ttl only when the question needs joins, traversal, grouping, aggregation, or typed values. Add other graphs only for their declared purpose.concept_path against the selected authoritative layer.Run commands from the directory containing this SKILL.md, or prefix paths with the skill root.
python -m venv .venv
source .venv/bin/activate
On Windows PowerShell, activate the same environment with:
.\./.venv/Scripts/Activate.ps1
Then install and verify with the activated interpreter:
python -m pip install -r scripts/requirements.txt
python scripts/runtime_smoke.py
Keep the environment activated for every command below. CPython 3.12 is the compatibility baseline used to compile the lock; a newer CPython is supported only when runtime_smoke.py passes with the exact locked dependencies.
The bundled Python helper is the supported baseline. rg, external reasoners, and persistent triplestores are optional tools, not package prerequisites. The helper is local and read-only; it does not perform network requests, mutation, entailment, build, refresh, or recovery.
semantic/records.jsonl for exact identifiers, source filters, record types, mapped attributes, counts, and literal artifact paths.concepts/ Markdown collections with fixed-string search for lexical discovery and human reading; use the ledger body when one exact packed record is required.semantic/data.ttl for accepted domain facts and semantic operations.ontology.ttl only for reviewed schema questions.provenance.ttl only for lineage or physical-source questions.shapes.ttl for declared constraints and validation-report.ttl for validation outcomes; never present either as ordinary domain facts.Do not union all graphs by default. Use entailment none unless a separately declared reasoner workflow is part of the request.
python scripts/query_semantic_okf.py BUNDLE ledger \
--source-id papers --type "Research Paper" --all --format json
python scripts/query_semantic_okf.py BUNDLE ledger \
--contains "retrieval strategy" --show-content --format json
python scripts/query_semantic_okf.py BUNDLE sparql \
--query-file PATH_TO_DATA_QUERY.rq --graph data --format json
python scripts/query_semantic_okf.py BUNDLE sparql \
--query-file PATH_TO_LINEAGE_QUERY.rq --graph data --graph provenance --format json
Replace each PATH_TO_*_QUERY.rq placeholder with a query file you create outside the immutable bundle. No queries/ directory or example query asset is supplied by this package.
Use --validate to parse the complete read surface before consultation. This verifies the ledger, exact concept paths, semantic plan, and local Turtle graphs. It is a read-only integrity check, not a repair operation.
Work breadth before depth. Convert the request into a clause checklist and build a source-by-clause-by-dimension ledger from one batched query. Count a source only when a selected claim directly supports a requested clause. Meet the independent-source minimum with verified relevant sources before reading any one source deeply.
Copy stable logical locators verbatim from ledger concept_path values. Never reconstruct hashes, shorten generated names, use wildcard paths, or substitute a topic-adjacent source for a relevant one. The helper resolves a logical locator to its own Markdown file or the source collection declared by the build layout. Keep source IDs, cited pages, and evidence paths aligned.
Read cross-source-synthesis.md only when the request needs multi-source comparison or a strict evidence contract. Its optional helpers remain local and read-only.
Before returning an answer, confirm:
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/_consult_semantic_okf.py (opens in a new tab)scripts/_cross_source.py (opens in a new tab)scripts/prepare_cross_source_evidence.py (opens in a new tab)scripts/query_semantic_okf.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)scripts/validate_cross_source_answer.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub gvillarroel/plugins --plugin semantic-okf16 skills in this plugin
/build-semantic-okfBuilds and maintains a Semantic OKF source definition and its generated knowledge folder with deterministic Python adapters for Markdown, CSV, JSON or JSONL, and RDF. Use when Codex needs to create or change a manifest, source topology, mapping, ontology, validation rule, generated snapshot, refresh, promotion, rollback, or recovery. This skill owns construction and maintenance only; it does not answer questions from the generated knowledge./build-semantic-okf-adaptiveBuilds and independently validates an atomic Semantic OKF/RDF snapshot plus a deterministic adaptive retrieval projection for arbitrary declared sources. Use when Codex needs a standalone offline builder that combines Bag of Words, BM25, topic communities, a PPMI term graph, query-aspect routing, diversified reranking, and exact evidence bindings without changing authoritative records or requiring embeddings. This skill owns construction only and never answers from a published snapshot./build-semantic-okf-classicalBuilds and independently validates an atomic Semantic OKF/RDF snapshot plus a deterministic, non-authoritative classical text-retrieval projection. Use when Codex needs Bag of Words, Okapi BM25, corpus lexical statistics, co-occurrence topic communities, PPMI query expansion, or diversity-aware retrieval without embeddings or model downloads. This standalone skill owns construction only and never answers from a published snapshot.