# atsu-adjoto007/universal-skills-hub architecture

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

- Interactive diagram: https://gitdiagram.com/atsu-adjoto007/universal-skills-hub
- Repository: https://github.com/atsu-adjoto007/universal-skills-hub

## Overview

Universal Skills Hub is an offline desktop manager for Agent Skills. Its main workflow is to scan configured agent folders, import selected Skills into a local library for parsing, classification, security review, duplicate detection and versioning, then organize them into packs and plan/apply synchronization to agent destinations. The desktop renderer invokes a whitelisted main-process API, which delegates product operations to the hub. The graph preserves the README’s other major capabilities, including backups and adapters. Some core connections are supported by the SOURCE INDEX; unsampled implementation details are not inferred.

Main entry points: [`src/core/hub.js`](https://github.com/atsu-adjoto007/universal-skills-hub/blob/main/src/core/hub.js) (Hub coordinator), [`src/core/library.js`](https://github.com/atsu-adjoto007/universal-skills-hub/blob/main/src/core/library.js) (Skill library), [`src/main/api.js`](https://github.com/atsu-adjoto007/universal-skills-hub/blob/main/src/main/api.js) (Renderer API), [`src/core/fsutil.js`](https://github.com/atsu-adjoto007/universal-skills-hub/blob/main/src/core/fsutil.js) (Filesystem utilities)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop interface"]
  node_renderer["Desktop UI<br/>[app.js]"]
  node_main["Electron main<br/>[main.js]"]
  node_api["Renderer API<br/>[api.js]"]
end

subgraph group_orchestration["Hub orchestration"]
  node_hub["Hub coordinator<br/>[hub.js]"]
  node_cli["Command-line client<br/>[ush.js]"]
end

subgraph group_skills["Skill management"]
  node_detector["Source detection<br/>[detector.js]"]
  node_importer["Skill import<br/>[importer.js]"]
  node_parser["Skill parser<br/>[skill-parser.js]"]
  node_library["Skill library<br/>[library.js]"]
  node_classifier["Classification<br/>[classifier.js]"]
  node_security["Security review<br/>[security.js]"]
  node_duplicates["Duplicate analysis<br/>[duplicates.js]"]
  node_diff["Version comparison<br/>[diff.js]"]
end

subgraph group_delivery["Packs and delivery"]
  node_packs["Packs and selection<br/>[packs.js]"]
  node_sync["Synchronization<br/>[sync.js]"]
  node_adapters["Agent adapters<br/>[index.js]"]
  node_backup["Backup and restore<br/>[backup.js]"]
  node_archive["ZIP archives<br/>[archive.js]"]
end

subgraph group_persistence["Local persistence"]
  node_store[("Hub data store<br/>[store.js]")]
  node_filesystem["Filesystem utilities<br/>[fsutil.js]"]
  node_text["Text matching<br/>[text.js]"]
end

node_user(("Desktop user"))

node_user -->|"uses"| node_renderer
node_renderer -.->|"requests operations"| node_api
node_main -->|"registers API"| node_api
node_main -->|"initializes"| node_hub
node_api -->|"delegates operations"| node_hub
node_api -->|"reads and edits"| node_library
node_api -->|"manages packs"| node_packs
node_api -->|"plans and runs"| node_sync
node_api -->|"lists adapters"| node_adapters
node_cli -->|"uses"| node_hub
node_hub -->|"uses state"| node_store
node_hub -->|"scans sources"| node_detector
node_hub -->|"imports Skills"| node_importer
node_hub -->|"manages library"| node_library
node_hub -->|"proposes packs"| node_packs
node_hub -->|"checks duplicates"| node_duplicates
node_hub -->|"coordinates sync"| node_sync
node_hub -->|"loads adapters"| node_adapters
node_hub -->|"exports backups"| node_backup
node_hub -->|"uses utilities"| node_filesystem
node_hub -->|"matches text"| node_text
node_detector -->|"imports discoveries"| node_importer
node_detector -->|"parses folders"| node_parser
node_importer -->|"parses imports"| node_parser
node_importer -->|"reads ZIP imports"| node_archive
node_library -->|"parses Skills"| node_parser
node_library -->|"classifies Skills"| node_classifier
node_library -->|"scans content"| node_security
node_library -->|"checks matches"| node_duplicates
node_library -->|"compares versions"| node_diff
node_library -->|"copies files"| node_filesystem
node_classifier -->|"matches keywords"| node_text
node_duplicates -->|"compares shingles"| node_text
node_packs -->|"scores keywords"| node_text
node_sync -->|"installs Skills"| node_adapters
node_sync -->|"compares changes"| node_diff
node_sync -->|"backs up targets"| node_filesystem
node_backup -->|"creates archives"| node_archive
node_backup -->|"stores backup data"| node_filesystem
node_parser -->|"lists files"| node_filesystem
node_store -->|"persists data"| node_filesystem

click node_renderer "https://github.com/atsu-adjoto007/universal-skills-hub/blob/main/src/renderer/app.js"
click node_main "https://github.com/atsu-adjoto007/universal-skills-hub/blob/main/src/main/main.js"
click node_api "https://github.com/atsu-adjoto007/universal-skills-hub/blob/main/src/main/api.js"
click node_hub "https://github.com/atsu-adjoto007/universal-skills-hub/blob/main/src/core/hub.js"
click node_cli "https://github.com/atsu-adjoto007/universal-skills-hub/blob/main/src/cli/ush.js"
click node_detector "https://github.com/atsu-adjoto007/universal-skills-hub/blob/main/src/core/detector.js"
click node_importer "https://github.com/atsu-adjoto007/universal-skills-hub/blob/main/src/core/importer.js"
click node_parser "https://github.com/atsu-adjoto007/universal-skills-hub/blob/main/src/core/skill-parser.js"
click node_library "https://github.com/atsu-adjoto007/universal-skills-hub/blob/main/src/core/library.js"
click node_classifier "https://github.com/atsu-adjoto007/universal-skills-hub/blob/main/src/core/classifier.js"
click node_security "https://github.com/atsu-adjoto007/universal-skills-hub/blob/main/src/core/security.js"
click node_duplicates "https://github.com/atsu-adjoto007/universal-skills-hub/blob/main/src/core/duplicates.js"
click node_diff "https://github.com/atsu-adjoto007/universal-skills-hub/blob/main/src/core/diff.js"
click node_packs "https://github.com/atsu-adjoto007/universal-skills-hub/blob/main/src/core/packs.js"
click node_sync "https://github.com/atsu-adjoto007/universal-skills-hub/blob/main/src/core/sync.js"
click node_adapters "https://github.com/atsu-adjoto007/universal-skills-hub/blob/main/src/core/adapters/index.js"
click node_backup "https://github.com/atsu-adjoto007/universal-skills-hub/blob/main/src/core/backup.js"
click node_archive "https://github.com/atsu-adjoto007/universal-skills-hub/blob/main/src/core/archive.js"
click node_store "https://github.com/atsu-adjoto007/universal-skills-hub/blob/main/src/core/store.js"
click node_filesystem "https://github.com/atsu-adjoto007/universal-skills-hub/blob/main/src/core/fsutil.js"
click node_text "https://github.com/atsu-adjoto007/universal-skills-hub/blob/main/src/core/text.js"

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_renderer,node_main,node_api,node_user toneBlue
class node_hub,node_cli toneAmber
class node_detector,node_importer,node_parser,node_library,node_classifier,node_security,node_duplicates,node_diff toneMint
class node_packs,node_sync,node_adapters,node_backup,node_archive toneRose
class node_store,node_filesystem,node_text toneIndigo
```

## Components

### Desktop interface

- [Desktop UI](https://github.com/atsu-adjoto007/universal-skills-hub/blob/main/src/renderer/app.js): `src/renderer/app.js`
- [Electron main](https://github.com/atsu-adjoto007/universal-skills-hub/blob/main/src/main/main.js): `src/main/main.js`
- [Renderer API](https://github.com/atsu-adjoto007/universal-skills-hub/blob/main/src/main/api.js): `src/main/api.js`

### Hub orchestration

- [Hub coordinator](https://github.com/atsu-adjoto007/universal-skills-hub/blob/main/src/core/hub.js): `src/core/hub.js`
- [Command-line client](https://github.com/atsu-adjoto007/universal-skills-hub/blob/main/src/cli/ush.js): `src/cli/ush.js`

### Skill management

- [Source detection](https://github.com/atsu-adjoto007/universal-skills-hub/blob/main/src/core/detector.js): `src/core/detector.js`
- [Skill import](https://github.com/atsu-adjoto007/universal-skills-hub/blob/main/src/core/importer.js): `src/core/importer.js`
- [Skill parser](https://github.com/atsu-adjoto007/universal-skills-hub/blob/main/src/core/skill-parser.js): `src/core/skill-parser.js`
- [Skill library](https://github.com/atsu-adjoto007/universal-skills-hub/blob/main/src/core/library.js): `src/core/library.js`
- [Classification](https://github.com/atsu-adjoto007/universal-skills-hub/blob/main/src/core/classifier.js): `src/core/classifier.js`
- [Security review](https://github.com/atsu-adjoto007/universal-skills-hub/blob/main/src/core/security.js): `src/core/security.js`
- [Duplicate analysis](https://github.com/atsu-adjoto007/universal-skills-hub/blob/main/src/core/duplicates.js): `src/core/duplicates.js`
- [Version comparison](https://github.com/atsu-adjoto007/universal-skills-hub/blob/main/src/core/diff.js): `src/core/diff.js`

### Packs and delivery

- [Packs and selection](https://github.com/atsu-adjoto007/universal-skills-hub/blob/main/src/core/packs.js): `src/core/packs.js`
- [Synchronization](https://github.com/atsu-adjoto007/universal-skills-hub/blob/main/src/core/sync.js): `src/core/sync.js`
- [Agent adapters](https://github.com/atsu-adjoto007/universal-skills-hub/blob/main/src/core/adapters/index.js): `src/core/adapters/index.js`
- [Backup and restore](https://github.com/atsu-adjoto007/universal-skills-hub/blob/main/src/core/backup.js): `src/core/backup.js`
- [ZIP archives](https://github.com/atsu-adjoto007/universal-skills-hub/blob/main/src/core/archive.js): `src/core/archive.js`

### Local persistence

- [Hub data store](https://github.com/atsu-adjoto007/universal-skills-hub/blob/main/src/core/store.js): `src/core/store.js`
- [Filesystem utilities](https://github.com/atsu-adjoto007/universal-skills-hub/blob/main/src/core/fsutil.js): `src/core/fsutil.js`
- [Text matching](https://github.com/atsu-adjoto007/universal-skills-hub/blob/main/src/core/text.js): `src/core/text.js`

### Other components

- **Desktop user**

## Connections

- Desktop user → Desktop UI: uses (evidence: `README.md`)
- Desktop UI → Renderer API: requests operations
- Electron main → Renderer API: registers API (evidence: `src/main/main.js`)
- Electron main → Hub coordinator: initializes (evidence: `src/main/main.js`)
- Renderer API → Hub coordinator: delegates operations (evidence: `src/main/api.js`)
- Renderer API → Skill library: reads and edits (evidence: `src/main/api.js`)
- Renderer API → Packs and selection: manages packs (evidence: `src/main/api.js`)
- Renderer API → Synchronization: plans and runs (evidence: `src/main/api.js`)
- Renderer API → Agent adapters: lists adapters (evidence: `src/main/api.js`)
- Command-line client → Hub coordinator: uses (evidence: `src/cli/ush.js`)
- Hub coordinator → Hub data store: uses state (evidence: `src/core/hub.js`)
- Hub coordinator → Source detection: scans sources (evidence: `src/core/hub.js`)
- Hub coordinator → Skill import: imports Skills (evidence: `src/core/hub.js`)
- Hub coordinator → Skill library: manages library (evidence: `src/core/hub.js`)
- Hub coordinator → Packs and selection: proposes packs (evidence: `src/core/hub.js`)
- Hub coordinator → Duplicate analysis: checks duplicates (evidence: `src/core/hub.js`)
- Hub coordinator → Synchronization: coordinates sync (evidence: `src/core/hub.js`)
- Hub coordinator → Agent adapters: loads adapters (evidence: `src/core/hub.js`)
- Hub coordinator → Backup and restore: exports backups (evidence: `src/core/hub.js`)
- Hub coordinator → Filesystem utilities: uses utilities (evidence: `src/core/hub.js`)
- Hub coordinator → Text matching: matches text (evidence: `src/core/hub.js`)
- Source detection → Skill import: imports discoveries (evidence: `src/core/detector.js`)
- Source detection → Skill parser: parses folders (evidence: `src/core/detector.js`)
- Skill import → Skill parser: parses imports (evidence: `src/core/importer.js`)
- Skill import → ZIP archives: reads ZIP imports (evidence: `src/core/importer.js`)
- Skill library → Skill parser: parses Skills (evidence: `src/core/library.js`)
- Skill library → Classification: classifies Skills (evidence: `src/core/library.js`)
- Skill library → Security review: scans content (evidence: `src/core/library.js`)
- Skill library → Duplicate analysis: checks matches (evidence: `src/core/library.js`)
- Skill library → Version comparison: compares versions (evidence: `src/core/library.js`)
- Skill library → Filesystem utilities: copies files (evidence: `src/core/library.js`)
- Classification → Text matching: matches keywords (evidence: `src/core/classifier.js`)
- Duplicate analysis → Text matching: compares shingles (evidence: `src/core/duplicates.js`)
- Packs and selection → Text matching: scores keywords (evidence: `src/core/packs.js`)
- Synchronization → Agent adapters: installs Skills (evidence: `src/core/sync.js`)
- Synchronization → Version comparison: compares changes (evidence: `src/core/sync.js`)
- Synchronization → Filesystem utilities: backs up targets (evidence: `src/core/sync.js`)
- Backup and restore → ZIP archives: creates archives (evidence: `src/core/backup.js`)
- Backup and restore → Filesystem utilities: stores backup data (evidence: `src/core/backup.js`)
- Skill parser → Filesystem utilities: lists files (evidence: `src/core/skill-parser.js`)
- Hub data store → Filesystem utilities: persists data (evidence: `src/core/store.js`)
