Skip to content
Back to skills

Bravos Templatize

ASecurity

Turn the threat model's open exposures into correct, testable cxg templates in this session: follow guardlink's own translate method (the generated guardlink-translate skill, else the guardlink_translate MCP tool, else guardlink translate --stdout), validate what you write, keep replay kits apart from scan templates, record repo-specific operator guidance for the probes you write (cxg never generates them), and record classes with no oracle as gaps. Use when asked to write pentest templates, ...

  • 2 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added November 12, 2026
toolsjavascriptpythongojavashellgitapi

Works with

  • api
  • mcp

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned December 1, 2026

npx -y skills add Bugb-Technologies/bravos-plugins --skill bravos-templatize --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Bravos Templatize?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Bravos Templatize
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/bugb-technologies-bravos-templatize/badge)](https://www.skillsdirectory.com/skills/bugb-technologies-bravos-templatize)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: bravos-templatize
description: "Turn the threat model's open exposures into correct, testable cxg templates in this session: follow guardlink's own translate method (the generated guardlink-translate skill, else the guardlink_translate MCP tool, else guardlink translate --stdout), validate what you write, keep replay kits apart from scan templates, record repo-specific operator guidance for the probes you write (cxg never generates them), and record classes with no oracle as gaps. Use when asked to write pentest templates, make a finding testable, or prepare a retest kit."
---
<!-- bravos:generated -->
# Bravos templatize: claims become testable templates, nothing runs

## When

- The user asks for pentest or cxg templates, or to make an exposure testable.
- bravos-annotate or bravos-ship handed you new `@exposes` claims with no test.
- A confirmed threat needs a retest kit before its fix is rechecked.

## Do

1. Select affected keys from `guardlink hypothesis list --json` or the ranked `guardlink hypothesis next --json`. Include untested exposures with declared controls and previously confirmed claims marked retest. Use the pentest SARIF export to resolve the exact logical source reference. A pure design claim can stay pending with its reason. Read the effort: the user's words ("at high"), else a `bravos effort: <level>` line in `AGENTS.md` / `CLAUDE.md`, else medium. It sets a starting budget, not a limit; go beyond it when the work needs it and say why in one line. Starting budget — low: exposures in changed files; medium: the top 5 from `guardlink hypothesis next --json`; high: the top 20; max: every open exposure.
2. Follow the installed `.claude/skills/guardlink-translate/SKILL.md`. Request the probe contract for web runtime proof, with the exact threat reference and the known route, roles and intended assertion. Use the guardlink_translate MCP tool or `guardlink translate --stdout --contract probe --threat <threat@file:line>` to obtain instructions for the current agent. With named profiles, supply the per-threat context pack. Before writing for a key, ask `bravos records intended <file>:<line> --threat <id>`: when it is by design per an adopted record, the feature is the product and is never the test (an admin running commands proves nothing). Test its guard instead: `bravos records pack <file>:<line> --threat <id> --entitled <profile> --attackers <profile,profile> --out .bravos/packs/<id>.json` writes GuardLink's context pack for the attacker's claims on the guard's file, with the identities bravos-env set up (the entitled one is the positive control, each attacker is expected to be refused); pass it with `--context`. With no claim on the guard yet it says so: run bravos-annotate on the guard first. Ownership claims are never by design, so they are always tested as written. Use the scanner contract for ordinary scanner observations. If in-session translation is unavailable, run `bravos doctor` and report the missing interface. The active coding agent writes the test.
3. Find the request that reaches each sink before you write its template. With the code graph (its MCP tools, or `bravos graph <question> --json` — same answers; see bravos-codegraph) (the briefing's `Code graph:` line says `current`, or `diverged` until a `no-exec` rebuild, bravos-codegraph step 2): `codegraph_call_chain` from the entry points (`codegraph_entry_points`, `codegraph_routes`) to the claim's symbol gives the route or RPC method, its handler and the parameters that flow into the sink; `codegraph_auth_boundary` on that route gives the identity the request needs (anonymous, a signed-in tenant, admin). Target that route with those parameters and the matching auth profile, put the chain (entry → … → sink) in the template's notes, and when several entry points reach the sink template the least privileged first. When `codegraph_entry_reach` says no entry point reaches it at high confidence, write no template: record "unreachable from any entry point per code graph" in the README and hand the claim to bravos-annotate to re-rate. Read `verdict` and `confidence` first; `unknown` or `insufficient_resolution` is not determined, never unreachable. Without the graph, trace the route from the handler by reading the code and say "code graph unavailable; traced by reading". A SAST finding joined to the claim (`bravos sast candidates`) gives its `route`, `entryPoint` and taint path too; use it alongside the graph's chain, and note it in the template. SAST findings not in the threat model go to bravos-annotate first, since templates come from claims. With no SAST report or SAST unavailable, carry on without it.
4. Write the templates under `.guardlink/cxg-templates/`, one per threat, following the engine contract and evidence shape the method gives. Keep every check non-destructive and scoped to confirming its one threat. Scanner templates (YAML, Python, shell) go there; JavaScript probes (`async function cxgProbe(cxg)`, `--contract probe`) go under `.guardlink/cxg-replay/` instead, because `cxg scan --template-dir` runs any probe it finds under cxg's default scope, not `.guardlink/scope.yaml`. In a probe, reach the target only through `cxg.fetch*` with well-formed arguments: cxg refuses at run time a probe that uses WebSocket, XMLHttpRequest, EventSource, `navigator.sendBeacon`, dynamic `import()`, or script or `innerHTML` injection, and `cxg template validate` does not catch it.
5. Validate: `cxg template validate .guardlink/cxg-templates/ --recursive --json`, and the same for `.guardlink/cxg-replay/`. It exits 1 when any template fails; a banner line can precede the JSON, so read from the first `{` or `[`. Fix each error and rerun until it reports none.
6. Record repo context for the probes you write. Copy `${CLAUDE_SKILL_DIR}/operator-guidance.md` to `.guardlink/operator-guidance.md` if it is not there, and fill each section from the code: framework, auth shape, test identities, known false positives, out-of-bounds routes. Read it before writing each kit; cxg never generates probes for this repository.
7. For a first test or regression kit, write a single JavaScript probe in .guardlink/cxg-replay/. Include an exact `// @guardlink_threat: threat@logical/file:line`, `// @attach_scheme: path`, the required identity names, and a precise test with a positive control. Run `bravos hook replay bind <kit.js>` before executing it. The binding command associates the kit with the key of the current GuardLink exposure. Review that mapping when the claim is edited or moved. Leave native CXG identity stamps to the engine.
8. Apply the oracle rule: a vulnerability class cxg cannot judge from a response has no oracle. Record it in `.guardlink/cxg-templates/README.md` as unsupported, with the threat id and why, instead of writing a template that pretends to prove it. An invariant threat (`#inv-…`, from intent.md) maps to the cxg class that can judge it: another user's or tenant's data → `idor`; a role or permission gained → `privilege_escalation`; a field the caller should not set → `mass_assignment`; a check bypassed by concurrent requests → `race_condition`; a workflow step skipped or reordered → `business_logic`. Record each invariant's class in the README. A rule that holds has its `@exposes` beside a `@mitigates` (bravos-annotate step 5), and its kit is a regression test: sign in as the role or user the rule forbids, make the request the rule is about, and report a finding only when it succeeds; a refusal is the expected result and records the rule as held. Bind it to that `@exposes` like any other kit. If cxg cannot tell a refusal from a success for that request, record the rule as unsupported instead of writing a kit that always passes.
9. With the person's go-ahead (the briefing's `Commits:` line is their standing answer; with no such line, ask once per session unless they already asked for commits), commit the templates, the README and the filled guidance together, and hand the template ids and threat ids to bravos-prove.

## Never

- Run `guardlink translate` without `--stdout`, or with `--headless --agent` or an agent flag: each launches another agent. Use the skill, the MCP tool or `--stdout`.
- Run a template, a scan or any probe; this skill writes and validates only.
- Write a destructive check, or one that reaches beyond its single threat.
- Put `@exposure_*` or `@threat_id` stamps in a hand-written template; cxg stamps claim identity itself.
- In a cross-identity kit (`idor`, `privilege_escalation`, `cross_tenant`, `broken_access_control`, `session_replay`, `cross_server_confusion`; never an alias such as `records_api`, which cxg mis-handles), write as `evidence.cross_identity_overlap` anything but a marker the victim's data really holds and both arms' raw response text show verbatim: plain `[A-Za-z0-9_-]`, at least 3 characters, not all digits, not a JSON key name (`machine_id`) and not a `key:value` label with a numeric value. cxg's overlap match is a raw substring, so a key name or a number confirms without shared data; the replay helper refuses to record such a confirmation.
- Fake proof for a class with no oracle; record it as unsupported.
- Reach for another cxg mode (its generation, its deterministic templates or its pentest harness) when cxg cannot test a threat: Bravos only writes templates and runs `cxg scan`, so record could not test and write your own check.
- Write `@accepts`, `@entitles` or `@confirmed`.

## Done when

- `cxg template validate --recursive --json` reports no errors for `.guardlink/cxg-templates/` and `.guardlink/cxg-replay/`, and the replay folder holds only JavaScript probes.
- `.guardlink/cxg-templates/README.md` maps each threat to its template, lists unsupported classes with reasons, and lists audit-only items.
- `.guardlink/operator-guidance.md` is filled from the code, not left as the starter.
- You told the user that nothing was run, so every claim stays untested.

## What it leaves for the next skill

- The scan-template and replay-kit directories, the guidance file path, and the template and threat ids, for bravos-prove, with each template's route and auth profile (from the code graph when it was available).

## Go deeper

- `.claude/skills/guardlink-translate/SKILL.md` — the translate method and the engine contract.
- `${CLAUDE_SKILL_DIR}/operator-guidance.md` — what a probe for this repo needs to know: routing, auth shape, identities, false positives, bounds.

Files in this skill

  • SKILL.md8.2 KB
  • operator-guidance.md962 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in tools →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.