Back to skill

Security audit

AI.MD

Security checks for vulnerabilities and agentic risk

Overview

The skill has a coherent purpose, but it can read and rewrite sensitive Claude configuration files and requires multi-model testing without clear redaction or separate opt-in.

Review this skill carefully before installing. Use it only on CLAUDE.md content you are comfortable exposing to the agent, remove secrets, private URLs, tokens, and connection strings first, and do not run multi-model validation unless you explicitly approve which providers receive the content. Prefer installing from a pinned release or reviewed commit with checksum verification rather than the mutable main-branch curl command.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:413
Finding
Sensitive configuration may be disclosed during mandatory multi-model validation<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:413-421` and `SKILL.md:475-476` **Vulnerability Type**: Sensitive data exposure across external LLM trust boundaries **Risk Level**: High ### Vulnerable Code ```text Then: Read all auto-loaded files. Identify redundancy, prose overhead, and duplicate rules. **Ask user before proceeding: "Want to distill?"** ### Stage 2: DISTILL — Convert with Safety Net 1. **Backup**: `cp ~/.claude/CLAUDE.md ~/.claude/CLAUDE.md.bak-pre-distill` 2. **Phase 1-5**: Run the full conversion process above 3. **Phase 6**: Run multi-model test (minimum 2 models, 8 questions) 4. **Report**: Show before/after scores ``` The template also instructs the conversion process to preserve sensitive connection information: ```text <conn> connection strings (keep exact — NEVER compress facts/credentials/URLs) </conn> ``` ### Technical Analysis The workflow directs the agent to read all automatically loaded configuration files and preserve connection strings, credentials, and URLs exactly. It then makes validation with at least two different LLM models mandatory. No instructions require secret detection, redaction, placeholder substitution, provider allowlisting, local-only evaluation, or separate user approval before sending converted content to additional model providers. If a user's `CLAUDE.md` or related rule files contain credentials, internal URLs, server details, tokens, or connection strings, the converted document may retain those values and expose them during cross-model validation. This is an insecure handling practice because data initially stored in a local configuration can cross one or more external provider trust boundaries without a defined minimization or redaction step. ### Attack Path 1. A user stores a credential, private URL, connection string, or infrastructure detail in `CLAUDE.md` or an automatically loaded rule file. 2. The Skill reads all automatically loaded files during the preview and convers ...[truncated 1077 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Add a mandatory secret-scanning and redaction phase before conversion or validation. 2. Replace credentials, tokens, private URLs, connection strings, IP addresses, and sensitive paths with stable placeholders such as `${REDACTED_SECRET_1}`. 3. Exclude the entire `<conn>` section from external model test prompts. 4. Require explicit user approval before transmitting any configuration to a second model provider. 5. Provide a local-only validation mode and make it the default. 6. Document which providers receive test data and their retention boundaries. 7. Maintain a denylist for common secret formats and support entropy-based detection for unknown tokens. 8. Restore redacted values locally only after testing, without exposing them to external models. 9. Change the template instruction from preserving credentials to preserving only non-sensitive structural facts. ]]>

T08 · Insecure Dependencies

