Install Press C to copy Claude Cursor Codex Any chat
$ npx get-skill add takemo101/sanitizer Copy Copied
Installs into ~/.claude/skills (or .claude/skills inside a project). Restart Claude Code to pick it up.
Download .zip Install Copied Save Share Link copied
+ Add to plugin
README badge [](https://skillmd.com/skills/takemo101/sanitizer)Copy Copied
Trust & safety 1 of 3 audits passed SkillMD Review PASS sanitize input for LLM, no unscoped actions
SkillSpector CAUTION YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).; This pattern attempts to override system instructions or ignore safety constraints. Without LLM analysis, manual review is recommended.
Skill Scanner WARNING Vague skill description; Skill does not specify a license; Attempts to override previous system instructions
Works with Claude Code Claude.ai OpenAI Codex + Report a problem with this skill File contents Sanitizer
外部からの入力(GitHub Issue本文、PR説明文など)をLLMに入力する前にサニタイズします。
プロンプトインジェクション攻撃や、予期しない制御文字による誤動作を防ぎます。
概要
以下の処理を行います:
制御文字の除去 : NULLバイトやバックスペースなどの制御文字を削除
Markdownの無害化 : 危険なHTMLタグ(<script>, <iframe>など)のエスケープ
プロンプトインジェクション対策 : "Ignore previous instructions" などの既知の攻撃パターンの検出と警告
使用方法
ファイル入力
bash .pi/skills/sanitizer/scripts/sanitize.sh <input-file>
標準入力
echo "content" | bash .pi/skills/sanitizer/scripts/sanitize.sh --stdin
適用箇所
ワークフロー
タイミング
実装フェーズ
Issue本文を読み込む際
req-workflow
ユーザー要件を読み込む際
pr-merge-workflow
PR本文を解析する際
サニタイズ仕様
削除対象(制御文字)
ASCII 0x00-0x08, 0x0B-0x0C, 0x0E-0x1F
UTF-8の不正なシーケンス
エスケープ対象(HTMLタグ)
以下のタグは <tag> に変換されます:
<script>
<style>
<svg>
<iframe>
<object>
<embed>
警告トリガー(インジェクションパターン)
以下のパターンが含まれる場合、警告ログを出力し、該当部分を [POTENTIAL INJECTION BLOCKED] に置換します:
Ignore previous instructions
System override
You are now ... (role hijacking)
制限事項
完全なセキュリティを保証するものではありません。
LLM自体の安全性フィルタと併用することを推奨します。
1 --- 2 name: sanitizer 3 description: Sanitizer 4 --- 5 6 # Sanitizer 7 8 外部からの入力(GitHub Issue本文、PR説明文など)をLLMに入力する前にサニタイズします。 9 プロンプトインジェクション攻撃や、予期しない制御文字による誤動作を防ぎます。 10 11 --- 12 13 ## 概要 14 15 以下の処理を行います: 16 17 1. **制御文字の除去**: NULLバイトやバックスペースなどの制御文字を削除 18 2. **Markdownの無害化**: 危険なHTMLタグ(`<script>`, `<iframe>`など)のエスケープ 19 3. **プロンプトインジェクション対策**: "Ignore previous instructions" などの既知の攻撃パターンの検出と警告 20 21 --- 22 23 ## 使用方法 24 25 ### ファイル入力 26 27 ```bash 28 bash .pi/skills/sanitizer/scripts/sanitize.sh <input-file> 29 ``` 30 31 ### 標準入力 32 33 ```bash 34 echo "content" | bash .pi/skills/sanitizer/scripts/sanitize.sh --stdin 35 ``` 36 37 ### 適用箇所 38 39 | ワークフロー | タイミング | 40 |-------------|----------| 41 | 実装フェーズ | Issue本文を読み込む際 | 42 | `req-workflow` | ユーザー要件を読み込む際 | 43 | `pr-merge-workflow` | PR本文を解析する際 | 44 45 --- 46 47 ## サニタイズ仕様 48 49 ### 削除対象(制御文字) 50 51 - ASCII 0x00-0x08, 0x0B-0x0C, 0x0E-0x1F 52 - UTF-8の不正なシーケンス 53 54 ### エスケープ対象(HTMLタグ) 55 56 以下のタグは `<tag>` に変換されます: 57 - `<script>` 58 - `<style>` 59 - `<svg>` 60 - `<iframe>` 61 - `<object>` 62 - `<embed>` 63 64 ### 警告トリガー(インジェクションパターン) 65 66 以下のパターンが含まれる場合、警告ログを出力し、該当部分を `[POTENTIAL INJECTION BLOCKED]` に置換します: 67 68 - `Ignore previous instructions` 69 - `System override` 70 - `You are now ...` (role hijacking) 71 72 --- 73 74 ## 制限事項 75 76 - 完全なセキュリティを保証するものではありません。 77 - LLM自体の安全性フィルタと併用することを推奨します。
takemo101/compose-workflow commit 84b5f82e69
Frequently asked questions How do I install the Sanitizer skill? Run npx get-skill add takemo101/sanitizer in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
What does the Sanitizer skill do? Sanitizer It is listed under Coding & Dev Tools on SkillMD.
Is Sanitizer safe to use? SkillMD's automated safety review verdict for this skill is PASS. Independent scanners report: SkillSpector: CAUTION, Skill Scanner: WARNING. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
Which AI agents work with Sanitizer? This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Is Sanitizer free to use? Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
Who published Sanitizer? takemo101 (@takemo101) published this skill. Their other Agent Skills are listed on their SkillMD profile.