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/girijashankarj/cursor-handbookWrote 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/girijashankarj/cursor-handbook/secrets-rules)<a href="https://agentmods.dev/rules/girijashankarj/cursor-handbook/secrets-rules"><img src="https://agentmods.dev/badge/rules/girijashankarj/cursor-handbook/secrets-rules/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/girijashankarj/cursor-handbook/secrets-rules"><img src="https://agentmods.dev/badge/rules/girijashankarj/cursor-handbook/secrets-rules.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.00515 | $0.00515 |
| Opus 5.5 | $0.00206 | $0.00206 |
| Sonnet 5.5 | $0.00103 | $0.00103 |
| Haiku 4.5 | $0.00052 | $0.00052 |
Grade A, and why
secrets-rules 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 3mo 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 — 72 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Secrets Handling Rules
Environment Variable Patterns
Required Environment Variables
All secrets MUST be loaded from environment variables or a secrets manager.
// CORRECT - Environment variable
const dbPassword = process.env.DB_PASSWORD;
const apiKey = process.env.API_KEY;
// WRONG - Hardcoded (NEVER do this)
const dbPassword = "my-secret-password";
const apiKey = "sk-1234567890abcdef";
Configuration Loading Pattern
// config/index.ts
export const config = {
database: {
host: process.env.DB_HOST || 'localhost',
port: parseInt(process.env.DB_PORT || '5432'),
name: process.env.DB_NAME || '{{CONFIG.project.name}}',
// Secrets - NO defaults for production
password: process.env.DB_PASSWORD,
username: process.env.DB_USERNAME,
},
auth: {
jwtSecret: process.env.JWT_SECRET,
jwtExpiry: process.env.JWT_EXPIRY || '15m',
},
cloud: {
region: process.env.CLOUD_REGION || 'us-east-1',
// Never log these values
accessKey: process.env.CLOUD_ACCESS_KEY,
secretKey: process.env.CLOUD_SECRET_KEY,
}
};
// Validate required secrets at startup
const requiredSecrets = ['DB_PASSWORD', 'JWT_SECRET'];
for (const secret of requiredSecrets) {
if (!process.env[secret]) {
throw new Error(`Missing required environment variable: ${secret}`);
}
}
.env File Rules
.envfiles MUST be in.gitignore- Provide
.env.examplewith placeholder values (no real secrets) - Never commit
.envfiles to version control - Use different
.envfiles per environment:.env.development,.env.staging,.env.production
Secret Rotation
- All secrets should support rotation without deployment
- Use secrets manager with automatic rotation when possible
- Log secret access (but never the secret value) for audit trails
What to Look For in Code Reviews
grepfor patterns:password,secret,key,token,credential- Check for base64-encoded strings that might be obfuscated secrets
- Verify
.envfiles are in.gitignore - Check that test fixtures don't contain real credentials
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.
- 3mo ago First seen · 72 lines · 515 tokens per session scan A 71a1f38d912c
secrets-rules is a cursor rule published in the GitHub repository girijashankarj/cursor-handbook (33 stars, last pushed 3mo ago), licensed MIT. It adds 515 tokens to every session, about $0.0021 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-09-03.
secrets-rules compared with cursor rules from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| secrets-rulesgirijashankarj/cursor-handbook | Cursor rule | 33 | 3mo ago | MIT | A | 515 | Cursor |
| graphstackMertCapkin/GraphStack | Cursor rule | 8 | 5mo ago | MIT | A | 1,573 | Cursor |
| new_featureseyaltoledano/claude-task-master | Cursor rule | 29k | yesterday | none | A | 0 | Cursor |
| utilitieseyaltoledano/claude-task-master | Cursor rule | 29k | yesterday | none | A | 0 | Cursor |
| mcpeyaltoledano/claude-task-master | Cursor rule | 29k | yesterday | none | A | 0 | Cursor |
| commandseyaltoledano/claude-task-master | Cursor rule | 29k | yesterday | none | A | 0 | Cursor |
| git_workfloweyaltoledano/claude-task-master | Cursor rule | 29k | yesterday | none | A | 2,938 | Cursor |