Communitygithub.com

延迟关键系统

用于延迟敏感系统,例如实时仪表盘、市场数据、流式代理、执行网关、队列、缓存或类高频交易基础设施,其中新鲜度和p95延迟至关重要。在p95延迟或数据新鲜度很重要时使用——实时仪表盘、市场数据、流式代理、队列或缓存。

延迟关键系统 是什么?

该技能专为需要严格控制延迟的工程系统设计,涵盖实时仪表盘、市场数据流、流式处理代理、执行网关、队列和缓存等场景。它关注p50、p95、p99延迟、吞吐量、新鲜度、队列深度、缓存命中率以及负载下的正确性等关键指标,而不是简单地将一切归结为“快”。技能要求绘制从源事件到最终用户可见状态的完整热路径,并对每个段分别测量,从而确定优化优先级:先消除不必要的往返,缓存稳定读取,批量处理,将计算靠近数据或用户,分离热路径和冷路径,对队列施加背压,并仅在改善新鲜度或用户体验时使用流式处理。验证方面依赖实时回读,包括HTTP计时、响应头、提供商新鲜度时间戳、队列/作业状态以及浏览器UI新鲜度检查。对于市场数据或执行相关路径,还需验证订单簿年龄、VWAP假设、提供商状态和终止开关行为。该技能对延迟优化设置严格护栏,禁止通过删除必要验证来优化延迟,禁止用快速缓存命中掩盖陈旧数据,禁止在无测量情况下声称毫秒级行为,并禁止在未获明确批准门的情况下运行实时订单、破坏性迁移或影响客户的部署。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/affaan-m/ECC/tree/main/skills/latency-critical-systems

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

延迟关键系统 是做什么的?

当用户关心实时行为、热路径、流式新鲜度或执行速度时,使用此技能。这包括类高频交易基础设施,但该技能侧重于工程实践。它不授权进行实盘交易或提供金融建议。

拆分指标

不要将所有东西都归结为“快”。追踪:

  • p50、p95 和 p99 延迟;
  • 吞吐量;
  • 新鲜度年龄;
  • 队列深度;
  • 缓存命中率;
  • 提供商/API 响应时间;
  • 浏览器渲染时间;
  • 负载下的正确性;
  • 故障和重试行为。

绘制热路径

写出从用户/事件到最终可见状态的路径:

源事件 -> 提供商 API -> 摄取工作器 -> 队列 -> 缓存 -> 边缘路由
-> 客户端流 -> 浏览器渲染 -> 用户可见状态

然后分别测量每个段。

优化顺序

  1. 消除不必要的往返。
  2. 缓存稳定读取,并附带新鲜度元数据。
  3. 批量处理小的调用和写入。
  4. 将计算移至更接近数据或用户的位置。
  5. 分离热路径和冷路径。
  6. 在队列无限增长之前施加背压。
  7. 仅在改善新鲜度或用户体验时使用流式处理。
  8. 为陈旧数据、降级提供商和不良缓存状态添加金丝雀检测。

验证

在存在已部署的上层应用时,使用实时回读:

  • HTTP 计时和响应头;
  • 提供商新鲜度时间戳;
  • 队列或作业状态;
  • 边缘/缓存状态;
  • 浏览器验证:实际 UI 新鲜度;
  • 关于重试和降级模式的日志。

对于市场数据或执行相关路径,在宣布路径就绪之前,还需验证订单簿年龄、VWAP 假设、提供商状态和终止开关行为。

护栏

  • 不要通过删除必要的验证来优化延迟。
  • 不要用快速的缓存命中掩盖陈旧数据。
  • 不要在没有测量的情况下,仅凭客户端标签就声称毫秒级行为。
  • 在没有明确批准门的情况下,不要运行实时订单、破坏性迁移或影响客户的部署。
  • 将秘密和私有有效负载保持在日志和基准测试工件之外。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

accessibility

Design, implement, and audit inclusive digital products using WCAG 2.2 Level AA. Use when building or auditing UI that must meet WCAG 2.2 Level AA, or when reviewing a change for keyboard, contrast, or screen-reader support.

affaan-m/content-engine

Create platform-native content systems for X, LinkedIn, TikTok, YouTube, newsletters, and repurposed multi-platform campaigns. Use when the user wants social posts, threads, scripts, content calendars, or one source asset adapted cleanly across platforms.

affaan-m/ECC

