common

A project rule for storing shared configuration in YAML files and validating it with typed Python settings models. Configuration is the collection of values that control how software runs.

In plain words
What is it for?
Use it to define project-wide hyperparameters, split configuration into sections, validate settings, and load secrets from a git-ignored .env file.
Why use it?
It gives the codebase one consistent place for shared settings while separating commit-safe values from environment variables and secrets.

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/edison-watch/custom-mcps/common
Clone the repo
git clone --depth 1 https://github.com/Edison-Watch/Custom-MCPs

Made for: Cursor.

Per session 512 This file is loaded in full into every session.
When invoked 512 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.00512 $0.00512
Opus 5 $0.00256 $0.00256
Sonnet 5 $0.00102 $0.00102
Haiku 4.5 $0.00051 $0.00051

Measured yesterday against content hash 661067844fea, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

common 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 yesterday.

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/common.mdc · 51 lines

What it actually says

Using global configuration

Global config is used to store hyperparameters that should be applied across the entire codebase. The configuration system uses pydantic-settings for automatic validation and type checking. They handle both environment variables (should not be committed to the repo) and other configuration values (safe to commit to the repo).

Configuration Files:

  • common/global_config.yaml - Base configuration values
  • common/<name>.yaml - Optional split config files (contents loaded under root key <name>)
  • common/config_models.py - Pydantic models defining structure and validation
  • common/global_config.py - Main Config class using BaseSettings
  • .env - Environment variables and secrets (git-ignored)

You can split config sections into their own YAML files in common/. For example, common/logging.yaml will have its contents loaded under the logging root key, equivalent to defining that section inline in global_config.yaml. If global_config.yaml already defines the same root key, a KeyError is raised to prevent conflicts.

Whenever there is a hyperparameter that should be applied across the entire codebase, add those hyperparameters in common/global_config.yaml (or a split file). Whenever a user seems to have defined a hyperparameter in the wrong scope, or using a constant value in their code point them towards common/global_config.yaml and ask them to add it there instead.

Examples of this are:

  • MAX_RETRIES
  • MODEL_NAME
  • etc, etc

Any private or secret keys should be stored in the .env file in the root of the project, which is automatically loaded into common.

Examples of this are:

  • OPENAI_API_KEY
  • GITHUB_PERSONAL_ACCESS_TOKEN
  • etc, etc

To add new configuration fields with nested structures, define the corresponding Pydantic model in common/config_models.py first, then add the field to the Config class in common/global_config.py.

Then, these common values can be accessed in python files using:

example_key: example_value
example_parent:
  example_child: example_value
from common import global_config

# Handling non-secrets
print(global_config.example_parent.example_child)

# Handling secrets
print(global_config.OPENAI_API_KEY)
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. yesterday First seen · 51 lines · 512 tokens per session scan A 661067844fea

Subscribe to this mod's changes

common is a cursor rule published in the GitHub repository Edison-Watch/Custom-MCPs (0 stars, last pushed 2d ago), licensed MIT. It adds 512 tokens to every session, about $0.0026 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.