with-banned-directories

with-banned-directories is a cursor rule for Cursor from zackiles/deno-kit. It costs 0 tokens per session (503 once invoked), scanned A, original, MIT.

A set of Cursor rules for checking whether directory paths match a list of banned folders or patterns. JSONC is a JSON-like configuration format that allows comments.

In plain words
What is it for?
Use it when editing or reviewing the relevant JSONC configuration or the path-checking code, especially to verify directory-only paths, platform-specific rules, and glob patterns.
Why use it?
It helps prevent code from accepting or using restricted directories because of incorrect paths or matching patterns.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it when editing or reviewing the relevant JSONC configuration or the path-checking code, especially to verify directory-only paths, platform-specific rules, and glob patterns.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/zackiles/deno-kit/with-banned-directories
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.

Clone the repo
git clone --depth 1 https://github.com/zackiles/deno-kit

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 with-banned-directories

README.md
[![agentmods](https://agentmods.dev/badge/rules/zackiles/deno-kit/with-banned-directories.svg)](https://agentmods.dev/rules/zackiles/deno-kit/with-banned-directories)
Your own site
<a href="https://agentmods.dev/rules/zackiles/deno-kit/with-banned-directories"><img src="https://agentmods.dev/badge/rules/zackiles/deno-kit/with-banned-directories.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 503 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00000 $0.00503
Opus 5 $0.00000 $0.00251
Sonnet 5 $0.00000 $0.00101
Haiku 4.5 $0.00000 $0.00050

Measured 7d ago against content hash 8709052f3330, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

with-banned-directories 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 7d 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/with-banned-directories.mdc · 23 lines

What it actually says

Rules for Banned Directories Jsonc Config

  • These .jsonc files contain strings that represent either a) an absolute path to a directory, OR b) a glob pattern used to match using the method checkPatternMatch in the file banned-direcories.ts.
  • Glob patters MUST adhere to the specification provided by the method globToRegExp in the library @std/path.
  • Before editing, adding to, or analyzing these .jsonc files you MUST review the documentation for globToRegExp to ensure you use the right syntax, options, and patterns provided by the method.
  • Before editing, adding to, or analyzing these .jsonc files you MUST review the method checkPatternMatch in the file banned-direcories.ts.
  • The objective of these jsonc files and the banned-direcories.ts file is to be able to check an absolute path of a directory (or multiple paths) to see if it matches a list banned folders or patterns.

Pattern and Path Rules

  • If its a path and not a pattern it should NOT be the path of a file. These strings are ONLY for matching folders or directories (including folders that start with a dot like .config).
  • MUST be inside a platform and be platform specific
  • MUST match against folder paths only. This code is not for matching files.
  • MUST assume all first-level folders on a system are banned paths. This doesn't always apply to subfolders of the first-level UNLESS its a known system path
  • MUST be as speciifc as possible for any second-level or deeper paths.
  • MUST ensure all paths and patterns for a specific platform are unique. Redudant or overlapping paths or patterns must be removed. No patterns should be added to banned_directories_custom.jsonc that already exist in banned_directories_default.jsonc
  • Patterns in banned_directories_default.jsonc SHOULD whenever possible comprehensively target ALL platform specific directories, but WITHOUT matching against folders that typically would contain user application code such as second-level or deeper folders in appdata, user document folders, caches, user desktops, temp directories, and program file directories.
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. 7d ago First seen · 23 lines · 0 tokens per session scan A 8709052f3330

Subscribe to this mod's changes

with-banned-directories is a cursor rule published in the GitHub repository zackiles/deno-kit (3 stars, last pushed 6mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 503 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-08-31.