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 →- Review Prediction Market RisksFreeYour AI reviews prediction-market workflows for compliance, safety, data quality, privacy, and execution risks before accessing sensitive data or trading. It checks venue rules, flags legal issues, enforces security, and ensures manual decision points remain.
- Swift Actor PersistenceFreeYour AI implements thread-safe data persistence in Swift using actors for in-memory caching with file-backed storage. It eliminates data races by design and supports safe concurrent access in Swift 5.5+ apps.
- Lookup USPTO Patent RecordsFreeYour AI accesses official US patent and trademark data from USPTO sources. It retrieves application status, assignments, prosecution history, and trademark documents to support reproducible IP research and verification.
- Manage Quality Non-ConformanceFreeYour AI guides investigating and resolving manufacturing quality issues through root cause analysis and CAPA planning. It supports NCR lifecycle, SPC data interpretation, and audit preparation in regulated environments.