# Sh kb business logic

> Sh kb business logic is an open-source agent skill for security. Gives your agent a checklist for finding business logic flaws in code. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/dmdhrumilmistry/indra/tree/main/plugins/indra/skills/sh-kb-business-logic
- **Repository:** https://github.com/dmdhrumilmistry/indra
- **GitHub stars:** 44
- **License:** MIT
- **Skill name:** sh-kb-business-logic
- **Collection:** https://github.com/dmdhrumilmistry/indra
- **Categories:** [security](https://ai-powered.com/categories/security)
- **Listing updated:** 2026-12-03

## About

This is a hunter's knowledge base for security review of application logic. Instead of searching for a dangerous function, it asks the agent to first write down the rules a system must follow, such as totals matching line items, one trial per account, or refunds not exceeding payments, and then looks for requests, input values or call orders that break those rules.

The guide walks the agent through a detection recipe: list invariants and where they are enforced, check which numeric and state fields the server trusts from the client, map the allowed state transitions and whether each handler checks the current state, and compare sibling paths such as web versus API or create versus import. It also covers numeric edge cases, coupon and credit reuse, refund and cancel abuse, plan gating, and common false positives to rule out before reporting.

The skill is written for code review and penetration testing work. It expects access to the source code, and often the running application, for proof of concept checks. It maps findings to CWE and OWASP categories and includes notes for defenders on logging and reconciliation signals.

## When your agent uses it

> Knowledge base for finding business logic flaws - price, quantity and currency tampering, negative or overflowing amounts, coupon and credit reuse, skipped or reordered workflow steps, trust in client-computed values, per-request limits, refund abuse, and plan limits enforced only in the UI. Use when hunting rule-breaking bugs where no dangerous sink exists. CWE-840, CWE-841, CWE-602, CWE-472, CWE-799, CWE-190, OWASP A04:2021-Insecure Design.

## 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-kb-business-logic)
- [License: MIT](https://github.com/dmdhrumilmistry/indra/tree/HEAD/plugins/indra/skills/sh-kb-business-logic)

## Features

- **Invariant recovery method:** Guides the agent to derive the rules a system must keep from tests, docs, enums and money models.
- **Client-trusted value checks:** Flags prices, totals, roles and plan fields accepted from requests instead of computed on the server.
- **Workflow state review:** Checks whether steps like shipping or activation can be reached without earlier payment or verification.
- **Limit and quota analysis:** Looks for per-request or per-IP limits and quota checks missing on bulk, import or API routes.
- **Numeric edge testing:** Covers negative, zero, overflow and rounding cases in amounts and quantities.
- **False-positive filters:** Lists conditions that rule out a finding, such as server-side recalculation or shared guards.

## Good for

- Review a checkout flow for price or quantity tampering
- Check whether coupons can be reused or stacked
- Audit refund logic for amounts above what was paid
- Find plan limits that only the UI enforces
- Test whether order states can be skipped or reversed

## 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-kb-business-logic`:

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

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

### Codex

Copy the skill folder to `~/.agents/skills/sh-kb-business-logic` 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-kb-business-logic &&
cp -R "$tmp/plugins/indra/skills/sh-kb-business-logic" ~/.agents/skills/sh-kb-business-logic &&
rm -rf "$tmp"
```

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

### Cursor

Copy the skill folder to `~/.cursor/skills/sh-kb-business-logic` 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-kb-business-logic &&
cp -R "$tmp/plugins/indra/skills/sh-kb-business-logic" ~/.cursor/skills/sh-kb-business-logic &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/sh-kb-business-logic` 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-kb-business-logic
```

Or copy the folder to `~/.gemini/skills/sh-kb-business-logic` yourself.

### VS Code

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

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

For one project only, put the folder in `.github/skills/sh-kb-business-logic` 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-kb-business-logic` into your agent's skills folder as `sh-kb-business-logic`. Agents that support SKILL.md read one folder per skill.

## FAQ

### When does Sh kb business logic apply?

It is meant for hunting rule-breaking bugs where no dangerous sink exists, such as price tampering, workflow skips and limit bypasses.

### What does Sh kb business logic need to run?

It is a single Markdown knowledge base file with no scripts. The agent reads the code and reasons about it; no tools are declared.

### Does Sh kb business logic change or fix code?

The skill describes how to hunt and test for flaws, plus mitigation advice. It does not include code that modifies a project.

### How do I install Sh kb business logic in Claude Code?

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

### Does Sh kb business logic 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 kb business logic?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Sh kb business logic?

The closest alternatives to Sh kb business logic are Web app logic, Sh kb crypto, Sh kb race conditions, Sh kb auth and Sh kb misconfig.

## Where this comes from

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

## Alternatives

- [Web app logic](https://ai-powered.com/skills/web-app-logic): Web app logic is an open-source agent skill for security.
- [Sh kb crypto](https://ai-powered.com/skills/sh-kb-crypto): Sh kb crypto is an open-source agent skill for finance and payments.
- [Sh kb race conditions](https://ai-powered.com/skills/sh-kb-race-conditions): Sh kb race conditions is an open-source agent skill for security.
- [Sh kb auth](https://ai-powered.com/skills/sh-kb-auth): Sh kb auth is an open-source agent skill for security.
- [Sh kb misconfig](https://ai-powered.com/skills/sh-kb-misconfig): Sh kb misconfig is an open-source agent skill for cloud and infrastructure.
- [Sh kb secrets](https://ai-powered.com/skills/sh-kb-secrets): Sh kb secrets is an open-source agent skill for security.
- [Sh kb path traversal](https://ai-powered.com/skills/sh-kb-path-traversal): Sh kb path traversal is an open-source agent skill for security.
- [Sh kb sqli](https://ai-powered.com/skills/sh-kb-sqli): Sh kb sqli is an open-source agent skill for security.

---
Source: https://ai-powered.com/skills/sh-kb-business-logic
