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/brunogama/ios-cursor-rules/knowledge-management-rulegit clone --depth 1 https://github.com/brunogama/ios-cursor-rulesWrote 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/brunogama/ios-cursor-rules/knowledge-management-rule)<a href="https://agentmods.dev/rules/brunogama/ios-cursor-rules/knowledge-management-rule"><img src="https://agentmods.dev/badge/rules/brunogama/ios-cursor-rules/knowledge-management-rule.svg" alt="Measured on agentmods" 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 | $0.02695 | $0.02695 |
| Opus 5 | $0.01347 | $0.01347 |
| Sonnet 5 | $0.00539 | $0.00539 |
| Haiku 4.5 | $0.00269 | $0.00269 |
Grade A, and why
knowledge-management-rule 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 4d 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 — 347 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Knowledge Management System
Rule for capturing, organizing, refining, and applying knowledge throughout the project lifecycle.
Learning refinement filters
- type: event pattern: "learning_create"
- type: event pattern: "learning_update"
- type: file_change pattern: ".cursor/learnings/*.md"
- type: command pattern: "knowledge"
Actionable insights filters
- type: command pattern: "insight"
- type: event pattern: "implementation_complete"
- type: event pattern: "task_complete"
- type: event pattern: "code_review"
- type: file_change pattern: "src/*"
actions:
SECTION 1: KNOWLEDGE CAPTURE
-
type: react conditions:
- pattern: "learn add|learning create" action: |
Create a new learning entry
I'll create a structured learning document with:
- Unique ID (format: LEARN-YYYY-MM-DD-NN)
- Title and short description
- Detailed description of the learning (including context related to SOLID, TDD, SRP, Calisthenics, resilience if applicable)
- Relevant code files (using
Sources/,Tests/paths), tasks (managed by development_workflow_system), specifications (managed by specification_management), and documents - Date of capture
- Keywords for easy retrieval
The learning will be stored in
.cursor/learnings/and indexed in.cursor/LEARNINGS.md -
type: react conditions:
- pattern: "document add|document create|document detect" action: |
Register a document in the knowledge base
I'll register the document by:
- Storing a copy in
.cursor/docs/if it's not already there - Creating a learning entry about this document
- Adding the document to the documents index
- Extracting key information from the document
- Creating cross-references to related content including specifications (managed by specification_management)
This ensures all project documentation is centrally tracked and discoverable.
-
type: react event: "conversation_insight" action: |
Automatically capture important insights from our conversations
When I identify valuable insights in our conversation, I'll:
- Create a learning entry with the insight
- Generate a unique ID for the learning
- Categorize and tag the insight appropriately
- Add context and relevant connections to tasks (managed by development_workflow_system)
- Index the insight for future reference
This ensures important information isn't lost.
-
type: react event: "file_change" conditions:
- pattern: ".cursor/docs/.*" action: |
Automatically process new documents added to docs directory
When a new document is added to
.cursor/docs/, I'll:- Extract key information from the document
- Create a learning entry linked to this document
- Update the documents index
- Identify related content including specifications (managed by specification_management)
- Generate appropriate metadata
This ensures all documentation is properly integrated into the knowledge base.
SECTION 2: KNOWLEDGE ORGANIZATION & REFINEMENT
-
type: react conditions:
- pattern: "learn categorize|learning categorize" action: |
Categorize and organize learnings
I'll organize all learnings into meaningful categories:
- Analyze all learning content to identify topics and themes
- Categorize learnings into domains like:
- Architecture, Performance, Security, DevOps
- UX, API, Database, Testing
- Frontend, Backend, Mobile, Tooling
- Process, Bugs, Documentation
- Create category files in
.cursor/learning_categories/ - Generate a categories index with links to all categorized learnings
- Identify uncategorized learnings for further review
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.
- 4d ago First seen · 347 lines · 2,695 tokens per session scan A 5ec9896c234c
knowledge-management-rule is a cursor rule published in the GitHub repository brunogama/ios-cursor-rules (74 stars, last pushed 1y ago), licensed MIT. It adds 2,695 tokens to every session, about $0.0135 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
swiftui
Rules for IcySky, a SwiftUI project for a bluesky client.
202-swift-standards-detailed
Swift 6.2 + iOS 18-26 编码规范 - 详细参考.
126-swift-advanced
126: Advanced Swift patterns including error handling, SwiftUI design system, SwiftData, concurrency, security, and documentation.
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.
cli-error-handling
CLI command error handling patterns.