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.
npx agentmods add agents/ramilito/kubectl.nvim/clean-codegit clone --depth 1 https://github.com/Ramilito/kubectl.nvimWrote 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.
[](https://agentmods.dev/agents/ramilito/kubectl.nvim/clean-code)<a href="https://agentmods.dev/agents/ramilito/kubectl.nvim/clean-code"><img src="https://agentmods.dev/badge/agents/ramilito/kubectl.nvim/clean-code.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00028 | $0.01533 |
| Opus 5 | $0.00014 | $0.00766 |
| Sonnet 5 | $0.00006 | $0.00307 |
| Haiku 4.5 | $0.00003 | $0.00153 |
Grade A, and why
clean-code 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 yesterday.
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.
How it starts
The opening of the file, as written. The whole thing — 246 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Clean Code Principles
Guidance for maintaining clean, readable code that respects human cognitive limits.
Core Principle: Limited Working Memory
Humans can hold approximately 4-7 items in working memory at once. Code must be written with this constraint in mind. Every function, module, and abstraction should minimize the mental load required to understand it.
Function Design
Keep Functions Small and Focused
A function should do one thing and fit in your head:
- Max 20-30 lines as a soft guideline
- Max 3-4 parameters - more indicates the function does too much
- Single level of abstraction - don't mix high-level logic with low-level details
-- BAD: Mixed abstraction levels, too much happening
function process_pod(pod)
local name = pod.metadata.name
local ns = pod.metadata.namespace
local status = pod.status.phase
if status == "Running" then
local containers = pod.spec.containers
for _, c in ipairs(containers) do
-- 50 more lines of container processing...
end
end
-- format output, handle errors, update state...
end
-- GOOD: Each function handles one concern
function process_pod(pod)
local info = extract_pod_info(pod)
if is_running(info) then
process_containers(pod.spec.containers)
end
return format_output(info)
end
Descriptive Names Over Comments
Names should reveal intent. If you need a comment to explain what code does, rename it instead:
// BAD
let t = 86400; // seconds in a day
// GOOD
let seconds_per_day = 86400;
// BAD
fn proc(d: &Data) -> Result // processes the data
// GOOD
fn validate_and_transform_resource(resource: &Resource) -> Result
Early Returns to Reduce Nesting
Deep nesting forces the reader to track multiple conditions. Use early returns:
-- BAD: Reader must track 3 levels of conditions
function handle_request(req)
if req then
if req.valid then
if req.authorized then
-- actual logic here, 3 levels deep
end
end
end
end
-- GOOD: Flat structure, exit early
function handle_request(req)
if not req then return nil end
if not req.valid then return nil, "invalid" end
if not req.authorized then return nil, "unauthorized" end
-- actual logic here, at top level
end
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.
- yesterday First seen · 246 lines · 28 tokens per session scan A 73b5bdbfa651
clean-code is an agent published in the GitHub repository Ramilito/kubectl.nvim (537 stars, last pushed 22d ago), licensed Apache-2.0. It adds 28 tokens to every session and 1,533 once invoked, about $0.0001 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-09-04.
Other agents, from other repositories
redaccion
Eres un experto en redacción académica en LaTeX para Trabajos de Fin de Grado (TFG) y Máster (TFM) de la Escuela Politécnica Superior (EPS) de la Universidad de Alicante (UA).
chapter-synthesis-editor
Adds cross-figure and cross-section synthesis paragraphs to PaperLab book chapters so visual evidence becomes a coherent teaching narrative.
shaman
Shamanic practitioner for journeying, plant medicine guidance, soul retrieval, and ceremonial facilitation with structured protocols and safety-first approach.
slide-auditor
Visual layout auditor for RevealJS and Beamer slides. Checks for overflow, font consistency, box fatigue, and spacing issues. Use proactively after creating or modifying slides.
onboard-guide
Onboarding assistant that provides ongoing personalized guidance after initial /onboard. Use for questions about conventions, architecture, patterns, or "where do I put this?" — answers are tailored to the engineer's background.
speckit.squad.status
Show alignment between your spec, tasks, and Squad agents.