Skip to content

Commit 4b6c6a5

Browse files
elementalsoulsinjectifytestclaude
authored
fix(engine): auto-detect skills dir for plugin installs; refresh plugin metadata (#47)
engine/skill_map.py: resolve SKILLS_DIR across all install methods — 1) $CBH_SKILLS_DIR override, 2) skills/ shipped next to the engine (repo checkout AND Claude Code plugin cache, where engine/ and skills/ stay siblings), 3) ~/.claude/skills (install.sh copy target). Fixes the plugin-cache 'skills not found' case with zero manual setup, while keeping the $CBH_SKILLS_DIR escape hatch proposed in #44. .claude-plugin/{marketplace,plugin}.json: refresh stale '71-skill / 48 hunt-*' -> '82-skill / 57 hunt-*' (+ APK/iOS); no schema changes (lastUpdated is not a Claude Code marketplace field, so it is intentionally not added). Co-authored-by: Sachin Sharma <sachin.lucideus@gmail.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 78d2de0 commit 4b6c6a5

3 files changed

Lines changed: 29 additions & 5 deletions

File tree

.claude-plugin/marketplace.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
{
1313
"name": "claude-bughunter",
1414
"source": "./",
15-
"description": "71-skill bug-hunting & external red-team bundle — 48 hunt-* web/vuln-class + framework skills, enterprise platform attack chains (M365/Entra, Okta, SharePoint, vCenter, SSL-VPN, APK), recon/OSINT, reporting & validation gates, Burp MCP integration. Skills auto-load by topic; 15 slash commands.",
15+
"description": "82-skill bug-hunting & external red-team bundle — 57 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.",
1616
"version": "2.1.0",
1717
"author": {
1818
"name": "Sachin Sharma",

.claude-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "claude-bughunter",
3-
"description": "71-skill bug-hunting & external red-team bundle for Claude Code — 48 hunt-* web/vuln-class + framework skills, enterprise platform attack chains (M365/Entra, Okta, SharePoint, vCenter, SSL-VPN, APK), recon/OSINT, reporting & validation gates, and Burp MCP integration. Skills auto-load by topic; 15 slash commands included.",
3+
"description": "82-skill bug-hunting & external red-team bundle for Claude Code — 57 hunt-* web/vuln-class + framework skills, enterprise platform attack chains (M365/Entra, Okta, SharePoint, vCenter, SSL-VPN, APK/iOS), recon/OSINT, reporting & validation gates, and Burp MCP integration. Skills auto-load by topic; 15 slash commands included.",
44
"version": "2.1.0",
55
"author": {
66
"name": "Sachin Sharma",

engine/skill_map.py

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,37 @@
88
99
surface (endpoint / parameter) -> attack class -> which hunt-* skill -> first curl
1010
11-
Mappings are grounded in the skills actually installed (~/.claude/skills); anything not
12-
present is filtered out so we never point at a skill that isn't there.
11+
Mappings are grounded in the skills actually installed (auto-detected: the bundle's own
12+
skills/ for repo/plugin installs, or ~/.claude/skills for the copy installer, overridable
13+
via $CBH_SKILLS_DIR); anything not present is filtered out so we never point at a skill
14+
that isn't there.
1315
Active testing is curl-first; Burp MCP is optional (only where noted — OOB/blind/fuzzing).
1416
"""
1517
import os
1618

17-
SKILLS_DIR = os.path.expanduser("~/.claude/skills")
19+
20+
def _resolve_skills_dir():
21+
"""Locate the installed skills/ directory across every install method.
22+
23+
Resolution order:
24+
1. $CBH_SKILLS_DIR — explicit override (e.g. a non-standard plugin cache path).
25+
2. skills/ shipped next to the engine — works for both a repo checkout and a
26+
Claude Code plugin install (the whole bundle lives in the plugin cache, so
27+
engine/ and skills/ stay siblings there too).
28+
3. ~/.claude/skills — the target of the scripts/install.sh copy method.
29+
"""
30+
env = os.environ.get("CBH_SKILLS_DIR")
31+
if env:
32+
return os.path.expanduser(env)
33+
bundled = os.path.join(
34+
os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "skills"
35+
)
36+
if os.path.isdir(bundled):
37+
return bundled
38+
return os.path.expanduser("~/.claude/skills")
39+
40+
41+
SKILLS_DIR = _resolve_skills_dir()
1842

1943
# attack class -> hunt skill(s) in the bundle
2044
CLASS_SKILL = {

0 commit comments

Comments
 (0)