# yanos0218/ai architecture

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

- Interactive diagram: https://gitdiagram.com/yanos0218/ai
- Repository: https://github.com/yanos0218/ai

## Overview

claude-config is a personal Claude Code and Claude.ai configuration repository: it creates reusable guidance, skills, agents, hooks, and settings, then validates and distributes approved assets. The main workflow is maintaining assets in `base/`, installing them to `~/.claude` for CLI/VS Code, or packaging skills for web upload. Distinct supporting capabilities include hook-based safety and format checks, PDF extraction, and an opt-in token-usage dashboard. Relationships for installation and surfaces follow README documentation; sampled hook and utility code supports the internal edges shown. Other unsampled wiring is omitted.

Main entry points: [`base/hooks/hooklib.py`](https://github.com/yanos0218/ai/blob/main/base/hooks/hooklib.py) (Hook common utilities), [`tools/install.sh`](https://github.com/yanos0218/ai/blob/main/tools/install.sh) (Local installer), [`base/skills`](https://github.com/yanos0218/ai/tree/main/base/skills) (Workflow skills), [`base/settings.example.json`](https://github.com/yanos0218/ai/blob/main/base/settings.example.json) (Hook configuration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_assets["Configuration assets"]
  node_guidance["Shared guidance<br/>[CLAUDE.md]"]
  node_skills["Workflow skills"]
  node_agents["Task agents"]
  node_settings["Settings and rules"]
  node_vscode["VS Code setup"]
end

subgraph group_controls["Hook safeguards"]
  node_hookconfig["Hook configuration"]
  node_hooklib["Hook common utilities<br/>[hooklib.py]"]
  node_formatcheck["Format checking<br/>[format_check.py]"]
  node_cramcheck["List-format rules<br/>[check-cram.py]"]
  node_verifierguard["Verifier guard<br/>[verifier_guard.py]"]
  node_bulklog["Bulk-read logging<br/>[bulk_read_log.py]"]
  node_configlog["Config-change logging"]
end

subgraph group_distribution["Distribution"]
  node_installer["Local installer<br/>[install.sh]"]
  node_bootstrap["Device bootstrap<br/>[bootstrap.sh]"]
  node_packer["Web skill packer<br/>[pack.sh]"]
end

subgraph group_utilities["User utilities"]
  node_pdfskill["PDF extraction<br/>[SKILL.md]"]
  node_pdfconverter["PDF converter<br/>[pdf2md.py]"]
  node_dashboard["Usage dashboard<br/>[SKILL.md]"]
  node_usagecollector["Usage collector<br/>[usage.py]"]
  node_usagescripts["Dashboard scripts"]
end

node_maintainer(("Config maintainer"))
node_localclaude(("Claude Code"))
node_webclaude(("Claude.ai surfaces"))
node_markitdown["MarkItDown"]

node_maintainer -->|"maintains"| node_guidance
node_maintainer -->|"maintains"| node_skills
node_maintainer -->|"maintains"| node_agents
node_maintainer -->|"maintains"| node_settings
node_hookconfig -->|"configures hooks"| node_hooklib
node_formatcheck -->|"loads rules"| node_cramcheck
node_verifierguard -->|"uses utilities"| node_hooklib
node_bulklog -->|"uses utilities"| node_hooklib
node_configlog -->|"uses utilities"| node_hooklib
node_maintainer -->|"starts setup"| node_bootstrap
node_bootstrap -->|"runs installer"| node_installer
node_maintainer -->|"requests install"| node_installer
node_installer -->|"copies configuration"| node_localclaude
node_maintainer -->|"requests packaging"| node_packer
node_packer -->|"uploads skill archive"| node_webclaude
node_localclaude -->|"loads installed skills"| node_skills
node_localclaude -->|"loads instructions"| node_guidance
node_localclaude -->|"runs configured hooks"| node_hookconfig
node_webclaude -->|"loads uploaded skills"| node_skills
node_pdfskill -->|"uses converter"| node_pdfconverter
node_pdfconverter -->|"converts PDF"| node_markitdown
node_dashboard -.->|"provides collection"| node_usagecollector
node_usagecollector -.->|"renders dashboard"| node_usagescripts

click node_guidance "https://github.com/yanos0218/ai/blob/main/base/claude-md/CLAUDE.md"
click node_skills "https://github.com/yanos0218/ai/tree/main/base/skills"
click node_agents "https://github.com/yanos0218/ai/tree/main/base/agents"
click node_settings "https://github.com/yanos0218/ai/blob/main/base/settings.example.json"
click node_vscode "https://github.com/yanos0218/ai/tree/main/base/vscode"
click node_hookconfig "https://github.com/yanos0218/ai/blob/main/base/settings.example.json"
click node_hooklib "https://github.com/yanos0218/ai/blob/main/base/hooks/hooklib.py"
click node_formatcheck "https://github.com/yanos0218/ai/blob/main/base/hooks/format_check.py"
click node_cramcheck "https://github.com/yanos0218/ai/blob/main/base/hooks/check-cram.py"
click node_verifierguard "https://github.com/yanos0218/ai/blob/main/base/hooks/verifier_guard.py"
click node_bulklog "https://github.com/yanos0218/ai/blob/main/base/hooks/bulk_read_log.py"
click node_configlog "https://github.com/yanos0218/ai/blob/main/base/hooks/config_changelog.py"
click node_installer "https://github.com/yanos0218/ai/blob/main/tools/install.sh"
click node_bootstrap "https://github.com/yanos0218/ai/blob/main/tools/bootstrap.sh"
click node_packer "https://github.com/yanos0218/ai/blob/main/tools/pack.sh"
click node_pdfskill "https://github.com/yanos0218/ai/blob/main/base/skills/pdf-extract/SKILL.md"
click node_pdfconverter "https://github.com/yanos0218/ai/blob/main/base/skills/pdf-extract/scripts/pdf2md.py"
click node_dashboard "https://github.com/yanos0218/ai/blob/main/base/skills/usage-dashboard/SKILL.md"
click node_usagecollector "https://github.com/yanos0218/ai/blob/main/base/skills/usage-dashboard/scripts/usage.py"
click node_usagescripts "https://github.com/yanos0218/ai/tree/main/base/skills/usage-dashboard/scripts"

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_guidance,node_skills,node_agents,node_settings,node_vscode toneBlue
class node_hookconfig,node_hooklib,node_formatcheck,node_cramcheck,node_verifierguard,node_bulklog,node_configlog toneAmber
class node_installer,node_bootstrap,node_packer toneMint
class node_pdfskill,node_pdfconverter,node_dashboard,node_usagecollector,node_usagescripts toneRose
class node_maintainer,node_localclaude,node_webclaude,node_markitdown toneIndigo
```

## Components

### Configuration assets

- [Shared guidance](https://github.com/yanos0218/ai/blob/main/base/claude-md/CLAUDE.md): `base/claude-md/CLAUDE.md`
- [Workflow skills](https://github.com/yanos0218/ai/tree/main/base/skills): `base/skills`
- [Task agents](https://github.com/yanos0218/ai/tree/main/base/agents): `base/agents`
- [Settings and rules](https://github.com/yanos0218/ai/blob/main/base/settings.example.json): `base/settings.example.json`
- [VS Code setup](https://github.com/yanos0218/ai/tree/main/base/vscode): `base/vscode`

### Hook safeguards

- [Hook configuration](https://github.com/yanos0218/ai/blob/main/base/settings.example.json): `base/settings.example.json`
- [Hook common utilities](https://github.com/yanos0218/ai/blob/main/base/hooks/hooklib.py): `base/hooks/hooklib.py`
- [Format checking](https://github.com/yanos0218/ai/blob/main/base/hooks/format_check.py): `base/hooks/format_check.py`
- [List-format rules](https://github.com/yanos0218/ai/blob/main/base/hooks/check-cram.py): `base/hooks/check-cram.py`
- [Verifier guard](https://github.com/yanos0218/ai/blob/main/base/hooks/verifier_guard.py): `base/hooks/verifier_guard.py`
- [Bulk-read logging](https://github.com/yanos0218/ai/blob/main/base/hooks/bulk_read_log.py): `base/hooks/bulk_read_log.py`
- [Config-change logging](https://github.com/yanos0218/ai/blob/main/base/hooks/config_changelog.py): `base/hooks/config_changelog.py`

### Distribution

- [Local installer](https://github.com/yanos0218/ai/blob/main/tools/install.sh): `tools/install.sh`
- [Device bootstrap](https://github.com/yanos0218/ai/blob/main/tools/bootstrap.sh): `tools/bootstrap.sh`
- [Web skill packer](https://github.com/yanos0218/ai/blob/main/tools/pack.sh): `tools/pack.sh`

### User utilities

- [PDF extraction](https://github.com/yanos0218/ai/blob/main/base/skills/pdf-extract/SKILL.md): `base/skills/pdf-extract/SKILL.md`
- [PDF converter](https://github.com/yanos0218/ai/blob/main/base/skills/pdf-extract/scripts/pdf2md.py): `base/skills/pdf-extract/scripts/pdf2md.py`
- [Usage dashboard](https://github.com/yanos0218/ai/blob/main/base/skills/usage-dashboard/SKILL.md): `base/skills/usage-dashboard/SKILL.md`
- [Usage collector](https://github.com/yanos0218/ai/blob/main/base/skills/usage-dashboard/scripts/usage.py): `base/skills/usage-dashboard/scripts/usage.py`
- [Dashboard scripts](https://github.com/yanos0218/ai/tree/main/base/skills/usage-dashboard/scripts): `base/skills/usage-dashboard/scripts`

### Other components

- **Config maintainer**
- **Claude Code**
- **Claude.ai surfaces**
- **MarkItDown**

## Connections

- Config maintainer → Shared guidance: maintains (evidence: `README.md`)
- Config maintainer → Workflow skills: maintains (evidence: `README.md`)
- Config maintainer → Task agents: maintains (evidence: `README.md`)
- Config maintainer → Settings and rules: maintains (evidence: `README.md`)
- Hook configuration → Hook common utilities: configures hooks (evidence: `README.md`)
- Format checking → List-format rules: loads rules (evidence: `base/hooks/format_check.py`)
- Verifier guard → Hook common utilities: uses utilities (evidence: `base/hooks/verifier_guard.py`)
- Bulk-read logging → Hook common utilities: uses utilities (evidence: `base/hooks/bulk_read_log.py`)
- Config-change logging → Hook common utilities: uses utilities (evidence: `base/hooks/config_changelog.py`)
- Config maintainer → Device bootstrap: starts setup (evidence: `README.md`)
- Device bootstrap → Local installer: runs installer (evidence: `README.md`)
- Config maintainer → Local installer: requests install (evidence: `README.md`)
- Local installer → Claude Code: copies configuration (evidence: `README.md`)
- Config maintainer → Web skill packer: requests packaging (evidence: `README.md`)
- Web skill packer → Claude.ai surfaces: uploads skill archive (evidence: `README.md`)
- Claude Code → Workflow skills: loads installed skills (evidence: `README.md`)
- Claude Code → Shared guidance: loads instructions (evidence: `README.md`)
- Claude Code → Hook configuration: runs configured hooks (evidence: `README.md`)
- Claude.ai surfaces → Workflow skills: loads uploaded skills (evidence: `README.md`)
- PDF extraction → PDF converter: uses converter (evidence: `README.md`)
- PDF converter → MarkItDown: converts PDF (evidence: `base/skills/pdf-extract/scripts/pdf2md.py`)
- Usage dashboard → Usage collector: provides collection
- Usage collector → Dashboard scripts: renders dashboard
