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/pranav-karra-3301/tuck/errorsgit clone --depth 1 https://github.com/Pranav-Karra-3301/tuckWhat 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.00000 | $0.00560 |
| Opus 5 | $0.00000 | $0.00280 |
| Sonnet 5 | $0.00000 | $0.00112 |
| Haiku 4.5 | $0.00000 | $0.00056 |
Grade A, and why
errors 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 — 118 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Error Handling Rules
Custom Error Classes
ALWAYS use custom errors from src/errors.ts:
import {
TuckError, // Base error class
NotInitializedError, // Tuck not set up
AlreadyInitializedError, // Already initialized
FileNotFoundError, // File doesn't exist
FileNotTrackedError, // File not in manifest
FileAlreadyTrackedError, // Already tracked
GitError, // Git operation failed
ConfigError, // Configuration issue
ManifestError, // Manifest corruption
PermissionError, // Can't read/write
GitHubCliError, // GitHub CLI issues
BackupError, // Backup/snapshot issues
} from '../errors.js';
Error Structure
All custom errors include:
- Human-readable message
- Error code for programmatic handling
- Suggestions for resolution
throw new FileNotFoundError(path, {
suggestion: "Run 'tuck add' to track this file first"
});
Error Handling Patterns
Catching Errors
// Good - handle specific error
try {
await loadManifest(tuckDir);
} catch (error) {
if (error instanceof ManifestError) {
throw new NotInitializedError();
}
throw error; // Re-throw unknown errors
}
NEVER Do
// Bad - silent failure
await operation().catch(() => {});
// Bad - generic error
throw new Error('Something went wrong');
// Bad - swallowing errors
try {
await operation();
} catch {
// Do nothing
}
User-Facing Errors
Errors shown to users should:
- Explain what happened
- Suggest how to fix it
- Be actionable
// Good
throw new ConfigError(
'Configuration file is corrupted',
{
code: 'CONFIG_CORRUPT',
suggestion: "Run 'tuck config reset' to restore defaults"
}
);
Logging Errors
Use the logger for debug info, not console:
import { logger } from '../ui/index.js';
logger.debug('Processing file:', filePath);
logger.error('Failed to read file:', error.message);
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 · 118 lines · 0 tokens per session scan A d16729fb88f9
errors is a cursor rule published in the GitHub repository Pranav-Karra-3301/tuck (14 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 560 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-30.
Other cursor rules, from other repositories
architecture
Architecture of openapi-to-cli (ocli).
testing
Test conventions for openapi-to-cli (Jest).
code-style
Code style for openapi-to-cli (TypeScript).
implementation-order
Implementation order for openapi-to-cli (one unit at a time).
workflow
Workflow for openapi-to-cli.
codegraph
CodeGraph MCP usage guide — when to use which tool.