Warning
Location
README.md:97
Finding
Installation downloads a mutable Skill definition without integrity verification<![CDATA[ ## Vulnerability Details **File Location**: `README.md:97-100` and `docs/index.md:47-51` **Vulnerability Type**: Unpinned remote dependency and supply-chain risk **Risk Level**: Medium ### Vulnerable Code ```bash mkdir -p ~/.claude/skills/ai-md curl -o ~/.claude/skills/ai-md/SKILL.md \ https://raw.githubusercontent.com/sstklen/ai-md/main/SKILL.md ``` The same installation pattern is repeated in `docs/index.md`: ```bash mkdir -p ~/.claude/skills/ai-md curl -o ~/.claude/skills/ai-md/SKILL.md \ https://raw.githubusercontent.com/sstklen/ai-md/main/SKILL.md ``` ### Technical Analysis The installation command retrieves `SKILL.md` directly from the mutable `main` branch. It does not pin an immutable commit or release, verify a checksum, validate a cryptographic signature, or require inspection before the downloaded file is installed. Although the downloaded file is not piped directly into a shell, it is an instruction-bearing Agent Skill. Once installed, its contents can influence agent behavior and tool use. Consequently, changes to the upstream branch after this audit can change the effective behavior received by future users. The HTTPS connection protects transport integrity but does not protect against compromise of the upstream repository, maintainer account, release process, or intentional replacement of the branch contents. ### Attack Path 1. An attacker compromises the upstream repository, a maintainer account, or the branch update process. 2. The attacker replaces `SKILL.md` on the `main` branch with malicious or unsafe instructions. 3. A user follows the documented installation command. 4. `curl` downloads the attacker-controlled version directly into the user's Claude Skill directory. 5. The Agent subsequently loads the modified Skill. 6. The malicious instructions may induce unauthorized file access, data disclosure, unsafe tool calls, or other behavior permitted by the Agent's existing privileges. ### Impact Assessment Successful ...[truncated 601 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Publish immutable, versioned releases of `SKILL.md`. 2. Change installation URLs to reference a reviewed commit hash or immutable release tag instead of `main`. 3. Publish a SHA-256 checksum for every release and require users to verify it before installation. 4. Prefer cryptographically signed release artifacts and document signature verification. 5. Add an update procedure that displays and reviews the diff before replacing an installed Skill. 6. Protect the upstream repository with mandatory multifactor authentication, branch protection, and reviewed changes. 7. Keep the previously installed version as a rollback copy. 8. Document that the Skill file is security-sensitive instruction content even though it is not a conventional executable script. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (27)

Tp2

High
Category
MCP Tool Poisoning
Confidence
85% confidence
Finding
Mixing characters from multiple Unicode scripts in a single identifier is a common technique to create visually ambiguous tool names.

Tp2

High
Category
MCP Tool Poisoning
Confidence
85% confidence
Finding
Mixing characters from multiple Unicode scripts in a single identifier is a common technique to create visually ambiguous tool names.

Credential Access

High
Category
Privilege Escalation
Content
```
GATE-1 (複述: repeat task) vs GATE-3 (保護檔: backup first)
→ CONFLICT: If user says "edit .env", should AI repeat the task first, or backup first?
→ RESOLUTION: priority: GATE-3 > GATE-1 (safety before courtesy)
             yields-to: GATE-3 (explicit in GATE-1)
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Agent Config Directory Access

High
Category
Agent Snooping
Content
```bash
echo "=== Current Token Burn ==="
claude_md=$(wc -c < ~/.claude/CLAUDE.md 2>/dev/null || echo 0)
rules=$(cat ~/.claude/rules/*.md 2>/dev/null | wc -c || echo 0)
total=$((claude_md + rules))
tokens=$((total / 4))
echo "CLAUDE.md:     $claude_md bytes"
Confidence
95% confidence
Finding
Direct access to ~/.claude and related rules files targets the agent's configuration directory, which commonly stores sensitive instructions, URLs, and potentially secrets. Reading these files without strict consent and path limitations can expose confidential material and increase the blast radius if the skill is triggered unintentionally.

Credential Access

High
Category
Privilege Escalation
Content
yields-to: GATE-2

GATE-2 protect-files:
  trigger: .env / docker-compose* / package.json
  action: line-1="Backing up first." + cp file file.bak
  format: must-be-line-1(not-footnote)
  priority: before GATE-1(backup-then-restate)
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Session Persistence

Medium
Category
Rogue Agent
Content
## Install

```bash
mkdir -p ~/.claude/skills/ai-md
curl -o ~/.claude/skills/ai-md/SKILL.md \
  https://raw.githubusercontent.com/sstklen/ai-md/main/SKILL.md
```
Confidence
60% confidence
Finding
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Vague Triggers

Medium
Confidence
94% confidence
Finding
The invocation phrase "rewrite my MD for AI" is broad enough to match ordinary user requests that are not intended to invoke this skill. In agent environments, overly generic triggers can cause unexpected activation and unintended processing or modification of sensitive instruction files, increasing the chance of confused-deputy behavior.

Missing User Warnings

Medium
Confidence
89% confidence
Finding
The README says the skill converts with backup and tests with multiple models, but does not clearly warn that this may modify CLAUDE.md or send content to external models/services. That lack of disclosure can lead to unintentional file changes or privacy leaks if sensitive instructions are transmitted off-box during testing.

Vague Triggers

Medium
Confidence
96% confidence
Finding
The trigger set is broad enough to activate on common phrases about token usage or optimizing instructions, which can cause the skill to run when the user did not intend local config inspection or modification. Over-broad activation increases the chance of surprising file access and accidental application of the workflow to sensitive prompt files.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
# Analysis: I find 4 hidden rules
Rule 1: certain words are banned → use data instead
Rule 2: hearing doubt words → run self-test
Rule 3: don't ask the user for data → look it up yourself
Rule 4: preference claims → require A/B comparison before accepting

# Output: 4 atomic rules
Confidence
80% confidence
Finding
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
EVIDENCE (no-guess) vs user says "處理一下" (just do it)
→ CONFLICT: should AI verify assumptions or execute immediately?
→ RESOLUTION: signal "處理一下" = user has decided, skip confirmation
```

**Technique: Not-Triggered Lists**
Confidence
85% confidence
Finding
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Context-Inappropriate Capability

Medium
Confidence
92% confidence
Finding
The skill instructs the agent to send user content or derived policy material through multiple external LLMs as a mandatory validation step, which can expand data exposure beyond the user's expectation. Even if framed as quality assurance, this broadens third-party disclosure and may leak sensitive instructions, project details, or secrets embedded in CLAUDE.md.

Context-Inappropriate Capability

Medium
Confidence
89% confidence
Finding
The skill goes beyond formatting advice and prescribes reading, backing up, and rewriting files under ~/.claude, which are agent configuration files that may contain sensitive operational instructions. This creates risk of unauthorized local file access or unintended modification if invoked without clear consent and boundaries.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The workflow includes commands that inspect and modify local CLAUDE configuration files, but the skill description does not prominently warn users that local files may be accessed and rewritten. This lack of transparent disclosure undermines informed consent and can expose sensitive prompt content or alter agent behavior unexpectedly.

Skill Enumeration

Medium
Category
Agent Snooping
Content
## Install (30 seconds)

```bash
mkdir -p ~/.claude/skills/ai-md
curl -o ~/.claude/skills/ai-md/SKILL.md \
  https://raw.githubusercontent.com/sstklen/ai-md/main/SKILL.md
```
Confidence
85% confidence
Finding
Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Skill Enumeration

Medium
Category
Agent Snooping
Content
## Install (30 seconds)

```bash
mkdir -p ~/.claude/skills/ai-md
curl -o ~/.claude/skills/ai-md/SKILL.md \
  https://raw.githubusercontent.com/sstklen/ai-md/main/SKILL.md
```
Confidence
85% confidence
Finding
Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Session Persistence

Medium
Category
Rogue Agent
Content
## Install (30 seconds)

```bash
mkdir -p ~/.claude/skills/ai-md
curl -o ~/.claude/skills/ai-md/SKILL.md \
  https://raw.githubusercontent.com/sstklen/ai-md/main/SKILL.md
```
Confidence
71% confidence
Finding
The installation instructions download remote content directly into a persistent skill location under ~/.claude/skills, causing the fetched instructions to affect future sessions. Even though presented as benign setup guidance, direct curl-to-persistent-path from a mutable remote source creates a supply-chain and persistence risk if the upstream content is changed or compromised.

Skill Enumeration

Medium
Category
Agent Snooping
Content
```bash
mkdir -p ~/.claude/skills/ai-md
curl -o ~/.claude/skills/ai-md/SKILL.md \
  https://raw.githubusercontent.com/sstklen/ai-md/main/SKILL.md
```
Confidence
80% confidence
Finding
Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Skill Enumeration

Medium
Category
Agent Snooping
Content
```bash
mkdir -p ~/.claude/skills/ai-md
curl -o ~/.claude/skills/ai-md/SKILL.md \
  https://raw.githubusercontent.com/sstklen/ai-md/main/SKILL.md
```
Confidence
80% confidence
Finding
Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Vague Triggers

Medium
Confidence
89% confidence
Finding
The documentation says users can invoke the skill with "AI.MD" or "distill my CLAUDE.md" or "蒸餾", but it does not define when these triggers should or should not activate. In particular, the standalone trigger "蒸餾" is a common word outside this skill's context, and no negative examples or contextual limits are provided to prevent unintended invocation.

Vague Triggers

Medium
Confidence
91% confidence
Finding
The listed signals include very common everyday phrases such as "fix it" and especially "do it", without clear scope constraints or negative examples. In a markdown skill file, such broad triggers can overlap with ordinary conversation and make it unclear when the skill should treat them as activation commands versus normal dialogue.

Vague Triggers

Medium
Confidence
86% confidence
Finding
The trigger includes `any "add X data to Y" intent`, which is a vague natural-language condition rather than a precise activation rule. This makes it unclear what exact requests are covered and increases the risk of inconsistent or unintended invocation of the gate.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The file embeds concrete SSH connection details and a deployment command that can modify a live environment, yet it does not require explicit confirmation, environment validation, or a warning before use. In an agent context, operational instructions like these can be acted on too readily, increasing the chance of unauthorized deployment, accidental production changes, or misuse of internal infrastructure details.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The file defines special meanings for Chinese phrases such as "壞了", "修到好", "確定嗎", and "處理一下" as part of normal operation. This introduces a language-specific interaction policy without indicating that alternative languages are supported or that the user has opted into this locale constraint.

Ssd 3

Medium
Confidence
95% confidence
Finding
The instructions explicitly tell the agent to persist user preferences and prior interactions into files across sessions ('update user-profile.md', 'save it to lessons.md'). That creates a real data-retention risk: sensitive personal details, operational habits, or confidential task content could be stored indefinitely and later surfaced in unrelated contexts, expanding the blast radius of any prompt injection, compromise, or accidental disclosure.

Static analysis

No suspicious patterns detected.