Is rtk-ai/rtk safe?
What rtk-ai/rtk does
RTK is a single Rust binary that filters and compresses shell command output before an AI coding agent reads it. It is published in the rtk-ai/rtk repository and installs through Homebrew, winget or an install script. Running rtk init adds a hook or rules file for the agent you choose, such as a PreToolUse hook for Claude Code, so commands like git status are rewritten to rtk equivalents. The hook sees only shell commands, not the agent's built-in file tools. An optional rtk-proxy daemon can sit between the agent and its model provider. The README says telemetry stays off until you opt in. Before installing, run rtk gain to confirm you have this rtk, since an unrelated crate with the same name exists on crates.io.
- Python shell/command execution
- Node.js shell/command execution
- Python filesystem write/delete
What to do: The Rust and Ruby code was not checked for shell, network or file access, so this result is incomplete. Review that code before installing.
rtk-ai/rtk is a GitHub repository analyzed by SkillTotal's deterministic static scanner. The scan found no malicious indicators. Its Rust and Ruby code was not checked for shell, network or file access, so this result is partial. It can: filesystem read, filesystem write and shell execution — capabilities are what the code can do, not a verdict on intent. Risk score 0/100 (low).
rtk
Get notified when this component changes
Change alerts aren't live yet. Leave your email and we'll let you know when they launch. We use it only for this and delete it on request.
Automated static-analysis result. It can contain false positives and false negatives, and is not a claim about the intent of rtk-ai/rtk's authors. Report a false positive.
Behavioral traits
How this component maps to the CSA agentic threat model. Descriptive — it never affects the risk score.
Findings (4)
The component can run operating-system commands or spawn processes.
import { execFile } from "node:child_process"import { execFileSync } from "node:child_process";Why it matters: Powerful and often legitimate — confirm the commands aren't built from untrusted input.
Fix: Confirm the command and its arguments are fully controlled and not derived from untrusted input; prefer execFile with an argument array.
The component can run operating-system commands or spawn processes.
run = subprocess.run(args, capture_output=True, text=True)
result = subprocess.run(
["rtk", "rewrite", command],
shell=False,
stdin=subprocess.DEVNULL,
timeout=_rewrite_timeout(),
capture_output=True,
te …subprocess.run(
["tar", "czf", tarball, "-C", str(source_dir), "."],
check=True,
)Why it matters: Powerful and often legitimate — confirm the commands aren't built from untrusted input.
Fix: Confirm the command and its arguments are fully controlled and not derived from untrusted input; avoid shell=True.
The component reads files from disk.
for line in open(path):
Why it matters: Usually legitimate, but worth confirming it can't be steered into reading sensitive files.
Fix: Confirm which files are read and that paths cannot be influenced by untrusted input to reach sensitive locations.
The component writes or deletes files on disk.
with open(path, "w") as out:
Why it matters: Usually legitimate, but worth confirming the paths can't be controlled by untrusted input.
Fix: Confirm which files are written/deleted and that paths cannot be influenced by untrusted input.
How attackers abuse these capabilities
Interactive labs on the attack class behind the rules above. They show the technique, not anything found in rtk-ai/rtk.
Maintain rtk-ai/rtk?
The free Claude Code plugin scans each npm, PyPI or MCP package with this report's open-source engine before the install command runs. It runs on your machine and needs no account.
Check your own component
Run the same evidence-backed scan on any MCP server, agent skill, or package.
Scan your own componentHow we determine this: deterministic static analysis (regex + AST), evidence-anchored, no code execution. Methodology →