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/mr-chen-05/rules-2.1-optimized/custom-command-buildergit clone --depth 1 https://github.com/Mr-chen-05/rules-2.1-optimizedWhat 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.04841 | $0.04841 |
| Opus 5 | $0.02420 | $0.02420 |
| Sonnet 5 | $0.00968 | $0.00968 |
| Haiku 4.5 | $0.00484 | $0.00484 |
Grade A, and why
custom-command-builder 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 2d 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 — 702 lines — stays where its author put it; the contents beside it link to each section on GitHub.
🛠️ Custom Command Builder - 智能自定义命令构建器
AI驱动的用户自定义命令和规则构建系统,支持智能模板生成、规则扩展和插件开发。
🧠 AI Intelligence Core - AI智能核心
智能激活条件
自动激活场景:
- 用户执行 "/create-command" 命令
- 检测到重复性操作需要自动化
- 超级大脑系统推荐创建自定义命令
- 项目需要特定的工作流定制
- 团队需要标准化操作流程
智能分析维度:
- 用户操作模式和频率 (30%)
- 项目特定需求分析 (25%)
- 团队协作模式识别 (20%)
- 工作流效率评估 (15%)
- 自动化潜力评估 (10%)
🚀 Commands - 智能命令
/create-command- AI智能命令创建(推荐)/create-command --template <type>- 使用指定模板创建/create-command --workflow- 创建工作流命令/create-command --rule- 创建自定义规则/create-command --plugin- 创建插件扩展/list-commands- 列出所有自定义命令/edit-command <name>- 编辑现有命令/delete-command <name>- 删除自定义命令
✨ AI-Powered Features - AI驱动功能
🤖 智能命令生成引擎
命令类型识别:
工作流命令:
- 开发流程自动化
- 测试和部署流程
- 代码审查流程
- 发布管理流程
工具集成命令:
- MCP工具快捷调用
- 外部API集成
- 数据库操作
- 文件系统操作
项目管理命令:
- 项目状态查询
- 进度跟踪和报告
- 团队协作支持
- 质量指标监控
自动化脚本:
- 重复任务自动化
- 批量操作处理
- 数据处理和转换
- 系统维护任务
智能生成能力:
- 基于用户描述自动生成命令逻辑
- 智能参数识别和验证
- 错误处理和异常管理
- 帮助文档自动生成
🔧 模板系统
内置模板:
基础模板:
- simple-command: 简单命令模板
- workflow-command: 工作流命令模板
- api-integration: API集成模板
- file-operation: 文件操作模板
高级模板:
- mcp-tool-wrapper: MCP工具包装器
- multi-step-workflow: 多步骤工作流
- conditional-logic: 条件逻辑模板
- error-handling: 错误处理模板
项目特定模板:
- frontend-command: 前端项目命令
- backend-command: 后端项目命令
- fullstack-command: 全栈项目命令
- devops-command: DevOps操作命令
自定义模板:
- 用户可创建自己的模板
- 模板继承和扩展
- 模板参数化配置
- 模板版本管理
📊 智能规则扩展
规则扩展能力:
规则类型:
- workflow_rule: 工作流规则
- feature_rule: 功能规则
- intelligent_workflow_rule: 智能工作流规则
- safety_rule: 安全规则
规则配置:
- 优先级设置和冲突解决
- 触发条件和激活场景
- 集成配置和依赖管理
- 性能优化和缓存策略
规则验证:
- 语法和格式验证
- 逻辑一致性检查
- 性能影响评估
- 安全风险评估
🔄 AI Workflow Process - AI工作流程
Phase 1: 需求分析阶段
Step 1 - 需求收集:
- 分析用户描述和需求
- 识别重复性操作模式
- 评估自动化潜力
- 确定命令类型和范围
Step 2 - 上下文分析:
- 获取项目上下文信息 (context-loader集成)
- 分析现有命令和规则
- 识别相关工具和依赖
- 评估集成复杂度
Step 3 - 模板选择:
- AI推荐最适合的模板
- 分析模板适用性
- 评估定制化需求
- 确定开发策略
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.
- 2d ago First seen · 702 lines · 4,841 tokens per session scan A 39d3953ccb30
custom-command-builder is a cursor rule published in the GitHub repository Mr-chen-05/rules-2.1-optimized (172 stars, last pushed 9mo ago), licensed MIT. It adds 4,841 tokens to every session, about $0.0242 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
test-plan
Plan Katalon True Platform/TestOps testing for a release, sprint, or feature. Use when you need to translate quality goals into scope, prioritize testing by requirement coverage and risk, decide what to test first, or build the executable plan structure (folders, suites, and sprint/release association) that stands in…
cli-forge-schema
Generate GitHub-compatible Mermaid diagrams — auto-picks diagram type, splits complex ones, converts tables/kanban/PERT.
STAGE_S5_TEST_POINTS
AIDocxWorkFlow Stage 5 — 测试点生成(独立阶段).
sprint-planning
BMAD BMM Agent: sprint-planning.
head-of-product
Head of Product persona — planning, user stories, UX decisions, scope guardian. Use when discussing product strategy, PRDs, user research, feature proposals, or backlog prioritization.
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.