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 rules/sounio-lang/sounio/effectsgit clone --depth 1 https://github.com/Sounio-lang/sounioWhat 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 | $0.00000 | $0.00689 |
| Opus 5 | $0.00000 | $0.00345 |
| Sonnet 5 | $0.00000 | $0.00138 |
| Haiku 4.5 | $0.00000 | $0.00069 |
Grade A, and why
effects 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 3d 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 — 66 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Sounio Effects System
Every function that performs a side effect MUST declare it with with. Missing effects = compile error.
Effect Reference
| Effect | When Required | Example |
|---|---|---|
IO |
println(), print(), file I/O, env access |
fn greet() with IO { println("hi") } |
Mut |
Mutating via &!, var reassignment in &! context |
fn set(x: &!i32) with Mut { *x = 5 } |
Div |
Division / or modulo % |
fn half(x: f64) -> f64 with Div, Panic { x / 2.0 } |
Panic |
Array access arr[i], assert(), as casts |
fn get(a: [i64; 4], i: i64) -> i64 with Panic { a[i as usize] } |
Alloc |
Heap allocation (Vec, Box) | Rare in most code |
Async |
Async operations | async fn fetch() with Async { } |
GPU |
GPU kernel execution | kernel fn k() with GPU { } |
Prob |
Probabilistic sampling | fn sample() with Prob { } |
Rules
- Pure functions have NO
withclause:fn add(a: i64, b: i64) -> i64 { a + b } - Div always pairs with Panic: Division can panic on zero, so both are needed
- Effects propagate upward: A caller must declare all effects of its callees
- Multiple effects:
fn process() with IO, Mut, Panic, Div { }
Common Patterns
// Pure — no effects
fn square(x: i64) -> i64 { x * x }
// IO only
fn hello() with IO { println("Hello") }
// Mutation
fn increment(c: &!i64) with Mut { *c = *c + 1 }
// Division (always with Panic)
fn average(a: f64, b: f64) -> f64 with Div, Panic { (a + b) / 2.0 }
// Array processing (Panic for bounds checks)
fn sum(arr: [i64; 4]) -> i64 with Panic {
var total: i64 = 0
for i in 0..4 { total = total + arr[i as usize] }
total
}
// Main — usually needs everything
fn main() with IO, Mut, Panic, Div {
// ...
}
Common Mistakes
- Forgetting
Panicwhen accessing arrays:arr[i as usize]needsPanic - Forgetting
Mutwhen using&!references - Forgetting
IOwhen callingprintln()orprint() - Forgetting
Divwhen using/or% - Not propagating effects from callees to callers
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.
- 3d ago First seen · 66 lines · 0 tokens per session scan A 77c5a8a532dd
effects is a cursor rule published in the GitHub repository Sounio-lang/sounio (5 stars, last pushed 3d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 689 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-31.
Other cursor rules, from other repositories
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.
cli-error-handling
CLI command error handling patterns.
prefer-direct-imports-over-module-mocks
Prefer extracting a testable core over vi.mock / vi.resetModules when unit tests need to reach production logic entangled with config, env, or singletons.
control-plane-descriptors
Control plane descriptor and instance implementation patterns.
family-instance-domain-actions
Family instance domain action implementation patterns.