Skip to content

alexgreensh/repo-forensics / skills/forensify

forensify

Flagged

Cross-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).

references/architecture.md

View on GitHub
# Forensify Architecture Reference

Detailed invariants, design rationale, and implementation notes.
SKILL.md is the primary entry point; this file provides depth.

## Directory map

```
skills/forensify/
├── SKILL.md                        # Skill manifest, invocation contract
├── README.md                       # (this file)
├── config/
│   ├── ecosystem_roots.json        # Canonical agent-stack root paths per ecosystem (stdlib-parseable)
│   ├── ecosystem_roots.md          # Rationale, provenance, and schema invariants
│   └── scanner_safety.json         # Per-scanner safety audit (lands in Session 3)
├── domains/
│   ├── skills.json                 # Domain 1 — Skills surface filters
│   ├── mcp.json                    # Domain 2 — MCP surface filters
│   ├── hooks.json                  # Domain 3 — Hooks & auto-execution
│   ├── plugins.json                # Domain 4 — Plugins & marketplace trust chain
│   ├── commands.json               # Domain 5 — Commands, agents, memory, config
│   └── credentials.json            # Domain 6 — Credentials & permissions
├── orchestrator/
│   ├── scanner_driver.py           # scan → parse → dedupe → cap
│   ├── analysis_dispatcher.py      # inventory → spawn → poll domain sub-agents
│   └── synthesis_presenter.py      # synthesize → ground → render briefing
├── prompts/
│   ├── domain_skills.txt           # Sub-agent prompt template per domain
│   ├── domain_mcp.txt
│   ├── domain_hooks.txt
│   ├── domain_plugins.txt
│   ├── domain_commands.txt
│   ├── domain_credentials.txt
│   └── synthesis.txt               # Synthesis agent prompt template
├── scripts/
│   └── build_inventory.py          # Cross-agent inventory layer (zero-LLM)
└── tests/
    ├── test_forensify_inventory.py
    ├── test_ecosystem_detection.py
    ├── test_credentials_metadata.py
    └── fixtures/
        ├── claude_code_stack/      # shaped fixture
        ├── codex_stack/
        ├── openclaw_stack/
        ├── nanoclaw_stack/
        └── multi_ecosystem/        # all four side by side
```

## Plan reference

Full architecture in `plans/forensify.md` (955 lines, reviewed twice). Cross-agent scope correction applied per `OUTPUTS/forensify-handoff-2026-04-06/SCOPE_CORRECTION.md` before any code shipped.

## Key invariants

- **Zero external dependencies.** Config files are JSON, parsed by `json` (stdlib). No PyYAML, no tomllib version constraint, no pip install. Preserves repo-forensics' trust promise.
- **Read-only at runtime.** macOS Seatbelt sandbox profile for sub-agents. No writes outside the coord folder.
- **Credentials are structured metadata.** Never read values. `auth_mode`, `file_mode_octal`, `staleness_days`, `known_cross_tool_contention` — all derived from `stat()` and JSON shape inspection.
- **NFKC + bidi-override rejection** on every string that enters the inventory output.
- **Cross-ecosystem IOCs are deterministic.** No LLM guessing — curated rule set matches against known upstream bug reports (e.g., openai/codex#54506).
- **Persistent coord folder** at `~/.cache/forensify/runs/<hash>-<ts>/` with 0o700 perms, retention policy, lock file at `~/.cache/repo-forensics/locks/` (outside coord folder per architecture-strategist finding).

## How this lives next to repo-forensics

`forensify` reuses repo-forensics scanners as parse primitives. It does not duplicate detection logic. The domain sub-agents call scanner outputs as input facts, then reason over them with hostile-data posture.
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: 472kUpdated Claude CodeCodexVerifiedInstall
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: 472kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 194kUpdated Claude CodeCodexVerifiedInstall