Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
6,000+ web scrapers for your AI agent, start free logo6,000+ web scrapers for your AI agent, start free

Apify gives your agent live web data: 6,000+ prebuilt scrapers and actors, MCP-ready. Sign up free with $5 in usage credits.

Try Apify free
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 48,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here
code-hardening logo

code-hardening

karinje-code-hardening

OtherClaude Codeby karinje

Summary

Responds to code audits by scoring findings, planning parallel work streams, and coordinating fix implementation across isolated git worktrees.

Install to Claude Code

/plugin install code-hardening@karinje-code-hardening

Run in Claude Code. Add the marketplace first with /plugin marketplace add karinje/code-hardening if you haven't already.

README.md

code-hardening

A Claude Code skill that responds to code audits by scoring findings, planning parallel work streams, and coordinating fix implementation across isolated git worktrees. Produces summary-response.md and review-response.md as the deliverable.

How It Works

%%{init: {"flowchart": {"wrappingWidth": 300}}}%%
flowchart TD
    A([Repo with audit branch]) --> P1

    subgraph P1 [Phase 1: Initial Review]
        direction TB
        P1a[Pass 1 — Parallel subagents: confirm each finding in code, estimate effort Low / Medium / High]
        P1b[Pass 2 — Deep dive on High effort issues only: full scope, dependencies, risks]
        P1c[Write hardening-initial-review.md and commit to audit branch]
        P1a --> P1b --> P1c
    end

    P1 --> U1{User confirms Phase 1 summary}
    U1 --> P2

    subgraph P2 [Phase 2: Plan and Review]
        direction TB
        P2a[2a — Group issues into work streams by domain and subsystem, user confirms count]
        P2b[2b — Interactive review per cluster: approve, skip, or adjust each item]
        P2c[2c — Write hardening-plan.md with all agreed decisions, commit to audit branch]
        P2a --> P2b --> P2c
    end

    P2 --> U2{User confirms plan}
    U2 --> P3

    subgraph P3 [Phase 3: Setup]
        direction TB
        P3a[Create named git worktrees as sibling directories outside the repo]
        P3b[Pre-populate summary-response.md and review-response.md in each worktree — all rows Pending]
        P3c[Discover test command from repo, ask user whether to run tests after each work stream]
        P3d[Write filled HARDENING-TASK.md into each worktree root]
        P3e[Detect claude binary, launch each worktree in tmux with claude --permission-mode auto]
        P3a --> P3b --> P3c --> P3d --> P3e
    end

    P3 --> P4

    subgraph P4 [Phase 4: Fix — runs in parallel]
        direction TB
        P4a[Read HARDENING-TASK.md, call EnterPlanMode, present approach for all issues]
        P4b{User confirms per session}
        P4c[ExitPlanMode, auto mode: fix each issue, update response docs, commit and push]
        P4d[Run tests after all issues complete, surface failures to user and resolve]
        P4a --> P4b --> P4c --> P4d
    end

    P4 --> U3{All sessions complete?}
    U3 -->|No| P4
    U3 -->|Yes| P5

    subgraph P5 [Phase 5: Merge]
        direction TB
        P5a[Merge all hardening branches into hardening/merged]
        P5b[Resolve any remaining Pending rows with user]
        P5c[Run full test suite and code-review on hardening/merged]
        P5d[Commit and push final hardening/merged]
        P5a --> P5b --> P5c --> P5d
    end

    P5 --> Z([summary-response.md and review-response.md])

Phases

Phase 1 — Initial Review Discovers all audit files on the audit branch without assuming a fixed location. Runs two passes: a lightweight parallel pass across all findings to confirm each issue exists in the code and estimate fix effort (Low / Medium / High), then a deeper dive for High effort issues to understand full scope, dependencies, and risks. Results are written to hardening-initial-review.md.

Phase 2 — Plan and Review Groups findings into work streams by domain or subsystem — not by audit category. A single work stream may include security, performance, and architectural issues that all relate to the same part of the system. The skill walks through each cluster interactively with the user, presenting the recommended fix approach and flagging any behavioral change risks. The user approves, skips, or adjusts each item. Final decisions are written to hardening-plan.md.

Phase 3 — Setup Creates one git worktree per approved work stream, named after the work stream, as sibling directories outside the repo. Pre-populates summary-response.md and review-response.md in each worktree with all issue rows at ⬜ Pending so nothing can be missed. Discovers the test command from the repo and asks the user whether to run tests after each work stream completes. Generates a HARDENING-TASK.md per worktree with full context. Detects the correct claude binary (e.g. claude or claude-work) and launches each worktree in a tmux window running claude --permission-mode auto.

Phase 4 — Fix Each worktree session runs independently. It reads its HARDENING-TASK.md, enters plan mode to present its approach, and after user confirmation switches to auto mode. For each issue it applies the fix, updates its assigned rows in the response docs, commits, and pushes. Once all issues are done, runs tests if a test command was provided — surfacing any failures to the user for resolution before the final commit.

Phase 5 — Merge Merges all worktree branches into hardening/merged. Because each session only updated its own pre-assigned rows, git merges the response docs cleanly. Any remaining ⬜ Pending rows are surfaced to the user for resolution. Runs the full test suite on the merged result, then runs a code review before the final commit and push.

Prerequisites

1. Enable Auto Mode

Auto mode is required for autonomous fix execution. Available on API and Enterprise plans with Claude Sonnet 4.6 or Opus 4.6.

Run this once:

claude --enable-auto-mode

2. Code Review Skill (recommended)

Install the official Anthropic code review skill for an automated review of the merged result:

/plugin install code-review@claude-plugins-official

If not installed the skill will warn you at the end and you can review manually.

3. Audit Branch

The target repo must have an audit branch containing audit files with findings.

Installation

Primary — install via plugin marketplace:

/plugin marketplace add karinje/code-hardening
/plugin install code-hardening@karinje-code-hardening

Backup — local copy:

git clone https://github.com/karinje/code-hardening /tmp/code-hardening
cp -r /tmp/code-hardening/skills/code-hardening ~/.claude/skills/

Use this if the marketplace install is unavailable.

> Note: If you use a custom CLAUDE_CONFIG_DIR (e.g. ~/.claude-work), copy to that directory instead of ~/.claude.

Usage

Navigate to the repo you want to harden and invoke:

/code-hardening

Output

Intermediate files (committed to audit branch during execution):

  • hardening-initial-review.md — effort estimates and fix recommendations per issue
  • hardening-plan.md — agreed decisions from the interactive review

Final deliverables (on hardening/merged branch):

  • summary-response.md — one row per issue with fix status and notes
  • review-response.md — inline responses to architectural review findings

Related plugins

Browse all →