refactor: standardize vulnerability skills format

This commit is contained in:
0xallam
2026-01-20 12:38:04 -08:00
committed by Ahmed Allam
parent 91feb3e01c
commit af2c830f70
28 changed files with 2904 additions and 2275 deletions

View File

@@ -1,7 +1,10 @@
import re
from strix.utils.resource_paths import get_strix_resource_path
_EXCLUDED_CATEGORIES = {"scan_modes", "coordination"}
_FRONTMATTER_PATTERN = re.compile(r"^---\s*\n.*?\n---\s*\n", re.DOTALL)
def get_available_skills() -> dict[str, list[str]]:
@@ -127,7 +130,9 @@ def load_skills(skill_names: list[str]) -> dict[str, str]:
if skill_path and (skills_dir / skill_path).exists():
full_path = skills_dir / skill_path
var_name = skill_name.split("/")[-1]
skill_content[var_name] = full_path.read_text()
content = full_path.read_text()
content = _FRONTMATTER_PATTERN.sub("", content).lstrip()
skill_content[var_name] = content
logger.info(f"Loaded skill: {skill_name} -> {var_name}")
else:
logger.warning(f"Skill not found: {skill_name}")