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/altaidevorg/rules-for-ai/guidegit clone --depth 1 https://github.com/altaidevorg/rules-for-aiWhat 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.00984 | $0.00984 |
| Opus 5 | $0.00492 | $0.00492 |
| Sonnet 5 | $0.00197 | $0.00197 |
| Haiku 4.5 | $0.00098 | $0.00098 |
Grade A, and why
guide 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.
What it actually says
Flax NNX is a neural network library for JAX designed to enhance the developer experience by integrating stateful object-oriented programming with JAX's functional paradigm.
The core abstraction is nnx.Module (0), a standard Python class where state (parameters, batch statistics, RNG states) is held directly as attributes, typically wrapped in nnx.Variable (1) subtypes (e.g., nnx.Param, nnx.BatchStat). This allows for intuitive initialization and direct attribute access.
To bridge the gap with JAX's requirement for pure functions and immutable data structures (pytrees), NNX provides:
- A Functional API (2): Functions like
nnx.split,nnx.merge,nnx.state, andnnx.updateallow explicitly separating a Module's static structure (GraphDef) from its dynamic state (GraphState), which is a pytree of immutablennx.VariableState(1) objects.GraphDefandGraphState(7) form the internal representation used by this API.Filters(5) are used extensively within this API to select specific parts of the state based on type, tags, or path. - Lifted Transforms (3): Higher-level wrappers around JAX transformations (e.g.,
nnx.jit,nnx.grad,nnx.vmap) that implicitly handle the state splitting and merging via the Functional API (2), offering a more object-oriented interface to users.
Auxiliary components include:
nnx.Rngs(4): Manages PRNG keys for reproducibility and simplified handling withinnnx.Modulemethods.nnx.Optimizer(6): A helper class encapsulating a Module, its differentiable parameters (selected viaFilters(5)), an Optax optimizer, and its state, simplifying the training loop update step.
Overall, NNX aims to provide the flexibility and ease-of-use of Python objects while retaining compatibility with the performance benefits of JAX's functional transformations.
Source Repository: https://github.com/google/flax.git
flowchart TD
A0["nnx.Module"]
A1["nnx.Variable / nnx.VariableState"]
A2["NNX Functional API (split/merge/state/update/graphdef)"]
A3["NNX Lifted Transforms (jit, grad, vmap, scan, etc.)"]
A4["nnx.Rngs"]
A5["Filters (`filterlib`)"]
A6["nnx.Optimizer"]
A7["Graph Representation (GraphDef / GraphState)"]
A0 -- "Contains / Holds state in" --> A1
A0 -- "Uses for randomness" --> A4
A2 -- "Operates on / Deconstructs ..." --> A0
A2 -- "Produces / Consumes" --> A7
A2 -- "Uses for selection" --> A5
A3 -- "Operates on" --> A0
A3 -- "Uses implicitly" --> A2
A5 -- "Selects / Filters" --> A1
A6 -- "Wraps / Manages" --> A0
A6 -- "Updates state of" --> A1
A6 -- "Uses for parameter selection" --> A5
A7 -- "Contains immutable state" --> A1
A4 -- "Manages RNG state via" --> A1
A3 -- "Uses for selection (e.g., S..." --> A5
Chapters
nnx.Module
nnx.Variable / nnx.VariableState
nnx.Rngs
Filters (filterlib)
NNX Lifted Transforms (jit, grad, vmap, scan, etc.)
NNX Functional API (split/merge/state/update/graphdef)
Graph Representation (GraphDef / GraphState)
nnx.Optimizer
Generated by Rules for AI
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 · 62 lines · 984 tokens per session scan A 0d86edc9c792
guide is a cursor rule published in the GitHub repository altaidevorg/rules-for-ai (2 stars, last pushed 1y ago), licensed MIT. It adds 984 tokens to every session, about $0.0049 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.
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.
typescript
Changes to these high-fan-out internals can affect every message, delta, element, or rerun. Keep work in them minimal, and benchmark changes with representative stress-test apps.
coolify-ai-docs
Master reference to all Coolify AI documentation in .ai/ directory.
python_lib
Tips and guidelines specific to the development of the Streamlit Python library, not applicable to scripts and e2e tests.
specs
This directory contains product and tech specs for Streamlit features.