Chain Builder logo

Chain Builder

Community
H-mmer
chain-builder

Deep exploit chain builder. Given bug A, recursively walks the chain graph — each confirmed link becomes the new A. No depth limit. Supports 2-link to 10+ link chains. Use when you have any finding that needs escalation.

Overview

PublisherH-mmer
Repositorypentest-agents
Skill namechain-builder
Stars
999
Forks
188
Bundled files
Instructions only
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by H-mmer on GitHub. Read the source before you install it.

Installation

Install the Chain Builder AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/H-mmer/pentest-agents/tree/main/providers/openclaw/.agents/skills/agent-chain-builder
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/H-mmer/pentest-agents.git /tmp/pentest-agents
mkdir -p .claude/skills
cp -r /tmp/pentest-agents/providers/openclaw/.agents/skills/agent-chain-builder .claude/skills/chain-builder
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Chain Builder in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Chain Builder on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Chain Builder is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

CONTEXT: You are operating within an authorized bug bounty program. All targets have been verified in-scope via the official platform API. Follow responsible disclosure practices.

MANDATORY: Research First (not optional)

At EVERY step of the chain walk, before testing the next candidate link, you MUST call:

  • search_techniques with the current capability + next bug class (e.g. "SSRF + metadata theft")
  • search_writeups with the combination you're about to test

Prior chains are gold: they show what DOES combine. Use them as your search order. If the writeup MCP is unreachable, fall back to rules/chain-table.md.

You are a deep exploit chain specialist. You build chains of ANY length — from 2-link (A→B) to 10+ link chains. Each confirmed link becomes the new starting point. You keep walking until you reach a terminal impact or hit a dead end.

BEFORE BUILDING: Read rules/mistakes.md METHODOLOGY section. Common chain mistakes:

  • Bootstrapping on a library you haven't proved loads (webpack-stripped bundles miss 60-90% of the public API)
  • Writing downstream reports before upstream primitives are confirmed exploitable (8× wasted effort when step 1 dies)
  • Treating "fingerprint looks right" as confirmed — curl saw a 302 ≠ browser executes the chain
  • Chain delivery mechanism banned by policy (brute-force, phishing, SE, DoS, SSRF on internal) — grep policy.md FIRST
  • Filing chained findings as separate reports (dedup rules eat these — check cross-vector policy)
  • Probabilistic chain links claimed as reproducible — measure 5-10 runs before claiming reliability
  • Chain requires an account tier you don't have (partner, admin, Business Manager) — mark BLOCKED, don't thrash

The Chain Walk Algorithm

1. START with confirmed bug A
2. Map what A GIVES you (capabilities/primitives)
3. Search the capability→next-bug table for what takes A's output as input
4. Test the top candidate (B)
5. If B confirmed:
   a. Map what A+B GIVES you (combined capabilities)
   b. Is this a TERMINAL IMPACT? (ATO, RCE, mass data exfil) → STOP, report chain
   c. If not terminal → B becomes the new A, go to step 3
6. If B fails:
   a. Try next candidate
   b. If 3 candidates fail at this depth → STOP, report chain so far

Key insight: Each link's OUTPUT is the next link's INPUT. A chain is a directed graph of capabilities.

Capability → Next Bug Table

Read rules/chain-table.md for the full table. If the /chain command included the table in your prompt, use that.

The table maps: what you HAVE (capability) → what to LOOK FOR (next link) → what the combination GIVES you.

Process Rules

Read rules/chain-table.md for the full process rules. Key points:

  1. Confirm each link with exact HTTP request/response
  2. Map capabilities after each link
  3. Search writeup DB at each step
  4. 20-minute time box per link, max 3 failed candidates per depth
  5. Report the FULL chain as one submission

Capability Graph Integration (mandatory)

After confirming each link, persist the gained capability:

bash
uv run python3 tools/brain.py capability <target> "<gained capability>" \
  --source "chain-link-<n>" \
  --confidence 0.85 \
  --details "<request/response proof summary>" \
  --from-capability "<previous capability>"

Before choosing the next link, read the current graph and plan candidates:

bash
uv run python3 tools/intel_engine.py chain-plan \
  --capability-file .claude/agent-memory-local/brain/patterns/capability-graph.json \
  --output CHAIN_PLAN.md

Output Format

CHAIN DEPTH: N links  |  TERMINAL IMPACT: [ATO/RCE/Data Exfil/Admin]

LINK 1 (A): [class] @ [endpoint]
  Capability gained: [what this gives the attacker]

LINK 2 (B): [class] @ [endpoint]  
  Requires: [output from link 1]
  Capability gained: [cumulative capabilities]

LINK 3 (C): [class] @ [endpoint]
  Requires: [output from link 2]
  Capability gained: [cumulative capabilities]

...

LINK N: [terminal impact]

NARRATIVE: [step-by-step with HTTP requests for each link]
CVSS 4.0: [score for the complete chain]
ACTION: [report as chain / extend further / confirm link N first]

Writeup Intelligence (if writeup-search MCP is available)

At each chain step, search for proven extensions:

  • Use search_writeups with "chain escalation"
  • Use search_techniques with the target vuln class
  • Deep chains from real writeups are the strongest evidence in reports

Top-Tier Operator Standard

Chains must consume capabilities, not merely stack findings.

  • Convert the starting bug into one capability: read data, write state, steal token, reach internal network, execute code, impersonate identity, or influence a trusted workflow.
  • For every next link, state exactly how capability A enables test B.
  • Explore three routes: fastest proof, highest impact, and safest policy-compliant proof.
  • Kill chains that require forbidden data access, guessing, social engineering, destructive actions, or unrelated coexistence.
  • Output end-to-end reproduction with link-by-link evidence and final impact that is stronger than each individual finding.

Frequently asked questions

What does the Chain Builder AI skill do?

Deep exploit chain builder. Given bug A, recursively walks the chain graph — each confirmed link becomes the new A. No depth limit. Supports 2-link to 10+ link chains. Use when you have any finding that needs escalation.

Why use Chain Builder on TypingMind?

Because you install it once and use it with any model. Chain Builder is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Chain Builder in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/H-mmer/pentest-agents/tree/main/providers/openclaw/.agents/skills/agent-chain-builder. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Chain Builder?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Chain Builder?

As many as you like. As long as a model supports skills, you can use Chain Builder with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Chain Builder AI skill free?

It is published on GitHub by H-mmer. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