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.
git clone --depth 1 https://github.com/stackhawk/agent-skillsWrote 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.
[](https://agentmods.dev/rules/stackhawk/agent-skills/stackhawk-optimize-trial)<a href="https://agentmods.dev/rules/stackhawk/agent-skills/stackhawk-optimize-trial"><img src="https://agentmods.dev/badge/rules/stackhawk/agent-skills/stackhawk-optimize-trial/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/rules/stackhawk/agent-skills/stackhawk-optimize-trial"><img src="https://agentmods.dev/badge/rules/stackhawk/agent-skills/stackhawk-optimize-trial.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00062 | $0.00831 |
| Opus 5.5 | $0.00025 | $0.00332 |
| Sonnet 5.5 | $0.00012 | $0.00166 |
| Haiku 4.5 | $0.00006 | $0.00083 |
Grade A, and why
stackhawk-optimize-trial 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 1mo 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.
How it starts
The opening of the file, as written. The whole thing — 55 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Trial Lifecycle
Setup mode builds + references the policy (steps 1–4, no scan); Refine mode runs the trial scan and promotes/discards (steps 5–9). Setup is re-runnable and is what hawkscan Phase 0c invokes on every fresh
stackhawk.yml.
How a named policy reaches a scan (why this is non-destructive)
When app.scanPolicy.name is set in stackhawk.yml, HawkScan bootstrap detects an
org-level policy and downloads it directly from S3 at scan start
(AssetManagerClient.getDownloadedAsset(orgId, SCAN_POLICY, name)), applying its tech flags
- plugins and then layering the local
includePluginIds/excludePluginIdstoggles. The application's own stored policy/flags are never read or mutated by this path.
Naming
Trial policy name: OPTIMIZE_TRIAL_<APP>_<ENV>, transformed to match ^[A-Z0-9_]+$
(uppercase; replace any non [A-Z0-9] run with _). Deterministic so re-runs are
idempotent.
Create (trial)
- Build the trial
ScanPolicyJSON (base preset + edited tech flags + toggled plugins). - Clean up any stale orphan first:
hawk op policy delete --name OPTIMIZE_TRIAL_… --yes(ignore "not found"). hawk op policy create --file <tmp.json> --name OPTIMIZE_TRIAL_… --display-name "Optimize trial (<APP>/<ENV>)".- Back up
stackhawk.yml— but guard against clobbering a good backup: ifstackhawk.yml.optimize-bakALREADY exists (a prior crashed run left it), do NOT overwrite it — it holds the true original. Warn the user, reuse the existing backup, and skip re-copying. Only when no backup exists, copystackhawk.yml→stackhawk.yml.optimize-bak. - Set
app.scanPolicy.nameand the corrections; show the diff.
Promote
- Ask the user for a permanent policy name (default
OPTIMIZE_<APP>), upper-snake. - Ensure the policy JSON is available, then create the permanent policy. The trial policy
already lives on the platform, so do NOT assume the local
<tmp.json>survived (a resumed/crashed session may have lost it). If<tmp.json>is missing, reconstruct it from the live trial policy:hawk op policy get --name OPTIMIZE_TRIAL_… > <tmp.json>. Thenhawk op policy create --file <tmp.json> --name <PERMANENT>. - Update
stackhawk.yml app.scanPolicy.name→<PERMANENT>; remove the backup file. hawk op policy delete --name OPTIMIZE_TRIAL_… --yes.- (Optional)
hawk op policy assign --app <APP> --name <PERMANENT>to set the platform default. - Leave the
stackhawk.ymlchange staged for the user to review/commit (do not commit for them).
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.
- 1mo ago Changed 2094e5a737ad
- 1mo ago First seen · 55 lines · 62 tokens per session scan A 41519ac949f2
stackhawk-optimize-trial is a cursor rule published in the GitHub repository stackhawk/agent-skills (16 stars, last pushed 8d ago), licensed MIT. It adds 62 tokens to every session and 831 once invoked, about $0.0002 per session on Opus 5.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-30.
Other cursor rules, from other repositories
ponytail
Ponytail, lazy senior dev mode. Always pick the simplest solution that works.
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.
prefer-assertions-over-defensive-checks
Prefer assertions over defensive checks when data is guaranteed to be valid.
prefer-direct-imports-over-module-mocks
Prefer extracting a testable core over vi.mock / vi.resetModules when unit tests need to reach production logic entangled with config, env, or singletons.
config-validation-and-normalization
Config validation and normalization responsibilities (defineConfig normalizes, the orm section schema validates and resolves paths, the loader reports per-section diagnostics).