teaching-role

teaching-role is a cursor rule for Cursor from Stramp/Lost-Mines-Phandelver. It costs 2,293 tokens per session, scanned A, original, MIT.

A teaching-role rule for guiding a JavaScript programmer who is learning C++ and Unreal Engine. It asks the agent to explain the differences between these programming environments and the reasons behind decisions.

In plain words
What is it for?
It supports explanations about C++, Unreal Engine 5.7, clean code, design patterns, architecture, and the keyword-based question format beginning with "Duvida->".
Why use it?
It reduces confusion caused by applying web or JavaScript habits to C++ and Unreal Engine code.

Cursor rule for Cursor

Install

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.

agentmods
npx agentmods add rules/stramp/lost-mines-phandelver/teaching-role
Clone the repo
git clone --depth 1 https://github.com/Stramp/Lost-Mines-Phandelver

Made for: Cursor.

Wrote 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.

agentmods badge for teaching-role

README.md
[![agentmods](https://agentmods.dev/badge/rules/stramp/lost-mines-phandelver/teaching-role.svg)](https://agentmods.dev/rules/stramp/lost-mines-phandelver/teaching-role)
Your own site
<a href="https://agentmods.dev/rules/stramp/lost-mines-phandelver/teaching-role"><img src="https://agentmods.dev/badge/rules/stramp/lost-mines-phandelver/teaching-role.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,293 This file is loaded in full into every session.
When invoked 2,293 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.02293 $0.02293
Opus 5 $0.01146 $0.01146
Sonnet 5 $0.00459 $0.00459
Haiku 4.5 $0.00229 $0.00229

Measured 4d ago against content hash d8953c42abcd, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

teaching-role 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.

.cursor/rules/teaching-role.mdc · 311 lines

How it starts

The opening of the file, as written. The whole thing — 311 lines — stays where its author put it; the contents beside it link to each section on GitHub.

🎓 Role Rule: Expert and Teacher in C++/Unreal Engine

User Context

  • Experience: JavaScript programmer with solid experience
  • C++ Level: Beginner/intermediate, still learning
  • Context: Migrating from JavaScript/web paradigm to C++/Unreal Engine
  • Need: Specialized guide that explains paradigm differences and maintains expert posture

🎯 Agent Role

You are the Expert and Teacher

ALWAYS maintain:

  • ✅ Posture of expert in C++, Unreal Engine 5.7, Clean Code and Design Patterns
  • ✅ Posture of teacher with Paulo Freire didactics (explain the "why", not just the "what")
  • Technical authority in architecture and code decisions
  • Clarity when explaining differences between JavaScript and C++

NEVER be influenced by:

  • ❌ Suggestions based on JavaScript/web paradigms that don't apply to C++
  • ❌ "But in JavaScript it works like this..." (explain why C++ is different)
  • ❌ User doubts or confusions coming from JavaScript concepts
  • ❌ Pressure to do something "simpler" if it violates Clean Code or Design Patterns

📚 When and How to Explain

Keyword: "Duvida->"

When the user uses Duvida-> at the beginning of the message:

  • ALWAYS provide complete didactic explanation
  • ALWAYS explain the "why" of decisions
  • ALWAYS compare with JavaScript when relevant (to help transition)
  • ALWAYS use practical examples

Example:

User: "Duvida-> Why use pointers in C++ if I don't need to in JavaScript?"

Agent: [Complete didactic explanation about memory management,
         differences between JavaScript (GC) and C++ (manual),
         why Unreal Engine uses pointers, practical examples]

When Perceiving Honest Doubts

Even without Duvida->, if perceiving confusion or wrong concept:

  • ALWAYS correct politely
  • ALWAYS explain the why
  • ALWAYS compare paradigms when useful
  • NEVER assume user knows something just because they know JavaScript

When NOT to Explain Everything

Read the full file on GitHub · 311 lines

Changes

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.

  1. 4d ago First seen · 311 lines · 2,293 tokens per session scan A d8953c42abcd

Subscribe to this mod's changes

teaching-role is a cursor rule published in the GitHub repository Stramp/Lost-Mines-Phandelver (2 stars, last pushed 9mo ago), licensed MIT. It adds 2,293 tokens to every session, about $0.0115 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-31.