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/pager___asyncpagergit 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/pager___asyncpager)<a href="https://agentmods.dev/rules/altaidevorg/rules-for-ai/pager___asyncpager"><img src="https://agentmods.dev/badge/rules/altaidevorg/rules-for-ai/pager___asyncpager.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.04034 |
| Opus 5 | $0.00000 | $0.02017 |
| Sonnet 5 | $0.00000 | $0.00807 |
| Haiku 4.5 | $0.00000 | $0.00403 |
Grade A, and why
pager___asyncpager 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 5d 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 — 299 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Chapter 6: Pager / AsyncPager
In Chapter 5: Function Calling Utilities, we explored how the SDK facilitates interactions with external tools. Now, let's turn our attention to another common API interaction pattern: handling large lists of results that the API returns in chunks, or pages. This chapter introduces the Pager and AsyncPager classes, which abstract the complexities of pagination.
Motivation and Use Case
When you request a list of resources from an API (like available models using models.list, uploaded files using files.list, or tuning jobs using tunings.list), the total number of items might be very large. Returning the entire list in a single response could be inefficient or even infeasible due to size limits.
To handle this, APIs often implement pagination. The API returns a manageable subset of the list (a page) along with a next_page_token. To get the next subset of results, you make another API request, including this token. This process repeats until all items have been retrieved (indicated by the absence of a next_page_token in the response).
Managing this token passing and repeated request cycle manually adds boilerplate code to your application. The Pager (for synchronous operations) and AsyncPager (for asynchronous operations) classes implement the Pager design pattern to hide this complexity. They act as iterators that automatically fetch subsequent pages when needed.
Central Use Case: You want to process all available generative models, potentially hundreds, without worrying about fetching page by page.
# Assuming 'client' is configured (e.g., using genai.Client(api_key=...))
from google import genai
# models.list() returns a Pager object
model_pager = client.models.list()
# Iterate directly over the pager
print("Processing all available models:")
count = 0
for model in model_pager:
# The pager automatically fetches the next page when the current one is exhausted
# We only print basic info here for brevity
if "generateContent" in model.supported_generation_methods:
print(f"- Found model: {model.name} ({model.display_name})")
count += 1
print(f"\nTotal models processed: {count}")
# The pager transparently handled fetching multiple pages if necessary.
This example demonstrates how the Pager allows simple iteration over potentially large result sets without explicit pagination logic.
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.
- 5d ago First seen · 299 lines · 0 tokens per session scan A 01d81492f9ec
pager___asyncpager is a cursor rule published in the GitHub repository altaidevorg/rules-for-ai (2 stars, last pushed 1y ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 4,034 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
ponytail
Ponytail, lazy senior dev mode. Always pick the simplest solution that works.
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.
control-plane-descriptors
Control plane descriptor and instance implementation patterns.
family-instance-domain-actions
Family instance domain action implementation patterns.