# Agent skill and instruction files

> How every Keryn scan screens SKILL.md, CLAUDE.md, AGENTS.md and other files coding agents read at the start of a session, for hidden instructions, piped remote scripts and unscoped shells.

Source: https://keryn.dev/docs/guides/agent-skills/

## Goal

Treat the files a coding agent reads at the start of a session as what they are: code that instructs a model. Find the ones that hide instructions from a human reviewer, pipe a remote script into a shell, or pre-approve a shell for any command.

This page is about screening those files in your repository. The skills Keryn itself ships for Claude Code and Codex are a different thing: see [Keryn Skills](https://keryn.dev/docs/guides/keryn-skills/).

> **Caution: Release availability**
> The dedicated screen runs in every `keryn scan` on main and in the current Keryn Web build. Keryn 0.5.2, the latest installed release, predates it; its pattern rules already include skill packs (for example [`skill-command-execution-v1`](https://keryn.dev/rules/skill-command-execution-v1/)).

## Which files

| Agent | Files |
|---|---|
| Agent Skills (Claude, Codex and others) | `SKILL.md` |
| Claude Code | `CLAUDE.md` |
| Codex and other `AGENTS.md` readers | `AGENTS.md` |
| Gemini CLI | `GEMINI.md` |
| Cursor | `.cursorrules`, `.cursor/rules/*.md`, `.cursor/rules/*.mdc` |
| Windsurf | `.windsurfrules` |
| Cline | `.clinerules` |
| GitHub Copilot | `.github/copilot-instructions.md` |

## What is checked

- **Hidden or poisoned instructions** (`mcp:skill:poisoned`, `mcp:skill:suspicious`): hidden Unicode, instructions to conceal something from the user, exfiltration URLs, reads of secrets, and prompt injection, in the name, description or body. Telling the model what to do is not a finding on its own; that is what these files are for.
- **A remote script piped into a shell** (`mcp:skill:remote-exec`): `curl … | sh`, `bash <(curl …)`, `iex (irm …)`, which run whatever that URL serves at the time.
- **An unscoped shell pre-approved** (`mcp:skill:unrestricted-tools`): `allowed-tools` grants `Bash`, `Bash(*)` or `*`, so the file's commands run without the user being asked.

A finding the pattern rules already report is folded into one. The screen runs offline with every scan and has no flag to turn it off.

## Fix or record

No inline suppression comment applies to these files. Fix the file, or record a decision as described in [suppressions](https://keryn.dev/docs/guides/suppressions/).

## Limits

- Only the file names above. An instruction file with another name, or instructions loaded from elsewhere at run time, is not screened by this pass (the pattern rules may still match it).
- The screen reads the text. It does not run the agent or observe what it does; for that, see [test AI security boundaries](https://keryn.dev/docs/guides/ai-testing/).

## Next

- The MCP servers those agents connect to: [audit and guard MCP servers](https://keryn.dev/docs/guides/mcp-guard/).
- Committed credentials: [secrets](https://keryn.dev/docs/guides/secrets/).
- Third-party packages: [software composition analysis](https://keryn.dev/docs/guides/sca/).
