latency-critical-systems
它能做什么
这个工具可以帮你检查并优化那些需要快速响应的系统的速度,例如实时仪表盘或交易系统。它会测量各个环节的耗时,并找出可能变慢的地方。
适用场景
- ✓当实时响应速度至关重要时。
- ✓当你想了解数据流系统中的瓶颈时。
- ✓当你想优化数据送达用户的速度时。
技能链接
https://github.com/affaan-m/ECC/blob/main/pi/core/skills/latency-critical-systems/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“分析一下我的行情数据流的延迟,并找出瓶颈所在。”
每周 5 个新技能,1 分钟读完。
工作原理
这个工具会从多个角度测量速度,例如一个操作完成所需的时间(p50、p95、p99)、数据更新的速度,以及等待队列的大小。它还会梳理数据经过的路径,找出造成延迟的环节。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Latency Critical Systems
Use this skill when the user cares about realtime behavior, hot paths, streaming freshness, or execution speed. This includes HFT-like infrastructure, but the skill is engineering-focused. It does not authorize live trading or financial advice.
Split The Metrics
Do not collapse everything into "fast." Track:
- p50, p95, and p99 latency;
- throughput;
- freshness age;
- queue depth;
- cache hit rate;
- provider/API response time;
- browser render time;
- correctness under load;
- failure and retry behavior.
Map The Hot Path
Write the path from user/event to final visible state:
source event -> provider API -> ingest worker -> queue -> cache -> edge route
-> client stream -> browser render -> user-visible state
Then measure each segment separately.
Optimization Order
- Remove unnecessary round trips.
- Cache stable reads with freshness metadata.
- Batch small calls and writes.
- Move compute closer to the data or the user.
- Split hot and cold paths.
- Apply backpressure before queues grow unbounded.
- Use streaming only when it improves freshness or user experience.
- Add canaries for stale data, degraded providers, and bad cache state.
Verification
Use live readbacks when a deployed surface exists:
- HTTP timing and response headers;
- provider freshness timestamp;
- queue or job state;
- edge/cache state;
- browser verification for actual UI freshness;
- logs around retries and degraded mode.
For market-data or execution-adjacent paths, also verify orderbook age, VWAP assumptions, provider status, and kill-switch behavior before calling the path ready.
Guardrails
- Do not optimize latency by dropping required validation.
- Do not hide stale data behind fast cache hits.
- Do not claim millisecond behavior from client labels without measurement.
- Do not run live orders, destructive migrations, or customer-impacting deploys without an explicit approval gate.
- Keep secrets and private payloads out of logs and benchmark artifacts.
常见问题
什么是 p50、p95 和 p99 延迟?
它们是速度指标。p50 表示一半的操作完成所需的时间,p95 表示 95% 的操作完成所需的时间,p99 表示 99% 的操作完成所需的时间。它们能帮你同时了解平均速度和最坏情况。
什么是“新鲜度”(freshness age)?
它表示数据的新旧程度。如果数据太旧,可能就没有用处,甚至可能造成损害。
我可以用它来做金融交易吗?
不可以。这个工具专注于提升系统速度的工程优化,不提供投资建议,也不执行交易。
详情
作者的原始描述
Optimize and verify latency-sensitive systems — realtime dashboards, market data feeds, streaming agents, execution gateways, queues, and caches — by tracking p50/p95/p99 latency, freshness age, and queue depth, mapping hot paths, and running live readbacks. Use when p95 latency, throughput, or data freshness matters.
repo: affaan-m/ECC
热度
- GitHub 星标
- 280k
- 排名
- #203
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
accessibility
280k帮你的智能体创建人人都能使用的界面。确保网站和应用对残障人士友好,比如失明或行动不便的用户也能顺畅使用。
agent-architecture-audit
280k让你的智能体检查一切是否正常运行。它能找出并修复 AI 系统中的问题,确保系统按预期工作。
agent-eval
280k帮你的智能体比较不同的 AI 编程工具。它能衡量哪个工具在特定任务上更快、更便宜、更可靠。
agent-harness-construction
280k让你的智能体更好地理解如何完成任务。它会优化智能体使用的工具和指令,提高成功的几率。