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/adonai-labs/agent-runwayWrote 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/adonai-labs/agent-runway/advanced-patterns)<a href="https://agentmods.dev/rules/adonai-labs/agent-runway/advanced-patterns"><img src="https://agentmods.dev/badge/rules/adonai-labs/agent-runway/advanced-patterns/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/adonai-labs/agent-runway/advanced-patterns"><img src="https://agentmods.dev/badge/rules/adonai-labs/agent-runway/advanced-patterns.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.00000 | $0.01701 |
| Opus 5.5 | $0.00000 | $0.00680 |
| Sonnet 5.5 | $0.00000 | $0.00340 |
| Haiku 4.5 | $0.00000 | $0.00170 |
Grade A, and why
advanced-patterns 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 1mo 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 — 151 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Advanced Patterns for Electron Development
Directives for building complex, scalable Electron applications. Apply when implementing multi-window apps, typed IPC, plugins, or enterprise-level features.
Security Best Practices
- Context isolation: Always enable
contextIsolation: trueandnodeIntegration: falseinwebPreferences - Preload scripts: Expose only the minimal API surface via
contextBridge.exposeInMainWorld; never expose rawipcRendererorrequire - CSP: Implement strict Content Security Policy headers; restrict script sources to trusted domains; use nonces or hashes for inline scripts when unavoidable
- IPC validation: Validate all IPC messages (type, format, length) before processing; reject invalid payloads explicitly
- Origin verification: Verify message origin for sensitive IPC channels
- For detailed security guidance (auth, encryption, input validation), defer to
security.mdcandengineering-security.mdc
// Minimal BrowserWindow security
webPreferences: { nodeIntegration: false, contextIsolation: true, preload: path.join(__dirname, 'preload.js') }
Multi-Window Management
- Use a centralised window manager — a single module or class that owns creation, lookup, and teardown of all
BrowserWindowinstances - Persist window state (bounds, maximised/minimised) on close; restore on reopen; ensure restored bounds stay within screen
- Cleanup on close: Remove windows from the manager map on
closed; clear references to avoid leaks - Unique IDs: Assign a stable ID per window; use it for IPC routing and state persistence
- Parent-child relationships: Set
parentwhere appropriate; ensure child windows close with parent - Do not create windows ad hoc from multiple places; route all creation through the manager
Advanced IPC Patterns
- Typed request-response: Use a request ID, correlate responses, and support
invoke-style async calls; avoid fire-and-forget for operations that need a result - Timeout handling: Set a timeout (e.g. 5s) for each request; reject and clean up pending requests on timeout
- Batching: For high-frequency IPC, consider batching multiple operations into a single round-trip where latency allows
- Validation: Validate payload shape and size before processing; return structured errors (code, message) rather than raw exceptions
- Channel naming: Use a consistent naming scheme (e.g.
module:action) and document the contract - Define shared TypeScript interfaces for request/response shapes in a
shared/typesmodule
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.
- 1mo ago First seen · 151 lines · 0 tokens per session scan A 1f19b6c383d9
advanced-patterns is a cursor rule published in the GitHub repository adonai-labs/agent-runway (2 stars, last pushed 25d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,701 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-09-03.
Other cursor rules, from other repositories
optimize-dry-solid-principles-cursorrules-prompt-f
Cursor rules for optimization development with DRY and SOLID principles integration.
code-optimization
Guidelines for optimizing duplicate and poorly structured code.
language-agnostic-patterns
Language-agnostic programming patterns: SOLID, design patterns, clean code, and architecture. Load when refactoring, designing abstractions, or reviewing structure — not for everyday syntax.
agent-master
Meta-orchestrator that classifies tasks and routes to the right combination of installed skills across caveman (output compression), superpowers (dev workflow), anthropic-skills (business/domain expertise), and wired tactical libraries (wshobson, davila7, impeccable, anthropic-official, rea). 27 routing categories…
code-review-en
Code Review Guidelines (English).
ai-dev-os-review
Performs a comprehensive self-review before creating a PR. Combines guideline compliance checking (L3) with design-level review (L2) and philosophical alignment (L1). Unlike @ai-dev-os-check which only checks rules, this also evaluates architecture decisions and code design quality.