semantic-trap-detector

Analyze SKILL.md files to detect semantic traps and generate structured JSON reports.

25|3|Updated Mar 8, 2026
One-click install
npx skills add https://github.com/Jumbo-WJB/semantic-trap-detector --skill semantic-trap-detector
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: semantic-trap-detector
Source: https://github.com/Jumbo-WJB/semantic-trap-detector/tree/main
Command: npx skills add https://github.com/Jumbo-WJB/semantic-trap-detector --skill semantic-trap-detector

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Detect and fix semantic traps that cause LLM hallucinations in Claude Skills, enabling safer, more reliable prompt engineering and skill development.

Core Features & Use Cases

  • Automated detection of semantic traps in Skill files
  • Risk classification into high/medium/low
  • Replacement suggestions and boundary anchoring strategies
  • Structured JSON reports for CI/CD and auditing
  • Use Case: Develop and optimize Claude Skills with measurable risk reduction

Quick Start

Run semantic-trap-detector against a SKILL.md to generate a structured JSON report.

Frequently Asked Questions about semantic-trap-detector

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect semantic traps in Claude Skills to prevent LLM hallucinations?

Detecting semantic traps involves analyzing a SKILL.md file to identify risky phrasing that causes LLM hallucinations. This skill performs context-aware matching against a lexicon to classify risks and provide actionable replacement guidance.

How do I generate a structured JSON report for prompt engineering validation in a CI/CD workflow?

You can generate a structured JSON report for CI/CD validation by running this detector against your SKILL.md. It outputs a comprehensive report containing a summary, per-item risk details, concrete replacements, and boundary anchoring strategies.

What is a semantic trap in prompt engineering and how does it affect LLM reliability?

A semantic trap is misleading phrasing within a prompt that increases the likelihood of LLM hallucinations. Detecting these traps using a dedicated lexicon allows developers to replace risky terms and anchor boundaries, significantly improving LLM reliability.

Can I use semantic trap detection for optimizing existing Claude Skills?

Yes, semantic trap detection is applicable during Skill creation and optimization. By analyzing existing SKILL.md files, it classifies risks into high, medium, and low categories and provides concrete replacements to improve reliability.

What is the best way to classify prompt risks and provide replacement suggestions for LLM safety?

The best way to classify prompt risks for LLM safety is through automated context-aware matching against a lexicon. This approach categorizes risks by severity and generates actionable replacement and boundary anchoring recommendations.

Why does my Claude Skill produce inconsistent outputs and how can I fix the semantic risks?

Inconsistent outputs frequently stem from semantic traps within SKILL.md files that trigger hallucinations. Fixing these semantic risks involves identifying problematic keywords, classifying their risk level, and applying boundary anchoring strategies to stabilize behavior.