memory-sanitize

memory-sanitize is a skill for Claude Code, Codex from lacolaco/claude-plugins. It costs 136 tokens per session (6,387 once invoked), scanned A, original, MIT.

A Japanese-language quality checker for persistent text that shapes an agent's context, such as memory files, instructions, and skill documents. It uses textlint-ja and custom rules to detect issues, including unwanted English words.

In plain words
What is it for?
Use it to inspect memory and instruction documents, run Japanese text checks, detect mixed-in English, and review prose quality without automatic fixes.
Why use it?
It helps find wording and style problems in saved Japanese guidance before they affect later agent responses.

Skill for Claude CodeCodex

Part of the memory-sanitize plugin — 1 skill 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/lacolaco/claude-plugins/memory-sanitize
Any agent
npx skills add lacolaco/claude-plugins --skill memory-sanitize
Clone the repo
git clone --depth 1 https://github.com/lacolaco/claude-plugins

Made for: Claude Code, Codex.

Or install memory-sanitize, the plugin that ships this one along with the rest of its 1 skill.

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 memory-sanitize

README.md
[![agentmods](https://agentmods.dev/badge/skills/lacolaco/claude-plugins/memory-sanitize.svg)](https://agentmods.dev/skills/lacolaco/claude-plugins/memory-sanitize)
Your own site
<a href="https://agentmods.dev/skills/lacolaco/claude-plugins/memory-sanitize"><img src="https://agentmods.dev/badge/skills/lacolaco/claude-plugins/memory-sanitize.svg" alt="Measured on agentmods" height="20"></a>
Per session 136 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,387 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.00136 $0.06387
Opus 5 $0.00068 $0.03194
Sonnet 5 $0.00027 $0.01277
Haiku 4.5 $0.00014 $0.00639

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

Security

Grade A, and why

memory-sanitize 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.

The scan reads SKILL.md. This mod also ships 14 executable files (scripts/check.sh, scripts/rules-gate/no-confusable-cyrillic.js, scripts/rules-gate/no-space-after-ja-punctuation.js, …), 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.

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.

memory-sanitize/skills/memory-sanitize/SKILL.md · 234 lines

How it starts

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

memory-sanitize

エージェントの文脈に影響する永続層の日本語文章の品質を、textlint-ja の規則群と独自規則で再現可能に検証する。自動修正はしない、検出のみ。修正はエージェント自身が結果を見て判断する。

検査は二段構えで実施する。第一段は機械検出、第二段は散文品質レビュー。永続層への書き込みは両段を通過してから完了とする。

  1. 機械検出: textlint による決定論的な検査。文法・形式・英単語混入など、規則で機械的に判定できる規律違反を検出する。scripts/check.sh がこれを担う。
  2. 散文品質レビュー: tech-writing スキルを参照したエージェント主導の検査。論証・段落構成・冗長排除・演出の抑制・LLM っぽい表現の禁止など、機械では判定できない規律違反を検出する。

起動条件

  • 「日本語品質チェック」「textlint かけて」「英語混入チェック」「メモリ点検」「memory sanitize」等の指示
  • 永続層への新規書き込み後の自己確認

検査対象

スキルは「エージェントの文脈に影響する永続層の日本語散文」を対象とする。以下の機能的性質を満たすファイルが想定対象。

  • 日本語の散文、すなわち文として読まれる本文を含む
  • エージェントの文脈や応答に影響する。ランタイムが読み込むもの、応答指針として参照されるもの、などを指す
  • 永続化されている。一時ファイルでなく、セッションをまたいで残るもの

検査対象に入れないもの:

  • 構造化データ (JSON / YAML / lockfile / 設定ファイル等)。規則のデータファイル (data/*.json$XDG_CONFIG_HOME/memory-sanitize/*.json) もここに含まれる。
  • ソースコード (Markdown でない .ts.js.py 等)。

具体的な配置・命名・構造は環境ごとに異なるため、スキルは検査対象の経路を一切規定しない。対象はエージェントが起動文脈から判断し、引数で check.sh に渡す。

呼び出し方は以下のとおり。

  • ユーザーが対象を指定した場合は字句通り使う
  • ユーザーが指定しない場合はエージェントが上記の機能的性質に照らして自分の環境から候補を列挙する
  • 判断に迷う場合はユーザーに確認する

対象が決まったら bash <SKILL_DIR>/scripts/check.sh <file...> の形で実行する。

検出項目

textlint の既存規則と独自規則を 1 回の実行で同時に適用する。

textlint-ja の既存規則による技術文書一般品質

  • ですます・である調の混在
  • 文末句点の混在
  • 重複した助詞・接続詞
  • 不適切な表現・冗長表現
  • 全角半角混在
  • 二重否定
  • 全角文字どうしの間の半角スペース (ja-no-space-between-full-width。カタカナ複合語は除外される)

scripts/rules/ 配下の独自規則 (判断を要する)

判定は機械的でも、違反を 0 にするには編集判断が要る規則。許可一覧の整備や文の書き換えが伴うため、二値ゲートには向かない。

  • no-english-word: 固有名詞 (data/proper-nouns.json)・略語 (data/acronyms.json)・バッククォート内コード以外の連続英字を検出
    • 検出範囲は「日本語と英語が混在した Str ノード」のみ。日本語文字すなわちひらがな・カタカナ・漢字を 1 文字も含まないテキストは「英単語混入」の対象外となる。純英語の見出し・引用・スラッグ単独行・コード片などがこれに当たる。ルール本来の目的、すなわち日本語文中の英単語混入検出だけを評価し、純英語パターンは無関係とする。
  • no-paren-equals-gloss: 半角開き括弧 ( の直後に等号 = が続く (= 構文を完全禁止
    • 「X (= Y)」形式の括弧内同格挿入は本文の論述リズムを断ち切る注釈様式として全面的に避ける。同格挿入が必要なら別文に分け、「X とは Y である」と書き起こすか、「X すなわち Y」と読点でつなぐ。
    • 検出対象は半角形のみ。バッククォート内の文字列リテラル、すなわち Code ノードは対象外。
  • no-em-dash-ja: 日本語の地の文・見出しでのダッシュ類使用を禁止
    • 検出対象は次の 3 種類。 (U+2014、em ダッシュ)、 (U+2015、横棒)、—— (em ダッシュ 2 連の 2倍ダッシュ)
    • 除外は次のとおり。 (U+2013、en ダッシュ) は範囲表記として許容する。日本語文字を含まない純英語の Str ノードは対象外 (例: Curry–Howard などの英語複合語)。バッククォート内コード・コードブロックは標準動作で自動除外される。
    • tech-writing 規範 18 行目を機械化したもの。同格・補足の挿入は括弧 () に降ろし、言い換えは句点で二文に分けるか読点で対応する。
  • no-heading-separator: 見出しに区切り線 (U+2500、罫線) を含めるのを禁止
    • 検出対象は Header ノード内の 単独および ── の連続。
    • 除外は次のとおり。Header ノード以外の本文中での 出現は対象外。バッククォート内コード・コードブロックは標準動作で自動除外される。
    • tech-writing 規範 20 行目を機械化したもの。二要素を罫線で連結した見出し (例: 種別──主題) を遮断する。見出しは単一の自然な句にし、要素を一つに絞るか助詞・読点でつなぐ。

Read the full file on GitHub · 234 lines

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 · 234 lines · 136 tokens per session scan A 13bb492b5982

Subscribe to this mod's changes

memory-sanitize is a skill published in the GitHub repository lacolaco/claude-plugins (5 stars, last pushed 9d ago), licensed MIT. It adds 136 tokens to every session and 6,387 once invoked, about $0.0007 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

subtitle-translator

Translate subtitle files (SRT, ASS) and video/media with embedded subtitles into any target language with high linguistic quality, sliding context window, timestamp alignment, and formatting preservation. Use when the user asks to translate a subtitle file (.srt, .ass) or video subtitles.

MaKTaiL/gemini-srt-translator · 60 tokens

help-video-ingest

Extract help-center (ohjeet) articles from LIPAS YouTube tutorial videos using Gemini's native video understanding, consolidate them into task-sized help pages, translate to sv/en, and publish to the help CMS (which feeds the AI-assistant knowledge base). Use when turning tutorial videos or guide PDFs into ohjeet…

lipas-liikuntapaikat/lipas · 72 tokens

wiki-knowledge-agent

Turn chat-pasted text/links into a verified, translated, searchable wiki knowledge base. When a user pastes a link or text (in ANY channel — Discord, Slack, CLI, etc.), fetch+verify it, classify it (useful vs ad), translate+summarize it into the target language, save it to the wiki, and optionally alert on…

atukunare/wiki-knowledge-agent · 141 tokens

ai-skills

Use when building LLM applications, RAG knowledge bases, AI agents, terminal coding agents, multi-model orchestration, plugin-based agent harnesses, or file translation. Index of 9 skills: Dify, Hermes Agent, OpenClaw, OpenCode, Pi, DocuTranslate, Oh-My-OpenAgent, Superpowers-zh, DeepSeek Harness.

znlgis/opengis-skills · 79 tokens

capacity-resource-estimation

Translate NFR targets + expected load into resource sizing. Compute / memory / storage / IOPS / network per service; autoscaling policy with min/max bounds and scaling triggers; headroom (the buffer above expected steady-state); growth model (sizing for 12 and 24 months); environment cost envelope. Output drives iac…

jeet129/praxis · 119 tokens

gearsystem-romhacking

Hack, modify, and translate Sega Master System, Game Gear, and SG-1000 ROMs using the Gearsystem emulator MCP server. Provides workflows for memory searching, value discovery, cheat creation, data modification, sprite/text finding, translation patching, and rewind-assisted experimentation. Use when the user wants to…

drhelius/Gearsystem · 172 tokens