Multi-platform content distribution across X, LinkedIn, Threads, and Bluesky. Adapts content per platform using content-engine patterns. Never posts identical content cross-platform. Use when the user wants to distribute content across social platforms.

affaan-m/fal-ai-media

Unified media generation via fal.ai MCP — image, video, and audio. Covers text-to-image (Nano Banana), text/image-to-video (Seedance, Kling, Veo 3), text-to-speech (CSM-1B), and video-to-audio (ThinkSound). Use when the user wants to generate images, videos, or audio with AI.

affaan-m/manim-video

日本語翻訳:このファイルは manim-video 用の日本語翻訳が必要です

affaan-m/remotion-video-creation

Remotion のベストプラクティス - React で動画を作成する。3D、アニメーション、音声、字幕、チャート、トランジションなどをカバーするドメイン固有の29のルール。

affaan-m/video-editing

AI-assisted video editing workflows for cutting, structuring, and augmenting real footage. Covers the full pipeline from raw capture through FFmpeg, Remotion, ElevenLabs, fal.ai, and final polish in Descript or CapCut. Use when the user wants to edit video, cut footage, create vlogs, or build video content.

agent-architecture-audit

Full-stack diagnostic for agent and LLM applications. Audits the 12-layer agent stack for wrapper regression, memory pollution, tool discipline failures, hidden repair loops, and rendering corruption. Produces severity-ranked findings with code-first fixes. Essential for developers building agent applications, autonomous loops, or any LLM-powered feature. Use when an agent or LLM feature misbehaves and the failing layer is unknown, or before shipping an agent stack.

agent-eval

Head-to-head comparison of coding agents (Claude Code, Aider, Codex, etc.) on custom tasks with pass rate, cost, time, and consistency metrics. Use when choosing between coding agents, or when a change to an agent setup needs measured pass rate, cost, and time rather than an impression.

agent-harness-construction

Design and optimize AI agent action spaces, tool definitions, and observation formatting for higher completion rates. Use when defining or revising an agent

agentic-engineering

Operate as an agentic engineer using eval-first execution, decomposition, and cost-aware model routing. Use when planning or executing engineering work that agents will carry out end to end.

agentic-os

Build persistent multi-agent operating systems on Claude Code. Covers kernel architecture, specialist agents, slash commands, file-based memory, scheduled automation, and state management without external databases. Use when building a persistent multi-agent system on Claude Code with its own memory, commands, and scheduling.

agent-introspection-debugging

Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports. Use when an agent run fails and you need a reproducible diagnosis instead of a retry.

agent-payment-x402

Add x402 payment execution to AI agents with per-task budgets, spending controls, and non-custodial wallets. Supports Base through agentwallet-sdk and X Layer through OKX Payments / OKX Agent Payments Protocol. Use when an agent must pay for something itself and needs per-task budgets, spending controls, and a non-custodial wallet.

agent-self-evaluation

Use after completing any non-trivial task. The agent self-rates its output on 5 axes — accuracy, completeness, clarity, actionability, conciseness — with concrete evidence per criterion. Produces a structured 1-5 scorecard with specific improvement suggestions.

agent-sort

Build an evidence-backed ECC install plan for a specific repo by sorting skills, commands, rules, hooks, and extras into DAILY vs LIBRARY buckets using parallel repo-aware review passes. Use when ECC should be trimmed to what a project actually needs instead of loading the full bundle.

ai-first-engineering

Engineering operating model for teams where AI agents generate a large share of implementation output. Use when setting team process, review gates, or ownership rules for a codebase largely written by agents.

ai-regression-testing

Regression testing strategies for AI-assisted development. Sandbox-mode API testing without database dependencies, automated bug-check workflows, and patterns to catch AI blind spots where the same model writes and reviews code. Use when adding regression coverage to AI-assisted code, or when the same model both wrote and reviewed a change.

android-clean-architecture

Clean Architecture patterns for Android and Kotlin Multiplatform projects — module structure, dependency rules, UseCases, Repositories, and data layer patterns. Use when structuring modules, layers, or data flow in an Android or KMP project.

angular-developer

Generates Angular code and provides architectural guidance. Trigger when creating projects, components, or services, or for best practices on reactivity (signals, linkedSignal, resource), forms, dependency injection, routing, SSR, accessibility (ARIA), animations, styling (component styles, Tailwind CSS), testing, or CLI tooling.

相关技能