latency-critical-systems

latency-critical-systems is a skill for Claude Code, Codex from pekral/cursor-rules. It costs 37 tokens per session (1,442 once invoked), scanned A, original, MIT.

An engineering guide for Laravel application paths where response time and data freshness matter, such as live dashboards, streaming, queues, caches, and execution gateways.

In plain words
What is it for?
Use it when deciding how to measure, cache, batch, replicate, or move work on latency-sensitive application paths.
Why use it?
It encourages measuring slow-tail response times, queue delay, cache age, and freshness so speed improvements do not break correctness.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when deciding how to measure, cache, batch, replicate, or move…

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/pekral/cursor-rules/latency-critical-systems
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add pekral/cursor-rules --skill latency-critical-systems
Clone the repo
git clone --depth 1 https://github.com/pekral/cursor-rules

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for latency-critical-systems

README.md
[![agentmods](https://agentmods.dev/badge/skills/pekral/cursor-rules/latency-critical-systems.svg)](https://agentmods.dev/skills/pekral/cursor-rules/latency-critical-systems)
Your own site
<a href="https://agentmods.dev/skills/pekral/cursor-rules/latency-critical-systems"><img src="https://agentmods.dev/badge/skills/pekral/cursor-rules/latency-critical-systems.svg" alt="Measured on agentmods" height="20"></a>
Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,442 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00037 $0.01442
Opus 5 $0.00018 $0.00721
Sonnet 5 $0.00007 $0.00288
Haiku 4.5 $0.00004 $0.00144

Measured 7d ago against content hash ece6733093cd, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

latency-critical-systems scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/latency-critical-systems/SKILL.md · 132 lines

How it starts

The opening of the file, as written. The whole thing — 132 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Latency Critical Systems (Laravel)

Engineering approach for latency-sensitive Laravel paths: realtime dashboards, streaming, ingest workers, queues, caches, and execution gateways where p95 latency and freshness matter. This skill is engineering-focused; it does not authorize live trading or financial advice.

Constraints

  • Apply @rules/sql/optimalize.mdc for every query on the hot path (N+1, eager loading, index usage, batching)
  • Apply @rules/laravel/laravel.mdc for framework-level structure and caching choices
  • Apply @rules/laravel/queue-debouncing.mdc when smoothing bursty queue work
  • Measure, do not guess — every claim about latency must come from a real readback.
  • Never trade correctness for speed (see Guardrails).

Use when

  • A page, API route, broadcast, or dashboard must hit a latency target (p95/p99).
  • Queue lag, cache staleness, or freshness age is a visible problem.
  • Streaming / websocket freshness or execution-gateway timing is in scope.
  • You are deciding where to cache, batch, replicate, or move compute.

1. Split the metrics

Do not collapse everything into "fast." Track separately:

  • p50, p95, p99 latency (one slow tail dominates user perception);
  • throughput (requests/jobs per second);
  • freshness age (how old the displayed data is);
  • queue depth and queue wait time;
  • cache hit rate;
  • provider/external API response time;
  • browser render time;
  • correctness under load;
  • failure and retry behavior.

Capture them with real tools: response timing headers, Horizon metrics, Redis INFO/MONITOR, slow-query log, and Laravel Telescope for per-request timing breakdowns.

2. Map the hot path

Write the path from event to visible state, then measure each segment:

source event -> provider API -> ingest job -> queue (Redis/Horizon) -> cache (Redis)
-> Octane worker / route -> broadcast (websocket) -> Livewire/browser render -> user

For each segment record where time goes. The bottleneck is usually one segment, not the whole chain — instrument before optimizing.

Read the full file on GitHub · 132 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 132 lines · 37 tokens per session scan A ece6733093cd

Subscribe to this mod's changes

latency-critical-systems is a skill published in the GitHub repository pekral/cursor-rules (6 stars, last pushed 6d ago), licensed MIT. It adds 37 tokens to every session and 1,442 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

cqrs-implementation

Implement Command Query Responsibility Segregation for scalable architectures. Use when separating read and write models, optimizing query performance, or building event-sourced systems.

wshobson/agents · 35 tokens

microservices-patterns

Design microservices architectures with service boundaries, event-driven communication, and resilience patterns. Use when building distributed systems, decomposing monoliths, or implementing microservices.

wshobson/agents · 38 tokens

diagnose-backend-bug

Diagnose a bounded backend or multi-service failure from GitHub Issues, Jira, Aone, user-provided exports, logs, traces, responses, stack traces, or job records. Use when a service, API, RPC, worker, queue, CLI, or scheduled job bug needs correlation through the project's existing observability route before repair; do…

QoderAI/better-harness · 87 tokens

designing-apis

Designs REST and GraphQL APIs including endpoints, error handling, versioning, and documentation. Use when creating new APIs, designing endpoints, reviewing API contracts, or when asked about REST, GraphQL, or API patterns.

CloudAI-X/claude-workflow-v2 · 50 tokens

firebase-cloud-functions

Use when calling callable functions (httpsCallable), passing data to server-side logic, handling function errors/timeouts, configuring regions, or testing with the Emulator Suite.

evanca/flutter-ai-rules · 36 tokens

api-doc-generator

Generate API documentation from source code, supporting REST APIs, GraphQL, and various documentation formats.

JackyST0/awesome-agent-skills · 23 tokens