semantic-analyzer

semantic-analyzer is a skill for Claude Code from SummerSec/SumSec-Skills. It costs 52 tokens per session (1,474 once invoked), scanned A, original, Apache-2.0.

An in-depth reviewer for instructions given to language models, looking for vague wording and combinations of terms that may broaden the result.

In plain words
What is it for?
Use it for deep reviews of Skills, prompts, or agent instructions when a quick scan is not enough.
Why use it?
It catches wording problems that a fixed list of known terms or simple rules may miss.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the semantic-linter plugin — 4 skills, 3 commands shipped together

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/summersec/sumsec-skills/semantic-analyzer
Any agent
npx skills add SummerSec/SumSec-Skills --skill semantic-analyzer
Clone the repo
git clone --depth 1 https://github.com/SummerSec/SumSec-Skills

Made for: Claude Code.

Or install semantic-linter, the plugin that ships this one along with the rest of its 4 skills, 3 commands.

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 semantic-analyzer

README.md
[![agentmods](https://agentmods.dev/badge/skills/summersec/sumsec-skills/semantic-analyzer.svg)](https://agentmods.dev/skills/summersec/sumsec-skills/semantic-analyzer)
Your own site
<a href="https://agentmods.dev/skills/summersec/sumsec-skills/semantic-analyzer"><img src="https://agentmods.dev/badge/skills/summersec/sumsec-skills/semantic-analyzer.svg" alt="Measured on agentmods" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,474 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.00052 $0.01474
Opus 5 $0.00026 $0.00737
Sonnet 5 $0.00010 $0.00295
Haiku 4.5 $0.00005 $0.00147

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

Security

Grade A, and why

semantic-analyzer 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 2d 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.

semantic-linter/skills/semantic-analyzer/SKILL.md · 101 lines

How it starts

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

指令语义深检(第 3 层)

利用 Claude 对语义的模型侧推理,对 Skill / Prompt / Agent 指令做第三层审阅:找出词典未收录、仍可能拉宽输出边界的用词与句式。

定位:与 Hook 检测的关系

层级 机制 速度 覆盖面
第 1 层:词典匹配 Hook,已知词对 毫秒级 固定
第 2 层:结构规则 Hook,固定模式 毫秒级 固定
第 3 层:语义深检 本 Skill,按需 秒级 动态

Hook 覆盖已入库的 wide 词;本 Skill 补未入库项与语境叠加。

Gotchas

  • 模板与 fenced 示例(如 STEP 2b 代码块内的演示词)仅用于说明维度,勿原样复制进生产 Skill;本仓库会对 plugin/skills/ 下 Markdown 跑 linter。
  • 四维打分带主观性;是否收录词典须与用户对齐。
  • 收录新词:仅允许改 references/semantic-trap-lexicon.mdnpm run build-lexiconnpm test禁止lexicon-data.js 当手写主路径。
  • 已知 wide 词以 require('./lib/lexicon-data.js')wideWordsZh / wideWordsEn(或 zhPairs / enPairs)为准做去重。

语义陷阱的四个判定特征

  1. 程度性 vs 二元性:陷阱词偏程度连续;安全词偏是否、通过/不通过。
  2. 展望性:「潜在」「可能」等拉远时间轴。
  3. 主观判定性:依赖评判者标准。
  4. 语义发散度:联想网大、难收敛。

原理:满足特征越多,边界越宽,越易突破 Prompt 约束。

工作流

STEP 1:获取目标文本与已知词典

  • 文本来源:用户粘贴、给定路径、或当前编辑中的指令文件。
  • 已知词典:在仓库根下执行
    const lex = require('./lib/lexicon-data.js')
    使用 lex.wideWordsZhlex.wideWordsEn 判断某 surface 是否已登记为 wide;已登记则本层不再重复展开(Hook 已覆盖)。

STEP 2:逐句深度语义扫描

对每句有实质内容的正文(跳过标题、代码块、空行):

2a. 提取关键词:动作指令词、目标对象词、约束修饰词、输出形态词。

2b. 四维评分(0–3 / 维)

词汇: "优化"
┌──────────────┬───────┬──────────────────────────────────┐
│ 特征维度     │ 评分  │ 判定理由                          │
├──────────────┼───────┼──────────────────────────────────┤
│ 程度性       │ 3/3   │ 优化是连续性的,没有明确终点      │
│ 展望性       │ 2/3   │ 隐含"变得更好"的未来预期         │
│ 主观评价性   │ 3/3   │ "更好"的标准因人/场景而异         │
│ 关联松散度   │ 3/3   │ 性能/可读性/架构/安全均可被优化   │
├──────────────┼───────┼──────────────────────────────────┤
│ 总分         │ 11/12 │ → 高危陷阱词                     │
└──────────────┴───────┴──────────────────────────────────┘
  • 0–3 分:无 → 强
  • 得分落档:10–12 → critical;7–9 → high;5–6 → medium-high;3–4 → medium;0–2 → low(可忽略)

2c. 排除已知 wide:见 STEP 1。

2d. 收窄方案:对总分 ≥ 5 的词给出更窄、可执行、同句可替换的表述。

STEP 3:上下文与句式隐患

  • 语义叠加:多枚中高严重度词同句共现 → 整体严重度上调。
  • 隐式宽边界:如「全面 + 检查」、递进修饰 + 开放式动词等,会拉宽动作范围。
  • 否定句反转:如 不要忽略任何潜在风险 → 模型为「不忽略」反而扩联想(示例仅在行内代码中展示,避免 linter 误报)。

Read the full file on GitHub · 101 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. 2d ago First seen · 101 lines · 52 tokens per session scan A 4ec8fab5f438

Subscribe to this mod's changes

semantic-analyzer is a skill published in the GitHub repository SummerSec/SumSec-Skills (8 stars, last pushed 21d ago), licensed Apache-2.0. It adds 52 tokens to every session and 1,474 once invoked, about $0.0003 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-09-03.

Related

Other skills, from other repositories

dsh-web-pre-push-checks

Use before pushing, opening or updating a pull request, or claiming dsh-web checks pass. Selects the required repository gates and diff-specific generation, build, and GUI evidence.

zhu1090093659/dsh-web · 45 tokens

dsh-web-documentation

Use when adding or editing dsh-web README files, docs, AGENTS.md instructions, user-facing configuration text, or bilingual documentation pairs.

zhu1090093659/dsh-web · 34 tokens

dsh-sdk-upgrade

Safely select and install a compatible official @deepseek-ai SDK release for dsh plugin projects (dsh-web, dsh-trading, and similar monorepos) from npm using an isolated worktree, explicit cohort review, CI-equivalent validation, and controlled rollout — including syncing the project's declared DSH host-version floor…

zhu1090093659/dsh-web · 176 tokens

dsh-web-sdk-compatibility

Adapt and repair dsh-web after an approved official @deepseek-ai SDK/runtime cohort is selected or installed. Compare public API, type, service-injection, module-table, protocol, and behavior changes; map every change to repository consumers; implement the smallest fixes and durable compatibility contracts; handle…

zhu1090093659/dsh-web · 107 tokens

ov-experience-memory

Retrieve and apply OpenViking Experience memories through the Agent runtime's generic OpenViking search and read tools. Use before or during executable, multi-step, or tool-based work such as coding, file or data changes, configuration, deployment, workflow execution, and failure recovery when prior operational…

volcengine/OpenViking · 78 tokens

task-planning-arch

计算任务 gap 并产出下一步可执行子任务 List[TaskSpec];gap 已闭返回空数组。对齐 arch 场景(架构师名册/技术栈概览/双视角分析)确定式分解——按根目标交付物集合 + donechildren 查表(参照 task-planning storage 特例,非自由 LLM 分解)。.

inclusionAI/Avernet · 89 tokens