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.
git clone --depth 1 https://github.com/neoshopcn/neo-adminWrote 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/neoshopcn/neo-admin/15-config-center)<a href="https://agentmods.dev/rules/neoshopcn/neo-admin/15-config-center"><img src="https://agentmods.dev/badge/rules/neoshopcn/neo-admin/15-config-center.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.1 | $0.00691 | $0.00691 |
| Opus 5 | $0.00345 | $0.00345 |
| Sonnet 5 | $0.00138 | $0.00138 |
| Haiku 4.5 | $0.00069 | $0.00069 |
Grade A, and why
15-config-center 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 8d 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.
What it actually says
动态配置中心读取
业务代码读取后台「配置中心」数据时,必须使用统一读取入口,禁止直接查 config_items 表。
实现位置:
App\Support\ConfigCenter- 助手函数
config_center()(app/helpers.php)
路径约定
配置路径使用英文 name,点号分隔:
page.group.section.item
- page:
system(系统配置)|api(接口配置) - group:分组,如
site/login/wechat/email - section:分区,如
default/mini/pay/aliyun - item:配置 key,如
site_name/mch_id
读取方式(按粒度选择)
1. 单个配置项(最常用)
use App\Support\ConfigCenter;
ConfigCenter::item('api', 'wechat', 'pay', 'mch_id', '');
config_center('api.wechat.pay.mch_id', '');
2. 按分区
ConfigCenter::section('api', 'wechat', 'pay');
config_center('api.wechat.pay');
3. 按组
ConfigCenter::group('api', 'wechat');
config_center('api.wechat');
4. 点号路径(推荐助手函数)
// 4 段 = 配置项 | 3 段 = 分区 | 2 段 = 分组
config_center('system.login.default.login_captcha', false);
config_center('api.email.default.smtp_host');
返回值类型
读取结果已按 type 转换:
| type | 返回 |
|---|---|
| switch | bool |
| number | int / float |
| json | array(解析失败则为 string) |
| 其他 | string |
| 空值 | null(可传默认值兜底) |
缓存(必须了解)
- 全量索引缓存键:
config_center:index - 读取自动走
Cache::remember - 后台保存配置、Seeder 后会
ConfigCenter::forgetCache() - 若直接改库,需手动:
ConfigCenter::forgetCache()
禁止行为
- ❌
ConfigItem::query()->where('name', ...)在业务里散落读取 - ❌ 用 Laravel
config()读取动态配置中心数据 - ❌ 硬编码应从配置中心获取的密钥、开关、站点信息
生成业务代码时
需要第三方密钥、站点名、登录策略、邮件 SMTP 等时:
- 先查
database/seeders/Admin/ConfigCenterDataSeeder.php确认 path - 用
config_center('...')或ConfigCenter::item(...)读取 - 为缺失配置提供合理默认值
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.
- 8d ago First seen · 107 lines · 691 tokens per session scan A 852c68ef99fb
15-config-center is a cursor rule published in the GitHub repository neoshopcn/neo-admin (12 stars, last pushed 2mo ago), licensed MIT. It adds 691 tokens to every session, about $0.0035 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
owl-admin
A set of project rules for Owl Admin, a Laravel-based framework for building web administration panels. It guides how the project should use its page renderer, controllers, services, menus, permissions, APIs, and code generator.
go-backend-scalability-cursorrules-prompt-file
Cursor rules for Go development with backend scalability.
cloudflare-email-telegram-cursorrules-prompt-file
Cursor rules for setting up email-to-Telegram forwarding via Cloudflare Email Routing and Workers using the mail2tg CLI.
sveltekit-typescript-guide-cursorrules-prompt-file
Cursor rules for SvelteKit development with TypeScript integration.
go-servemux-rest-api-cursorrules-prompt-file
Cursor rules for Go development with ServeMux REST API integration.
react-query-cursorrules-prompt-file
Cursor rules for React development with React Query integration.