semaphore-classification-tuning

semaphore-classification-tuning is a skill for Claude Code from tternquist/marklogic-mcp. It costs 117 tokens per session (1,789 once invoked), scanned A, original, MIT.

A troubleshooting guide for Semaphore, a MarkLogic tool that classifies content using concepts and scores. It covers ways to adjust labels, thresholds, and shared scoring templates.

In plain words
What is it for?
Use it to investigate false matches, missed matches, weak or uniform scores, missing hierarchy results, noisy related terms, short-text problems, ignored titles, and overly broad links.
Why use it?
It helps identify whether bad matches come from one concept or from scoring rules used across the whole model, and shows how to apply and verify changes.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

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-classification-tuning
Any agent
npx skills add tternquist/marklogic-mcp --skill semaphore-classification-tuning
Clone the repo
git clone --depth 1 https://github.com/tternquist/marklogic-mcp

Made for: Claude Code.

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-classification-tuning

README.md
[![agentmods](https://agentmods.dev/badge/skills/tternquist/marklogic-mcp/semaphore-classification-tuning.svg)](https://agentmods.dev/skills/tternquist/marklogic-mcp/semaphore-classification-tuning)
Your own site
<a href="https://agentmods.dev/skills/tternquist/marklogic-mcp/semaphore-classification-tuning"><img src="https://agentmods.dev/badge/skills/tternquist/marklogic-mcp/semaphore-classification-tuning.svg" alt="Measured on agentmods" height="20"></a>
Per session 117 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,789 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.1 $0.00117 $0.01789
Opus 5 $0.00059 $0.00894
Sonnet 5 $0.00023 $0.00358
Haiku 4.5 $0.00012 $0.00179

Measured 6d ago against content hash eebf05b943d2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

semaphore-classification-tuning 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 6d 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-classification-tuning/SKILL.md · 139 lines

How it starts

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

Semaphore Classification Tuning

The three fix levels — always try them in order

Level Tool Scope Use when
1. Labels semaphore_concept_labels_update one concept a specific concept fires wrongly or misses
2. Threshold semaphore_classify(threshold=…) one query exploring precision/recall without changing the model
3. Template semaphore_kid_template_set every concept the same scoring problem affects all concepts

The decisive question: is the problem with one concept or with scoring behaviour?

A .kid template applies identically to every concept in the model — a weight change moves all concepts equally. That makes it the right fix for systemic problems and the wrong fix for a misbehaving concept.

Practical trigger for reaching for level 3: you find yourself wanting to make the same label edit to many concepts for the same reason. That reason is a scoring behaviour that belongs in the template.

Every change at any level requires semaphore_publish before it takes effect, then semaphore_classify to verify.

Symptom → action

Full step-by-step playbooks for all eight symptoms are in references/symptom-playbooks.md. Summary:

Symptom Most likely cause First move
false_positives over-broad altLabel; nearlist on scattered words inspect labels (semaphore_concept_get)
missing_matches missing synonyms; threshold too high add altLabels; drop threshold to 0 to see raw scores
score_too_uniform evidence types weighted too evenly raise phraselist_weight, lower nearlist_weight
hierarchy_not_firing lower_hierarchy_weight too low, or no skos:broader links verify hierarchy exists, then preset=hierarchy_heavy
nearlist_noise multi-word labels matching scattered constituents lower nearlist_weight, or preset=precision
short_text_poor default weights assume long documents preset=short_text
zone_ignored no zone-biasing configured set title_weight / body_weight
associative_overfiring related-concept score propagation associative_cap=0

Read the full file on GitHub · 139 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. 6d ago First seen · 139 lines · 117 tokens per session scan A eebf05b943d2

Subscribe to this mod's changes

semaphore-classification-tuning is a skill published in the GitHub repository tternquist/marklogic-mcp (3 stars, last pushed 15d ago), licensed MIT. It adds 117 tokens to every session and 1,789 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

sensitive-logging-audit

Audit and fix sensitive-data exposure through Python runtime logging in openai-agents-python. Use when reviewing logging, print, warnings, stderr, traceback, MCP names, model or tool exceptions, redaction flags, or any diagnostic path that may retain user data.

openai/openai-agents-python · 59 tokens

spark-optimization

Optimize Apache Spark jobs with partitioning, caching, shuffle optimization, and memory tuning. Use when improving Spark performance, debugging slow jobs, or scaling data processing pipelines.

wshobson/agents · 37 tokens

notebooklm

Install, authenticate, troubleshoot, and operate Gemini Notebook through the notebooklm-py CLI or typed async Python API. Use for notebook and source management, grounded chat and research, and artifact generation or download when the user mentions Gemini Notebook, notebooklm-py, the notebooklm CLI, or its Python API.…

teng-lin/notebooklm-py · 79 tokens

debug-inference

Debug why inference.local, direct external inference, or supervisor-only system inference is failing. Use when the user cannot reach a local model server, has provider base URL issues, sees inference verification failures, hits protocol mismatches, or needs to diagnose inference on local vs remote gateways. Trigger…

NVIDIA/OpenShell · 114 tokens

oh-my-posh

Install, configure, or troubleshoot Oh My Posh/ohmyposh: shell init, themes, segments, Nerd Font icons, and prompt setup on PowerShell, zsh, bash, or fish.

JanDeDobbeleer/oh-my-posh · 47 tokens

eagle3-triage

Triage a failed EAGLE3 pipeline run. Identifies which step failed (data synthesis, hidden state dump, training, or benchmark), diagnoses root cause from logs, and suggests fixes. Use when user reports an EAGLE3 pipeline failure or asks why a specific step failed. Also helps debug new model support issues.

NVIDIA/Model-Optimizer · 73 tokens