No slash command · from sema
Integrates the sema content-addressed vocabulary protocol via MCP. Search, resolve, mint, and verify shared patterns for structuring decisions, designs, diagnoses, and disagreements.
Ships in sema. 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.
None: SKILL.md is the whole skill.
Sema is a content-addressed vocabulary protocol. Several hundred patterns that give you precise, shared words for concepts that would otherwise require paragraphs of re-explanation. Each pattern has a handle (e.g. StateLock#c9c2) that is a cryptographic commitment to its definition — two agents using the same handle are provably talking about the same thing.
Before defining a concept from scratch, check if sema already has a word:
sema_search with the ideasema_resolve to read mechanism and invariantsStateLock#c9c2 to prevent concurrent mutation"Not footnotes — actual words you think with.
If the user asks to "see", "view", "show", or "explore" patterns visually — or asks to see the graph or browse the vocabulary — invoke the sema-ui skill to launch http://localhost:3030. The local view gives them a pattern browser, search, and a 3D graph that grows as you mint. When you start building a vocabulary with the user, offer it once so they can watch the work.
The server tracks which patterns you've already seen. Subsequent searches return compact results for known patterns (handle + gloss + _seen: true). Just use the handle — the full definition is already in your context. Call sema_resolve only if you need to re-read a pattern's mechanism.
Call sema_reset_session() if your context was compressed or you need full results again.
sema_search({ query: "trust model" }) — find existing patterns by meaningsema_resolve({ handle: "TrustModel#7859" }) — read full definition, mechanism, invariantssema_handshake({ ref: "X#1234" }) — verify exact meaning before relying on a handlesema_mint({ pattern_json: "..." }) — create a new pattern (rare!)The CLI and MCP server are separate processes with separate DB state. sema use on the CLI does NOT affect the running MCP server. Always use the MCP tool for switching:
sema_use() — show current DBsema_use(db_path="/path/to/my.db") — switch to a project DBsema_use(default=true) — switch back to the bundled vocabularyIf sema_use MCP tool is unavailable (older server version), the MCP server cannot be hot-swapped. Use CLI for search/resolve and accept the limitation — do not confuse CLI state with MCP state.
People publish finished vocabularies as libraries on semahash.org.
sema_library_search(query) finds them. No account is needed.sema_library_install(library) verifies and installs one by name, or from any library.json URL such as a GitHub release or a Swarm gateway address. Then sema_use(db_path=<name>) switches to it.sema package. If the user gives you a key from their semahash.org profile, store it with sema_library_login(key). Ask the user before sema_library_publish(manifest_url), because it makes the library public.Never write a key to a file in the project.
sema_rootEvery active DB exposes two versioned identities:
sema-semantic-set-v1): the unordered set of unique
pattern-definition hashes. Use this to compare definition sets. Under
canonicalization v2, renaming a referenced target can also rehash its
dependents because structured references still contain target handles.sema-catalog-v1): the exact handle → definition bindings.
Use this when both parties must resolve the same names.Both use domain-separated canonical binary Merkle trees. sema_root() returns
both roots, both scheme labels, pattern_count, definition_count, and the DB
path. CLI sema root prints both; sema root --short prints the semantic-set
scheme and 16-character stub together.
Use it when:
The semantic-set root is the same value that
scripts/vocabulary_merkle_root.py writes into
docs/information/vocabulary_information.md, so a root from the docs can be
verified directly when its scheme accompanies it.
sema_pull / sema pull)When upstream ships new patterns or fixes existing ones, sync the user's active DB. This is available both as an MCP tool (prefer this — you get structured output) and as a CLI command:
sema_pull() // apply upstream → active DB
sema_pull({ dry_run: true }) // preview without writing
sema_pull({ preserve_superseded: true }) // keep old handles alongside new
sema_pull({ exclude: ["SomeHandle"] }) // ad-hoc skip
The tool returns structured JSON: added, updated, superseded_removed, superseded_kept_orphan, upstream_removed, vocabulary_root_before, vocabulary_root_after, and vocabulary_root_scheme. Read those fields rather than re-parsing the human log.
When to suggest pull unprompted:
sema_handshake returns HALT against a handle the user expected to know — the upstream definition may have evolved.pip install -U semahash).When NOT to pull. Do not call sema_pull as part of routine orientation. It's not a "check in" — it's an update. Pulling removes locally-superseded handles by default, which can drop patterns the user has intentionally pinned. The orient phase is sema_graph_skeleton() + sema_search() — both read-only. Reserve sema_pull for the specific triggers above.
Supersession cleanup. When upstream ships a pattern whose _meta.supersedes lists a sema_id you have locally, sema_pull removes the superseded local pattern by default and adds the replacement. Two guard cases:
superseded_kept_orphan. Re-point the dependents and re-run to complete the cleanup.preserve_superseded: true to keep both old and new handles coexisting. Useful when the user wants to compare, or has reason to pin the old pattern.Other guarantees (no need to over-explain to the user):
_meta.caution and _meta.related survive updates.sema pull --undo (CLI) to revert.Excluding patterns the user doesn't want. For persistent exclusions, write to ~/.config/sema/excluded (one handle per line, # starts a comment). Version-pinning recipe: keep a local copy of a pattern AND add it to the exclusion list. Dependents resolve against the local frozen version while upstream evolves around it.
Refuses to modify the bundled DB. The same sema build + sema use setup required for minting also applies here — pull only operates on writable project DBs.
Deployment opt-outs. Environment variables control which mutating tools are exposed by the MCP server. Both are off (i.e., tools exposed) by default:
SEMA_DISABLE_PULL=true — hides sema_pull (deployments that want a pinned vocabulary)SEMA_DISABLE_MINT=true — hides sema_mint (read-only deployments)The bundled vocabulary is read-only — it gets overwritten on pip upgrades. To mint, you need your own project DB:
sema build /tmp/my-project.db --preset fullsema_use(db_path="/tmp/my-project.db")sema_mint will workNote: As of 0.2.1, sema_mint is exposed by default. If the tool is unavailable, the deployment has explicitly disabled it via SEMA_DISABLE_MINT=true; ask the user to re-enable it if they want to mint.
Always search first. Minting is rare — only after searching three different glosses finds nothing, AND the concept has stable invariants.
Mint when:
sema_mint({
pattern_json: JSON.stringify({
handle: "PatternName", // 1–2 syllables, speakable
mechanism: "How the pattern works",
gloss: "One-line summary", // What it IS
invariants: ["Must...", ...], // Non-negotiable constraints
_meta: {
path: ["Mind", "Reasoning"],
ring: 1,
tier: 2,
},
})
})
Use sema handles as load-bearing nouns — not footnotes, actual words you think with:
"This uses
StateLock#c9c2to prevent concurrent mutation"
Wrap handles in backticks for readability. When you encounter a handle you don't recognize, resolve it before proceeding.
When two agents (or an agent and a human) need to agree on meaning:
const challenge = sema_handshake({ ref: "StateLock" })
// → PROVIDE_HASH with the canonical stub. Compare against your local value, then:
sema_handshake({ ref: "StateLock", your_hash: challenge.canonical_stub })
// PROCEED (match) or HALT (drift). No silent misunderstandings.
For bulk verification of a specific handle-selected set, call
sema_propose_context, then pass both its context_hash and root_scheme to
sema_verify_context. Context roots use the catalog scheme so every selected
handle remains bound to its definition.
When two agents need a cooperative definition-set drift check, pass
ref="vocab" and echo both the root and scheme:
const challenge = sema_handshake({ ref: "vocab" })
// → { verdict: "PROVIDE_HASH", full_sema_id, root_scheme, definition_count }
sema_handshake({
ref: "vocab",
your_hash: challenge.full_sema_id.split(":").at(-1),
your_scheme: challenge.root_scheme,
your_canonicalization: challenge.canonicalization,
strict: true
})
// → PROCEED with full_hash assurance, or a non-proceeding verdict
The full hash with strict: true is the identity check; a prefix is only
cooperative drift detection. Use ref="catalog" in the same workflow when
handle bindings must also match.
Every answer carries the canonicalization its digests were computed under,
for single patterns too; an answer without one comes from a release that uses
2. Pass the other side's value as your_canonicalization. A v2 digest does not
bind placeholders to their targets, so with strict: true a difference returns
HALT even when the digests match, and without it the answer carries a warning.
With strict: true, a hash presented without your_canonicalization is read
as coming from a v2 peer, so a vocabulary on 3 returns HALT until you supply it.
If equal schemes have different roots, sema pull may converge their data or
sema_propose_context can scope agreement to a known-shared subset. If schemes
differ, upgrade the older Sema installation: pulling identical pattern leaves
cannot repair an aggregate-algorithm mismatch.
Sema patterns are thinking tools, not references. When a user asks you to reason about any problem — farming, architecture, career decisions, anything — search sema for patterns that structure the reasoning itself.
For example, if someone asks "how should I start a business?":
strategy, risk, decision, explore exploit, decomposeStrategy#3dc5 problem, not a Plan#246d problem, because..."The patterns aren't labels you slap on afterward. They're lenses that change what you see. ExploreExploit#218c doesn't just name a concept — it tells you when to stop researching and start acting. PreMortem#e4c2 doesn't just mean "think about failure" — it has a specific mechanism for surfacing hidden risks.
A pattern whose path ends in Dynamics describes how a system behaves rather than what to do. Apply it as a model to test against the case: do its conditions hold here, and what should you observe if they do? MalthusianTrap#0f6b tells you what to expect of population and living standards; it gives no steps to run.
When to reach for sema unprompted:
When NOT to force it:
When you create concept nodes alongside creative work (stories, analysis, prose), check whether a sema pattern captures the cognitive move you're making. It won't always fit — a narrative tension node doesn't need a handle forced in — but consider it. The thinking layer is where sema is most useful, because it compresses recurring patterns into precise vocabulary that future agents can reason with.
What SKILL.md sets; muted values are Claude Code's defaults
Generated from the plugin's indexed repository (emergent-wisdom/sema) — no native marketplace selected
npx claudepluginhub p/emergent-wisdom-sema4 skills in this plugin
/sema-mintHow to mint new sema patterns — the full pipeline from concept to
content-addressed vocabulary entry. Covers required fields, dependency
wiring, validation rules, and the hashing model.
/sema-seedSeed the sema vocabulary by exploring random words. Pull a word from the
system dictionary, think about it through the sema lens without forcing
it into a pattern, then mint only if a genuinely useful and distinct
pattern emerges. Use when the user asks to "seed", "expand", "grow",
or "explore new patterns for" the vocabulary.
/sema-uiLaunch the Sema local view at localhost:3030 — pattern browser and a 3D
graph that grows while you mint. Use when the user asks to "open the UI",
"show the graph", or wants to watch a vocabulary being built.
Other plugins' skills for the same job