guard

guard is a skill for Claude Code from drn/dots. It costs 35 tokens per session (993 once invoked), scanned A, original, MIT.

A pre-commit check that scans changed files before they are saved to Git history.

In plain words
What is it for?
Use it as a quick pass or fail gate before committing staged or otherwise changed files, with an optional strict mode for warnings.
Why use it?
It helps catch exposed secrets, unsafe security patterns, broken tests, lint problems, and files that should not be committed.

Skill for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

Good fit Use it as a quick pass or fail gate before committing staged or otherwise changed files, with an optional strict mode for warnings.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/drn/dots/guard
View source ↗ drn/dots
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 drn/dots --skill guard
Clone the repo
git clone --depth 1 https://github.com/drn/dots

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 guard

README.md
[![agentmods](https://agentmods.dev/badge/skills/drn/dots/guard/github.svg)](https://agentmods.dev/skills/drn/dots/guard)
Your own site
<a href="https://agentmods.dev/skills/drn/dots/guard"><img src="https://agentmods.dev/badge/skills/drn/dots/guard/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 guard

Your own site · 80×15
<a href="https://agentmods.dev/skills/drn/dots/guard"><img src="https://agentmods.dev/badge/skills/drn/dots/guard.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 993 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 5 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 34
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Tool Misuse · line 60
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
  • medium Privilege Escalation · line 60
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
  • medium Tool Misuse · line 60
    Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.
    Fix: Override unsafe defaults with secure settings (verify=True, auth required, restrictive permissions). Review and harden all tool configurations.
  • medium MCP Rug Pull · line 83
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
How audits are shown
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.00035 $0.00993
Opus 5.5 $0.00014 $0.00397
Sonnet 5.5 $0.00007 $0.00199
Haiku 4.5 $0.00003 $0.00099

Measured 1mo ago against content hash b5257b4cd91e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

guard 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 1mo 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.

Asks for rootlowPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

- `chmod 777` or world-readable permissions

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

agents/skills/guard/SKILL.md · 121 lines

How it starts

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

Pre-commit Guard

Fast safety check before committing. Scans for secrets, security antipatterns, test breakage, and lint issues. Binary pass/fail output.

Arguments

  • $ARGUMENTS - Optional: --strict for zero-tolerance mode (warnings also fail)

Context

  • Staged files: !git diff --cached --name-only
  • Unstaged changes: !git diff --name-only
  • Project type: !find . -maxdepth 1 \( -name go.mod -o -name Gemfile -o -name package.json -o -name Cargo.toml -o -name pyproject.toml \) 2>/dev/null | head -3

Instructions

Run these checks against all staged files (or all changed files if nothing is staged). Be fast -- this is a pre-commit gate, not a full review.

Check 0: Gitignore Violations

Scan staged/changed files for common files that should not be committed:

  • .env, .env.* files (environment/secrets)
  • node_modules/ contents
  • Build artifacts (dist/, build/, *.o, *.pyc, __pycache__/)
  • IDE files (.idea/, .vscode/settings.json)
  • OS files (.DS_Store, Thumbs.db)
  • Log files (*.log)
  • Credential files (credentials.json, *.pem, *.key)

Report: WARNING if any found (FAIL in --strict mode).

Check 1: Secrets Detection

Scan staged/changed files for:

  • API keys, tokens, passwords (patterns: password\s*=, api_key, secret, token\s*=, Bearer )
  • AWS credentials (AKIA, aws_secret_access_key)
  • Private keys (-----BEGIN.*PRIVATE KEY-----)
  • Connection strings with embedded credentials
  • .env files being committed
  • Hardcoded URLs with credentials (https://user:pass@)

Report: FAIL if any found, with file and line number.

Check 2: Security Antipatterns

Scan for common dangerous patterns:

  • eval() or exec() with variable input
  • SQL string concatenation (instead of parameterized queries)
  • dangerouslySetInnerHTML or equivalent
  • Disabled SSL verification (verify: false, VERIFY_NONE)
  • Overly permissive CORS (Access-Control-Allow-Origin: *)
  • chmod 777 or world-readable permissions
  • --no-verify or security bypass flags in code

Read the full file on GitHub · 121 lines

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. 1mo ago First seen · 121 lines · 35 tokens per session scan A b5257b4cd91e

Subscribe to this mod's changes

guard is a skill published in the GitHub repository drn/dots (23 stars, last pushed 11d ago), licensed MIT. It adds 35 tokens to every session and 993 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

research-engineer

An uncompromising Academic Research Engineer. Operates with absolute scientific rigor, objective criticism, and zero flair. Focuses on theoretical correctness, formal verification, and optimal implementation across any required technology.

davila7/claude-code-templates · 43 tokens

eval-dataset-design

A guide to creating reliable test sets for AI agents. Each evaluation task includes the request, the simulated user's behaviour, a reset starting state, and a success check that can be independently verified.

bojieli/ai-agent-book · 138 tokens

tika-eval-compare

Compare extracts from two Tika builds over a corpus to detect regressions in content, encoding, exceptions, and embedded-document handling. Use for "compare before/after extracts", "eval this change against the corpus".

apache/tika · 50 tokens

cua-driver

Use Cua Driver for desktop or browser tasks that are awkward or unavailable through Bash/APIs, or when the user explicitly wants GUI interaction: app testing, visual bug reproduction, form filling, calendar entry, screenshots, and demo recording. Also covers Cua setup; not OpenAI Codex Computer Use or web research.

davidondrej/skills · 68 tokens

jetson-validate-image

Use after jetson-flash-image to run static BSP checks, on-target smoke/regression tests on a flashed DUT, or both. Not for build or flash steps. Triggers: validate bsp, on-target validation.

NVIDIA/skills · 50 tokens

atmos-validation

Validate Atmos projects, components, arbitrary JSON Schema inputs, EditorConfig, and GitHub Actions; use affected-file selection and native CI annotations.

cloudposse/atmos · 31 tokens