ponytail

A set of coding rules for Lean projects, with guidance on finding existing code, keeping changes small, and splitting large modules.

In plain words
What is it for?
Use it when editing Lean code in Cursor: inspect related files, follow the project's existing patterns, run builds and tests, and split large changes into smaller modules.
Why use it?
It helps prevent oversized, messy changes and discourages unsafe shortcuts such as blind type casts, dead code, and deeply nested logic.

Cursor rule

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 rules/kleosr/kleosrules/ponytail
Clone the repo
git clone --depth 1 https://github.com/kleosr/kleosrules
Per session 231 This file is loaded in full into every session.
When invoked 231 The same file — it is already loaded in full.
Security scan A 0 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.00231 $0.00231
Opus 5 $0.00115 $0.00115
Sonnet 5 $0.00046 $0.00046
Haiku 4.5 $0.00023 $0.00023

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

Security

Grade A, and why

ponytail 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 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.

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.

shared/rules/ponytail.mdc · 31 lines

What it actually says

Native Lean

Smallest diff. Zero prose comments. No registered lean hook.

Ladder

  1. No code
  2. Reuse (Grep)
  3. Stdlib
  4. Platform
  5. Installed dep
  6. One-liner
  7. Minimum (soft ~80; split before 120; hard 300; >700 rewrite modules ≤300)

Quality

Match 1–2 siblings before Write. Named exports. Early return. Nesting ≤2. No any / blind casts. No dead code or empty catch.

Tools

Read, Grep, Glob, Write, StrReplace, EditNotebook, Delete. Shell: builds, tests, git. before_shell.sh denies Shell source-write.

Split

Over roof: Write new modules, StrReplace original to imports, Grep callers. Never Shell sed.

Procedure

Complex or architecture: Read ~/.cursor/skills/ponytail/SKILL.md

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 · 31 lines · 231 tokens per session scan A 4a72afbc762f

Subscribe to this mod's changes

ponytail is a cursor rule published in the GitHub repository kleosr/kleosrules (2 stars, last pushed 3d ago), licensed MIT. It adds 231 tokens to every session, about $0.0012 per session on Opus 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.