Harden repos
Skill MrToAster13/mrtoaster13-plugins/plugins/autonomous-workflows/skills/harden-repos
Clear instead of compact — two Claude Code skills: /handoff distills a session to disk, /resume reads it back into a fresh context.
npx -y skills add MrToAster13/mrtoaster13-plugins --skill harden-reposAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 29 days oldThe repository was created 29 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Harden several repos in one pass by fanning out one fresh-context sub-agent per repo. Each agent secret-scans, reviews, applies only verified-safe fixes on a branch (never pushing), and reports back; the orchestrator aggregates everything into HARDENING_HANDOFF.md. Use when the user says "harden my repos", "harden-repos", "clean up all my repos", "run hardening across the portfolio", or wants multi-repo cleanup without hitting context limits.
SKILL.md
5.3 KB, ~1.2k tokens by cl100k_base, as published. Nobody here has run it
Harden Repos
Clean a whole portfolio in one pass. The point of fanning out — one sub-agent per repo, each with its own fresh context — is that no single context has to hold every repo at once, which is what makes long multi-repo cleanups fail partway through. Each agent works in isolation, changes nothing it can't verify, and never pushes. You get one report and a set of review-ready branches.
Steps
-
Resolve the target repos.
- If the user passed repo paths as arguments, use exactly those.
- Otherwise read
~/.harden-targets— one repo path per line,#comments allowed. This file is the user's maintained list; it is personal and must not live inside this skill or any shared repo. - If neither exists, don't guess and don't scan the whole disk. Ask the user which repos to harden and offer to seed
~/.harden-targetsfrom their answer. - Confirm the resolved list back to the user before spawning anything.
-
Fan out — one sub-agent per repo, in parallel. Spawn all agents in a single batch (multiple Agent calls in one message) so they run concurrently. Each agent gets a different repo directory, so there are no file conflicts and no worktree isolation is needed. Give each agent the brief in step 3, with its repo path filled in. Ask each to return a structured report (the shape in step 4).
-
Per-repo agent brief. Each sub-agent does this, in order, inside its one repo, and stops at the first hard blocker:
- Secret scan first. Grep the working tree and staged content for keys, tokens,
.envvalues, credentials, private keys. If anything sensitive is found, do not stage or commit anything — record it as a blocker and skip straight to the report. Secrets abort hardening for that repo. - Establish a test baseline. Detect the test command (npm/pytest/cargo/go per the repo's manifests) and run it once. Record passed/skipped/total. If there's no suite, note "no tests" — this restricts what may be applied.
- Review. Read the code for real issues: complexity worth simplifying, missing
.gitignoreentries, absent pre-commit tooling, dead code, obvious bugs. Collect findings. - Branch, then apply only verified-safe fixes.
git switch -c "harden/$(date +%Y-%m-%d)", then:- Mechanical-safe fixes (formatting, adding a pre-commit config,
.gitignoreentries, import ordering) may always be applied — they don't change behavior. - Behavioral fixes (simplifications, refactors) may be applied only if the repo has tests. After applying, re-run the suite. Green with the same passed/skipped counts → keep it. Red → revert that change and downgrade it to a suggestion in the report. Never leave a red branch.
- No test suite → apply mechanical-safe fixes only; every behavioral idea becomes a report-only suggestion, applied by nobody.
- Mechanical-safe fixes (formatting, adding a pre-commit config,
- Commit locally, never push. Secret-scan the diff again, run the repo's pre-commit hook, and commit as
harden: <summary>. Nogit push, no PR. - Return the report.
- Secret scan first. Grep the working tree and staged content for keys, tokens,
-
Per-repo report shape. Each agent returns:
- repo name, branch created (or none)
- secret-scan result (clean / BLOCKED with what was found — never the secret value itself)
- findings: issues discovered
- applied: fixes committed (with the test result proving green)
- suggested-only: behavioral changes not applied, and why (no tests, or reverted on red)
- test status: before → after counts
- needs-manual: anything requiring the user
-
Aggregate into
HARDENING_HANDOFF.md. After all agents return, write one file (in the current working directory, or where the user asks) summarizing every repo: what was found, what was applied on which branch, test status, and — called out at the top — any repo that is BLOCKED on secrets or otherwise needs manual attention. This file is the single thing the user reads to know the state of the whole portfolio. -
Close out. Tell the user: which repos got a
harden/<date>branch to review, which are blocked, and that nothing was pushed. Point them atHARDENING_HANDOFF.mdand suggestremediateor a manual review for anything left as suggested-only.
Notes
- Nothing is ever pushed. Every repo ends on a local branch the user reviews.
- A secret finding is a hard stop for that repo — flag it, never stage it, and never print the secret's value into the report.
- "Verified-safe" is the whole game: a behavioral change is only kept if the suite proves it didn't break anything. No tests means no behavioral changes, only mechanical ones.
- One agent per repo, fresh context each — that isolation is what lets this cover a large portfolio in a single run without the context-limit failures that sink sequential passes.
- If a repo path in the target list doesn't exist or isn't a git repo, note it in the handoff and move on; don't abort the whole run.
Gives 0 of the 12 instructions most agent orchestration skills give in ~1.2k tokens
Counted across 742 of the 995 authors here whose files we hold, read 2026-08-06
- run the full test suite after integrating changesin 53 of 742, across 20 files
- reference existing artifacts by path or URLin 52 of 742, across 22 files
- dispatch one agent per independent problem domainin 50 of 742, across 17 files
- verify fixes do not conflictin 45 of 742, across 13 files
- include a suggested skills section in the documentin 45 of 742, across 15 files
- redact sensitive informationin 41 of 742, across 11 files
- save to the temporary directory of the operating systemin 39 of 742, across 9 files
- tailor the document to user-provided focus argumentsin 39 of 742, across 9 files
- spot check agent changes for systematic errorsin 34 of 742, across 7 files
- write a handoff document summarising the current conversationin 31 of 742, across 6 files
- assign each agent a specific scopein 23 of 742, across 8 files
- provide specific scope and clear goalin 23 of 742, across 5 files
Said here and by no other author read
- resolve target repos from arguments or target file
- confirm the resolved list before spawning agents
- scan for secrets before making changes
- establish a test baseline before applying fixes
- branch before applying fixes
- apply mechanical fixes only without a test suite
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.