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/altaidevorg/rules-for-aiWrote 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/altaidevorg/rules-for-ai/guide)<a href="https://agentmods.dev/rules/altaidevorg/rules-for-ai/guide"><img src="https://agentmods.dev/badge/rules/altaidevorg/rules-for-ai/guide/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/rules/altaidevorg/rules-for-ai/guide"><img src="https://agentmods.dev/badge/rules/altaidevorg/rules-for-ai/guide.svg" alt="Reviewed on agentmods" width="80" 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.00984 | $0.00984 |
| Opus 5.5 | $0.00394 | $0.00394 |
| Sonnet 5.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 2mo 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.
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.
- 2mo ago 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.0039 per session on Opus 5.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
pytorch-deep-learning
A set of Python guidelines for building and training deep-learning models with PyTorch, a machine-learning framework. It covers model structures, training loops, loss calculation, optimization, and choosing available hardware.
scikit-learn-machine-learning
A set of Python guidelines for building machine-learning models with scikit-learn, a library for training models from data. It covers preparing data, linking processing steps into pipelines, training models, and checking results with cross-validation.
tensorflow-handbook
A set of guidelines for building and training neural networks with TensorFlow and Keras, Python tools for machine learning. It covers sequential models, model training, distributed training, and using multiple GPUs.
langflow-input-types
This document provides a comprehensive guide to all input types available in Langflow. Each input type is designed for specific use cases and data formats.
dask-notebook
Create a Jupyter notebook that sets up a Dask distributed LocalCluster and walks through an ETL workflow.
032_MIPROv2_MultiHop_Reasoning_Tutorial
Comprehensive example of using MIPROv2 to optimize complex multi-hop reasoning systems with DSPy 3.0.1. This tutorial demonstrates advanced reasoning chain optimization, knowledge graph traversal, and production-ready multi-step inference systems.