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.
npx agentmods add rules/stackhawk/agent-skills/stackhawk-optimize-trialgit clone --depth 1 https://github.com/stackhawk/agent-skillsWhat 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 | $0.00062 | $0.00821 |
| Opus 5 | $0.00031 | $0.00411 |
| Sonnet 5 | $0.00012 | $0.00164 |
| Haiku 4.5 | $0.00006 | $0.00082 |
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 2d 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 onboarding invokes.
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.
- 2d 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 (15 stars, last pushed 12d ago), licensed MIT. It adds 62 tokens to every session and 821 once invoked, about $0.0003 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-30.
Other cursor rules, from other repositories
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.
typescript
Changes to these high-fan-out internals can affect every message, delta, element, or rerun. Keep work in them minimal, and benchmark changes with representative stress-test apps.
coolify-ai-docs
Master reference to all Coolify AI documentation in .ai/ directory.
python_lib
Tips and guidelines specific to the development of the Streamlit Python library, not applicable to scripts and e2e tests.
specs
This directory contains product and tech specs for Streamlit features.