latency-critical-systems
Skill10 starsChanged 3 months agoMITView on GitHub
Use when working on latency-sensitive Laravel paths — realtime dashboards, streaming, queues, caches, or execution gateways — where p95 latency and data freshness matter.
We split this skill into the rules it gives an agent
12 rules. 4 are common, 7 are distinctive, and 1 is very specific to this project.
4
Common
Most of the 6 edited versions we read keep these.
7
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 21
Never trade correctness for speed (see Guardrails).
- Common: line 31
Do not collapse everything into "fast." Track separately:
- Distinctive: line 49
Write the path from event to visible state, then measure each segment:
- Very specific: line 66
Cache stable reads with freshness metadata: Use Cache::remember() / Cache::flexible() against Redis for reads that tolerate a known …
- Distinctive: line 83
Split hot and cold paths: Keep the request fast: do the minimum synchronously, dispatch the rest to a queue.
- Distinctive: line 89
Stream only when it improves freshness: Use broadcasting / websockets (Reverb / Echo) to push fresh data instead of client polling — but …
- Distinctive: line 96
Never claim a latency win from a label.
- Common: line 116
Do not optimize latency by dropping required validation or authorization.
- Distinctive: line 117
Do not hide stale data behind fast cache hits — surface freshness age.
- Common: line 119
Do not claim millisecond behavior from client labels without measurement.
- Distinctive: line 120
Do not gate risky changes loosely: execution-impacting, destructive-migration, or customer-facing deploys need an explicit approval gate …
- Common: line 122
Keep secrets and private payloads out of logs and benchmark artifacts.
“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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.mdcfor every query on the hot path (N+1, eager loading, index usage, batching) - Apply
@rules/laravel/laravel.mdcfor framework-level structure and caching choices - Apply
@rules/laravel/queue-debouncing.mdcwhen 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 -> userFor each segment record where time goes. The bottleneck is usually one segment, not the whole chain — instrument before optimizing.
3. Optimization order
Apply in this order; stop when the target is met.
- Remove unnecessary round trips. Collapse repeated queries; resolve N+1
with eager loading (
with(...),withCount(...)) per@rules/sql/optimalize.mdc. N+1 on a hot path is the single most common latency killer. Cache stable reads with freshness metadata. Use
Cache::remember()/Cache::flexible()against Redis for reads that tolerate a known staleness window. Store the computed-at timestamp alongside the value.$stats = Cache::remember('dashboard:stats', now()->addSeconds(30), fn () => Order::query()->selectRaw('count(*) c, sum(total) t')->first() );- Batch small calls and writes. Combine per-row queries into bulk
operations (
whereIn,upsert, single keyed read) rather than looping. For bursty event streams, debounce/coalesce queued work per@rules/laravel/queue-debouncing.mdcso one job processes a window of events. - Move compute closer to the data or user. Push aggregation into SQL
(
@rules/sql/optimalize.mdc) instead of hydrating models in PHP; serve reads from a DB read replica where the connection supports it. - Split hot and cold paths. Keep the request fast: do the minimum synchronously, dispatch the rest to a queue. Run hot routes under Laravel Octane so the framework stays booted between requests.
- Apply backpressure before queues grow unbounded. Cap concurrency with
Horizon
maxProcesses/ rate limiting; shed or defer load when queue depth crosses a threshold rather than letting lag compound. - Stream only when it improves freshness. Use broadcasting / websockets (Reverb / Echo) to push fresh data instead of client polling — but only where freshness genuinely improves the experience.
- Add canaries for stale cache, degraded providers, and growing queue depth.
4. Verification — real readbacks
Never claim a latency win from a label; read it back from the running system:
- HTTP timing & headers — measure the route; add a
Server-Timingheader or read response time from logs / Telescope. - Cache state — confirm hit rate via Redis (
INFO stats) and verify the freshness timestamp stored with cached values. - Queue state — check Horizon for wait time, depth, and failed jobs; confirm the hot path is not blocked behind a slow queue.
- Query plans — run
EXPLAINon the hot query (see@rules/sql/optimalize.mdc) to confirm index usage after a rewrite. - Freshness — read the provider/source timestamp and the displayed value; confirm the gap is within the agreed staleness window.
- Browser — verify actual UI freshness (Livewire poll/broadcast updates), not just server numbers.
For execution-adjacent paths, also verify source-data age, provider status, and kill-switch / degraded-mode behavior before calling the path ready.
Guardrails
- Do not optimize latency by dropping required validation or authorization.
- Do not hide stale data behind fast cache hits — surface freshness age; never let a fast cache hit masquerade as live data.
- Do not claim millisecond behavior from client labels without measurement.
- Do not gate risky changes loosely: execution-impacting, destructive-migration, or customer-facing deploys need an explicit approval gate and a rollback path.
- Keep secrets and private payloads out of logs and benchmark artifacts.
Done when
- Each tracked metric (p50/p95/p99, throughput, freshness, queue depth, cache hit rate) has a real, measured value — before and after.
- The hot path is mapped and the actual bottleneck segment is identified.
- Optimizations were applied in order and each win is confirmed by a readback (Telescope/Horizon/Redis/EXPLAIN/browser), not assumption.
- Validation, authorization, and freshness honesty are intact; risky deploys are gated.
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 5
- gongyijie85/dsh-ecc★ 825% same
- ronmkr/PromptBook★ 226% same
- SamuelNDCE/claude-super-skill-library★ 126% same
- davidanthonyn/claude-skills★ 026% same
- renepf/claude-skills★ 026% same
Wrote their own version · 1
- Premchand006/AI-assistant-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Used alongsideProjects with it also use orch-pipeline, prediction-market-oracle-research and 8 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
renepfSkillorch-pipeline
Shared orchestration engine for the orch-* skill family. Defines the gated Research-Plan-TDD-Review-Commit pipeline, the size classifier, the agent map, and the two human gates that the orch-* operation skills delegate to. Not usually invoked directly.
Also in 3 projects that use this
renepfSkillprediction-market-oracle-research
Research prediction markets as data sources or oracle signals for products, agents, dashboards, and corporate decision intelligence. Use for source-grounded analysis of market-implied probabilities, caveats, and integration patterns without investment advice.
Also in 3 projects that use this
TironFoxSkillagent-payment-x402
Add x402 payment execution to AI agents — per-task budgets, spending controls, and non-custodial wallets via MCP tools. Use when agents need to pay for APIs, services, or other agents.
Also in 3 projects that use this
arsalllsSkillnetwork-config-validation
Pre-deployment validation of Cisco IOS/IOS-XE configuration — catching missing saves, mismatched ACLs, overlapping subnets, duplicate IPs, missing route-maps, and dangerous commands before they cause outages.
Also in 3 projects that use this
marcusgollSkillparallel-execution-optimizer
Identify and execute independent operations in parallel for 3-5x speedup. Auto-analyzes task dependencies, groups into batches, launches parallel Task() calls. Applies to /optimize (5 checks), /ship pre-flight (5 checks), /implement (task batching), /prototype (N screens). Auto-triggers when detecting multiple independent operations in a phase.
Also in 3 projects that use this
loulanyueSkillsanta-method
Multi-agent adversarial verification with convergence loop. Two independent review agents must both pass before output ships.
Also in 3 projects that use this
- +1 more from renepf
In this repository62 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- analyze-problemSkill
- api-reviewSkill
- article-writingSkill
- assignment-compliance-checkSkill
- automation-audit-opsSkill
- autonomous-loopsSkill
- benchmark-optimization-loopSkill
- benchmarkSkill
- blueprintSkill
- class-refactoringSkill
- cleanup-local-branchesSkill
- codebase-simplification-auditSkill
- code-review-bugsnagSkill
- code-review-githubSkill
- code-review-jiraSkill
- code-reviewSkill
- composer-updateSkill
- create-issues-from-textSkill
- create-issueSkill
- create-missing-tests-in-prSkill
- create-testSkill
- design-systemSkill
- docker-patternsSkill
- e2e-testingSkill
- frontend-a11ySkill
- frontend-design-directionSkill
- frontend-patternsSkill
- frontend-slidesSkill
- git-workflowSkill
- laravel-authorization-reviewSkill
- laravel-securitySkill
- laravel-telescopeSkill
- merge-github-prSkill
- mysql-patternsSkill
- mysql-problem-solverSkill
- penetration-testerSkill
- postgres-patternsSkill
- prepare-issue-contextSkill
- process-code-reviewSkill
- product-capabilitySkill
- production-auditSkill
- pr-staged-merge-planSkill
- pr-summarySkill
- record-project-memorySkill
- redis-patternsSkill
- refactor-entry-point-to-actionSkill
- refresh-claude-mdSkill
- resolve-issueSkill
- rewrite-tests-pestSkill
- security-bounty-hunterSkill
- security-reviewSkill
- security-threat-analysisSkill
- seoSkill
- skill-creatorSkill
- slack-messagingSkill
- smartest-project-additionSkill
- test-driven-developmentSkill
- tester-cookbookSkill
- test-like-humanSkill
- The first 60 shown.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

