Smart Exclude

An agent that selects folders a SAST scan should skip, such as tests, documentation, generated output, and copied third-party code. SAST means checking source code for security bugs without running it.

In plain words
What is it for?
Use it before a security scan to inspect the directory layout and return justified folder patterns to exclude.
Why use it?
It keeps the scan focused on code and configuration owned by the project. This reduces review of files that are unlikely to contain the project's security flaws.

Agent

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 agents/agentgg-dev/agentgg/exclude
Clone the repo
git clone --depth 1 https://github.com/agentgg-dev/agentgg
Per session 36 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 305 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.00036 $0.00305
Opus 5 $0.00018 $0.00152
Sonnet 5 $0.00007 $0.00061
Haiku 4.5 $0.00004 $0.00030

Measured yesterday against content hash 60d54c6a3cf4, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

Smart Exclude 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 yesterday.

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.

packages/cli/src/agents/exclude.md · 33 lines

What it actually says

You are the smart-exclude agent for a SAST (static application security testing) run. Before the scan starts you are shown the repository's directory layout. Your job is to pick the folders that do not need to be scanned for security bugs, so the scan skips them. You do not look for vulnerabilities yourself.

A SAST run reviews the project's own code and configuration for security bugs, so keep any folder that could hold first-party source or config a security reviewer would care about. Only exclude folders that clearly need no security review, such as:

  • Test directories and their fixtures, mocks, and sample / test data.
  • Documentation and examples.
  • Generated or compiled output.
  • Vendored third-party dependencies.

Make sure you understand what the folder are and do not make decision just based off their name.

Output

Return the folder globs to exclude, each with a one-line reason. Use minimatch directory globs, e.g. docs, **/__tests__, **/testdata, third_party. Exclude a whole folder when all of it needs no review, or a subfolder when only part of it does. Return an empty list if the whole tree is worth scanning.

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. yesterday First seen · 33 lines · 36 tokens per session scan A 60d54c6a3cf4

Subscribe to this mod's changes

Smart Exclude is an agent published in the GitHub repository agentgg-dev/agentgg (194 stars, last pushed 3d ago), licensed Apache-2.0. It adds 36 tokens to every session and 305 once invoked, about $0.0002 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-30.

Related

Other agents, from other repositories

threat-modeler

Use this agent when the user asks to "create a threat model", "analyze threats", "STRIDE analysis", "what are the threats", "threat modeling", "identify attack vectors", "map attack surface", or needs systematic threat identification with data flow diagrams.

allsmog/vuln-scout · 60 tokens

false-positive-verifier

Use this agent to verify security findings and eliminate false positives. Analyzes code context, data flow paths, and exploitability with structured evidence to determine if a finding is a true positive or false positive.

allsmog/vuln-scout · 46 tokens

poc-developer

Use this agent when the user wants to "write an exploit", "create a PoC", "develop proof of concept", "automate the attack", or needs help creating exploit scripts during Phase 3 of whitebox security review.

allsmog/vuln-scout · 52 tokens

app-mapper

Use this agent when the user asks to "understand the application", "map the codebase", "analyze the architecture", "identify trust boundaries", "map user roles", or needs to build comprehensive application understanding before vulnerability hunting.

allsmog/vuln-scout · 51 tokens

code-reviewer

Use this agent when the user asks to "review code for security", "find vulnerabilities", "security audit", "analyze for security issues", or when exploring a codebase with security concerns.

allsmog/vuln-scout · 43 tokens

attack-researcher

Autonomous attack vector exploration agent that hypothesizes novel attack vectors, tests them against the codebase, and iterates. Use when the standard scan pipeline has completed and you want deeper, creative vulnerability research beyond pattern matching.

allsmog/vuln-scout · 50 tokens