elementalsouls
A Claude Code skill bundle for bug hunting and external red-team work - 82 skills, 15 slash commands, 681 disclosed-report patterns curated across 24 core vulnerability classes, plus enterprise identity + infrastructure attack matrices.
Safety scan
A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.
Check it deeper on your machine
It has changed since its scan on 11 Nov 2026.
As a Claude Code plugin, install it and then ask Claude Code:
/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/elementalsouls/Claude-BugHunter with scanskillsafety
Or from a terminal, clone it and run it:
git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/elementalsouls/Claude-BugHunter'
It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.
Badge for your README
Markdown
[](/listings/elementalsouls-claude-bughunter)HTML
<a href="/listings/elementalsouls-claude-bughunter"><img src="/api/listings/elementalsouls-claude-bughunter/badge.svg" alt="findsafeskills safety rating" /></a>Install
Install instructions from the README
As written by the repo's author. findsafeskills has not verified these steps.
**Option A — install as a Claude Code plugin (recommended).** From inside Claude Code:
/plugin marketplace add elementalsouls/Claude-BugHunter /plugin install claude-bughunter@elementalsouls
All 83 skills + 15 commands load namespaced under `claude-bughunter:` and update when you bump the plugin version — no files copied into `~/.claude/`.
**Option B — copy install (no plugin system / pin to a clone):**
git clone https://github.com/elementalsouls/Claude-BugHunter.git cd Claude-BugHunter
# macOS / Linux bash scripts/install.sh # Windows (PowerShell) pwsh ./scripts/install.ps1
Both copy the skills + commands into `~/.claude/` (macOS/Linux) or `%USERPROFILE%\.claude\` (Windows) and wire the `hunt` engagement scaffolder.
**What each install path gives you:**
| Path | 83 skills + 15 slash commands | `cbh` CLI | `hunt` scaffolder | |---|---|---|---| | **A — plugin** | ✅ namespaced under `claude-bughunter:` | ➕ separate `pipx install` | ❌ clone-only | | **B — copy install** | ✅ copied into `~/.claude/` | ✅ from the clone | ✅ from the clone |
The plugin is the fastest path to the skills + slash commands. The terminal-native `cbh` runner installs standalone — `pipx install git+https://github.com/elementalsouls/Claude-BugHunter` — so plugin users can add it without a full clone (see [`cbh` CLI](docs/cbh-cli.md)). The `hunt` engagement scaffolder ships with the clone (Option B).
That's it. Open Claude Code and describe what you're testing in plain English — the right skill loads automatically, no invocation by name:
> Testing acme.com — an in-scope HackerOne target. Run recon and rank the surface.
⟳ loading skills: web2-recon, offensive-osint, bb-methodology …
→ subdomain enum (subfinder + crt.sh) … 47 hosts
→ live hosts (httpx) … 12 · tech fingerprint … 6 distinct stacks
→ ranked surface: api.acme.com (GraphQL, introspection ON) ← start here
auth.acme.com (OAuth, SSO) ← hunt-oauth
Next: want me to probe the GraphQL introspection + OAuth redirect_uri?→ Full [Installation guide](INSTALL.md) · [Usage guide](USAGE.md) · [searchable skill catalog](docs/skills.md).
> The block above is an illustrative transcript. To record a real demo of your own session: `asciinema rec demo.cast` → upload to [asciinema.org](https://asciinema.org) and drop the badge here.
---
What was scanned
The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.
.claude-plugin/marketplace.json · Manifest · 35 lines
View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)
This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.
- {
- "name": "elementalsouls",
- "owner": {
- "name": "Sachin Sharma",
- "url": "https://github.com/elementalsouls"
- },
- "metadata": {
- "description": "Offensive-security skill bundles for Claude Code by ElementalSoul.",
- "version": "2.1.0"
- },
- "plugins": [
- {
- "name": "claude-bughunter",
- "source": "./",
- "description": "83-skill bug-hunting & external red-team bundle — 58 hunt-* web/vuln-class + framework skills, enterprise platform attack chains (M365/Entra, Okta, SharePoint, vCenter, SSL-VPN, APK/iOS), recon/OSINT, reporting & validation gates, Burp MCP integration. Skills auto-load by topic; 15 slash commands.",
- "version": "2.1.0",
- "author": {
- "name": "Sachin Sharma",
- "url": "https://github.com/elementalsouls"
- },
- "homepage": "https://elementalsouls.github.io/Claude-BugHunter",
- "category": "security",
- "tags": [
- "security",
- "offensive-security",
- "bug-bounty",
- "red-team",
- "pentest",
- "recon",
- "osint",
- "hunt"
- ]
- }
- ]
- }
README.md · README · 346 lines
View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)
This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.
- 
- # claude-bughunter
- > A self-contained Claude skill bundle for bug hunting and external red-team work · **83 skills** · 15 slash commands · **681 disclosed-report patterns** (433 now individually cited & auditable) across 24 core vulnerability classes · enterprise identity + infrastructure attack matrices · engagement-folder scaffolding · Burp MCP integration · battle-tested across authorized red-team and bug-hunting engagements, plus public training platforms (DVWA, OWASP Juice Shop, Hacker101, testphp.vulnweb.com).
- Built by **[Sachin Sharma](https://www.linkedin.com/in/sachinsharma8080/)** — Bug Hunting & GenAI Security Research.
- <p align="center">
- <sub>SPONSORED BY</sub>
- <br/>
- <a href="https://www.apismart.ai/">
- <picture>
- <source media="(prefers-color-scheme: dark)" srcset="assets/sponsors/apismart-dark.png">
- <img alt="ApiSmart" src="assets/sponsors/apismart-light.png" height="30">
- </picture>
- </a>
-
- <a href="https://threatwatch360.com">
- <picture>
- <source media="(prefers-color-scheme: dark)" srcset="assets/sponsors/tw360-dark.svg">
- <img alt="ThreatWatch360" src="assets/sponsors/tw360-light.svg" height="30">
- </picture>
- </a>
- </p>
- ---
- ## What is this?
- `claude-bughunter` is a drop-in skill bundle for the [Claude Code skills system](https://docs.claude.com/en/docs/claude-code/skills). Install once and Claude Code stops being a chatbot and starts behaving like a senior bug-hunting researcher or red-team operator: it knows the techniques, the chain templates, the VRT mappings, the platform CVE chains, and the hygiene — and it stays in scope.
- Four layers stack:
- - **Think** — `bb-methodology` + `redteam-mindset`: the 5-phase non-linear workflow, critical-thinking framework, and red-team operator discipline.
- - **Hunt webapps** — 58 `hunt-*` skills curated from 681 disclosed HackerOne reports: per-class detection patterns, payloads, bypass tables, and chain templates.
- - **Hit the perimeter** — enterprise platform chains (M365/Entra, Okta, vCenter, SSL-VPN appliances, SharePoint, cloud IAM): current 2024–2026 CVE chains + post-credential escalation.
- - **Ship it** — `triage-validation` + reporting + `evidence-hygiene`: the 7-Question Gate, VRT-aware severity, OOS rebuttals, PII redaction, and red-team deliverables.
- All triggered automatically by topic — describe what you're testing in plain English and the relevant skill loads. No invocation by name.
- ---
- ## Quickstart
- **Option A — install as a Claude Code plugin (recommended).** From inside Claude Code:
- ```text
- /plugin marketplace add elementalsouls/Claude-BugHunter
- /plugin install claude-bughunter@elementalsouls
- ```
- All 83 skills + 15 commands load namespaced under `claude-bughunter:` and update when you bump the plugin version — no files copied into `~/.claude/`.
- **Option B — copy install (no plugin system / pin to a clone):**
- ```bash
- git clone https://github.com/elementalsouls/Claude-BugHunter.git
- cd Claude-BugHunter
- ```
- ```bash
- # macOS / Linux
- bash scripts/install.sh
- # Windows (PowerShell)
- pwsh ./scripts/install.ps1
- ```
- Both copy the skills + commands into `~/.claude/` (macOS/Linux) or `%USERPROFILE%\.claude\` (Windows) and wire the `hunt` engagement scaffolder.
- **What each install path gives you:**
- | Path | 83 skills + 15 slash commands | `cbh` CLI | `hunt` scaffolder |
- |---|---|---|---|
- | **A — plugin** | ✅ namespaced under `claude-bughunter:` | ➕ separate `pipx install` | ❌ clone-only |
- | **B — copy install** | ✅ copied into `~/.claude/` | ✅ from the clone | ✅ from the clone |
- The plugin is the fastest path to the skills + slash commands. The terminal-native
- `cbh` runner installs standalone — `pipx install git+https://github.com/elementalsouls/Claude-BugHunter`
- — so plugin users can add it without a full clone (see [`cbh` CLI](docs/cbh-cli.md)).
- The `hunt` engagement scaffolder ships with the clone (Option B).
- That's it. Open Claude Code and describe what you're testing in plain English — the right skill loads automatically, no invocation by name:
- ```text
- > Testing acme.com — an in-scope HackerOne target. Run recon and rank the surface.
- ⟳ loading skills: web2-recon, offensive-osint, bb-methodology …
- → subdomain enum (subfinder + crt.sh) … 47 hosts
- → live hosts (httpx) … 12 · tech fingerprint … 6 distinct stacks
- → ranked surface: api.acme.com (GraphQL, introspection ON) ← start here
- auth.acme.com (OAuth, SSO) ← hunt-oauth
- Next: want me to probe the GraphQL introspection + OAuth redirect_uri?
- ```
- → Full [Installation guide](INSTALL.md) · [Usage guide](USAGE.md) · [searchable skill catalog](docs/skills.md).
- > The block above is an illustrative transcript. To record a real demo of your own session: `asciinema rec demo.cast` → upload to [asciinema.org](https://asciinema.org) and drop the badge here.
- ---
- ## Runs on multiple agent harnesses
- 
- The skills are plain [Agent Skills](https://docs.claude.com/en/docs/claude-code/skills) — the same `SKILL.md` format that **Claude Code · OpenCode · OpenAI Codex CLI · Hermes Agent · Google AntiGravity** all load. One command installs them everywhere:
- ```bash
- # macOS / Linux
- bash scripts/install.sh --all --burp-mcp
- # Windows (PowerShell)
- pwsh ./scripts/install.ps1 -All -BurpMcp
- ```
- | Harness | Target Skill Directory | Flag |
- |---|---|---|
- | **Claude Code** (baseline) | `~/.claude/skills/` | *(default)* |
- | **OpenCode** | reads `~/.claude/skills/` & `~/.agents/skills/` | *(default)* / `--agents` |
- | **OpenAI Codex CLI** | `~/.agents/skills/` | `--agents` |
- | **Hermes Agent** | `~/.hermes/skills/` | `--hermes` |
- | **Google AntiGravity** | `~/.gemini/config/skills/` | `--antigravity` |
- `--all` (`-All`) detects installed harnesses and copies skills to each harness's path (`~/.claude/skills`, `~/.agents/skills`, `~/.hermes/skills`, `~/.gemini/config/skills`); `--burp-mcp` (`-BurpMcp`) wires the Burp MCP server into each. The full *knowledge* layer ports to all five — the slash commands and `/hunt` engine stay Claude-Code-only by design.
- → [Multi-harness guide](docs/multi-harness.md)
- ---
- ## Star History
- <a href="https://github.com/elementalsouls/Claude-BugHunter/stargazers">
- <picture>
- <source media="(prefers-color-scheme: dark)" srcset="assets/star-history-dark.svg" />
- <source media="(prefers-color-scheme: light)" srcset="assets/star-history-light.svg" />
- <img alt="Star history chart for Claude-BugHunter" src="assets/star-history-light.svg" width="840" />
- </picture>
- </a>
- <sub>Chart is self-hosted — regenerate with `python3 scripts/gen_star_history.py` (needs `gh auth login`).
- Refreshes automatically each day via `.github/workflows/star-history.yml`.</sub>
- ---
- ## Scope — what this bundle is for, and what it isn't
- This bundle covers the **external attack surface** — anything reachable from the internet without first compromising an internal endpoint.
- ### In scope
- - **Bug bounty hunting** — web apps, APIs, SaaS, GraphQL, OAuth, JWT, file upload, IDOR, SSRF, RCE chains
- - **Web application pentesting** — full hunt-* coverage of OWASP-mapped bug classes + discipline rules
- - **External red-team engagements** — initial-access against internet-facing enterprise estate: M365 / Entra ID, Okta-as-IdP, SharePoint on-prem (ToolShell + legacy SOAP), VMware vCenter / Workspace ONE, SSL VPN appliances (Cisco / Fortinet / Citrix / Palo Alto / Pulse / SonicWall / F5), Android APK red-team, supply-chain recon
- - **Cloud misconfig + post-credential escalation** — public S3, IMDS chains, STS AssumeRole, cross-account confused-deputy
- - **Recon + OSINT** — subdomain enum, identity-fabric mapping, certificate transparency, JS analysis, secret scanning
- - **Reporting** — H1, Bugcrowd (VRT-aware), Intigriti, Immunefi, plus client-facing red-team deliverable format
- ### Out of scope (deliberate — not gaps, design decisions)
- - **Internal Active Directory attacks** — BloodHound, Kerberoasting, ASREProast, DCSync, Pass-the-Hash, AD CS abuse, ntlmrelayx, Responder, PetitPotam, etc. Different operational risk profile; needs different tooling and judgment. **Future bundle, not this one.**
- - **C2 frameworks** — Cobalt Strike, Sliver, Mythic, Havoc, BRC4 tradecraft. Out of scope for external-only engagement model.
- - **Post-exploit / persistence / lateral** — Mimikatz/comsvcs LSASS dumping, golden/silver tickets, named-pipe impersonation, persistence (registry, scheduled tasks, WMI events, COM hijacking), token theft. These start after the perimeter has already broken — different bundle territory.
- - **Evasion** — AMSI bypass, ETW patching, AV/EDR bypass. Tied to C2 tradecraft above.
- - **iOS pentesting / hardware / RF / ICS** — out of scope by design.
- - **Binary exploitation / kernel pwn / browser internals** — different skill universe.
- If you're running an internal red team that includes domain-takeover chains via Kerberos or lateral movement, **this bundle won't help you in those phases** — and we'd rather say that up front than have you find out mid-engagement. The external surface handoff to internal-RT tooling (Impacket, NetExec, CrackMapExec, Rubeus, Certify, BloodHound) is intentionally outside our scope. **Coverage for internal AD and post-exploit may come in a future update.**
- ---
- ## What's inside
- **83 skills**, auto-loaded by topic — no invocation by name. Coverage across the external attack surface:
- | Category | # | Examples |
- |---|---|---|
- | Hunt — web app vuln classes | 58 | XSS, SQLi, SSRF, IDOR, LFI, SSTI, XXE, CSRF, CORS, open-redirect, SharePoint, ASP.NET/NTLM |
- | Enterprise platform attack ★ | 10 | M365/Entra, Okta, cloud-IAM-deep, vCenter, enterprise VPN, APK/iOS red-team pipelines, supply-chain recon |
- | Reporting & validation | 6 | triage-validation, evidence-hygiene, report-writing, bugcrowd-reporting |
- | Recon & OSINT | 5 | web2-recon, offensive-osint, osint-methodology, recon-scope-triage |
- | Methodology & mindset | 4 | bb-methodology, bug-bounty, redteam-mindset, bb-local-toolkit |
- Full searchable catalog → **[docs/skills.md](docs/skills.md)**. Also ships **15 slash commands** (`/hunt`, `/recon`, `/report`, …) and a deterministic **engagement engine** (`engine/`) that maps a target's attack surface and routes each finding to the skill that handles it.
- ---
- ## How it works
- A 6-phase, non-linear workflow — **recon → map & rank → hunt → validate → report** — with scope enforced in code and a **7-Question Gate** before anything is submitted. Two ways to drive it:
- - **Plain English** — describe what you're testing and the relevant skill loads automatically.
- - **`/hunt` scaffold + `cbh` CLI** — engagement-folder structure, state, and orchestration.
- → [Usage guide & worked example](USAGE.md) · [6-phase architecture & skill-to-phase map](docs/architecture.md) · [`cbh` CLI](docs/cbh-cli.md)
- ---
- ## Authorization
- These skills are intended for assets you **own** or have **written authorization to assess** (bug-bounty in-scope assets, pentest engagement letters, CTF challenges, your own infrastructure).
- The skills include validation gates that auto-trigger when you point Claude at unverified third-party targets — `triage-validation`'s 7-Question Gate explicitly asks whether the asset is in scope (Q3) and on the program's accepted-impact list (Q2). The `bugcrowd-reporting` skill includes researcher-side hygiene (Bugcrowdninja alias, account-state restoration, friendly-tester posture) that signals legitimate authorized testing to the target's fraud team.
- The bundle explicitly **excludes**: weaponizing 0-days against unauthorized targets, post-exploitation tooling, malware development, mass-targeting infrastructure. See [`SECURITY.md`](SECURITY.md) for the full posture.
- > **Heads-up — Anthropic runtime cyber safeguards.** Anthropic's models apply real-time safeguards that **block "vulnerability exploitation or offensive security tooling development" by default** — so even *authorized, in-scope* work can hit a refusal that isn't this bundle's doing. If you do authorized offensive security (pentest / bug bounty / red team), enroll in Anthropic's **free, application-based [Cyber Verification Program (CVP)](https://claude.com/form/cyber-use-case)** to get safeguards adjusted for legitimate dual-use work. (Mass data exfiltration and ransomware development stay prohibited and are *not* adjustable.) Details: [Anthropic — real-time cyber safeguards](https://support.claude.com/en/articles/14604842-real-time-cyber-safeguards-on-claude).
- ### Why your model switched mid-session
- Separate from refusals, and easy to miss. On **Opus 5**, a narrow set of higher-risk cyber requests —
- Anthropic names *exploit generation*, *binary-based vulnerability scanning* and *penetration testing* —
- **fall back to Opus 4.8** rather than being refused. You get a notice and the response is labelled with
- the model that answered, but in a long agentic run that is easy to scroll past, so it can look like
- Opus 5 quietly got worse. See [why Claude switched models](https://support.claude.com/en/articles/16049681-why-claude-switched-models-in-your-conversation-with-opus-5).
- What to do depends on what you are actually doing:
- | Situation | What helps |
- |---|---|
- | **Auditing your own code** — reviewing a repo you own for defects | Say so. "Defensive review of my own repo", "check this against the OWASP Top 10", "secure refactor to remediate" describe the work accurately and read as remediation. This is not a workaround; the work genuinely is defensive. |
- | **Authorized offensive work** — live engagement, PoC for a bounty submission | This is what the bundle is for, and the supported route is [CVP](https://claude.com/form/cyber-use-case). Do not reword an offensive engagement to look defensive to get past a classifier — enroll instead. |
- | **You just want the switching off** | Settings → Capabilities disables automatic model switching. |
- `/hunt` states the engagement frame (authorized, scope-bounded, remediable finding) on its first turn
- for exactly this reason — engagement context belongs in the session explicitly, not implied.
- ---
- ## Documentation
- | Doc | Contents |
- |---|---|
- | [`README.md`](README.md) | This file — overview, quickstart, scope, skill summary |
- | [`INSTALL.md`](INSTALL.md) | Full setup with Burp MCP integration and optional skill regenerator |
- | [`USAGE.md`](USAGE.md) | Workflow walkthrough · decision tree · worked engagement example |
- | [`docs/architecture.md`](docs/architecture.md) | 6-phase architecture · skill-to-phase mapping · engagement composition |
- | [`docs/cbh-cli.md`](docs/cbh-cli.md) | `cbh` CLI — native runner orchestrating recon + classify + triage + report |
- | [`docs/cve-coverage.md`](docs/cve-coverage.md) | CISA KEV coverage snapshot — refreshed weekly via the workflow template at `docs/automation/cve-refresh.yml.template` |
- | [`docs/credits.md`](docs/credits.md) | Full attribution: 43 original skills + 8 vendored from upstream |
- | [`CONTRIBUTING.md`](CONTRIBUTING.md) | PR guidelines · skill quality standards · scope |
- | [`SECURITY.md`](SECURITY.md) | Authorized-use posture · responsible disclosure · what's excluded |
- | [`LICENSE`](LICENSE) | MIT |
- | [`NOTICE`](NOTICE) | Upstream-skills attribution · no-redistribution note |
- | [`LICENSE-CONTENT`](LICENSE-CONTENT) | CC BY 4.0 (skill methodology, wordlists, docs) |
- ---
- ## Why this exists
- Most bug-hunting Claude setups are either too generic (one big "security" prompt) or too fragmented (you bookmark 30 disclosed reports and re-read them every engagement). Neither scales past the second target.
- This bundle was built and validated through authorized engagements that exposed different capability gaps:
- **Bug-bounty engagement** — surfaced four gaps a starter 3-skill stack could not close:
- 1. **No hypothesis discipline** — drafts written before validation → wasted hours, hurt validity ratio
- 2. **No per-program reporting tactics** — VRT defaults auto-downgraded P3-worthy findings to P4
- 3. **No engagement coordination** — findings, evidence, and submission IDs scattered across folders
- 4. **No evidence hygiene** — screenshots leaked cookies and victim PII
- **External red-team engagement** — exposed five additional gaps that bug-bounty defaults made worse:
- 1. **Conservative defaults retracted real findings** — WAPT mindset stopped tests early on defended targets where red-team continuation would have surfaced bypass chains → `redteam-mindset`
- 2. **No mid-engagement situational awareness** — client SOC patched confirmed SQLi within 30 min; external attacker locked 14 accounts during a live test session — both invisible without explicit detection methodology → `mid-engagement-ir-detection`
- 3. **No enterprise-platform attack chains** — M365 + Entra ID, on-prem SharePoint, Cisco SSL VPN, vCenter, and 7 Android APKs all needed current 2024-2026 CVE knowledge and platform-specific tradecraft → `m365-entra-attack`, `okta-attack`, `hunt-sharepoint`, `hunt-aspnet`, `hunt-ntlm-info`, `vmware-vcenter-attack`, `enterprise-vpn-attack`, `apk-redteam-pipeline`
- 4. **No client-facing deliverable format** — bug-bounty report templates don't fit enterprise red-team where output is a 50KB+ MD + DOCX with embedded screenshots → `redteam-report-template`
- 5. **No post-credential escalation model** — when recon yielded credentials (AWS keys, JWTs, GCP JSON), it was unclear what they granted or how to escalate → `cloud-iam-deep`
- The per-class `hunt-*` skills address gap-zero (*"what should I look for in webapps"*) — the original 24 codifying patterns from 681 disclosed HackerOne reports, with 20+ framework/surface skills added by the community v3 expansion — Claude knows the actual chain templates real triagers paid for, not abstract OWASP Top 10. The enterprise-platform and red-team-tradecraft layers address what bug-bounty alone cannot: external red-team engagements against monitored enterprise targets.
- ---
- ## Roadmap
- - [x] HackerOne MCP integration — [`mcp/hackerone/`](mcp/hackerone/README.md): disclosed-report duplicate search, program stats and scope; optional logged-in mode for private programs and your own reports
- - [ ] Per-engagement memory layer — pattern recall across targets
- - [x] Industry-specific hunt skills — `hunt-fintech-graphql` shipped; `hunt-healthcare-fhir`, `hunt-gov-compliance` still open
- - [ ] Program-rules-parser skill — auto-generate structured `scope.md` from program text
- - [ ] Refresh `hunt-*` skills with newer disclosed reports (re-run `public-skills-builder`)
- - [ ] Additional enterprise-platform skills — `citrix-netscaler-deep`, `f5-bigip-attack`, `ad-cs-attack` (AD Certificate Services)
- - [ ] Refresh enterprise-VPN CVE matrix quarterly to track 2026 advisories
- - [ ] Update architecture SVG to include the 7-skill enterprise-platform layer
- ---
- ## Sponsors
- <p align="center">
- <a href="https://www.apismart.ai/"><picture>
- <source media="(prefers-color-scheme: dark)" srcset="assets/sponsors/apismart-dark.png">
- <img alt="ApiSmart" src="assets/sponsors/apismart-light.png" width="210">
- </picture></a>
- </p>
- **[ApiSmart](https://www.apismart.ai/)** unifies leading LLM, image, and video models through one OpenAI-compatible API. Use one key to switch models, simplify billing, and improve reliability with automatic failover.
- <p align="center">
- <a href="https://threatwatch360.com"><picture>
- <source media="(prefers-color-scheme: dark)" srcset="assets/sponsors/tw360-dark.svg">
- <img alt="ThreatWatch360" src="assets/sponsors/tw360-light.svg" width="430">
- </picture></a>
- </p>
- **[ThreatWatch360](https://threatwatch360.com)** is an AI-powered offensive-security platform: continuous Attack Surface Management, AI-assisted penetration testing, brand protection, dark-web monitoring, and Cyber Threat Intelligence in one platform. Validated findings with proof-of-concept and business-impact prioritization — signal over alert fatigue.
- ---
- ## About
- Operational tradecraft accumulated across bug-bounty engagements and authorized pentests, codified into Claude skills. Platform-agnostic — slot into any engagement workflow you already use, or none.
- **Author:** [ElementalSoul](https://github.com/elementalsouls) · GenAI Security Research
- **Sister project:** [Claude-OSINT](https://github.com/elementalsouls/Claude-OSINT) — paired skills for the recon phase that this bundle picks up after. Its two recon skills (`offensive-osint`, `osint-methodology`) are **canonically maintained here** and re-exported there, so the two are byte-identical. **Installing both is safe:** each bundle's installer (`install.sh` on macOS/Linux, `install.ps1` on Windows) records a manifest, the script skips re-copying an identical skill, and `--uninstall` keeps any skill the other bundle still owns — uninstalling one never breaks the other.
- **Vendored foundation:** [shuvonsec/claude-bug-bounty](https://github.com/shuvonsec/claude-bug-bounty) — methodology, validation, reporting, payload library (8 of 83 skills + 15 slash commands)
- **Generator tool used (not vendored):** [shuvonsec/public-skills-builder](https://github.com/shuvonsec/public-skills-builder) — used to scaffold per-class skills from H1 disclosed reports
- **Inspirations:**
- - [archangel / douglasday](https://hackerone.com/) — top-10 H1 hunter; per-class skill pattern
- - [Trail of Bits — `trailofbits/skills`](https://github.com/trailofbits/skills) — skill-authoring discipline
- - [SecSkills — `trilwu/secskills`](https://github.com/trilwu/secskills) — subagent pattern
- **Tool inventory:**
- - [PortSwigger Burp Suite + MCP Server extension](https://portswigger.net/burp)
- - [ProjectDiscovery](https://github.com/projectdiscovery) — subfinder · dnsx · httpx · katana · nuclei
- - [SecLists](https://github.com/danielmiessler/SecLists) · [Assetnote Wordlists](https://wordlists.assetnote.io/)
- ## License
- This project is dual-licensed:
- - **Code** (Python helpers, shell scripts) — [MIT](LICENSE).
- - **Content** (skill methodology, wordlists, regex catalogs, severity rubrics, docs) — [Creative Commons Attribution 4.0 International](LICENSE-CONTENT) (CC BY 4.0).
- To be precise about the boundary: **`*.py`, `*.sh`, and other source files are MIT; `*.md` documentation, wordlists, regex catalogs, and rubrics are CC BY 4.0.**
- Reuse the content freely — including commercially — as long as you credit **Sachin Sharma / Claude-BugHunter** and link back to this repository. See [`NOTICE`](NOTICE) for upstream-skills attribution.
- ---
- > *"Give Claude the right skill and it stops being a chatbot. It becomes an operator."*
engine/scope.py · Bundled script · 192 lines · 1 finding marked
- #!/usr/bin/env python3
- """
- scope.py — deterministic scope safety for the engagement engine.
- The engine may run unattended, so scope is enforced in CODE, not by trusting an
- LLM. Every host/URL is checked here before any agent is allowed to touch it.
- Deny wins: an out-of-scope match excludes even if an in-scope pattern also matches.
- Default deny: anything not matching an in-scope pattern is out of scope.
- Pattern forms (matched against the URL's host):
- example.com -> the apex AND any subdomain (example.com, api.example.com)
- *.example.com -> any subdomain (NOT the bare apex)
- api.example.com -> that exact host
- 10.0.0.0/8 -> any IP in the CIDR (IPv4)
- re:^staging[0-9]+\\.example\\.com$ -> explicit regex (prefix re:)
- """
- import ipaddress
- import re
- from urllib.parse import urlparse
- def _host_of(target):
- t = target.strip()
- if "://" not in t:
- t = "//" + t
- try:
- parsed = urlparse(t)
- return (parsed.hostname or "").lower().rstrip(".")
- except ValueError:
- return ""
- def _match(pattern, host):
- p = pattern.strip()
- if not p or not host:
- return False
- if p[:3].lower() == "re:":
- try:
- return re.search(p[3:], host, re.IGNORECASE) is not None
- except re.error:
- return False
- p = p.lower()
- if "/" in p and p.replace(".", "").replace("/", "").isdigit(): # CIDR
- try:
- return ipaddress.ip_address(host) in ipaddress.ip_network(p, strict=False)
- except ValueError:
- return False
- if p.startswith("*."):
- base = p[2:]
- return host.endswith("." + base)
- # bare domain: apex or any subdomain; or exact host
- return host == p or host.endswith("." + p)
- class Scope:
- def __init__(self, in_scope, out_of_scope=None, seeds=None, name="engagement"):
- self.in_scope = [p for p in (in_scope or []) if p.strip()]
- self.out_of_scope = [p for p in (out_of_scope or []) if p.strip()]
- self.seeds = seeds or []
- self.name = name
- @classmethod
- def load(cls, path):
- import json
- d = json.load(open(path))
- return cls(d.get("in_scope", []), d.get("out_of_scope", []),
- d.get("seeds", []), d.get("name", "engagement"))
- def in_scope_host(self, target):
- host = _host_of(target)
- if not host:
- return False
- if any(_match(p, host) for p in self.out_of_scope):
- return False # deny wins
- return any(_match(p, host) for p in self.in_scope)
- def reject_reason(self, target):
- """Return None if in scope, else a human reason (for logging)."""
- host = _host_of(target)
- if not host:
- return "could not parse host"
- if any(_match(p, host) for p in self.out_of_scope):
- return f"{host} matches an out-of-scope rule"
- if not any(_match(p, host) for p in self.in_scope):
- return f"{host} matches no in-scope rule (default deny)"
- return None
- def _selftest():
- s = Scope(in_scope=["example.com", "*.test.example.com", "10.0.0.0/8",
- "re:^lab[0-9]+\\.acme\\.io$"],
- out_of_scope=["admin.example.com", "internal.example.com"])
- ok = lambda t: s.in_scope_host(t)
- assert ok("https://example.com/login") # apex
- assert ok("http://api.example.com/x") # subdomain of bare domain
- assert ok("https://a.test.example.com") # wildcard
- assert ok("https://10.1.2.3:8080/") # CIDR
- assert ok("https://lab42.acme.io") # regex
- assert not ok("https://admin.example.com") # out-of-scope (deny wins)
- assert not ok("https://internal.example.com/x") # out-of-scope
- assert ok("https://test.example.com") # in scope via bare example.com rule
- assert not ok("https://evil.com") # default deny
- assert not ok("https://notexample.com") # suffix-confusion guard
- assert not ok("https://example.com.evil.com") # suffix-confusion guard
- assert not ok("https://11.0.0.1") # outside CIDR
- Dismissed after review: Talks to a raw IP address or throwaway host, where malware is often staged
- Line 105 on GitHub
- assert s.reject_reason("https://evil.com")
- assert s.reject_reason("https://example.com") is None
- # wildcard depth: *.test.example.com needs a label deeper than test.example.com
- s2 = Scope(in_scope=["*.test.example.com"])
- assert s2.in_scope_host("a.test.example.com")
- assert not s2.in_scope_host("test.example.com")
- print("scope.py self-test: PASS")
- def _scope_from_md(path):
- """Build a Scope from a scaffolded scope.md (the `hunt` template).
- Collects bullet items under an '## In scope' / '## Out of scope' heading.
- Takes the first whitespace token of each bullet (so '- api.example.com — note'
- yields 'api.example.com'). Skips placeholder bullets like '(paste ... here)'.
- """
- in_scope, out_scope, section = [], [], None
- with open(path, encoding="utf-8") as fh:
- for line in fh:
- low = line.strip().lower()
- if low.startswith("#"):
- hashes = len(low) - len(low.lstrip("#"))
- if "out of scope" in low or "out-of-scope" in low:
- section = "out"
- elif "in scope" in low or "in-scope" in low:
- section = "in"
- elif hashes <= 2:
- section = None # a peer-level section (## Focus areas, etc.)
- # deeper sub-headings (### Web, #### APIs) keep the current section
- continue
- s = line.strip()
- if section and (s.startswith("- ") or s.startswith("* ")):
- tok = s[2:].strip().split()[0:1]
- if not tok:
- continue
- pat = tok[0]
- if pat.startswith("(") or pat.startswith("["):
- continue # placeholder text, not a real pattern
- (in_scope if section == "in" else out_scope).append(pat)
- return Scope(in_scope=in_scope, out_of_scope=out_scope, name=path)
- def _main(argv=None):
- import argparse
- ap = argparse.ArgumentParser(
- prog="scope.py",
- description="Deterministic in-scope check (deny wins, default deny).")
- ap.add_argument("targets", nargs="*", help="hosts/URLs to check")
- ap.add_argument("--md", help="path to a scaffolded scope.md")
- ap.add_argument("--scope-file", help="path to an engagement scope.json")
- ap.add_argument("--in-scope", action="append", default=[], metavar="PATTERN",
- help="in-scope pattern (repeatable)")
- ap.add_argument("--out-of-scope", action="append", default=[], metavar="PATTERN",
- help="out-of-scope pattern (repeatable)")
- ap.add_argument("--selftest", action="store_true", help="run the built-in self-test")
- args = ap.parse_args(argv)
- if args.selftest:
- _selftest()
- return 0
- if args.md:
- scope = _scope_from_md(args.md)
- elif args.scope_file:
- scope = Scope.load(args.scope_file)
- elif args.in_scope or args.out_of_scope:
- scope = Scope(in_scope=args.in_scope, out_of_scope=args.out_of_scope)
- else:
- ap.error("provide --md, --scope-file, or --in-scope/--out-of-scope patterns")
- if not args.targets:
- ap.error("no targets given")
- worst = 0
- for t in args.targets:
- reason = scope.reject_reason(t)
- if reason is None:
- print(f"IN-SCOPE {t}")
- else:
- print(f"OUT-OF-SCOPE {t} ({reason})")
- worst = 1
- return worst
- if __name__ == "__main__":
- import sys
- sys.exit(_main())
engine/skill_map.py · Bundled script · 246 lines · 1 finding marked
- #!/usr/bin/env python3
- """
- skill_map.py — categorize the discovered attack surface against the hunt-* skill arsenal.
- The engine's job is NOT to test everything itself. It maps the surface, then tells the
- operator *which skill applies where* and *the first curl to run* — so the human spends
- their 20% expert effort where the 80% automation points:
- surface (endpoint / parameter) -> attack class -> which hunt-* skill -> first curl
- Mappings are grounded in the skills actually installed (auto-detected: the bundle's own
- skills/ for repo/plugin installs, or ~/.claude/skills for the copy installer, overridable
- via $CBH_SKILLS_DIR); anything not present is filtered out so we never point at a skill
- that isn't there.
- Active testing is curl-first; Burp MCP is optional (only where noted — OOB/blind/fuzzing).
- """
- import os
- import sys
- def _resolve_skills_dir():
- """Locate the installed skills/ directory across every install method.
- Resolution order:
- 1. $CBH_SKILLS_DIR — explicit override (e.g. a non-standard plugin cache path).
- 2. skills/ shipped next to the engine — works for both a repo checkout and a
- Claude Code plugin install (the whole bundle lives in the plugin cache, so
- engine/ and skills/ stay siblings there too).
- 3. ~/.claude/skills — the target of the scripts/install.sh copy method.
- """
- env = os.environ.get("CBH_SKILLS_DIR")
- if env:
- return os.path.expanduser(env)
- bundled = os.path.join(
- os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "skills"
- )
- if os.path.isdir(bundled):
- return bundled
- return os.path.expanduser("~/.claude/skills")
- SKILLS_DIR = _resolve_skills_dir()
- # attack class -> hunt skill(s) in the bundle.
- # NOTE: hunt-dispatch is an internal loader (for the /hunt orchestrator) and is intentionally
- # not listed here — it routes no attack class of its own.
- CLASS_SKILL = {
- "sqli": ["hunt-sqli"], "nosqli": ["hunt-nosqli"], "xss": ["hunt-xss", "hunt-dom"],
- "ssrf": ["hunt-ssrf"], "idor": ["hunt-idor"], "open-redirect": ["hunt-open-redirect"],
- "lfi": ["hunt-lfi"], "ssti": ["hunt-ssti"], "rce": ["hunt-rce"], "xxe": ["hunt-xxe"],
- "auth-bypass": ["hunt-auth-bypass", "hunt-session"], "ato": ["hunt-ato", "hunt-forgot-password"],
- "llm-ai": ["hunt-llm-ai"], "rag-vector": ["hunt-rag-vector", "hunt-llm-ai"],
- "saml": ["hunt-saml"], "oauth": ["hunt-oauth"], "mfa": ["hunt-mfa-bypass"],
- "graphql": ["hunt-graphql"], "fintech-graphql": ["hunt-fintech-graphql", "hunt-graphql"],
- "csrf": ["hunt-csrf"], "cors": ["hunt-cors"], "clickjacking": ["hunt-clickjacking"],
- "info-leak": ["hunt-source-leak", "hunt-api-misconfig"], "secret": ["hunt-source-leak"],
- "shadow-api": ["hunt-shadow-api", "hunt-source-leak"], "spa-api": ["hunt-spa-api", "hunt-source-leak"],
- "deserialization": ["hunt-deserialization"], "file-upload": ["hunt-file-upload"],
- "host-header": ["hunt-host-header"], "http-smuggling": ["hunt-http-smuggling"],
- "cache-poison": ["hunt-cache-poison"], "race-condition": ["hunt-race-condition"],
- "business-logic": ["hunt-business-logic"], "brute-force": ["hunt-brute-force"],
- "captcha-bypass": ["hunt-captcha-bypass"], "forgot-password": ["hunt-forgot-password", "hunt-ato"],
- "jwt-crypto": ["hunt-jwt-crypto", "hunt-ato"], "websocket": ["hunt-websocket"],
- "html-injection": ["hunt-html-injection", "hunt-xss"],
- "exceptional-conditions": ["hunt-exceptional-conditions", "hunt-source-leak"],
- "cicd": ["hunt-cicd"], "k8s": ["hunt-k8s"], "cloud-misconfig": ["hunt-cloud-misconfig"],
- "ldap": ["hunt-ldap"], "ntlm-info": ["hunt-ntlm-info"], "tls-network": ["hunt-tls-network"],
- "subdomain-takeover": ["hunt-subdomain"],
- }
- # detected tech -> tech-specific skill(s)
- TECH_SKILL = {
- "next.js": ["hunt-nextjs"], "node.js": ["hunt-nodejs"], "react": ["hunt-dom"],
- "wordpress": ["hunt-sqli", "hunt-idor"], "laravel": ["hunt-laravel"], "spring": ["hunt-springboot"],
- "asp.net": ["hunt-aspnet"], "sharepoint": ["hunt-sharepoint"], "graphql": ["hunt-graphql"],
- "grpc": ["hunt-grpc"], "kubernetes": ["hunt-k8s"], "docker": ["hunt-k8s"],
- "websocket": ["hunt-websocket"], "socket.io": ["hunt-websocket"],
- "jenkins": ["hunt-cicd"], "teamcity": ["hunt-cicd"], "drone": ["hunt-cicd"],
- "argo": ["hunt-cicd"], "github actions": ["hunt-cicd"], "gitlab ci": ["hunt-cicd"],
- }
- # curl-first starter probe per class. {u}=url with FUZZ->1, {ur}=injection prefix (before the value)
- CLASS_PROBE = {
- "sqli": "curl -s \"{u}\" # then ' OR '1'='1'-- and time-based ' AND SLEEP(5)-- (Burp Intruder for blind)",
- "nosqli": "curl -s \"{u}\" # then [$ne]=1 / {\"$gt\":\"\"} in the param",
- "xss": "curl -s \"{ur}z1z<svg/onload=alert(1)>\" # check the marker comes back UNencoded",
- "open-redirect": "curl -sI \"{ur}https://evil.example\" # inspect the Location: response header",
- "ssrf": "curl -s \"{ur}http://169.254.169.254/latest/meta-data/\" # Burp Collaborator for blind OOB",
- Note: Quoted as data in code: Fetches a raw IP-literal URL — ambiguous (could be legitimate internal tooling) but worth a second look
- Line 88 on GitHub
- "idor": "curl -s \"{u}\" # swap/increment the id across two identities; diff the bodies",
- "lfi": "curl -s \"{ur}../../../../etc/passwd\" # also php://filter/convert.base64-encode/resource=",
- "ssti": "curl -s \"{ur}{{7*7}}\" # look for 49 (or ${7*7}); confirm engine before RCE",
- "rce": "curl -s \"{u}\" # only with explicit authorization; start with benign id;sleep markers",
- "xxe": "curl -s -X POST \"{u}\" -d '<?xml ...>' # OOB via Collaborator if blind",
- "auth-bypass": "curl -s \"{u}\" # no token / expired token / role swap / forced browse",
- "llm-ai": "curl -s -X POST \"{u}\" -H 'Content-Type: application/json' -d '{\"messages\":[{\"role\":\"user\",\"content\":\"...\"}]}' # prompt-injection / system-prompt extraction",
- "graphql": "curl -s -X POST \"{u}\" -d '{\"query\":\"{__schema{types{name}}}\"}' # introspection",
- "csrf": "curl -s \"{u}\" # check for SameSite / CSRF token on state-changing POST",
- "info-leak": "curl -s \"{u}\" # inspect for secrets / verbose errors / source / stack traces",
- "secret": "curl -s \"{u}\" # confirm the exposed secret is present (read-only — do NOT exercise it)",
- "host-header": "curl -s \"{u}\" -H 'Host: evil.example' # check for reflection / cache / pw-reset poisoning",
- "saml": "curl -s \"{u}\" # inspect SAML/SSO config endpoints; test XSW / signature-stripping / IdP confusion (needs auth)",
- "oauth": "curl -s \"{u}\" # check redirect_uri validation, state, PKCE, token leakage",
- "ato": "curl -s \"{u}\" # reset/email-change flows: host-header poisoning, token in body/referer, no-expiry/reuse",
- "forgot-password": "curl -s \"{u}\" # diff valid vs invalid email responses; check token in response/referer, replay, rate limit",
- "brute-force": "curl -s -X POST \"{u}\" -d 'user=a&pass=b' # measure lockout/throttle; try X-Forwarded-For bypass",
- "captcha-bypass": "curl -s -X POST \"{u}\" # omit/blank/replay the captcha field; test cross-endpoint acceptance",
- "jwt-crypto": "curl -s \"{u}\" # decode the JWT; test alg:none / RS256->HS256 key confusion",
- "websocket": "curl -s \"{u}\" -H 'Upgrade: websocket' -H 'Connection: Upgrade' -H 'Origin: https://evil.example' # check Origin validation",
- "html-injection": "curl -s \"{ur}<b>marker</b>\" # raw HTML reflected (no script exec) -> escalate to XSS if JS runs",
- "cache-poison": "curl -s \"{u}\" -H 'X-Forwarded-Host: evil.example' # check if unkeyed input is cached and served to others",
- "shadow-api": "curl -s \"{u}\" # enumerate v1/v2/beta/legacy paths; diff Wayback OpenAPI for auth regressions",
- "spa-api": "curl -s \"{u}\" # pull JS bundle -> backend route map -> test for missing auth middleware",
- "exceptional-conditions": "curl -s \"{u}\" # malformed/unexpected input -> verbose stack-trace / ORM / path leak",
- "cicd": "curl -s \"{u}\" # exposed CI dashboard / workflow-injection surface (pull_request_target, self-hosted runner)",
- "k8s": "curl -s \"{u}\" # API anonymous access, kubelet /run, etcd unauth",
- "cloud-misconfig": "curl -s \"{u}\" # anonymous read on S3/GCS/Blob; PutObjectAcl public-write",
- "ldap": "curl -s \"{ur}*)(objectClass=*\" # LDAP search-filter injection in auth/search",
- "ntlm-info": "curl -sI \"{u}\" # WWW-Authenticate: NTLM -> leak domain/forest/computer name",
- "tls-network": "curl -sI \"{u}\" # HSTS / weak cipher / SPF-DKIM-DMARC / DNS AXFR",
- "subdomain-takeover": "curl -sI \"{u}\" # dangling CNAME -> check claimable provider",
- "rag-vector": "curl -s \"{u}\" # shared knowledge base / vector-DB port; cross-tenant query",
- "fintech-graphql": "curl -s -X POST \"{u}\" -d '{\"query\":\"{__schema{types{name}}}\"}' # money-movement mutations, idempotency-key double-spend",
- "clickjacking": "curl -sI \"{u}\" # missing X-Frame-Options / CSP frame-ancestors -> confirm framing in a browser",
- "cors": "curl -sD - -o /dev/null \"{u}\" -H 'Origin: https://evil.example' # GET, not HEAD: look for Access-Control-Allow-Origin echoing that origin WITH Allow-Credentials: true",
- "deserialization": "curl -s \"{u}\" # hunt for rO0AB (Java) / O:8: (PHP) / gAS (pickle) / __VIEWSTATE, then replay a tampered blob",
- "file-upload": "curl -s -X POST \"{u}\" -F 'file=@probe.jpg;type=image/jpeg' # then fetch it back: is it served, and does a .php/.svg extension survive",
- "http-smuggling": "curl -s --http1.1 \"{u}\" -H 'Transfer-Encoding: chunked' -H 'Content-Length: 6' # desync probe; confirm with Burp's HTTP Request Smuggler",
- "mfa": "curl -s \"{u}\" # after the password step: reach the post-login URL directly, replay an OTP, or omit the MFA field",
- "race-condition": "curl -s -X POST \"{u}\" # fire N copies in parallel (Turbo Intruder single-packet); >1 success means the limit is racy",
- "business-logic": "curl -s \"{u}\" # replay the same action twice / skip a step / try qty 0 or negative; diff the resulting state",
- }
- def _present():
- """Names in SKILLS_DIR, or None when the directory cannot be read.
- None is deliberately distinct from an empty set: an unreadable skills directory
- means presence cannot be *verified*, and _filter() must not read that as "assume
- everything is installed".
- """
- try:
- return set(os.listdir(SKILLS_DIR))
- except OSError:
- return None
- def _filter(names):
- present = _present()
- if present is None:
- # Unverifiable. The contract above is to name only skills that are actually
- # installed, so name none rather than every one of them.
- return []
- return [s for s in names if s in present]
- def skills_for(vuln_class, tech=None):
- """Class-specific skill(s) for a vuln class (tech kept separate — see tech_skills)."""
- out = _filter(CLASS_SKILL.get(vuln_class, []))
- return out or _filter(["hunt-misc"])
- def tech_skills(tech):
- """Tech-stack skill(s) for the detected service tech (target-wide, not per class)."""
- out = []
- for t in (tech or []):
- for s in _filter(TECH_SKILL.get((t or "").lower(), [])):
- if s not in out:
- out.append(s)
- return out
- def probe_for(vuln_class, url, param=None):
- """Curl-first starter probe string for a (class, url)."""
- tmpl = CLASS_PROBE.get(vuln_class, "curl -s \"{u}\"")
- u = url.replace("FUZZ", "1")
- if "FUZZ" in url:
- ur = url.split("FUZZ", 1)[0]
- elif param:
- ur = url + ("&" if "?" in url else "?") + param + "="
- else:
- ur = url + ("&" if "?" in url else "?") + "x="
- return tmpl.replace("{u}", u).replace("{ur}", ur)
- def main(argv=None):
- """Self-check the maps against the skills actually installed.
- Errors (exit 1) are conditions that make the routing wrong or unverifiable:
- - the skills directory cannot be read, so nothing can be verified
- - a mapping names a skill that is not installed
- - an installed hunt-* skill is unreachable through every mapping
- Warnings (exit 0) are coverage gaps: the class still routes to the right skill,
- but no tailored starter probe is defined for it.
- """
- present = _present()
- errors, warnings = [], []
- if present is None:
- errors.append(
- f"skills directory not readable: {SKILLS_DIR} — set $CBH_SKILLS_DIR or "
- f"install the bundle; presence cannot be verified"
- )
- present = set()
- referenced = {
- s for skills in list(CLASS_SKILL.values()) + list(TECH_SKILL.values()) for s in skills
- }
- if present:
- missing = sorted(referenced - present)
- if missing:
- errors.append(f"mapped but NOT installed: {', '.join(missing)}")
- # Coverage: every installed hunt-* skill should be reachable through CLASS_SKILL or
- # TECH_SKILL (hunt-dispatch is an internal loader and hunt-misc is the explicit
- # fallback — both exempt).
- mapped = referenced | {"hunt-misc"}
- unreachable = sorted(
- {s for s in present if s.startswith("hunt-") and s != "hunt-dispatch"} - mapped
- )
- if unreachable:
- errors.append(
- f"installed hunt-* skills NOT reachable through any mapping: {', '.join(unreachable)}"
- )
- no_probe = sorted(set(CLASS_SKILL) - set(CLASS_PROBE))
- if no_probe:
- warnings.append(f"classes with a mapping but no tailored starter probe: {', '.join(no_probe)}")
- print(
- f"skill_map: {len(CLASS_SKILL)} class mappings, {len(TECH_SKILL)} tech mappings, "
- f"{len(CLASS_PROBE)} probes"
- )
- if present:
- print(f" skills installed: {len(present)}")
- for w in warnings:
- print(f"::warning:: {w}" if os.environ.get("GITHUB_ACTIONS") else f"WARN {w}")
- for e in errors:
- print(f"::error:: {e}" if os.environ.get("GITHUB_ACTIONS") else f"ERROR {e}")
- print(f" {'FAIL' if errors else 'OK'}: {len(errors)} error(s), {len(warnings)} warning(s)")
- return 1 if errors else 0
- if __name__ == "__main__":
- sys.exit(main(sys.argv[1:]))
Ratings and comments
Sign in to rate this skill.
Sign inFree to use. If it’s helped, pass it on.