Catalog
affaan-m/latency-critical-systems

affaan-m

latency-critical-systems

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.

New~560Updated Jul 14, 2026

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

  1. Remove unnecessary round trips.
  2. Cache stable reads with freshness metadata.
  3. Batch small calls and writes.
  4. Move compute closer to the data or the user.
  5. Split hot and cold paths.
  6. Apply backpressure before queues grow unbounded.
  7. Use streaming only when it improves freshness or user experience.
  8. 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.
Files1
1 files · 1.0 KB

Select a file to preview

Overall Score

78/100

Grade

B

Good

Safety

85

Quality

75

Clarity

82

Completeness

68

Summary

This skill provides engineering guidance for optimizing latency-critical systems such as realtime dashboards, streaming agents, caches, and market data infrastructure. It teaches a systematic approach to measuring and optimizing performance across the entire data path, from source event to user-visible state, while maintaining critical guardrails around validation, transparency, and operational safety.

Detected Capabilities

code analysis and profilingsystem design and architectureperformance metric measurementlog inspection and diagnosticsconfiguration tuning guidancevalidation and safety guardrails

Trigger Keywords

Phrases that MCP clients use to match this skill to user intent.

optimize latency metricsmarket data freshnessrealtime dashboard performancecache hit rate tuningexecution path profilingqueue backpressurep95 latency reductionstreaming data pipelineorderbook verificationprovider response time

Use Cases

  • Optimize realtime dashboard refresh latency
  • Reduce p95/p99 latencies in market data systems
  • Design streaming data freshness pipelines
  • Eliminate round trips from hot execution paths
  • Tune queue depth and backpressure in event systems
  • Validate cache hit rates and stale data conditions
  • Profile browser render time in realtime UIs
  • Implement kill-switch behavior for degraded providers
  • Benchmark provider API response times and freshness
  • Verify orderbook age and VWAP assumptions before deployment

Quality Notes

  • Excellent scope clarity: skill is explicitly scoped to latency optimization engineering, not live trading or financial operations
  • Strong guardrails section explicitly prohibits dangerous practices (dropping validation, hiding stale data, unauthorized live orders)
  • Well-structured optimization order (7 concrete steps) with clear rationale
  • Metric breakdown (p50, p95, p99, throughput, freshness age, etc.) is comprehensive and measurable
  • Verification section provides concrete techniques (HTTP headers, provider timestamps, queue state, browser verification)
  • Map-the-hot-path diagram technique is practical and actionable
  • Secret handling guidance (keep secrets out of logs/artifacts) demonstrates security awareness
  • Scope limitation acknowledged: 'engineering-focused' clarifies this is not financial advice or trading authorization
  • Minor incompleteness: no specific tools or commands listed for profiling/verification (could reference flame graphs, browser DevTools, etc.)
  • Could benefit from example latency measurements or case studies to ground abstract guidance
Model: claude-haiku-4-5-20251001Analyzed: Jul 14, 2026

Reviews

Add this skill to your library to leave a review.

No reviews yet

Be the first to share your experience.

Version History

  1. v1.1

    Content updated

    ✦ AINo behavioral changes detected.

    2026-07-14

    Latest
  2. v1.0

    2026-05-25

    View This VersionInitial version

Use affaan-m/latency-critical-systems in your dev environment

Command Palette

Search for a command to run...