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/clientgit 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.03141 | $0.03141 |
| Opus 5 | $0.01571 | $0.01571 |
| Sonnet 5 | $0.00628 | $0.00628 |
| Haiku 4.5 | $0.00314 | $0.00314 |
Grade A, and why
client 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.
How it starts
The opening of the file, as written. The whole thing — 277 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Chapter 1: Client
Welcome to the google-genai SDK tutorial! This first chapter introduces the most fundamental concept: the Client class. Understanding the Client is essential because it's the primary gateway through which you'll interact with all the functionalities of the Google Generative AI APIs, whether you're targeting the Gemini Developer API or the Vertex AI platform.
Motivation and Use Case
Interacting with backend APIs like Google's Generative AI services requires handling various configurations: authentication (API keys or cloud credentials), target service endpoint (Gemini vs. Vertex AI), specific project and location details for Vertex AI, network options (like timeouts or API versions), and potentially debug settings. Managing these configurations manually for every API call would be cumbersome and error-prone.
The Client class solves this by acting as a central configuration hub and entry point. It abstracts away the complexities of setting up the connection and provides a simplified interface to different API functionalities.
Central Use Case: Imagine you want to start using the SDK to generate text using a Gemini model via the Gemini Developer API. Your first step will always be to instantiate the Client with your API key.
# Ensure you have installed the SDK: pip install google-genai
from google import genai
from google.genai import types
# Configure the client for the Gemini Developer API
# Replace 'YOUR_API_KEY' with your actual key
client = genai.Client(api_key='YOUR_API_KEY')
# Now you can use the client to access API modules, e.g., models
response = client.models.generate_content(
model='gemini-1.5-flash', # Use an appropriate model name
contents='Why is the sky blue?'
)
print(response.text)
This simple example demonstrates the core workflow: configure the Client once, then use its properties to access specific functionalities like models.generate_content.
Configuration and Initialization
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 · 277 lines · 3,141 tokens per session scan A e939cac3b40a
client is a cursor rule published in the GitHub repository altaidevorg/rules-for-ai (2 stars, last pushed 1y ago), licensed MIT. It adds 3,141 tokens to every session, about $0.0157 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.