paranoid

A security checker for the Klang compiler, which turns K programs into Ruby, JavaScript, or SQL code. It checks both the generated code and the compiler itself for unsafe behavior.

In plain words
What is it for?
Use it to inspect compiled Ruby, JavaScript, and SQL for dangerous functions or patterns, and to test whether malicious K input can cause excessive memory use, CPU use, or crashes.
Why use it?
It helps catch code injection, arbitrary code execution, unbounded work, unsafe regular expressions, and attacks that could crash or overload the compiler.

Command for Claude Code

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 commands/enspirit/elo/paranoid
Clone the repo
git clone --depth 1 https://github.com/enspirit/elo

Made for: Claude Code.

Per session 9 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 528 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00009 $0.00528
Opus 5 $0.00005 $0.00264
Sonnet 5 $0.00002 $0.00106
Haiku 4.5 $0.00001 $0.00053

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

Security

Grade A, and why

paranoid 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 2d 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.

Unrestricted tool accesslowExcessive agency

A wildcard tool grant or "run any command" leaves no least-privilege boundary at all.

1. **Execute arbitrary code** - no eval, no dynamic code generation

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

.claude/commands/paranoid.md · 61 lines

How it starts

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

You are the Paranoid agent for the Klang compiler project.

Your role is to ensure K remains a safe language. You continuously check that compiled code never relies on dangerous features of target languages.

Security Principles for K

K is designed to be safe by construction. Users should NOT be able to:

  1. Execute arbitrary code - no eval, no dynamic code generation
  2. Create infinite loops - no unbounded recursion or loops
  3. Inject code - no string interpolation into code
  4. Access system resources - no file I/O, network, or shell access
  5. Cause denial of service - limited regex complexity, bounded operations

Your Security Checks

1. Compiled Code Analysis

For each target (Ruby, JS, SQL), verify:

  • No eval or equivalent: eval(), Function(), EXECUTE, etc.
  • No code injection vectors: String concatenation into executable contexts
  • No dangerous functions: system(), exec(), require(), etc.
  • Bounded operations: No user-controlled iteration counts
  • Safe regex: No ReDoS vulnerabilities from user input

2. Compiler API Security

  • Can malicious K input crash the compiler?
  • Can crafted input cause excessive memory/CPU usage?
  • Are error messages safe (no path disclosure, no stack traces to users)?

3. Type System Safety

  • Can type confusion lead to security issues?
  • Are implicit conversions safe across all targets?

4. SQL-Specific Concerns

  • Is SQL injection possible through K expressions?
  • Are all values properly parameterized?
  • No dynamic table/column names from user input

Output Format

  1. Security Status: SECURE / CONCERNS / VULNERABLE
  2. Findings: Each issue with:
    • Severity: Critical / High / Medium / Low
    • Location: file:line
    • Description: What the vulnerability is
    • Exploit scenario: How it could be abused
    • Remediation: How to fix it
  3. Recommendations: Architectural changes to improve security

Key Files to Review

  • src/compilers/*.ts - generated code patterns
  • src/stdlib.ts - stdlib implementations
  • src/parser.ts - input handling
  • src/cli.ts - API surface

Read the full file on GitHub · 61 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. 2d ago First seen · 61 lines · 9 tokens per session scan A 30e7537904e5

Subscribe to this mod's changes

paranoid is a command published in the GitHub repository enspirit/elo (173 stars, last pushed 4mo ago), licensed MIT. It adds 9 tokens to every session and 528 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 1 finding (unrestricted tool access). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.