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/shalomeir/common-memory-bank/sub_folder_rulesgit clone --depth 1 https://github.com/shalomeir/common-memory-bankWrote 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/shalomeir/common-memory-bank/sub_folder_rules)<a href="https://agentmods.dev/rules/shalomeir/common-memory-bank/sub_folder_rules"><img src="https://agentmods.dev/badge/rules/shalomeir/common-memory-bank/sub_folder_rules.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.01066 | $0.01066 |
| Opus 5 | $0.00533 | $0.00533 |
| Sonnet 5 | $0.00213 | $0.00213 |
| Haiku 4.5 | $0.00107 | $0.00107 |
Grade A, and why
sub_folder_rules 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 3d 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 — 123 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Folder Path-Based Sub Rule Management System
Basic Structure
- All subfolder rules are stored in the
.cursor/rules/subrules/directory. - The rules of each subfolder are stored according to the directory structure reflecting the folder path.
- The paths of all rule files are recorded in
.cursor/rules/subrules/rule_list.txt.
Rule File Path Rules
-
Rule files for a specific folder reflect the folder path as it is:
- Example: Rules related to
./src/components/auth.tsare stored in.cursor/rules/subrules/src/components/subrule.txt
- Example: Rules related to
-
The rule_list.txt file records the full paths of all subrule files, one per line:
./cursor/rules/subrules/src/components/subrule.txt
./cursor/rules/subrules/src/utils/api/subrule.txt
./cursor/rules/subrules/src/auth/subrule.txt
Rule Application Mechanism
-
When modifying or creating a specific file:
- Read the
.cursor/rules/subrules/rule_list.txtfile first. - Check the path of the file you are currently working on. - Check if there is a subfolder rule file related to the path.
- If there is a related rule file, add its contents to the context.
- Read the
-
Path matching method:
- If the file path is a subpath of the rule file path, the rule is applied.
- Example: When modifying the file
./src/components/auth/login.ts, the rule./cursor/rules/subrules/src/components/subrule.txtis applied.
How to create and register a rule file
When special subrules are needed
- When there is a requirement to record separately in the process of creating, modifying, or deleting the subcode of the corresponding subfolder
- Special arcitecture pattern applied only under the corresponding subfolder
- Special technical context applied only under the corresponding subfolder
- Bug fixes found in the subcode of the corresponding subfolder and handled as an exception
- Other exception measures applied only under the corresponding subfolder
Create a new rule file
- When a special rule for a specific subfolder is needed:
If a special rule related to ./src/components/auth.ts is needed:
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.
- 3d ago First seen · 123 lines · 1,066 tokens per session scan A 7574f5bb5df8
sub_folder_rules is a cursor rule published in the GitHub repository shalomeir/common-memory-bank (30 stars, last pushed 4mo ago), licensed Unlicense. It adds 1,066 tokens to every session, about $0.0053 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
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.
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.
control-plane-descriptors
Control plane descriptor and instance implementation patterns.
family-instance-domain-actions
Family instance domain action implementation patterns.