Latency Critical Systems
Focus on p95 latency and data freshness for realtime systems like dashboards, streaming agents, and caches. It tracks latency metrics, maps hot paths, and suggests optimizations for throughput and correctness under load.
affaan-m on GitHub
Curated by PromptsEdge from a public repo · MIT license. All credit goes to the author.
What is this skill?
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.
Install this skill
- 1
Get the skill — it’s free
Use the Get this skill panel. Unlocked skills stay in My skills. - 2
Download or clone the files
Download the zip, or clone the repo and copy theskills/latency-critical-systemsfolder. - 3
Put it where your agent looks for skills
For Claude Code, use your personal skills folder (every project) or a project’s own folder:~/.claude/skills/latency-critical-systems/SKILL.md # all projects .claude/skills/latency-critical-systems/SKILL.md # this project only
- 4
Just ask
No command needed. The agent reads the skill’s description and loads it on its own when your request matches.
SKILL.md frontmatter
What your agent reads to decide when to load this skill.
--- name: latency-critical-systems description: Use for latency-sensitive systems such as realtime dashboards, market data, streaming agents, execution gateways, queues, caches, or HFT-like infrastructure where freshness and p95 latency matter. Use when p95 latency or data freshness matters — realtime dashboards, market data, streaming agents, queues, or caches. ---
Files
Open any Markdown file to read it here.
Related skills
View all →- Stock Liquidity AnalysisFreeYour AI analyzes a stock’s liquidity: bid-ask spreads, volume, order book depth, market impact, turnover, and slippage, all from Yahoo Finance data. Get a liquidity grade and cost estimates for trading.
- Yahoo Finance Data FetchFreeGet current quotes, price history, financial statements, options chains, dividends, analyst estimates, and more for any stock or ETF using Yahoo Finance data. Your AI handles tickers and custom screens.
- SaaS Valuation CompressionFreeYour AI analyzes how a private SaaS company’s ARR multiple changed between funding rounds, attributes the causes, and benchmarks against market medians and peers. Includes charts and a concise verdict.
- Stock Correlation AnalysisFreeYour AI finds correlated stocks, measures pairwise correlation and beta, builds correlation matrices, and tracks rolling or regime-based co-movement using Yahoo Finance data. Great for pair trading, sector analysis, and risk management.