stackhawk-optimize-mapping Cursor ruleA
stackhawk-optimize-mapping 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-mapping.mdc@git:20260914.830087cPins git:20260914.830087c 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-mapping.mdc- Versions recorded
- 4
- Latest version
- git:20260914.830087c, committed Sep 14, 2026
- First version recorded
- Jun 30, 2026
- Size
- 2,485 bytes
- Repository stars
- 16
- License
- MIT
Optimize codebase-to-config mapping: tech-flag detection heuristics (reuses hawkscan's evidence-file detection), plugin selection from a base preset, stackhawk.yml correctness (app type, OpenAPI, GraphQL, auth), and the default-balanced speed-vs-coverage profile lean.
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
# Codebase → Config Mapping ## Tech flags Reuse the hawkscan skill's tech-flag detection heuristics (linked from the Companion skills section of SKILL.md) — evidence files such as `package.json`, `pom.xml`, `go.mod`, `requirements.txt`, `docker-compose.yml`, `Gemfile`, `*.csproj`/`*.sln`. Map detected techs to canonical flag keys. The canonical flag list is authoritative — fetch it with `hawk op app tech-flags get --app <APP> --format json` and only use keys that exist. When enabling a child flag (e.g. `Language.Java.Spring`), also enable its parents. ## Plugins Start from a base preset that matches the app shape: - Plain REST/HTML app → `DEFAULT` - OpenAPI-described API → `DEFAULT_API` - GraphQL API → the GraphQL preset (confirm exact name via `hawk op policy list`) Fetch the base with `hawk op policy get --name <PRESET>`. Then: - DROP plugin families irrelevant to the detected stack (reduces noise + time). - KEEP/ADD families the stack needs. Validate every plugin id against the base policy's plugin list — never invent ids. Edit the fetched JSON as little as possible: keep every field on every plugin entry (dropping …
Read the whole file at its exact version.
How to install
mdr add stackhawk/agent-skills/cursor/.cursor/rules/stackhawk-optimize-mapping.mdc@sha256:ca5e383660a02221The line at the top of this page pins the label git:20260914.830087c, 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_s76cjdoychh2giwz)
3 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 4 versions of this file, between Jun 30, 2026 and Sep 14, 2026, about one every 25 days.
| version | committed | commit | size | audit | |
|---|---|---|---|---|---|
| git:20260914.830087c latest | 2026-09-14 | 830087c | 2,485 B | A | view · diff |
| git:20260914.1e1ce75 | 2026-09-14 | 1e1ce75 | 2,501 B | A | view · diff |
| git:20260914.5fe0d68 | 2026-09-14 | 5fe0d68 | 2,491 B | A | view · diff |
| git:20260630.b97573a | 2026-06-30 | b97573a | 1,913 B | A | view |
Audit of the latest version
- pass: Size between 200 bytes and 200 KB (2485 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_s76cjdoychh2giwz GET https://markdownregistry.com/api/v1/resolve?ref=stackhawk/agent-skills/cursor/.cursor/rules/stackhawk-optimize-mapping.mdc GET https://markdownregistry.com/api/v1/blob/ca5e383660a0222106272d31c4f1ccf47ad46d0f62ae12676b62ee6434a8cdae
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.