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/hamzaamjad/cursor-rules/104-analogy-transfergit clone --depth 1 https://github.com/hamzaamjad/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/hamzaamjad/cursor-rules/104-analogy-transfer)<a href="https://agentmods.dev/rules/hamzaamjad/cursor-rules/104-analogy-transfer"><img src="https://agentmods.dev/badge/rules/hamzaamjad/cursor-rules/104-analogy-transfer.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.02316 | $0.02316 |
| Opus 5 | $0.01158 | $0.01158 |
| Sonnet 5 | $0.00463 | $0.00463 |
| Haiku 4.5 | $0.00232 | $0.00232 |
Grade C, and why
104-analogy-transfer scanned grade C with 1 finding 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.
Hidden instructionshighPrompt injection
Directives inside HTML comments, invisible characters or bidirectional overrides are read by the model and not by the person reviewing the file.
* Maintain "analogy debt" log for mappings that may break <!-- TODO: Create monitoring system --> How it starts
The opening of the file, as written. The whole thing — 202 lines — stays where its author put it; the contents beside it link to each section on GitHub.
analogy-transfer.mdc
-
Purpose: To enable systematic cross-domain problem-solving by mapping relational structures from familiar source domains to novel target problems. This rule operationalizes analogical reasoning as a formal problem-solving tool, emphasizing structural over surface similarity. Empirical Impact: Meta-analysis shows effect size d=0.50 for improved problem-solving outcomes. Stigmergic patterns (indirect environmental signaling) show 22% latency reduction and 34% faster convergence on optimal solutions.
-
Requirements:
- Source Domain Selection:
- Identify 2-3 potential source domains with structural similarity
- Prioritize domains with well-understood causal relationships
- Include at least one "distant" domain for creative insights
- Structural Mapping Process:
- Explicitly map relationships, not attributes
- Identify: entities, relationships, higher-order relations
- Use template: "In [source], [A relates to B]. In [target], [X relates to Y similarly]"
- Mapping Validation:
- Verify causal relationships preserve across domains
- Explicitly state what does NOT transfer
- Test mapping with edge cases
- Analogy Repository:
- Nature patterns (ant colonies, river networks, immune systems)
- Engineering systems (highways, power grids, supply chains)
- Organizational structures (military, orchestras, sports teams)
- Abstract systems (music theory, game mechanics, economic markets)
- Stigmergic Systems (environmental coordination patterns):
- Ant pheromone trails → Cache warming patterns
- Termite mound building → Distributed consensus algorithms
- Wikipedia editing → Collaborative documentation
- Key Insight: Indirect coordination through environment modification
- Integration Requirements:
- Present mapping during DIVERGENCE phase of divergence-convergence
- Include confidence score for structural fit (low/medium/high)
- Provide fallback if primary analogy fails
- Source Domain Selection:
-
Validation:
- Check: Are relationships (not attributes) explicitly mapped?
- Check: Is causal structure preserved across domains?
- Check: Are limitations/non-transfers clearly stated?
- Check: Does the analogy enable specific problem-solving insights?
- Check: Is structural similarity score provided?
-
Examples:
-
Scenario: Design distributed system resilience
- Source Selection: "Evaluating source domains: 1) Immune system (high fit), 2) Forest fire management (medium fit), 3) Jazz improvisation (creative fit)"
- Structural Mapping:
IMMUNE SYSTEM → DISTRIBUTED SYSTEM - Antibodies → Error handlers (recognize specific threats) - T-cells → Circuit breakers (kill compromised components) - Memory cells → Incident patterns database - Inflammation → Rate limiting (temporary protection) - Fever → System-wide defensive mode CAUSAL PRESERVATION: - Pathogen exposure → Memory cell creation - System intrusion → Pattern recording DOES NOT TRANSFER: - Physical proximity effects - Biological evolution timescales - Applied Solution: "Implement 'immune memory' - system learns from failures and pre-positions defenses"
-
Scenario: Optimize team communication
- Source Selection: "1) Neural networks (high fit), 2) Highway systems (medium fit), 3) Beehive waggle dance (creative fit)"
- Structural Mapping:
NEURAL NETWORK → TEAM COMMUNICATION - Neurons → Team members - Synapses → Communication channels - Action potential → Message priority threshold - Neurotransmitters → Message types/protocols - Plasticity → Channel optimization over time - Applied Solution: "Implement 'synaptic strengthening' - frequently used communication paths get dedicated channels/tools"
-
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 · 202 lines · 2,316 tokens per session scan C da3869c67e0a
104-analogy-transfer is a cursor rule published in the GitHub repository hamzaamjad/cursor-rules (2 stars, last pushed 1y ago), licensed MIT. It adds 2,316 tokens to every session, about $0.0116 per session on Opus 5. A static security scan graded it C with 1 finding (hidden instructions). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other cursor rules, from other repositories
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.
family-instance-domain-actions
Family instance domain action implementation patterns.
prefer-assertions-over-defensive-checks
Prefer assertions over defensive checks when data is guaranteed to be valid.
prefer-direct-imports-over-module-mocks
Prefer extracting a testable core over vi.mock / vi.resetModules when unit tests need to reach production logic entangled with config, env, or singletons.