# slowmist/slowmist-agent-security architecture

> Architecture diagram of the GitHub repository slowmist/slowmist-agent-security, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-08-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/slowmist/slowmist-agent-security
- Repository: https://github.com/slowmist/slowmist-agent-security

## Overview

#### Purpose and Operating Model
This is a documentation-driven security-review skill for LLM agents, not an executable application. It guides agents handling untrusted installation requests, repositories, URLs/documents, blockchain addresses, products/services, and social recommendations. The governing entry point is `SKILL.md`; package/distribution metadata is in `_meta.json`.

#### Entry and Review Routing
An agent selects a review playbook based on the incoming artifact:
- Skill or MCP installation: `reviews/skill-mcp.md`
- Source repository: `reviews/repository.md`
- URL or document: `reviews/url-document.md`
- Blockchain address: `reviews/onchain.md`
- Product or service: `reviews/product-service.md`
- Tool recommendation shared in messages: `reviews/message-share.md`

These guides form the primary control-flow layer: classify request, collect evidence, assess risk, and produce a bounded recommendation.

#### Threat-Pattern Knowledge Base
Reusable detection criteria are separated from workflow-specific guides:
- Code and agent-danger indicators: `patterns/red-flags.md`
- Manipulation and prompt-injection/social-engineering indicators: `patterns/social-engineering.md`
- Dependency, provenance, and delivery risks: `patterns/supply-chain.md`

Review guides should apply these shared patterns rather than inventing per-case criteria. This creates an important boundary between evidence gathering and risk classification.

#### Risk Decision Boundary
The framework standardizes outcomes into LOW, MEDIUM, HIGH, and REJECT. HIGH-risk cases—such as credentials, fund access, system modification, or unknown sources—require human approval; REJECT cases stop the requested action. This is the core safety gate: agents may analyze external content but should not treat it as trusted instructions or execute consequential actions without the required decision threshold.

#### Report Generation Contract
Each review category has a corresponding output template, creating a consistent handoff from analysis to user-facing assessment:
- `templates/report-skill.md`
- `templates/report-repo.md`
- `templates/report-url.md`
- `templates/report-onchain.md`
- `templates/report-product.md`

The expected flow is: route to review guide → evaluate against pattern library and trust context → assign risk/action → populate the matching report. Social-share reviews appear to use their guide’s own reporting structure rather than a dedicated template.

#### Runtime, Distribution, and External Dependencies
The intended runtime is an agent skill environment such as OpenClaw, with compatibility also described for Hermes Agent and similar LLM-agent systems. It is distributed as a Git repository or potentially via ClawHub, represented by `README.md` and `_meta.json`. On-chain assessment may integrate with the external MistTrack Skills service; this is optional and supplies AML/transaction evidence rather than replacing the framework’s final risk decision.

