alexgreensh/repo-forensics / plugins/repo-forensics/skills/forensify
forensify
FlaggedCross-agent self-inspection of your AI-agent stack. Audits skills, MCP servers, hooks, plugins, commands, credentials, and memory files across Claude Code, Codex, OpenClaw, and NanoClaw. Produces a structured inventory and narrative briefing with cross-ecosystem risk analysis. Use when the user asks to audit their own setup, check what they have installed, review their agent stack security posture, or understand cross-tool interactions. Use when a user has accumulated skills/plugins/MCP servers over time and wants visibility into their attack surface. Use after installing new skills or plugins. Do NOT use for vetting external code before install (that is repo-forensics). Do NOT use for incident response during active attacks. Do NOT use for fixing or patching vulnerabilities (forensify is read-only).
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 9.7 KB |
| config/ecosystem_roots.json | config | 16.5 KB |
| config/ecosystem_roots.md | markdown | 8.0 KB |
| config/seatbelt_subagent.sb | other | 1.1 KB |
| domains/commands.json | config | 457 B |
| domains/credentials.json | config | 590 B |
| domains/hooks.json | config | 482 B |
| domains/mcp.json | config | 374 B |
| domains/plugins.json | config | 366 B |
| domains/skills.json | config | 461 B |
| orchestrator/__init__.py | script | 88 B |
| orchestrator/analysis_dispatcher.py | script | 7.5 KB |
| orchestrator/contracts.py | script | 2.7 KB |
| orchestrator/scanner_driver.py | script | 5.9 KB |
| orchestrator/synthesis_presenter.py | script | 9.0 KB |
| prompts/domain_commands.txt | markdown | 1.6 KB |
| prompts/domain_credentials.txt | markdown | 2.0 KB |
| prompts/domain_hooks.txt | markdown | 1.6 KB |
| prompts/domain_mcp.txt | markdown | 1.5 KB |
| prompts/domain_plugins.txt | markdown | 1.3 KB |
| prompts/domain_skills.txt | markdown | 2.0 KB |
| prompts/synthesis.txt | markdown | 2.4 KB |
| references/architecture.md | markdown | 3.7 KB |
| scripts/build_inventory.py | script | 62.0 KB |
orchestrator/contracts.py
View on GitHub"""
DomainJob dataclass — typed contract between inventory layer and domain
sub-agents, per PLAN.md section 9.7.
This is the unit of work the AnalysisDispatcher sends to each domain
sub-agent. It bundles the filtered scanner output, inventory slice,
and metadata the sub-agent needs to reason about one risk domain for
one ecosystem.
"""
from __future__ import annotations
import json
from dataclasses import dataclass, field, fields, asdict
from typing import Any, Dict, List, Optional
@dataclass
class DomainJob:
"""Input contract for a domain sub-agent."""
# Identity
job_id: str # unique per run, e.g. "skills-claude_code-<run_hash>"
domain: str # one of: skills, mcp, hooks, plugins, commands, credentials
ecosystem: str # ecosystem key from ecosystem_roots.json
run_id: str # coord folder name: <hash>-<ts>
# Inventory slice — the subset of inventory output relevant to this domain
inventory_slice: List[Dict[str, Any]] = field(default_factory=list)
# Scanner findings — filtered to this domain's scanner set
scanner_findings: List[Dict[str, Any]] = field(default_factory=list)
# Metadata
scanner_names: List[str] = field(default_factory=list)
ecosystem_display_name: str = ""
total_items_in_slice: int = 0
walk_depth_cap: int = 8
# Cross-ecosystem context (injected by dispatcher for cross-domain awareness)
cross_ecosystem_agents_md: List[Dict[str, Any]] = field(default_factory=list)
cross_tool_iocs: List[Dict[str, Any]] = field(default_factory=list)
def to_json(self) -> str:
"""Serialize for sub-agent input via coord folder file."""
return json.dumps(asdict(self), indent=2)
@classmethod
def from_json(cls, data: str) -> "DomainJob":
"""Deserialize from coord folder file. Filters to known fields only
to prevent injection of unexpected values via poisoned coord files."""
d = json.loads(data)
valid = {f.name for f in fields(cls)}
return cls(**{k: v for k, v in d.items() if k in valid})
@dataclass
class DomainResult:
"""Output contract from a domain sub-agent."""
job_id: str
domain: str
ecosystem: str
findings: List[Dict[str, Any]] = field(default_factory=list)
risk_themes: List[str] = field(default_factory=list)
suppressed_scanner_ids: List[str] = field(default_factory=list)
narrative_section: str = ""
def to_json(self) -> str:
return json.dumps(asdict(self), indent=2)
@classmethod
def from_json(cls, data: str) -> "DomainResult":
d = json.loads(data)
valid = {f.name for f in fields(cls)}
return cls(**{k: v for k, v in d.items() if k in valid})
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |