From afdocs
AI-Friendly Architecture Documentation Standard. Use when documenting system architecture, components, deployment topology, C4 diagrams, ADRs, or component registries.
How this skill is triggered — by the user, by Claude, or both
Slash command
/afdocs:afadsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Use this skill to document architecture for systems that span multiple repositories, infrastructure, and application components.
Use this skill to document architecture for systems that span multiple repositories, infrastructure, and application components.
docs/
index.md ← landing page linking to all docs
ecosystem.md ← standards, architecture hub, related repos
component.md ← this component's architecture
runbook.md ← operations index (links to AFOPS procedures)
adrs/ ← architecture decision records (optional)
diagrams/ ← C4 and other diagrams (optional)
docs/
00-orientation.md ← reading guide
01-context.md ← C4 L1 context diagram, trust boundaries
02-containers.md ← C4 L2 container diagram
03-components.md ← C4 L3 per-component summaries
04-conventions.md ← links to AFPS conventions
05-security.md ← links to AFSS controls
06-ops.md ← links to AFOPS procedures
components.yaml ← component registry
ecosystem.yaml ← ecosystem registry
Every docs/component.md MUST start with:
component_id: api-service # stable kebab-case identifier
component_name: API Service
owner: platform-team
repo: github.com/org/api-service
type: service # service | infra | library | job | helm-chart | terraform
deployed_as: helm
namespace: production
environments: [dev, staging, prod]
depends_on: [postgres, redis] # other component_ids
exposes: [http:8080]
consumes: [postgres://db:5432]
components:
- component_id: api-service
name: API Service
type: service
owner: platform-team
repo: https://github.com/org/api-service
doc_path: docs/component.md
depends_on: [postgres, redis]
ecosystem:
- component_id: api-service
repo_url: https://github.com/org/api-service
doc_path: docs/component.md
type: service
File: docs/adrs/NNNN-short-title.md
---
status: accepted # proposed | accepted | superseded | deprecated
date: 2026-01-15
deciders: [tech-lead, architect]
component_id: api-service
---
# ADR-NNNN: Decision Title
## Context
Why this decision was needed.
## Decision
What was decided.
## Consequences
Positive and negative outcomes.
## Alternatives considered
Other options that were evaluated.
## Links
Related ADRs, issues, or documents.
component_id for the component they operate oncomponent_id for the component they apply tocomponent_id for the component they protectcomponent_id for planned workhttps://github.com/securitymonster/afdocs/blob/main/AFADS.md
npx claudepluginhub securitymonster/afdocs --plugin afdocsDocuments system architecture with component diagrams, data flows, ADRs, deployment views, and templates. Analyzes patterns and maintains living docs for team communication.
Generates architecture documents using markdown templates with C4 diagram integration (context, container, component). Creates viewpoint docs, technical overviews, and executive summaries for stakeholders.
Generates architecture documentation using arc42 or C4 models with Mermaid diagrams for system context, containers, components, plus narrative on structure, dependencies, and flows.