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/nongjun/feishu-cursor-claw/assistant-registrationgit clone --depth 1 https://github.com/nongjun/feishu-cursor-clawWrote 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/nongjun/feishu-cursor-claw/assistant-registration)<a href="https://agentmods.dev/rules/nongjun/feishu-cursor-claw/assistant-registration"><img src="https://agentmods.dev/badge/rules/nongjun/feishu-cursor-claw/assistant-registration.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 | $0.00000 | $0.00685 |
| Opus 5 | $0.00000 | $0.00342 |
| Sonnet 5 | $0.00000 | $0.00137 |
| Haiku 4.5 | $0.00000 | $0.00068 |
Grade A, and why
assistant-registration 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 4d 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
小助手统一注册规范
核心原则
系统中所有 webhook 推送功能(告警、日报、提醒等)必须注册到门户系统的小助手配置中心,由门户统一管理 webhook URL 和开关。
新增小助手的标准流程
1. 在模块 main.py 的 MODULE_ASSISTANTS 中添加定义
MODULE_ASSISTANTS = [
# ... 现有定义 ...
{
"assistant_code": "your_new_assistant", # 全局唯一,snake_case
"display_name": "你的新功能名称",
"description": "一句话描述推送内容和触发方式",
"module_code": "your_module", # archive/quality/moment/contact 等
"schedule_config": {
"type": "cron", # cron / interval / realtime
"times": ["09:00"], # cron 类型填写
# "interval_minutes": 5, # interval 类型填写
# "description": "事件触发", # realtime 类型填写
},
},
]
模块启动时会通过 register_assistants(MODULE_ASSISTANTS) 自动向门户注册。
2. 通过 assistant_config_client 获取 webhook 配置
from app.services.assistant_config_client import get_assistant_config
config = await get_assistant_config("your_new_assistant")
if not config.enabled or not config.webhook_key:
return # 未启用或未配置则跳过
# config.webhook_key 是完整的 webhook URL
3. 使用 build_payload 构建多平台消息
from shared_backend.utils.webhook_platform import detect_platform, build_payload
payload = build_payload(detect_platform(webhook_url), content, "markdown")
禁止事项
- ❌ 不要在代码中硬编码 webhook URL
- ❌ 不要直接从环境变量读取 webhook(仅作为降级回退)
- ❌ 不要硬编码企微消息格式(使用 build_payload 适配多平台)
- ❌ 不要在门户的 ASSISTANT_DEFINITIONS 中手动添加(由各模块自动注册)
相关文件
- 注册工具:
公共模块/shared_backend/utils/assistant_registry.py - 平台适配:
公共模块/shared_backend/utils/webhook_platform.py - 配置客户端: 各模块
app/services/assistant_config_client.py - 门户 API:
门户系统/后端服务/app/api/assistant.py(/internal/register-batch)
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.
- 4d ago First seen · 81 lines · 0 tokens per session scan A 4289bcc86367
assistant-registration is a cursor rule published in the GitHub repository nongjun/feishu-cursor-claw (14 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 685 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.
Other cursor rules, from other repositories
code-optimization
Guidelines for optimizing duplicate and poorly structured code.
guardrails
Security guardrails applied to all AI interactions.
documentation-standards
Documentation standards for code, APIs, and architecture.
token-efficiency
Token optimization rules to reduce AI costs by 30%+.
data-fetching
Data fetching patterns with TanStack Query, Server Components, and Supabase.
mcp
Guidelines for implementing and interacting with the Task Master MCP Server.