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.
git clone --depth 1 https://github.com/Kartones/replicube-game-solutionsWrote 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/rules/kartones/replicube-game-solutions/replicube-deoptimization-rule)<a href="https://agentmods.dev/rules/kartones/replicube-game-solutions/replicube-deoptimization-rule"><img src="https://agentmods.dev/badge/rules/kartones/replicube-game-solutions/replicube-deoptimization-rule.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.00000 | $0.01515 |
| Opus 5 | $0.00000 | $0.00758 |
| Sonnet 5 | $0.00000 | $0.00303 |
| Haiku 4.5 | $0.00000 | $0.00152 |
Grade A, and why
replicube-deoptimization-rule 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 7d 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.
How it starts
The opening of the file, as written. The whole thing — 238 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Replicube Code Deoptimization Rule
Purpose
Convert optimized Replicube LUA code into human-readable format by reversing the optimization techniques described in coding.md.
Cursor Rule
When asked to "deoptimize" or "make readable" Replicube LUA code, apply these transformations:
Convert Ternary-like Returns to If-Else Statements
From: return condition and value or 0
To:
if condition then
return value
end
return 0
From: return condition and value (implicit or 0)
To:
if condition then
return value
end
return 0
Convert Complex Boolean Returns to If-Else
From: return x == y and y == z and 11 or 0
To:
if x == y and y == z then
return 11
end
return 0
Extract Repeated Calculations to Variables
From: Multiple occurrences of x*x. There must be AT MINIMUM 2 occurrences of each case to extract it, else do NOT extract to a variable.
Example:
if x*x > 2 and y*y > 4 then
-- some code
end
if x*x > 3 and y*y < 6 then
-- some other code
end
To:
local x_squared = x * x
local y_squared = y * y
if x_squared > 2 and y_squared > 4 then
-- some code
end
if x_squared > 3 and y_squared < 6 then
-- some other code
end
Example (of non-conversion due to only a single occurrence): From:
if x*x > 2 and y*y > 4 then
-- some code
end
To:
-- code is unchanged
if x*x > 2 and y*y > 4 then
-- some code
end
Add Local Scope for Readability
From: Variables without local scope
To: Add local keyword for better readability (even if it increases instruction count)
Prefer abs(x) instead of x*x
From: x*x == squared_value_of_x (optimized absolute value comparison)
To: abs(x) == value_of_x or explicit absolute value logic
From: x*x + z*z < value (squared distance calculations)
To: Consider if this represents abs(x) + abs(z) < threshold (Manhattan distance) or keep as Euclidean distance.
Note: When x*x appears to be used for absolute value comparisons (especially in small integer ranges), convert back to abs(x) for clarity, taking into account to also update the value compared with. This includes local variables (feel free to rename them accordingly). Example:
From:
local x_squared = x*x
local y_squared = y*y
if x_squared < 4 and y_squared < 4 then
return PEACH
end
to:
local x_abs = abs(x)
local y_abs = abs(y)
if x_abs < 2 and y_abs < 2 then
return PEACH
end
Another example: From:
if y * y > x * x then
return YELLOW
end
To:
if abs(y) > abs(x) then
return YELLOW
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.
- 7d ago First seen · 238 lines · 0 tokens per session scan A 115c9de69c22
replicube-deoptimization-rule is a cursor rule published in the GitHub repository Kartones/replicube-game-solutions (14 stars, last pushed 1y ago), licensed Unlicense. It costs nothing until one of its globs matches a file; then it loads 1,515 tokens. 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-30.
Other cursor rules, from other repositories
error-handling-and-validation
A code-quality guide for handling errors, invalid inputs, edge cases, preconditions, logging, and user-friendly error messages.
css-render-blocking-diagnosis
Cursor rule "css-render-blocking-diagnosis" from adobecom/da-express-milo, covering css render-blocking diagnosis & resolution, critical learning from 98 pagespeed achievement, primary diagnostic protocol, step 1: css blocking symptom recognition and step 2: css loading sequence audit.
workflow-level1
Streamlined workflow for Level 1 Quick Bug Fix tasks.
modus-checkbox-value-inversion-react-short
Critical bug fix for ModusWcCheckbox value property inversion.
javascript-expert-performance
Profile first. Measure before and after. Never optimize without data.
5-bug-finder
APPLY WHEN investigating a bug.