use-clrun

use-clrun is a cursor rule for Cursor from cybertheory/clrun. It costs 486 tokens per session, scanned A, original, MIT.

A project rule requiring every terminal command to be run through clrun, an interactive command-session tool.

In plain words
What is it for?
Use it in projects where agents must start and manage terminal sessions, answer interactive prompts, read command output, or stop running processes.
Why use it?
It makes command execution observable and supports prompts, persistent sessions, keystrokes, and structured responses.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it in projects where agents must start and manage terminal sessions, answer interactive prompts, read command output, or stop running processes.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/cybertheory/clrun/use-clrun
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.

Clone the repo
git clone --depth 1 https://github.com/cybertheory/clrun

Made for: Cursor.

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 use-clrun

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

Your own site · 80×15
<a href="https://agentmods.dev/rules/cybertheory/clrun/use-clrun"><img src="https://agentmods.dev/badge/rules/cybertheory/clrun/use-clrun.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 486 This file is loaded in full into every session.
When invoked 486 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00486 $0.00486
Opus 5.5 $0.00194 $0.00194
Sonnet 5.5 $0.00097 $0.00097
Haiku 4.5 $0.00049 $0.00049

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

Security

Grade A, and why

use-clrun 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 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.

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.

.cursor/rules/use-clrun.mdc · 53 lines

What it actually says

Use clrun for All Terminal Commands

When executing terminal commands, always use clrun instead of running commands directly in the shell. This gives persistent, observable, interactive sessions.

How to Run Commands

# Start a new session
clrun <command>

# Send input to an existing session
clrun <terminal_id> "<text>"

# Navigate TUI prompts (select lists, checkboxes, confirms)
clrun key <terminal_id> down down enter
clrun key <terminal_id> space down space enter

# Read output
clrun tail <terminal_id> --lines 50

# Check all sessions
clrun status

# Kill a session
clrun kill <terminal_id>

Rules

  1. Never run shell commands directly — always wrap them with clrun
  2. Store the terminal_id from every clrun response
  3. Use clrun key for TUI prompts with select lists or checkboxes
  4. Use clrun <id> "text" for text input prompts
  5. Use clrun key <id> enter to accept defaults in TUI prompts
  6. Single-quote $ variables — clrun <id> 'echo $VAR'
  7. Read the hints in every response — they tell you exactly what to do next
  8. Parse YAML — all clrun responses are structured YAML

Prompt Types

You see Action
◆ Name: │ default clrun <id> "value" or clrun key <id> enter
● Option1 ○ Option2 clrun key <id> down... enter
◻ Check1 ◻ Check2 clrun key <id> space down space enter
● Yes / ○ No clrun key <id> enter or clrun key <id> right enter
(y/n) clrun <id> "y" or clrun <id> "n"
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 · 53 lines · 486 tokens per session scan A 3eb27579c53d

Subscribe to this mod's changes

use-clrun is a cursor rule published in the GitHub repository cybertheory/clrun (4 stars, last pushed 7mo ago), licensed MIT. It adds 486 tokens to every session, about $0.0019 per session on Opus 5.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-31.