semantix

semantix is a skill for Claude Code, Codex from Gnosil/semantix. It costs 47 tokens per session (2,370 once invoked), scanned A, original, MIT.

A memory layer for an AI agent that stores user preferences, work habits, and useful experience between sessions. It is installed as a command-line program and connected through lookup and optional injection tools.

In plain words
What is it for?
Use it to retrieve past preferences or workflows during a session and save useful information for reuse in later sessions, with setup paths for custom agents, LangChain, and Claude Code.
Why use it?
It prevents the agent from starting without relevant context every time a new session begins.

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/gnosil/semantix/agent-skill
Any agent
npx skills add Gnosil/semantix --skill agent-skill
Clone the repo
git clone --depth 1 https://github.com/Gnosil/semantix

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 semantix

README.md
[![agentmods](https://agentmods.dev/badge/skills/gnosil/semantix/agent-skill.svg)](https://agentmods.dev/skills/gnosil/semantix/agent-skill)
Your own site
<a href="https://agentmods.dev/skills/gnosil/semantix/agent-skill"><img src="https://agentmods.dev/badge/skills/gnosil/semantix/agent-skill.svg" alt="Measured on agentmods" height="20"></a>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,370 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00047 $0.02370
Opus 5 $0.00023 $0.01185
Sonnet 5 $0.00009 $0.00474
Haiku 4.5 $0.00005 $0.00237

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

Security

Grade A, and why

semantix scanned grade A with 1 finding 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.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/install.sh, scripts/selftest.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

command -v curl || echo "need curl"
agent-skill/SKILL.md · 177 lines

How it starts

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

Semantix — 记忆中间件 Skill

给你的智能体装上用户级记忆:记住用户偏好、业务流程、总结办案/工作经验, 跨会话自动复用。你的 agent 不需要改造内核——装一个二进制 + 两个工具即可。

执行模式(agent 自助接入,逐条执行)

本 skill 设计为由客户的 agent 直接执行完成接入。按顺序执行以下步骤; 每步有通过标准;失败进入「故障处理」。全部通过 = 接入完成。

STEP 0 — 环境检查

uname -s && uname -m            # 通过标准:darwin 或 linux;amd64 或 arm64
command -v curl || echo "need curl"

STEP 1 — 安装

bash <(curl -sL https://raw.githubusercontent.com/Gnosil/semantix/main/agent-skill/scripts/install.sh)

通过标准:输出 == installed: 且无报错。 (离线/内网客户:手动下载 release 包,跳过下载步骤后继续。)

STEP 2 — 配置

semantix lookup --help >/dev/null && echo ok   # 通过标准:输出 ok
mkdir -p ~/.semantix/sessions

默认零配置可用;按需复制 agent-skill/config/semantix.example.toml 调整。

STEP 3 — 选择集成方式(决策树)

你的 agent 底座 走哪条路径
semantix-agent(本仓 harness/,随发布包分发) 内置集成已就绪:semantix-agent.toml[semantix] enabled=true + semantix_lookup 工具(零步骤)
LangChain docs/reports/langchain-middleware.md 双挂点示例(消息改写 + 会话提取)
Claude Code / 工具注册类 本 skill tools/semantix-lookup.md 的 schema 注册 semantix_lookup(+可选 semantix_inject
任意自定义 agent 会话旁路三方式(hooks/session-bypass.md):导出 / 事件旁路 / 直接调用

STEP 3.5 — Claude Code 接第三方 GLM 端点时的前缀卫生(可选,强烈推荐)

Claude Code ≥2.1.36 会在 system prompt 最前端注入逐请求变化的计费头x-anthropic-billing-header 的 cch 字段)。官方服务端会剥离它;第三方 GLM 端点 (腾讯云 TokenHub 等)不剥离——前缀从第一个 token 起失配,隐式缓存全灭 (社区实测命中差 133 倍;对照 TokenHub 官方 Claude Code 接入页推荐的环境变量组)。 两道防线任开其一,同开更稳:

export CLAUDE_CODE_ATTRIBUTION_HEADER=0   # 客户端不再注入计费头(直连第三方端点时唯一有效的一道)
  • semantix-gateway 转发时:网关净化中间件默认剥离该计费头([sanitize] strip_attribution,见 deploy/semantix-gateway.toml.example),未设环境变量也受保护;
  • 直连第三方端点(不过网关)时:只有上面的环境变量能救。

STEP 4 — 闭环自测(必须通过)

bash <(curl -sL https://raw.githubusercontent.com/Gnosil/semantix/main/agent-skill/scripts/selftest.sh)

通过标准:输出 SELFTEST PASS。自测内容: 提取 demo 会话 → lookup 命中(zone=hit)→ inject 返回注入块 → 记忆闭环成立。

STEP 5 — 接入完成

  • 会话结束:extract --input <会话> --scope user --project <业务域>(沉淀)
  • 新任务:inject --query <任务> --scope user(注入)或 lookup(检索)
  • 定期:verify --session <目录> --scope user(质量评估)

Read the full file on GitHub · 177 lines

Files

What ships with it

5 files 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 · 177 lines · 47 tokens per session scan A ca97cc193118

Subscribe to this mod's changes

semantix is a skill published in the GitHub repository Gnosil/semantix (330 stars, last pushed today), licensed MIT. It adds 47 tokens to every session and 2,370 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

faq-mine

Mine docs/faq.md from README.md, docs/.md, and the pi-hermes memory stores. Dispatches @fast subagents per source, dedupes against the existing FAQ, and merges entries in caveman style. Use when asked to "build / regenerate / extend the FAQ", "mine docs into FAQ", "mine hermes memory into FAQ", "surface runtime…

BlackBeltTechnology/pi-agent-dashboard · 94 tokens

distill-session-knowledge

Offline-mine this project's pi session JSONL logs into reusable, verified knowledge: extracts faults, decisions, corrections, procedures and docs, promotes only recurring patterns, and routes artifacts into skillmanage, memory and docs. Use on "mine my sessions", "distill session knowledge", "extract lessons from…

BlackBeltTechnology/pi-agent-dashboard · 78 tokens

context-engineering

Use when designing, reviewing, or debugging how an agent's context window gets filled, pruned, or shared — choosing what loads at boot versus on demand, sizing an install or an always-loaded file, fixing an agent that drifts, repeats itself, or forgets constraints mid-task, planning compaction or summarization…

mvschwarz/openrig · 142 tokens

design-memory

Use at project start and completion to OBSERVE and record how the user designs — the decisions they make, the styles they reach for, their habits and inclinations across projects. This is a descriptive record (a mirror), NOT a controller — it is never fed back to steer the work. Per-project direction comes from…

Owl-Listener/designpowers · 91 tokens

context-optimizer

Optimize token usage and context management. Use when sessions feel slow, context is degraded, or you're running out of budget.

rohitg00/pro-workflow · 28 tokens

deep-clean

Full-spectrum consolidation of AI agent configuration files. Goes beyond memory-only dream skills: audits and optimizes context files (AGENTS.md/AGENTS.md/GEMINI.md/.cursorrules), rules, skills, and memory. Detects stale references, dead file paths, duplicated rules, stack mismatches, contradictions, vague directives…

opencue/cuecards · 87 tokens