Communitygithub.com

低延遲關鍵系統

適用於對延遲敏感的系統,例如即時儀表板、市場數據、串流代理、執行網關、佇列、快取或類似 HFT 的基礎設施。當 p95 延遲或資料新鮮度至關重要時使用。

低延遲關鍵系統 是什麼?

這個技能專為處理低延遲關鍵系統而設計,專注於即時行為、熱路徑、串流新鮮度和執行速度等工程面向。它涵蓋從 HFT 基礎設施到一般即時系統的範疇,但明確排除授權即時交易或提供財務建議。技能核心是拆解指標,要求追蹤 p50、p95、p99 延遲、吞吐量、新鮮度年齡、佇列深度、快取命中率、提供者回應時間等多個維度,而非單純追求「快」。它支援任何開發者工具或 AI 代理平台(如 Claude Code、Cursor、Codex)。其運作方式基於系統化的 SKILL.md 文件,提供從映射熱路徑、最佳化順序到驗證與護欄的完整工程方法。開發者可以透過它學習如何移除不必要往返、快取穩定讀取、分批呼叫、將計算移至資料或使用者附近,以及在部署前使用即時回讀進行驗證,確保系統在低延遲下仍保持正確性和可靠性。

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

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

低延遲關鍵系統 是做什麼的?

當使用者關心即時行為、熱路徑、串流新鮮度或執行速度時,請使用此技能。這包括類似 HFT 的基礎設施,但此技能以工程為導向。它不會授權即時交易或提供財務建議。

拆分指標

不要將所有項目都歸結為「快」。請追蹤:

  • 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.

相關技能