Skip to content

mgiovani/ai-arsenal / skills/docs-diagram

docs-diagram

Verified

Generate a Mermaid diagram (ER, architecture, deployment, or security) by reading the actual codebase and writing it to docs/. Use for requests like "draw an ER diagram of these tables", "show me the architecture", "diagram the deployment setup", "visualize the security data flow", or "generate a system diagram". Not for scaffolding a new docs directory structure (use docs-init), syncing existing prose docs with code changes (use docs-update), or recording a design decision's rationale (use docs-adr), this skill only produces diagrams generated from code.

references/detection-patterns.md

View on GitHub
# Detection Patterns

Codebase detection commands for each diagram type.

## ORM Detection (ER Diagrams)

### Python ORMs

```bash
# SQLAlchemy
find . -name "*models.py" -exec grep -l "Base\|Column\|relationship" {} \; | head -10

# Django
find . -name "models.py" -exec grep -l "models.Model" {} \; | head -10

# Tortoise ORM
find . -name "*.py" -exec grep -l "tortoise.models" {} \; | head -10
```

### JavaScript/TypeScript ORMs

```bash
# Prisma
find . -name "schema.prisma"

# TypeORM
find . -name "*.entity.ts" -o -name "*entity.js" | head -10

# Sequelize
find . -name "*.model.js" -o -name "*.model.ts" | head -10
```

## Architecture Detection

```bash
# Find services
find . -name "*service*.ts" -o -name "*service*.py" -o -name "*service*.js" | head -15

# Find API routes
find . -name "*router*.ts" -o -name "*routes*.py" -o -name "*controller*.js" | head -15

# Find configs
find . -name "*.config.js" -o -name "*.config.ts" -o -name "config.py" | head -10
```

## Deployment Detection

```bash
# Docker
find . -name "Dockerfile" -o -name "docker-compose.yml" -o -name "docker-compose.yaml"

# Kubernetes
find . -name "*.k8s.yaml" -o -name "*.k8s.yml" -o -name "*deployment.yaml"

# CI/CD
find . -name ".github/workflows/*.yml" -o -name ".gitlab-ci.yml" -o -name "Jenkinsfile"
```

## Security Detection

```bash
# Authentication patterns
grep -r "authenticate\|authorization\|jwt\|oauth" --include="*.py" --include="*.ts" . | head -15

# Security middleware
grep -r "middleware\|cors\|csrf\|helmet" --include="*.py" --include="*.ts" --include="*.js" . | head -15

# Encryption
grep -r "encrypt\|decrypt\|hash\|bcrypt\|argon" --include="*.py" --include="*.ts" . | head -10
```
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: 471kUpdated 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: 471kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 471kUpdated 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