module-monitor

module-monitor is a cursor rule for Cursor from wangqiqi/cursor-ai-rules. It costs 0 tokens per session (2,380 once invoked), scanned A, original, MIT.

A set of rules and code for monitoring modules and managing settings at rule, project, and user levels. A module is a separate part of a software system.

In plain words
What is it for?
Use it to configure modules, activate or deactivate project rules, set user-specific options, and inspect performance.
Why use it?
It provides a defined way to choose which rules are active and which setting takes priority when several configuration levels exist.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is ../core/env-perception.sh.

Good fit Use it to configure modules, activate or deactivate project rules, set user-specific options, and inspect performance.

Compare 6 cursor rules from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/wangqiqi/cursor-ai-rules
agentmods
npx agentmods add rules/wangqiqi/cursor-ai-rules/module-monitor

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 module-monitor

README.md
[![agentmods](https://agentmods.dev/badge/rules/wangqiqi/cursor-ai-rules/module-monitor/github.svg)](https://agentmods.dev/rules/wangqiqi/cursor-ai-rules/module-monitor)
Your own site
<a href="https://agentmods.dev/rules/wangqiqi/cursor-ai-rules/module-monitor"><img src="https://agentmods.dev/badge/rules/wangqiqi/cursor-ai-rules/module-monitor/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for module-monitor

Your own site · 80×15
<a href="https://agentmods.dev/rules/wangqiqi/cursor-ai-rules/module-monitor"><img src="https://agentmods.dev/badge/rules/wangqiqi/cursor-ai-rules/module-monitor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 2,380 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.02380
Opus 5 $0.00000 $0.01190
Sonnet 5 $0.00000 $0.00476
Haiku 4.5 $0.00000 $0.00238

Measured 12d ago against content hash 45f7be198a30, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

module-monitor 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 12d 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/system/module-monitor.mdc · 284 lines

How it starts

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

📊 模块监控和配置管理

🔧 配置管理器 (Configuration Manager)

当前配置机制 (Current Configuration Mechanism)

规则级配置 (Rule-level Configuration)

每个规则通过 .cursor/rules/**/*.mdc 文件顶部的 YAML frontmatter 配置(Cursor 官方 Project Rules):

---
description: "规则描述"
globs: ["**/*.ts"]
alwaysApply: false
---
项目级配置 (Project-level Configuration)
  • 通过创建/删除规则目录来控制规则激活
  • 通过修改规则文件内容来调整规则行为
  • 通过引用语法(@规则名)建立规则间依赖
用户级配置 (User-level Configuration)
  • 用户可以通过复制和修改规则来自定义行为
  • 通过创建个人规则目录扩展功能
  • 通过选择性激活规则来适应工作习惯

配置合并策略 (Configuration Merge Strategy)

class ConfigurationManager {
  async getConfiguration(moduleName: string, key: string): Promise<any> {
    const configs = await this.loadConfigurationHierarchy();

    // 从低到高优先级查找配置
    for (const config of configs.reverse()) {
      if (config.modules?.[moduleName]?.[key] !== undefined) {
        return config.modules[moduleName][key];
      }
    }

    // 返回默认值
    return this.getDefaultValue(moduleName, key);
  }

  async setConfiguration(moduleName: string, key: string, value: any): Promise<void> {
    const userConfig = await this.loadUserConfig();

    if (!userConfig.modules) {
      userConfig.modules = {};
    }

    if (!userConfig.modules[moduleName]) {
      userConfig.modules[moduleName] = {};
    }

    userConfig.modules[moduleName][key] = value;

    await this.saveUserConfig(userConfig);
  }
}

🧩 模块工具子系统 (Module Tools Subsystem)

模块架构 (Module Architecture)

模块架构设计蓝图 (Module Architecture Blueprint)

注意: 以下目录结构是概念性设计,展示了模块化系统的理想组织方式。目前这些目录还不存在,是未来扩展时的目标架构。

当前规则的功能分类 (Current Rules by Function Category)

├── 基础设施层 (Infrastructure Layer)
│   ├── system_info/        # 系统信息获取 (✅ 已实现)
│   ├── platform_adapter/  # 跨平台适配 (✅ 已实现)
│   └── i18n/              # 国际化支持 (✅ 已实现)
├── 开发工具层 (Development Tools Layer)
│   ├── eslint/            # JavaScript代码质量检查 (✅ 已实现)
│   ├── intelligent_evolution/ # 智能感知系统 (✅ 已实现)
│   └── generator/         # 规则生成器 (✅ 已实现)
├── 演进管理层 (Evolution Management Layer)
│   ├── evolution-philosophy/  # 演进理念 (✅ 已实现)
│   ├── evolution-manual/     # 手动演进 (✅ 已实现)
│   ├── evolution-automation/ # 自动化演进 (✅ 已实现)
│   └── evolution-governance/ # 演进治理 (✅ 已实现)
└── 框架核心层 (Framework Core Layer)
    ├── constitution/      # AI共生宪法 (✅ 已实现)
    ├── philosophy/        # 协作哲学 (✅ 已实现)
    ├── templates/         # 配置模板框架 (✅ 已实现)
    └── module_manager/    # 规则管理系统 (✅ 当前文档)

注意:以上是功能分类的逻辑分组,实际文件都位于 .cursor/rules/ 目录下

Read the full file on GitHub · 284 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. 12d ago First seen · 284 lines · 0 tokens per session scan A 45f7be198a30

Subscribe to this mod's changes

module-monitor is a cursor rule published in the GitHub repository wangqiqi/cursor-ai-rules (16 stars, last pushed 3mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,380 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-30.