local-llm-dogfood

local-llm-dogfood is a cursor rule for Cursor from Lawofall/AgentCore. It costs 37 tokens per session (1,361 once invoked), scanned A, original, MIT.

A set of local-development rules for running the product’s AI tests and probes with a development account and its configured bring-your-own-key setup.

In plain words
What is it for?
Use it to configure local model credentials, run product probes and evaluations, test multi-device event delivery, and diagnose stale prompts, sidecars, or rate limits.
Why use it?
It prevents local tests from using the wrong or expired platform key and explains why code or prompt changes may not appear until the correct process is restarted.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/. Also seen: mentions OpenCode.

Good fit Use it to configure local model credentials, run product probes and evaluations, test multi-device event delivery, and diagnose stale prompts, sidecars, or rate limits.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/lawofall/agentcore/local-llm-dogfood
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.

Clone the repo
git clone --depth 1 https://github.com/Lawofall/AgentCore

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 local-llm-dogfood

README.md
[![agentmods](https://agentmods.dev/badge/rules/lawofall/agentcore/local-llm-dogfood.svg)](https://agentmods.dev/rules/lawofall/agentcore/local-llm-dogfood)
Your own site
<a href="https://agentmods.dev/rules/lawofall/agentcore/local-llm-dogfood"><img src="https://agentmods.dev/badge/rules/lawofall/agentcore/local-llm-dogfood.svg" alt="Measured on agentmods" height="20"></a>
Per session 37 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,361 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.00037 $0.01361
Opus 5 $0.00018 $0.00681
Sonnet 5 $0.00007 $0.00272
Haiku 4.5 $0.00004 $0.00136

Measured yesterday against content hash c7f2494f1998, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

local-llm-dogfood 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/local-llm-dogfood.mdc · 46 lines

How it starts

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

本地 LLM dogfood 凭据

两条起步路权威 → 本地开发 · 两条起步路。本规则只写 How。

症状 → 原因 → 对策

  • 症状:eval / 探针报缺 key、或踩过期 / 线上池的 PLATFORM_API_KEY
  • 原因:clone 默认应走测试账号自己的 Key,不是平台 key;同构档也必须用本机独立平台 Key。
  • 对策(默认档)dev / devpasswordDEV_USERNAME / DEV_PASSWORD 可覆盖)+ 账号已配 OpenCode Zen(如 deepseek-v4-flash-free);先 uv run python scripts/seed_dev_user.py,再设置页或 scripts/set_dev_llm_key.py
  • 对策(同构档):本机 .env BILLING_MODE=platform + 独立 PLATFORM_*(Go + deepseek-v4-flash)+ 重启 api;uv run python scripts/set_quota.py dev --unlimited。禁止复制生产池 Key。

改 prompt / runtime 后仍像旧核

  • 症状:刚跑过 start-dev-server.ps1,桌面本机对话的 cost.prompt_assembled 仍与改前逐字节相同(ceo_prompt 字数 / assembly_hash 不变),或行为完全没变。
  • 原因:本机传统回合在 sidecar 里 import,不在 API 进程。清树脚本只杀 -m agentcore,故意不碰 sidecar。
  • 对策:完全退出并重开桌面后再开新对话。对账要看到新的 sidecar.ready,且本场装配哈希相对改前变化。云协作或通用·进阶关掉「允许本机执行」才是重启 API 即加载。权威 → 本地开发 · 改代码后哪边会加载

真跑入口

  • 产品回合:scripts/archive/probe_turn.py(HTTP,与桌面同路)。
  • 多端同权 / 对话级订阅scripts/archive/probe_multiend.py——挂两条真 SSE(一条扮桌面、一条扮手机 ?follow=true)断言帧到没到对端。多端类缺陷单测普遍抓不到(测里的回合是瞬时的),这条真跑就抓出过「对端晚 12.6s 才看到回合」。连跑 4 场景约十几个回合,容易打满限流窗(见下)。
  • Eval / 多数探针:EvalHarnessawait eval_credentials()(已回落本地账号 Key;异步路径必须 await,勿在 running loop 里同步调 _eval_credentials 以免 DB Key 静默失败回落到过期 PLATFORM)。

优先级(勿颠倒)

  1. EVAL_DEEPSEEK_*(显式覆盖)
  2. 本地库测试账号自己的 Key(默认档;模型跟账号默认,常为 deepseek-v4-flash-free
  3. PLATFORM_*(最后;默认档 禁止依赖。同构档的产品对话走这里,eval / 探针仍先走 1–2,除非你故意在测平台代付)

限流窗:连跑多个真回合会触发 llm.rate_limit_no_retry,回合以 error 帧收口、无正文——别把它误判成产品缺陷(症状:content_delta×0message_end 正常)。小时级窗宜等不宜硬重试。

归因前先换模型对照

  • 症状:产品 AI「不听话」——无视工具回执与 skill 明令(如已告知无执行环境仍手抄数据、仍宣称已校验),或某一跳墙钟离谱。
  • 原因:免费档(*-free)不只是慢和限流,行为也不同:会把数据搬进推理再交差。同一 prompt 换付费档可能直接消失。
  • 对策:下「提示词压不住 / 该加闸 / 编排太贵」这类结论之前,先换官方 deepseek-v4-flash 跑同一场景,对照 dev 的 *-free 档。免费档不只是慢,行为也不同(会把数据搬进推理再交差);贵的经常是模型不是工具表。同构档已经是付费 Flash,对照时不要再当成免费档。
  • 反向同样成立:别拿「换付费档就没了」把问题判给模型档位然后收手。无执行分支上有没有「够得着的完整交付」(结构报告 + 待跑脚本 + 一句下一步)同样决定会不会手抄、会不会宣称已校验。
  • 验证时别同时换两个变量:改完 prompt / skill,要用失败基线那个模型复跑。拿付费档去验刚改的 skill,好转可被换模型单独解释,等于没验。

Read the full file on GitHub · 46 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. yesterday Changed · +3 lines · +7 tokens per session c7f2494f1998
  2. 2d ago Changed 0867347b8faa
  3. 8d ago First seen · 43 lines · 30 tokens per session scan A 7f8a8f9261b6

Subscribe to this mod's changes

local-llm-dogfood is a cursor rule published in the GitHub repository Lawofall/AgentCore (81 stars, last pushed today), licensed MIT. It adds 37 tokens to every session and 1,361 once invoked, about $0.0002 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.