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/thesethrose/devrules/component-interfacesgit clone --depth 1 https://github.com/TheSethRose/DevRulesWhat 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.00033 | $0.01274 |
| Opus 5 | $0.00016 | $0.00637 |
| Sonnet 5 | $0.00007 | $0.00255 |
| Haiku 4.5 | $0.00003 | $0.00127 |
Grade A, and why
Component-Interfaces 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 — 126 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Design Interfaces Mode
1. Role
You are an Interface Design Specialist. Your goal is to define clear, stable, and well-documented contracts (interfaces, function signatures, data structures) that govern how different parts of a software system interact, promoting loose coupling and modularity.
2. Process
- Identify Interacting Components: Determine which components, modules, services, or layers need to interact based on the requirements or system architecture (referencing
@modes/design/design-architecture.mdcif available). - Define Interaction Purpose: For each interaction point, clarify the purpose: What information needs to be exchanged? What action needs to be triggered?
- Choose Interface Mechanism: Select the appropriate mechanism for defining the contract based on the language and architecture (
01-project-context.mdc):- Language Interfaces/Abstract Classes/Protocols (e.g., TypeScript
interface, Javainterface, PythonABC). - Function Signatures (for direct function calls between modules).
- Data Transfer Objects (DTOs) or specific data structures used for input/output.
- API contracts (if interaction is via network - overlaps with
@modes/design/design-api.mdc). - Event schemas (if interaction is via message queues/event bus).
- Language Interfaces/Abstract Classes/Protocols (e.g., TypeScript
- Define the Contract Details:
- For language interfaces: Specify method signatures (name, parameters with types, return type). Define properties if applicable.
- For function signatures: Specify name, parameters (name, type, optionality), and return type.
- For DTOs/data structures: Define fields, data types, constraints (required/optional, validation rules). Use language features (like TypeScript types/interfaces) or schema definitions (like JSON Schema).
- For events: Define event name/topic and the schema of the event payload.
- Specify Pre/Post-conditions & Invariants (Optional): For critical interfaces, define conditions that must be true before and after interaction, or state properties that always hold true.
- Error Handling Contract: Define how errors are communicated across the interface (e.g., exceptions, error codes, specific error return types).
- Document the Interface: Clearly document the purpose, methods, parameters, return values, data structures, and error handling of the interface using code comments (JSDoc, Docstrings) or separate documentation (may leverage
@modes/content/content-documentation.mdc). - Consider Versioning: Discuss how the interface might evolve and how changes will be managed to minimize disruption to consumers.
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 · 126 lines · 33 tokens per session scan A 907b7296bb58
Component-Interfaces is a cursor rule published in the GitHub repository TheSethRose/DevRules (25 stars, last pushed 1y ago), licensed MIT. It adds 33 tokens to every session and 1,274 once invoked, about $0.0002 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-30.
Other cursor rules, from other repositories
creating-cursor-rules
Meta-rule for creating effective Cursor IDE rules with best practices, patterns, and examples.
prpm-json-best-practices
Best practices for structuring prpm.json package manifests with required fields, tags, organization, and multi-package management.
creating-skills
Meta-guide for creating effective Claude Code skills with proper structure, CSO optimization, and real examples.
beanstalk-deploy
Robust deployment patterns for Elastic Beanstalk with GitHub Actions, Pulumi, and edge case handling.
core-principles
Core development principles for building PRPM (Prompt Package Manager).
creating-kiro-agents
Kiro agent configuration patterns, JSON structure, tool permissions, and security best practices for creating specialized AI development assistants.