Skip to main content
command CX Codex

scope — Claude Code command: scope check and setup

scope is a Claude Code command that checks hosts and URLs before active testing. It blocks assets outside engagement rules during security work.

MIT ★ 16,193 updated 2026-10-29

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add elementalsouls/Claude-BugHunter
/plugin install claude-bughunter@elementalsouls
Open on GitHub

What scope does

scope checks each host or URL before any active testing begins. It reads allow and deny patterns from scope.md, or accepts patterns inline, then prints IN-SCOPE or OUT-OF-SCOPE <reason>. A non-zero exit status appears when any asset fails, so the result can stop an automated run.

The check runs through engine/scope.py rather than model judgement. It handles an apex domain and its subdomains, wildcard entries such as *.acme.com, exact hosts, CIDR ranges like 10.0.0.0/8, and regex rules marked with re:. Deny rules win when patterns overlap. An empty allow-list rejects every asset, so scope.md must contain the engagement rules first.

With an unfilled scope.md, the command stays in default-deny mode and rejects the assets it receives.

What it helps with

  • check a host before sending HTTP requests
  • match an asset against scope.md rules
  • halt testing when an asset is out of scope
  • validate IPs with CIDR and hosts with regex

Example prompts for the agent

  • Run /scope api.acme.com before testing the host.
  • Check api.acme.com, staging.acme.io, and admin.acme.com with /scope api.acme.com staging.acme.io admin.acme.com.
  • Use the rules in scope.md and stop when the result is OUT-OF-SCOPE.

How to install scope

1Plugin marketplace

/plugin marketplace add elementalsouls/Claude-BugHunter
/plugin install claude-bughunter@elementalsouls

2Manually: put the files in place

.claude/commands/scope.md

Call it with /scope. For all projects use ~/.claude/commands/

Questions about scope

How do I install scope in Claude Code?

Add the marketplace with /plugin marketplace add elementalsouls/Claude-BugHunter, then install the plugin with /plugin install claude-bughunter@elementalsouls. The command is stored at .claude/commands/scope.md.

What does scope do?

It checks hosts and URLs against engagement scope rules before active testing. If any asset is rejected, the command reports the reason and exits with a non-zero status.

What happens when an asset matches both allow and deny rules?

The deny rule takes precedence, so the asset is marked OUT-OF-SCOPE. An empty allow-list also rejects every asset.

Source text

scope.md · MIT
---
name: scope
description: Mandatory pre-flight scope check — verify an asset is in scope BEFORE any HTTP touch. Deterministic (deny-wins, default-deny) via engine/scope.py against the engagement's scope.md. Blocks out-of-scope testing. Usage: /scope <asset> [<asset> ...]
---

# /scope

The mandatory pre-flight gate. Verify a host or URL is in scope **before** any
active testing. Scope is enforced in **code** (`engine/scope.py`), not by LLM
judgment — deny wins, default deny.

## What This Does

1. Loads in-scope / out-of-scope patterns from the engagement's `scope.md`
   (the `hunt` scaffold creates it) or from inline patterns.
2. Checks each asset deterministically with `engine/scope.py`:
   - apex `acme.com` → the apex **and** any subdomain
   - `*.acme.com` → any subdomain (NOT the bare apex)
   - `api.acme.com` → that exact host
   - `10.0.0.0/8` → any IP in the CIDR
   - `re:^lab[0-9]+\.acme\.io$` → explicit regex (prefix `re:`)
3. Prints `IN-SCOPE` / `OUT-OF-SCOPE <reason>` and exits non-zero if any asset
   is out of scope — so it can gate automation.

## Usage

```
/scope api.acme.com
/scope api.acme.com staging.acme.io admin.acme.com
```

Under the hood, run the deterministic checker directly:

```bash
# Against the engagement scope.md (preferred — fill scope.md from the program page first)
python3 engine/scope.py api.acme.com --md ~/Targets/acme/scope.md

# Or with inline patterns (repeat --in-scope / --out-of-scope per pattern)
python3 engine/scope.py api.acme.com evil.com \
  --in-scope acme.com --in-scope '*.acme.io' --out-of-scope admin.acme.com
```

## Rules

- **Run this before any HTTP touch.** An `OUT-OF-SCOPE` result is a hard stop —
  do not probe the asset.
- If `scope.md` is still the empty template (`(paste ... here)` placeholders),
  fill it from the program page first; an empty in-scope list = default-deny =
  everything rejected, which is the safe default.
- Deny wins: if an asset matches both an in-scope and an out-of-scope rule, it is
  out of scope.

© Sachin Sharma · MIT · elementalsouls/Claude-BugHunter

Similar slash commands

All slash commands for Security →
_scope-guard 0xSteph _scope-guard — a subagent for Claude Code that enforces authorization scope before executing any command. Embeds into Tier 2 agent system prompts and blocks out-of-scope targets, refuses dangerous techniques without exception. CX Codex ★ 2,482repo stars 2-scope challengepost The 2-scope skill runs a focused interview about your project idea and writes the scope doc. Useful when the idea exists but the build does not. CX Codex +1 1,800installs scope-appropriate-architecture OrchestKit scope-appropriate-architecture classifies projects into six tiers and picks patterns that fit their scope, preventing microservices for MVPs. Activates during design and complexity checks. CX Codex +1 179installs scope-framing ferrumclaudepilgrim The scope-framing skill sets a research decision, a finish line, and exclusions before work begins. Use it when a technically sound answer still needs to address the right practical question. CX Codex +1 ★ 348repo stars game-scope-check AlterLab-IEU game-scope-check — a skill for Claude Code that balances game feature lists against deadlines and capacity. Evaluates scope creep, milestone targets, and cut lists before demos or festivals. CX Codex +1 ★ 57repo stars business-logic-vulnerabilities yaklang business-logic-vulnerabilities is a Claude Code skill with a playbook for finding business logic flaws that scanners miss, including race conditions, price tampering, workflow bypass and coupon abuse. CX Codex +1 4,300installs

From the same set92

The whole set →
pickup pickup pulls previous target recon from the Claude-BugHunter ledger to inspect tested endpoints, tech stack, and confirmed findings. CX Codex +1 ★ 16,193repo stars memory-gc The memory-gc command checks the autopilot’s JSONL ledgers and rotates files that exceed a size cap. Use it when findings.jsonl or negatives.jsonl keeps growing. CX Codex +1 ★ 16,193repo stars surface Shows a ranked attack surface for a target from its recon manifest and hunt memory. CX Codex +1 ★ 16,193repo stars intel Fetches target intelligence on demand: scans NVD and GitHub advisories, checks HackerOne reports, and flags untested endpoints from hunt memory. CX Codex +1 ★ 16,193repo stars hunt-exceptional-conditions The hunt-exceptional-conditions skill reveals when an app leaks stack traces, server paths, or library versions through unhandled exceptions triggered by malformed input. Effective for testing APIs and web endpoints. CX Codex +1 ★ 16,193repo stars triage triage evaluates security findings through a 7-question gate before you write a bug report. It helps bug bounty hunters discard invalid submissions immediately. CX Codex +1 ★ 16,193repo stars report Builds a submission-ready bug bounty report. Generates CVSS 3.1 score, proof of concept, impact statement, and fix in HackerOne, Bugcrowd, Intigriti, or Immunefi format. CX Codex +1 ★ 16,193repo stars validate validate — a validation command that culls weak findings before report writing. Runs a 7-Question Gate and 4-gate checklist to prevent submissions that damage your validity ratio. CX Codex +1 ★ 16,193repo stars

Project sponsors

Companies that keep this analytics open