agentleFS
hailneedhailneed/agent-blackbox/skills/risk/SKILL.md

risk

Skill0 starsChanged 3 months agoMITView on GitHub

Audit what coding agents have been allowed to run on this machine — sweep local session logs (Claude Code, Codex CLI, Gemini CLI) for destructive commands, secret exposure, permission bypasses, outward-facing actions and writes outside the workspace, then verify each finding against the transcript before reporting it. Use when the user asks whether an agent did anything dangerous, wants a security or safety review of agent activity, asks what agents have been running, says "risk taraması", "tehlikeli bir şey yaptı mı", "audit my agent sessions", "what has Claude been running", or runs /agent-blackbox:risk. Not for reconstructing a single session's story — that is agent-blackbox:timeline. Not for restoring files — that is agent-blackbox:undo.

  • Deletes or force-pushes

5 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions5 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 5

    1. ruujOnChain/HedgeFund-Skills★ 17same name
    2. davidromeo/tradeblocks-skills★ 3same name
    3. tradeblocks-org/tradeblocks-skills★ 3same name
    4. arunendapally/portfolio-copilot★ 0same name
    5. Olayeeeyo/claude-skills★ 0same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository2 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 1 is distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Default window is 7 days, all agents.

    line 19
  2. Very specific:

    Create the output directory if missing (expand the home directory yourself.

    line 25
  3. Very specific:

    Use --agent <id> to narrow, --ignore <rule1,rule2> to drop rules the user has already accepted.

    line 33
  4. Very specific:

    Is it still reversible?: If files are involved, check --undo --session <id>.

    line 54

“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Risk audit (risk)

Sweep local agent logs for actions that are expensive to reverse or reach outside this machine. The scanner only reads local files and never sends anything; secret-looking strings are masked before they reach any output file.

Language rule: write every user-facing output in the language the user is speaking with you. Verification rule: a finding goes in the report only after you have looked at the surrounding transcript context and can say what actually happened. A regex match is a lead, not a conclusion.

Step 0 — Scope

Default window is 7 days, all agents. Widen or narrow from what the user said ("bu ay", "sadece codex", "şu proje"). Read ${CLAUDE_PLUGIN_ROOT}/skills/risk/references/rules.md before triaging — it says what each rule id means and how to tell a real hit from noise.

Step 1 — Scan

Create the output directory if missing (expand the home directory yourself; never pass a literal ~ to the script), then:

node "${CLAUDE_PLUGIN_ROOT}/scripts/blackbox.mjs" --scan --days 7 --limit 40 \
  --out "<home>/.agentlens/blackbox/risk-raw.json"

Use --agent <id> to narrow, --ignore <rule1,rule2> to drop rules the user has already accepted. Requires Node.js 18+. Read the JSON. If window.unreadable > 0, that count goes in the report's source note — never hide a log you could not parse.

Step 2 — Verify before you report

Take the findings in severity order. For each high finding, and for any medium one you intend to surface, open the session it came from:

node "${CLAUDE_PLUGIN_ROOT}/scripts/blackbox.mjs" --session <id> --md

Then decide, from the surrounding turn:

  • What was the target? rm -rf ./build is housekeeping; rm -rf ~/projects is not. The path decides, not the command.
  • Did it run? The sonuç/outcome column says çalıştı, hata verdi, reddedildi or sonuç yok. A denied call is a good sign — report it as friction, not as damage.
  • Was it asked for? A force-push the user explicitly requested is a note; one the agent decided on its own is a finding.
  • Is it still reversible? If files are involved, check --undo --session <id>.

Drop anything you cannot substantiate. Say how many you dropped and why — a shrinking list is the point of this step, not a failure of it.

Step 3 — Rank by consequence, not by count

Sort what survives by what it would cost if it were wrong, in this order:

  1. Data or history that is already gone (deleted files, hard resets, dropped tables)
  2. Secrets that reached disk or left the machine
  3. Security controls left switched off
  4. Outward-facing actions (published, pushed, deployed, messaged)
  5. Everything else

A rule that fires 40 times in one loop is one finding with a count, not 40 findings.

Step 4 — Write

Save ~/.agentlens/blackbox/risk-<YYYY-MM-DD>.md in this order:

  1. Title + source note: window, how many sessions scanned, which agents, how many logs were unreadable, and the raw risk score with its level
  2. Three-sentence verdict — the honest one, including "nothing alarming" when that is true
  3. Findings table: severity, rule, session, count, what it actually did, whether it ran
  4. One block per surviving finding: what happened · which session and event · why it matters here (not in general) · what to do now · whether it is still reversible
  5. Accepted risks — hits you deliberately dropped, so the next run does not re-raise them; include the --ignore line the user can paste
  6. Behaviour signals worth acting on (error storms, repeated denials, unverified changes)

Step 5 — Reply

6–10 lines: the verdict, the two or three findings that actually need action, the single most useful habit change, and the file path. If a secret reached a transcript, that goes first and the reply says plainly: rotate the key, then delete that transcript file. If the sweep is clean, say so in one line and do not invent concerns to fill the report.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.