stackhawk-optimize-metrics Cursor ruleA
stackhawk-optimize-metrics from stackhawk/agent-skills is a Cursor rule: instructions the Cursor agent follows in that repo.
mdr add stackhawk/agent-skills/cursor/.cursor/rules/stackhawk-optimize-metrics.mdc@git:20260630.b97573aPins git:20260630.b97573a in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 14 of 14 checks passed
- Kind
- Cursor rule
- Repository
- stackhawk/agent-skills
- Path
cursor/.cursor/rules/stackhawk-optimize-metrics.mdc- Versions recorded
- 1
- Latest version
- git:20260630.b97573a, committed Jun 30, 2026
- Size
- 4,402 bytes
- Repository stars
- 16
- License
- MIT
Optimize post-scan metrics refine loop: MetricsJson schema (paths/operations/flags/health), flag-to-lever mapping (concurrency for rate-limited/timeout-prone; excludePaths for heavy/slow paths; auth for auth-wall), auto-vs-confirm tiers, concurrency step-down (halve from current, floor 1), and the capped refine loop.
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# Scan Metrics → Refine Loop
After the trial scan, analyze its metrics and refine the config using real scan data.
This skill does NOT compute metrics — it consumes `hawk op scan metrics`.
## Get the metrics
```
hawk op scan metrics <SCAN_ID> --format json
```
`<SCAN_ID>` is the trial scan's id (use the id returned by the trial scan; `latest` also works).
Output (`MetricsJson`):
```json
{
"scan_id": "...",
"request_health": { "timeout": 0, "connection_failure": 0, "timeout_streak_max": 0 },
"scan_flags": ["timeout-prone"],
"paths": [
{
"method": "GET", "path": "/x", "total_requests": 100,
"status_counts": {"200": 90, "429": 10},
"class_2xx": 90, "class_3xx": 0, "class_4xx": 10, "class_5xx": 0,
"error_rate": 0.10,
"time": {"p50_bucket": 256, "p90_bucket": 4096, "max_bucket": 8192, "est_total_ms": 30000},
"flags": ["slow-path", "rate-limited"]
}
],
"operations": []
}
```
Useful read-only views (human framing): `--sort {heaviest|slowest|erroring|most-requested}`,
`--top N`, `--method <VERB>`, `--operations`.
## Flag → lever mapping
| Flag | Meaning | Lever | Tier | Goal |
|------|---------|-------|------|------|
…Read the whole file at its exact version.
How to install
mdr add stackhawk/agent-skills/cursor/.cursor/rules/stackhawk-optimize-metrics.mdc@sha256:75d7e1f7e9ee2ad8The line at the top of this page pins the label git:20260630.b97573a, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_jzfe6op5wuczs4bq)
3 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 1 version of this file, committed on Jun 30, 2026.
Audit of the latest version
- pass: Size between 200 bytes and 200 KB (4402 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
stackhawk/agent-skills · 16 stars · license MIT · pushed 2026-11-06 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_jzfe6op5wuczs4bq GET https://markdownregistry.com/api/v1/resolve?ref=stackhawk/agent-skills/cursor/.cursor/rules/stackhawk-optimize-metrics.mdc GET https://markdownregistry.com/api/v1/blob/75d7e1f7e9ee2ad87be62d263c92fc2cd89476a03325ae76ada92a2e4054de13
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: Cursor rules vs AGENTS.md · which agent file does what.