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 skills/jerrylalala/compound-engineering/intent-gatenpx skills add Jerrylalala/compound-engineering --skill intent-gategit clone --depth 1 https://github.com/Jerrylalala/compound-engineeringWrote 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/skills/jerrylalala/compound-engineering/intent-gate)<a href="https://agentmods.dev/skills/jerrylalala/compound-engineering/intent-gate"><img src="https://agentmods.dev/badge/skills/jerrylalala/compound-engineering/intent-gate.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.00066 | $0.01333 |
| Opus 5 | $0.00033 | $0.00666 |
| Sonnet 5 | $0.00013 | $0.00267 |
| Haiku 4.5 | $0.00007 | $0.00133 |
Grade A, and why
intent-gate 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.
How it starts
The opening of the file, as written. The whole thing — 156 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Intent Gate — 意图分类门控
参考:oh-my-openagent 的 Intent Classification 思路,适配本仓库 ce:work 流程。
目的:避免 ce:work 对所有任务一刀切处理;不同意图需要不同的执行策略。
意图分类
| 意图 | 英文 | 触发信号 | 执行策略 |
|---|---|---|---|
| 实现新功能 | implement | "新增"、"添加"、"实现"、"create"、"add"、"implement" | TDD 优先,先写测试再实现 |
| 修复问题 | fix | "修复"、"修复 bug"、"fix"、"broken"、"error" | 先定位根因(systematic-debugging),再修复 |
| 重构 | refactor | "重构"、"优化"、"清理"、"refactor"、"cleanup" | 确保有测试覆盖,小步骤重构 |
| 探索/分析 | explore | "分析"、"研究"、"了解"、"explore"、"investigate" | 只读模式,不改代码,生成报告 |
| 配置/文档 | configure | "配置"、"文档"、"设置"、"config"、"docs" | 轻量执行,无需 TDD |
| 混合 | mixed | 多种意图混合 | 拆分为独立子任务,逐一处理 |
门控检测流程
在 ce:work Phase 0 完成后,执行意图分类:
Step 1: 自动分类
分析输入文档(plan 或 bare prompt)中的关键词,得出初始分类:
输入分析 → 关键词匹配 → 初始意图
Step 2: 置信度评估
| 置信度 | 行为 |
|---|---|
| ≥ 0.80 | 直接设定执行策略,不询问 |
| 0.60-0.79 | 展示分类结果,询问确认(单问) |
| < 0.60 | 明确询问用户意图 |
Step 3: 意图确认(低置信度时)
使用 AskUserQuestion 询问:
检测到此任务可能是:
A. 实现新功能(test-first)
B. 修复问题(debug-first)
C. 重构(refactor-safe)
D. 其他:___
选择最准确的意图 (A/B/C/D):
各意图执行策略
implement(实现新功能)
1. 加载 test-driven-development skill
2. 先写失败测试
3. 实现使测试通过
4. 重构(可选)
5. 验证完整测试套件
fix(修复问题)
1. 加载 systematic-debugging skill
2. 定位根因(不猜测)
3. 写复现测试(证明 bug 存在)
4. 修复使测试通过
5. 验证无回归
refactor(重构)
1. 确认现有测试覆盖率
2. 如覆盖率不足 → 先补测试
3. 小步骤重构(每步运行测试)
4. 最终效果:行为不变,代码更清晰
explore(探索/分析)
1. 设置只读模式(不改代码)
2. 使用 repo-research-analyst + learnings-researcher
3. 生成分析报告到 docs/plans/ 或标准输出
4. 明确告知用户:探索模式,不执行任何修改
configure/docs(配置/文档)
1. 轻量执行,无需 TDD 周期
2. 修改相关配置文件或文档
3. 验证格式正确性(lint/yaml validate 等)
与 ce:work 的集成
Intent Gate 在 ce:work Phase 0(环境扫描)完成后、Phase 1(Quick Start)开始前执行:
Phase 0: 环境扫描(原有)
↓
[Intent Gate 插入点 — 本 overlay 在此插入]
├── 自动分类意图
├── 设定执行策略
└── 加载对应 skill(TDD / systematic-debugging 等)
↓
Phase 1: Quick Start(原有,但按策略执行)
注意:不使用分数相命名(如 Phase 0.5),以避免与 ce:work 原有整数相编号冲突。
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 · 156 lines · 66 tokens per session scan A d20d919bb31b
intent-gate is a skill published in the GitHub repository Jerrylalala/compound-engineering (5 stars, last pushed 3mo ago), licensed MIT. It adds 66 tokens to every session and 1,333 once invoked, about $0.0003 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-31.
Other skills, from other repositories
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.
auto-perf-optimize
Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.
chat-perf
Run chat perf benchmarks and memory leak checks against the local dev build or any published VS Code version. Use when investigating chat rendering regressions, validating perf-sensitive changes to chat UI, or checking for memory leaks in the chat response pipeline.
chat-pet-sprite-creation
Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.
cpu-profile-analysis
Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…