# Sh fix

> Sh fix is an open-source agent skill for security. Turns verified security findings into root-cause code fixes with regression tests. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/dmdhrumilmistry/indra/tree/main/plugins/indra/skills/sh-fix
- **Repository:** https://github.com/dmdhrumilmistry/indra
- **GitHub stars:** 44
- **License:** MIT
- **Skill name:** sh-fix
- **Collection:** https://github.com/dmdhrumilmistry/indra
- **Categories:** [security](https://ai-powered.com/categories/security), [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-03

## About

Sh-fix takes findings a security review has already verified and changes the code so they no longer hold. It groups related findings by root cause, such as a shared helper, a middleware or a query layer, and applies the framework's own safe API at that point rather than patching each call site. Each finding gets a regression test built from its proof-of-concept that should fail before the change and pass after it, and the skill searches for other places that use the same pattern.

The workflow asks the agent to create a new branch or work in the working tree, record the starting state, run the project's existing tests and linters to get a baseline, and keep changes minimal and behaviour-preserving. It writes a fix record listing the root cause, the change, the test, variants found and residual risk, and it names the finding ids the change claims to close so a separate retest step can check them. Guardrails forbid weakening checks, touching secret values, committing to the default branch or pushing.

It expects a run folder containing verified findings from a prior review, or finding ids or a class slug, plus a git repository and a project with a runnable test suite. Its tests are meant to run in process or against a test client and never attack a live system.

## When your agent uses it

> Remediation: turn verified security findings into code fixes. Groups findings by root cause, fixes at the root (the shared helper, the middleware, the query layer) with the framework's own safe API, writes a regression test from each finding's PoC that fails before the fix and passes after, searches for variants of the pattern, runs the project's tests and linters, and records which finding ids the change claims to close so `sh-retest` can check them. Use when the user asks to fix, remediate or patch a finding, a class, or everything a review verified. Works on a new branch or in the working tree only; never commits to the default branch, never pushes.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/dmdhrumilmistry/indra/tree/HEAD/plugins/indra/skills/sh-fix)
- [Asks for: Read, Write, Edit, Grep, Glob, Bash](https://github.com/dmdhrumilmistry/indra/blob/HEAD/plugins/indra/skills/sh-fix/SKILL.md)
- [License: MIT](https://github.com/dmdhrumilmistry/indra/tree/HEAD/plugins/indra/skills/sh-fix)

## Features

- **Root-cause grouping:** Groups related findings that share one unsafe helper, middleware or query layer so they are fixed together.
- **Regression tests from PoCs:** Builds a test from each finding's proof-of-concept that must fail before the fix and pass after.
- **Variant search:** Looks for the same vulnerable pattern elsewhere and fixes those that share the root cause.
- **Safe framework APIs:** Prefers bound parameters, template escaping and vetted helpers over hand-rolled filters.
- **Fix record for retesting:** Writes a markdown record naming the finding ids the change claims to close, for a separate retest step.
- **Branch-safe workflow:** Works on a new branch or the working tree and never commits to the default branch or pushes.

## Good for

- Fix the SQL injection findings from my last security review
- Patch every verified finding of the path traversal class
- Remediate a finding by changing the shared file-path helper
- Write regression tests for the verified XSS issues before fixing them
- Prepare a fix record listing which findings the change closes

## Install

### Claude Code

This skill ships in the `indra` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add dmdhrumilmistry/indra
/plugin install indra@indra
```

Or copy only this skill to `~/.claude/skills/sh-fix`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/dmdhrumilmistry/indra.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/sh-fix &&
cp -R "$tmp/plugins/indra/skills/sh-fix" ~/.claude/skills/sh-fix &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/sh-fix` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/sh-fix` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/dmdhrumilmistry/indra.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/sh-fix &&
cp -R "$tmp/plugins/indra/skills/sh-fix" ~/.agents/skills/sh-fix &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/sh-fix` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/sh-fix` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/dmdhrumilmistry/indra.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/sh-fix &&
cp -R "$tmp/plugins/indra/skills/sh-fix" ~/.cursor/skills/sh-fix &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/sh-fix` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/dmdhrumilmistry/indra.git --path plugins/indra/skills/sh-fix
```

Or copy the folder to `~/.gemini/skills/sh-fix` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/sh-fix`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/dmdhrumilmistry/indra.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/sh-fix &&
cp -R "$tmp/plugins/indra/skills/sh-fix" ~/.copilot/skills/sh-fix &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/sh-fix` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/dmdhrumilmistry/indra.git
```

Then copy `indra/plugins/indra/skills/sh-fix` into your agent's skills folder as `sh-fix`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does the skill need before Sh fix runs?

A run folder with verified or needs-runtime findings, or specific finding ids or a class slug, and a git repository. With branch:current the current branch must not be the default branch.

### Does Sh fix commit or push changes?

No. It works on a new branch or in the working tree, never commits to the default branch, and never pushes. Committing is left to the user unless they ask.

### Does Sh fix mark findings as fixed?

No. It records which finding ids the change claims to close, and a separate retest step makes the verdict.

### Does Sh fix test against live systems?

No. Regression tests call the code in process or against a test client, and the skill never sends the proof-of-concept over the network.

### How do I install Sh fix in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/sh-fix to use it in all your projects, or to .claude/skills/sh-fix in one project. Or install the indra plugin, which includes it: /plugin marketplace add dmdhrumilmistry/indra, then /plugin install indra@indra.

### Does Sh fix run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Sh fix?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

### What are the best alternatives to Sh fix?

The closest alternatives to Sh fix are Variant analysis, Security audit, Sh retest, Find bugs and Security remediation.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Variant analysis](https://ai-powered.com/skills/variant-analysis-mtarcure): Variant analysis is an open-source agent skill for security.
- [Security audit](https://ai-powered.com/skills/security-audit): Security audit is an open-source agent skill for security.
- [Sh retest](https://ai-powered.com/skills/sh-retest): Sh retest is an open-source agent skill for security.
- [Find bugs](https://ai-powered.com/skills/find-bugs): Find bugs is an open-source agent skill for security.
- [Security remediation](https://ai-powered.com/skills/security-remediation): Security remediation is an open-source agent skill for security.
- [Blue team](https://ai-powered.com/skills/blue-team): Blue team is an open-source agent skill for developer tools.
- [Security best practices](https://ai-powered.com/skills/security-best-practices): Security best practices is a free agent skill for security.
- [Bugfix](https://ai-powered.com/skills/bugfix): Bugfix is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/sh-fix
