markdown-injection-scanner

markdown-injection-scanner is a skill for Claude Code from tranhieutt/software_development_department. It costs 58 tokens per session (2,683 once invoked), scanned A, original, MIT.

A security scanner for Markdown files that looks for malicious content such as scripts, cross-site scripting, prompt injection, and hidden attack payloads.

In plain words
What is it for?
Use it to audit Markdown files across a directory for injection threats and other supply-chain risks.
Why use it?
It helps find harmful instructions or code embedded in documentation before those files are trusted or processed.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: agent in frontmatter; mentions subagents.

Good fit Use it to audit Markdown files across a directory for injection threats and other supply-chain risks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tranhieutt/software_development_department/markdown-injection-scanner
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.

Any agent
npx skills add tranhieutt/software_development_department --skill markdown-injection-scanner
Clone the repo
git clone --depth 1 https://github.com/tranhieutt/software_development_department

Made for: Claude Code.

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 markdown-injection-scanner

README.md
[![agentmods](https://agentmods.dev/badge/skills/tranhieutt/software_development_department/markdown-injection-scanner/github.svg)](https://agentmods.dev/skills/tranhieutt/software_development_department/markdown-injection-scanner)
Your own site
<a href="https://agentmods.dev/skills/tranhieutt/software_development_department/markdown-injection-scanner"><img src="https://agentmods.dev/badge/skills/tranhieutt/software_development_department/markdown-injection-scanner/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for markdown-injection-scanner

Your own site · 80×15
<a href="https://agentmods.dev/skills/tranhieutt/software_development_department/markdown-injection-scanner"><img src="https://agentmods.dev/badge/skills/tranhieutt/software_development_department/markdown-injection-scanner.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 58 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,683 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.00058 $0.02683
Opus 5 $0.00029 $0.01341
Sonnet 5 $0.00012 $0.00537
Haiku 4.5 $0.00006 $0.00268

Measured 8d ago against content hash cd48c8826f33, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

markdown-injection-scanner 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 8d 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.

Makes network callslowCapability

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

| 16 | Shell Command Injection | `(curl\s+\|wget\s+\|bash\s+-c\|sh\s+-c\|powershell\|cmd\.exe\|/bin/sh\|/bin/bash\|rm\s+-rf\|chmod\s+777\|sudo\s+)` | Shell command execution |
.claude/skills/markdown-injection-scanner/SKILL.md · 189 lines

How it starts

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

Markdown Injection Scanner

Scans all .md files in a target directory for 18 categories of malicious code injection. Uses regex pattern matching across the entire file corpus with parallel subagent execution for speed.

Usage

/markdown-injection-scanner [target-directory]

If no directory is specified, ask the user to provide one.


Phase 1: Discovery — Map the File Corpus

  1. Count all .md files in target directory (recursive).

  2. Sample 2-3 files to understand the file structure and content type (design docs, documentation, config, etc.).

  3. Report file count and content type before proceeding.


Phase 2: Parallel Injection Scanning

Execute scans in 3 parallel batches using subagents for speed. Each subagent uses search_files with the target directory path and *.md file pattern.

Batch 1 — Script and Code Injection (5 patterns)

# Category Regex Pattern Threat
1 Script tags <script[^>]*> Embedded JavaScript execution
2 HTML Event Handlers (onclick|onerror|onload|onmouseover|onfocus|onblur|onresize|onsubmit|onchange|oninput|onkeydown|onkeyup|onkeypress|ontouchstart|onmouseenter|onmouseleave)\s*= Inline JS via HTML attributes
3 JS/VBScript Protocol (javascript:|vbscript:) Malicious link protocols
4 Dynamic Code Execution (eval\s*\(|Function\s*\(|setTimeout\s*\(|setInterval\s*\() Code execution via eval/setTimeout
5 DOM Manipulation (document\.(cookie|domain|write)|window\.(location|open)|XMLHttpRequest|fetch\s*\() DOM-based attacks

Batch 2 — Obfuscation and Encoding (6 patterns)

# Category Regex Pattern Threat
6 Base64 Payloads (base64|atob|btoa|b64decode|b64encode)[\s(] Encoded malicious content
7 Data URI Injection data:\s*(text/html|application/javascript|text/javascript) Inline HTML/JS via data URIs
8 SVG Injection <svg[^>]*> SVG-based XSS vectors
9 Hex/Unicode Encoding (\\x[0-9a-fA-F]{2}|\\u[0-9a-fA-F]{4}|&#x[0-9a-fA-F]+;) Obfuscated character encoding
10 Hidden Text — display:none <(span|div|p)[^>]*style\s*=\s*['"][^'"]*display\s*:\s*none Hidden content tricks
11 Hidden Text — font-size:0 font-size\s*:\s*0 Invisible text

Read the full file on GitHub · 189 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. 8d ago First seen · 189 lines · 58 tokens per session scan A cd48c8826f33

Subscribe to this mod's changes

markdown-injection-scanner is a skill published in the GitHub repository tranhieutt/software_development_department (72 stars, last pushed 3mo ago), licensed MIT. It adds 58 tokens to every session and 2,683 once invoked, about $0.0003 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-09-03.

Related

Other skills, from other repositories