# xaghy/ai-skills-manager architecture

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

- Interactive diagram: https://gitdiagram.com/xaghy/ai-skills-manager
- Repository: https://github.com/xaghy/ai-skills-manager

## Overview

AI Skills Manager is an Obsidian plugin for discovering and managing AI skills and related assets in their existing tool folders. The main workflow is: open the library, scan configured global and project locations, enrich results with vault metadata and usage, then organize or act on items in place. Separate branches cover GitHub discovery and installation/updates, memories and MCP visibility, integrity checks, and usage history. Some subsystem links are based on README documentation or indexed imports; unsampled implementation details are not inferred.

Main entry points: [`src/views/LibraryView.ts`](https://github.com/xaghy/ai-skills-manager/blob/main/src/views/LibraryView.ts) (Library View), [`src/rescan.ts`](https://github.com/xaghy/ai-skills-manager/blob/main/src/rescan.ts) (Rescan Coordinator), [`src/main.ts`](https://github.com/xaghy/ai-skills-manager/blob/main/src/main.ts) (Plugin Entry), [`src/discover.ts`](https://github.com/xaghy/ai-skills-manager/blob/main/src/discover.ts) (Repository Discovery)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Plugin and Library"]
  node_plugin["Plugin Entry<br/>[main.ts]"]
  node_library["Library View<br/>[LibraryView.ts]"]
  node_settings["Settings<br/>[settings.ts]"]
end

subgraph group_inventory["Scanning and Metadata"]
  node_scanner["Tool Scanners<br/>[scanners.ts]"]
  node_rescan["Rescan Coordinator<br/>[rescan.ts]"]
  node_memory["Agent Memories<br/>[memories.ts]"]
  node_mcp["MCP Servers<br/>[mcpScanners.ts]"]
  node_metadata[("Vault Metadata<br/>[store.ts]")]
end

subgraph group_actions["Item Operations"]
  node_toggle["Enable and Disable<br/>[itemToggle.ts]"]
  node_collections["Collections<br/>[collections.ts]"]
  node_integrity["Integrity Checks<br/>[integrity.ts]"]
end

subgraph group_github["GitHub Lifecycle"]
  node_discover["Repository Discovery<br/>[discover.ts]"]
  node_install["GitHub Installation"]
  node_git["Git Operations<br/>[git.ts]"]
  node_diff["Update Diffs<br/>[tabsDiff.ts]"]
  node_diff_lines["Diff Line Builder<br/>[buildDiffLines.ts]"]
  node_history["Saved Versions<br/>[history.ts]"]
end

subgraph group_insights["Insights"]
  node_usage["Usage Collection<br/>[claude-usage.ts]"]
  node_usage_history[("Usage History<br/>[usage-history.ts]")]
  node_dashboard["Usage Dashboard<br/>[dashboard.ts]"]
end

node_user(("Obsidian User"))
node_github_service{{"GitHub"}}

node_user -->|"opens plugin"| node_plugin
node_plugin -->|"opens view"| node_library
node_plugin -->|"registers settings"| node_settings
node_plugin -->|"schedules rescans"| node_rescan
node_library -->|"requests scan"| node_rescan
node_rescan -->|"scans tools"| node_scanner
node_rescan -->|"scans memories"| node_memory
node_rescan -->|"scans servers"| node_mcp
node_rescan -->|"updates metadata"| node_metadata
node_library -->|"organizes items"| node_metadata
node_library -->|"toggles items"| node_toggle
node_library -->|"organizes collections"| node_collections
node_library -->|"shows health issues"| node_integrity
node_library -->|"browses sources"| node_discover
node_discover -->|"fetches repo details"| node_github_service
node_discover -->|"clones repositories"| node_git
node_library -->|"starts installation"| node_install
node_install -->|"clones source"| node_git
node_install -->|"refreshes inventory"| node_rescan
node_library -->|"reviews updates"| node_diff
node_diff -->|"builds diff lines"| node_diff_lines
node_library -->|"opens saved versions"| node_history
node_usage -->|"records daily use"| node_usage_history
node_library -->|"shows usage"| node_dashboard
node_dashboard -.->|"reads history"| node_usage_history

click node_plugin "https://github.com/xaghy/ai-skills-manager/blob/main/src/main.ts"
click node_library "https://github.com/xaghy/ai-skills-manager/blob/main/src/views/LibraryView.ts"
click node_settings "https://github.com/xaghy/ai-skills-manager/blob/main/src/settings.ts"
click node_scanner "https://github.com/xaghy/ai-skills-manager/blob/main/src/scanners.ts"
click node_rescan "https://github.com/xaghy/ai-skills-manager/blob/main/src/rescan.ts"
click node_memory "https://github.com/xaghy/ai-skills-manager/blob/main/src/memories.ts"
click node_mcp "https://github.com/xaghy/ai-skills-manager/blob/main/src/mcpScanners.ts"
click node_metadata "https://github.com/xaghy/ai-skills-manager/blob/main/src/store.ts"
click node_toggle "https://github.com/xaghy/ai-skills-manager/blob/main/src/itemToggle.ts"
click node_collections "https://github.com/xaghy/ai-skills-manager/blob/main/src/collections.ts"
click node_integrity "https://github.com/xaghy/ai-skills-manager/blob/main/src/integrity.ts"
click node_discover "https://github.com/xaghy/ai-skills-manager/blob/main/src/discover.ts"
click node_install "https://github.com/xaghy/ai-skills-manager/blob/main/src/modals/InstallFromGitHubModal.ts"
click node_git "https://github.com/xaghy/ai-skills-manager/blob/main/src/git.ts"
click node_diff "https://github.com/xaghy/ai-skills-manager/blob/main/src/diff/tabsDiff.ts"
click node_diff_lines "https://github.com/xaghy/ai-skills-manager/blob/main/src/diff/buildDiffLines.ts"
click node_history "https://github.com/xaghy/ai-skills-manager/blob/main/src/history.ts"
click node_usage "https://github.com/xaghy/ai-skills-manager/blob/main/src/claude-usage.ts"
click node_usage_history "https://github.com/xaghy/ai-skills-manager/blob/main/src/usage-history.ts"
click node_dashboard "https://github.com/xaghy/ai-skills-manager/blob/main/src/dashboard.ts"

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_plugin,node_library,node_settings,node_user toneBlue
class node_scanner,node_rescan,node_memory,node_mcp,node_metadata toneAmber
class node_toggle,node_collections,node_integrity toneMint
class node_discover,node_install,node_git,node_diff,node_diff_lines,node_history toneRose
class node_usage,node_usage_history,node_dashboard,node_github_service toneIndigo
```

## Components

### Plugin and Library

- [Plugin Entry](https://github.com/xaghy/ai-skills-manager/blob/main/src/main.ts): `src/main.ts`
- [Library View](https://github.com/xaghy/ai-skills-manager/blob/main/src/views/LibraryView.ts): `src/views/LibraryView.ts`
- [Settings](https://github.com/xaghy/ai-skills-manager/blob/main/src/settings.ts): `src/settings.ts`

### Scanning and Metadata

- [Tool Scanners](https://github.com/xaghy/ai-skills-manager/blob/main/src/scanners.ts): `src/scanners.ts`
- [Rescan Coordinator](https://github.com/xaghy/ai-skills-manager/blob/main/src/rescan.ts): `src/rescan.ts`
- [Agent Memories](https://github.com/xaghy/ai-skills-manager/blob/main/src/memories.ts): `src/memories.ts`
- [MCP Servers](https://github.com/xaghy/ai-skills-manager/blob/main/src/mcpScanners.ts): `src/mcpScanners.ts`
- [Vault Metadata](https://github.com/xaghy/ai-skills-manager/blob/main/src/store.ts): `src/store.ts`

### Item Operations

- [Enable and Disable](https://github.com/xaghy/ai-skills-manager/blob/main/src/itemToggle.ts): `src/itemToggle.ts`
- [Collections](https://github.com/xaghy/ai-skills-manager/blob/main/src/collections.ts): `src/collections.ts`
- [Integrity Checks](https://github.com/xaghy/ai-skills-manager/blob/main/src/integrity.ts): `src/integrity.ts`

### GitHub Lifecycle

- [Repository Discovery](https://github.com/xaghy/ai-skills-manager/blob/main/src/discover.ts): `src/discover.ts`
- [GitHub Installation](https://github.com/xaghy/ai-skills-manager/blob/main/src/modals/InstallFromGitHubModal.ts): `src/modals/InstallFromGitHubModal.ts`
- [Git Operations](https://github.com/xaghy/ai-skills-manager/blob/main/src/git.ts): `src/git.ts`
- [Update Diffs](https://github.com/xaghy/ai-skills-manager/blob/main/src/diff/tabsDiff.ts): `src/diff/tabsDiff.ts`
- [Diff Line Builder](https://github.com/xaghy/ai-skills-manager/blob/main/src/diff/buildDiffLines.ts): `src/diff/buildDiffLines.ts`
- [Saved Versions](https://github.com/xaghy/ai-skills-manager/blob/main/src/history.ts): `src/history.ts`

### Insights

- [Usage Collection](https://github.com/xaghy/ai-skills-manager/blob/main/src/claude-usage.ts): `src/claude-usage.ts`
- [Usage History](https://github.com/xaghy/ai-skills-manager/blob/main/src/usage-history.ts): `src/usage-history.ts`
- [Usage Dashboard](https://github.com/xaghy/ai-skills-manager/blob/main/src/dashboard.ts): `src/dashboard.ts`

### Other components

- **Obsidian User**
- **GitHub**

## Connections

- Obsidian User → Plugin Entry: opens plugin (evidence: `README.md`)
- Plugin Entry → Library View: opens view (evidence: `src/main.ts`)
- Plugin Entry → Settings: registers settings (evidence: `src/main.ts`)
- Plugin Entry → Rescan Coordinator: schedules rescans (evidence: `src/main.ts`)
- Library View → Rescan Coordinator: requests scan (evidence: `src/views/LibraryView.ts`)
- Rescan Coordinator → Tool Scanners: scans tools (evidence: `src/rescan.ts`)
- Rescan Coordinator → Agent Memories: scans memories (evidence: `src/rescan.ts`)
- Rescan Coordinator → MCP Servers: scans servers (evidence: `src/rescan.ts`)
- Rescan Coordinator → Vault Metadata: updates metadata (evidence: `src/rescan.ts`)
- Library View → Vault Metadata: organizes items (evidence: `README.md`)
- Library View → Enable and Disable: toggles items (evidence: `README.md`)
- Library View → Collections: organizes collections (evidence: `src/views/LibraryView.ts`)
- Library View → Integrity Checks: shows health issues (evidence: `README.md`)
- Library View → Repository Discovery: browses sources (evidence: `src/views/LibraryView.ts`)
- Repository Discovery → GitHub: fetches repo details (evidence: `README.md`)
- Repository Discovery → Git Operations: clones repositories (evidence: `src/discover.ts`)
- Library View → GitHub Installation: starts installation (evidence: `README.md`)
- GitHub Installation → Git Operations: clones source (evidence: `src/modals/InstallFromGitHubModal.ts`)
- GitHub Installation → Rescan Coordinator: refreshes inventory (evidence: `src/modals/InstallFromGitHubModal.ts`)
- Library View → Update Diffs: reviews updates (evidence: `README.md`)
- Update Diffs → Diff Line Builder: builds diff lines (evidence: `src/diff/tabsDiff.ts`)
- Library View → Saved Versions: opens saved versions (evidence: `README.md`)
- Usage Collection → Usage History: records daily use (evidence: `src/claude-usage.ts`)
- Library View → Usage Dashboard: shows usage (evidence: `README.md`)
- Usage Dashboard → Usage History: reads history