Main entry points: [`reviews/skill-mcp.md`](https://github.com/slowmist/slowmist-agent-security/blob/main/reviews/skill-mcp.md) (Skill / MCP Review), [`reviews/repository.md`](https://github.com/slowmist/slowmist-agent-security/blob/main/reviews/repository.md) (Repository Review), [`reviews/url-document.md`](https://github.com/slowmist/slowmist-agent-security/blob/main/reviews/url-document.md) (URL / Document Review), [`reviews/onchain.md`](https://github.com/slowmist/slowmist-agent-security/blob/main/reviews/onchain.md) (On-chain Review)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_core["Skill Control"]
  node_skill["Security Review Skill<br/>agent skill<br/>[SKILL.md]"]
  node_routing{{"Request Routing<br/>control flow"}}
  node_risk_gate{{"Risk Decision Gate<br/>safety policy"}}
end

subgraph group_playbooks["Review Playbooks"]
  node_skill_mcp["Skill / MCP Review<br/>review playbook<br/>[skill-mcp.md]"]
  node_repository["Repository Review<br/>review playbook<br/>[repository.md]"]
  node_url_document["URL / Document Review<br/>review playbook<br/>[url-document.md]"]
  node_onchain["On-chain Review<br/>review playbook<br/>[onchain.md]"]
  node_product_service["Product / Service Review<br/>review playbook<br/>[product-service.md]"]
  node_message_share["Message-share Review<br/>review playbook<br/>[message-share.md]"]
end

subgraph group_knowledge["Risk Knowledge"]
  node_red_flags["Code &amp; Agent Red Flags<br/>pattern library<br/>[red-flags.md]"]
  node_social_engineering["Social Engineering Patterns<br/>pattern library"]
  node_supply_chain["Supply-chain Patterns<br/>pattern library<br/>[supply-chain.md]"]
end

subgraph group_outputs["Assessment Outputs"]
  node_reports["Category Report Templates<br/>report contract"]
  node_report_skill["Skill Report<br/>template<br/>[report-skill.md]"]
  node_report_repo["Repository Report<br/>template<br/>[report-repo.md]"]
  node_report_url["URL Report<br/>template<br/>[report-url.md]"]
  node_report_onchain["On-chain Report<br/>template<br/>[report-onchain.md]"]
  node_report_product["Product Report<br/>template<br/>[report-product.md]"]
end

subgraph group_ecosystem["Distribution &amp; Integrations"]
  node_distribution["Distribution Metadata<br/>package metadata<br/>[_meta.json]"]
  node_misttrack[("MistTrack Skills<br/>external evidence service")]
end

node_skill -->|"governs"| node_routing
node_routing -->|"installation request"| node_skill_mcp
node_routing -->|"source repository"| node_repository
node_routing -->|"URL or document"| node_url_document
node_routing -->|"blockchain address"| node_onchain
node_routing -->|"product or service"| node_product_service
node_routing -->|"shared recommendation"| node_message_share
node_red_flags -.->|"detection criteria"| node_skill_mcp
node_red_flags -.->|"detection criteria"| node_repository
node_social_engineering -.->|"detection criteria"| node_url_document
node_social_engineering -.->|"detection criteria"| node_message_share
node_supply_chain -.->|"provenance criteria"| node_skill_mcp
node_supply_chain -.->|"dependency criteria"| node_repository
node_skill_mcp -->|"evidence and assessment"| node_risk_gate
node_repository -->|"evidence and assessment"| node_risk_gate
node_url_document -->|"evidence and assessment"| node_risk_gate
node_onchain -->|"evidence and assessment"| node_risk_gate
node_product_service -->|"evidence and assessment"| node_risk_gate
node_message_share -->|"evidence and assessment"| node_risk_gate
node_risk_gate -->|"approved assessment handoff"| node_reports
node_reports -->|"skill / MCP"| node_report_skill
node_reports -->|"repository"| node_report_repo
node_reports -->|"URL / document"| node_report_url
node_reports -->|"on-chain"| node_report_onchain
node_reports -->|"product / service"| node_report_product
node_misttrack -.->|"optional AML evidence"| node_onchain
node_distribution -.->|"packages and describes"| node_skill

click node_skill "https://github.com/slowmist/slowmist-agent-security/blob/main/SKILL.md"
click node_skill_mcp "https://github.com/slowmist/slowmist-agent-security/blob/main/reviews/skill-mcp.md"
click node_repository "https://github.com/slowmist/slowmist-agent-security/blob/main/reviews/repository.md"
click node_url_document "https://github.com/slowmist/slowmist-agent-security/blob/main/reviews/url-document.md"
click node_onchain "https://github.com/slowmist/slowmist-agent-security/blob/main/reviews/onchain.md"
click node_product_service "https://github.com/slowmist/slowmist-agent-security/blob/main/reviews/product-service.md"
click node_message_share "https://github.com/slowmist/slowmist-agent-security/blob/main/reviews/message-share.md"
click node_red_flags "https://github.com/slowmist/slowmist-agent-security/blob/main/patterns/red-flags.md"
click node_social_engineering "https://github.com/slowmist/slowmist-agent-security/blob/main/patterns/social-engineering.md"
click node_supply_chain "https://github.com/slowmist/slowmist-agent-security/blob/main/patterns/supply-chain.md"
click node_report_skill "https://github.com/slowmist/slowmist-agent-security/blob/main/templates/report-skill.md"
click node_report_repo "https://github.com/slowmist/slowmist-agent-security/blob/main/templates/report-repo.md"
click node_report_url "https://github.com/slowmist/slowmist-agent-security/blob/main/templates/report-url.md"
click node_report_onchain "https://github.com/slowmist/slowmist-agent-security/blob/main/templates/report-onchain.md"
click node_report_product "https://github.com/slowmist/slowmist-agent-security/blob/main/templates/report-product.md"
click node_distribution "https://github.com/slowmist/slowmist-agent-security/blob/main/_meta.json"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_skill,node_routing,node_risk_gate toneBlue
class node_skill_mcp,node_repository,node_url_document,node_onchain,node_product_service,node_message_share toneAmber
class node_red_flags,node_social_engineering,node_supply_chain toneMint
class node_reports,node_report_skill,node_report_repo,node_report_url,node_report_onchain,node_report_product toneRose
class node_distribution,node_misttrack toneIndigo
```

## Components

### Skill Control

- [Security Review Skill](https://github.com/slowmist/slowmist-agent-security/blob/main/SKILL.md): agent skill · Governing instructions for untrusted-request reviews. · `SKILL.md`
- **Request Routing**: control flow · Classifies the incoming artifact and selects a playbook.
- **Risk Decision Gate**: safety policy · LOW, MEDIUM, HIGH, or REJECT determines the permitted action.

### Review Playbooks

- [Skill / MCP Review](https://github.com/slowmist/slowmist-agent-security/blob/main/reviews/skill-mcp.md): review playbook · `reviews/skill-mcp.md`
- [Repository Review](https://github.com/slowmist/slowmist-agent-security/blob/main/reviews/repository.md): review playbook · `reviews/repository.md`
- [URL / Document Review](https://github.com/slowmist/slowmist-agent-security/blob/main/reviews/url-document.md): review playbook · `reviews/url-document.md`
- [On-chain Review](https://github.com/slowmist/slowmist-agent-security/blob/main/reviews/onchain.md): review playbook · `reviews/onchain.md`
- [Product / Service Review](https://github.com/slowmist/slowmist-agent-security/blob/main/reviews/product-service.md): review playbook · `reviews/product-service.md`
- [Message-share Review](https://github.com/slowmist/slowmist-agent-security/blob/main/reviews/message-share.md): review playbook · Reviews tool recommendations received in messages. · `reviews/message-share.md`

### Risk Knowledge

- [Code & Agent Red Flags](https://github.com/slowmist/slowmist-agent-security/blob/main/patterns/red-flags.md): pattern library · `patterns/red-flags.md`
- [Social Engineering Patterns](https://github.com/slowmist/slowmist-agent-security/blob/main/patterns/social-engineering.md): pattern library · `patterns/social-engineering.md`
- [Supply-chain Patterns](https://github.com/slowmist/slowmist-agent-security/blob/main/patterns/supply-chain.md): pattern library · `patterns/supply-chain.md`

### Assessment Outputs

- **Category Report Templates**: report contract · Templates cover skill, repository, URL, on-chain, and product reviews.
- [Skill Report](https://github.com/slowmist/slowmist-agent-security/blob/main/templates/report-skill.md): template · `templates/report-skill.md`
- [Repository Report](https://github.com/slowmist/slowmist-agent-security/blob/main/templates/report-repo.md): template · `templates/report-repo.md`
- [URL Report](https://github.com/slowmist/slowmist-agent-security/blob/main/templates/report-url.md): template · `templates/report-url.md`
- [On-chain Report](https://github.com/slowmist/slowmist-agent-security/blob/main/templates/report-onchain.md): template · `templates/report-onchain.md`
- [Product Report](https://github.com/slowmist/slowmist-agent-security/blob/main/templates/report-product.md): template · `templates/report-product.md`

### Distribution & Integrations

- [Distribution Metadata](https://github.com/slowmist/slowmist-agent-security/blob/main/_meta.json): package metadata · Git/ClawHub distribution and agent-environment compatibility. · `_meta.json`
- **MistTrack Skills**: external evidence service · Optional AML and transaction evidence for on-chain reviews.

## Connections

- Security Review Skill → Request Routing: governs
- Request Routing → Skill / MCP Review: installation request
- Request Routing → Repository Review: source repository
- Request Routing → URL / Document Review: URL or document
- Request Routing → On-chain Review: blockchain address
- Request Routing → Product / Service Review: product or service
- Request Routing → Message-share Review: shared recommendation
- Code & Agent Red Flags → Skill / MCP Review: detection criteria
- Code & Agent Red Flags → Repository Review: detection criteria
- Social Engineering Patterns → URL / Document Review: detection criteria
- Social Engineering Patterns → Message-share Review: detection criteria
- Supply-chain Patterns → Skill / MCP Review: provenance criteria
- Supply-chain Patterns → Repository Review: dependency criteria
- Skill / MCP Review → Risk Decision Gate: evidence and assessment
- Repository Review → Risk Decision Gate: evidence and assessment
- URL / Document Review → Risk Decision Gate: evidence and assessment
- On-chain Review → Risk Decision Gate: evidence and assessment
- Product / Service Review → Risk Decision Gate: evidence and assessment
- Message-share Review → Risk Decision Gate: evidence and assessment
- Risk Decision Gate → Category Report Templates: approved assessment handoff
- Category Report Templates → Skill Report: skill / MCP
- Category Report Templates → Repository Report: repository
- Category Report Templates → URL Report: URL / document
- Category Report Templates → On-chain Report: on-chain
- Category Report Templates → Product Report: product / service
- MistTrack Skills → On-chain Review: optional AML evidence
- Distribution Metadata → Security Review Skill: packages and describes
