semaphore-integration

semaphore-integration is a skill for Claude Code, Codex from tternquist/marklogic-mcp. It costs 110 tokens per session (1,762 once invoked), scanned A, original, MIT.

A guide for connecting Semaphore, a content-classification service, with MarkLogic, a document database. It covers several ways to classify documents while loading them or after they are stored.

In plain words
What is it for?
Use it to classify documents during import, enrich stored documents later, classify through a REST transformation, or add classification to a Data Hub Framework pipeline.
Why use it?
It helps choose an integration design that fits new data, existing documents, multiple sources, or entity matching. It also highlights connectivity and configuration issues.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/tternquist/marklogic-mcp/semaphore-integration
Any agent
npx skills add tternquist/marklogic-mcp --skill semaphore-integration
Clone the repo
git clone --depth 1 https://github.com/tternquist/marklogic-mcp

Made for: Claude Code, Codex.

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 semaphore-integration

README.md
[![agentmods](https://agentmods.dev/badge/skills/tternquist/marklogic-mcp/semaphore-integration.svg)](https://agentmods.dev/skills/tternquist/marklogic-mcp/semaphore-integration)
Your own site
<a href="https://agentmods.dev/skills/tternquist/marklogic-mcp/semaphore-integration"><img src="https://agentmods.dev/badge/skills/tternquist/marklogic-mcp/semaphore-integration.svg" alt="Measured on agentmods" height="20"></a>
Per session 110 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,762 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00110 $0.01762
Opus 5 $0.00055 $0.00881
Sonnet 5 $0.00022 $0.00352
Haiku 4.5 $0.00011 $0.00176

Measured 4d ago against content hash 6946b4fcee3e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

semaphore-integration 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 4d 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.

.claude/skills/semaphore-integration/SKILL.md · 150 lines

How it starts

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

Semaphore + MarkLogic Integration

Choose a pattern

Pattern How it works Best for
A. Ingest + classify (preferred for new pipelines) Flux calls the CLS inline via --classifier-* flags; categories written at ingest new data pipelines; no raw/enriched split needed
B. Reprocess + enrich Documents already loaded; an SJS transform calls the CLS via xdmp.httpPost() and patches each doc, parallelised by Flux legacy data; adding Semaphore to an existing deployment
C. Transform on ingest A REST transform maps raw→canonical and classifies in one step; Flux passes --transform <name> simultaneous mapping and classification
D. DHF pipeline Ingestion → Mapping → custom Semaphore step → optional Mastering multiple sources; STAGING/FINAL split; entity mastering

Default to Pattern A. It runs outside MarkLogic, so it sidesteps the outbound-HTTP restrictions that make B fragile (see the network note below).

Configuration

CLS (Classification Server) — required for classification:

  • SEMAPHORE_HOST, optionally SEMAPHORE_SCS_PORT (default 5058)
  • or SEMAPHORE_URL=http://<host>:<port> for an explicit override
  • no authentication by default
  • verify with semaphore_status

KMM (Knowledge Model Manager / Studio) — required for taxonomy authoring:

  • SEMAPHORE_USERNAME and SEMAPHORE_PASSWORD — KMM uses Java EE form auth, not Basic auth, so these are a separate credential path from the CLS
  • SEMAPHORE_KMM_PORT (default 5080)
  • verify with semaphore_studio_status

If semaphore_classify works but semaphore_kmm_* fails, the problem is almost always these KMM-specific settings, not the CLS.

Discovery before designing

  1. semaphore_publish_sets — which taxonomy rule sets are loaded and active in the CLS
  2. semaphore_classes — classification class names (taxonomy domain names)
  3. semaphore_classify with a sample snippet and threshold=0 — validate real output

If no rule sets are loaded, use semaphore_kmm_model_create + semaphore_kmm_skos_load to import a vocabulary, then publish. The full authoring workflow — including the mandatory SKOS-XL reification step — is in the semaphore-taxonomy skill.

Read the full file on GitHub · 150 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 4d ago First seen · 150 lines · 110 tokens per session scan A 6946b4fcee3e

Subscribe to this mod's changes

semaphore-integration is a skill published in the GitHub repository tternquist/marklogic-mcp (3 stars, last pushed 13d ago), licensed MIT. It adds 110 tokens to every session and 1,762 once invoked, about $0.0006 per session on Opus 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-31.

Related

Other skills, from other repositories

schema-exploration

Lists tables, describes columns and data types, identifies foreign key relationships, and maps entity relationships in a database. Use when the user asks about database schema, table structure, column types, what tables exist, ERD, foreign keys, or how entities relate.

langchain-ai/deepagents · 57 tokens

agent-platform-rag-engine-management

Manage and query Agent Platform RAG Engine Corpora and retrieve grounded contexts using the Google GenAI SDK. Use when listing RAG corpora or files, inspecting a corpus, retrieving contexts, or generating content grounded in a RAG corpus. Do not use for standard database queries (use SQL/Spanner skills), Google…

google/skills · 85 tokens

deploy-docker-compose

Run the Omnigent server as a Docker compose stack (server + Postgres) on any Docker host — your laptop, a VPS, EC2 by hand, or as the base layer of any container-platform deploy. Invoke when the user wants to build the image, bring up the compose stack, debug the stack on a host they already have, or extend the stack…

omnigent-ai/omnigent · 84 tokens

moderator-page-migration

Port a moderator page from the main Next.js app (src/pages/moderator/) into apps/moderator. Use when asked to migrate, move or cut over a /moderator/ page to the spoke, or to port its tRPC procedures and Prisma services to SvelteKit loads/actions and Kysely.

civitai/civitai · 71 tokens

dsql

Build with Aurora DSQL — manage schemas, execute queries, handle migrations, diagnose query plans, diagnose cluster performance, load data, and develop applications with a serverless, distributed SQL database. Covers IAM auth, multi-tenant patterns, MySQL-to-DSQL and PostgreSQL-to-DSQL schema conversion, foreign key…

awslabs/agent-plugins · 229 tokens

sql-translate

Translate SQL queries between database dialects (Snowflake, BigQuery, PostgreSQL, MySQL, etc.).

AltimateAI/altimate-code · 26 tokens