# mohssinehakimpro-maker/skills architecture

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

- Interactive diagram: https://gitdiagram.com/mohssinehakimpro-maker/skills
- Repository: https://github.com/mohssinehakimpro-maker/skills

## Overview

skills is a CLI and programmatic API for discovering, fetching, and managing reusable agent instructions across many coding agents. The main install path resolves a source, discovers skills, selects target agents and skills, then writes them into agent-compatible locations while maintaining lock state. Other documented workflows include find, list, use, update, remove, init, and experimental sync/install. Several command implementations are unsampled; their nodes are retained from the README, but speculative internal links are omitted.

Main entry points: [`src/add.ts`](https://github.com/mohssinehakimpro-maker/skills/blob/main/src/add.ts) (Add skills), [`src/index.ts`](https://github.com/mohssinehakimpro-maker/skills/blob/main/src/index.ts) (Public API), [`src/agents.ts`](https://github.com/mohssinehakimpro-maker/skills/blob/main/src/agents.ts) (Agent definitions), [`src/installer.ts`](https://github.com/mohssinehakimpro-maker/skills/blob/main/src/installer.ts) (Install skills)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry points"]
  node_cli["CLI commands<br/>[cli.ts]"]
  node_api["Public API<br/>[index.ts]"]
  node_api_config["API configuration<br/>[config.ts]"]
end

subgraph group_source["Source discovery"]
  node_find["Find skills<br/>[find.ts]"]
  node_source_parse["Parse source<br/>[source-parser.ts]"]
  node_providers["Source providers<br/>[wellknown.ts]"]
  node_git["Git retrieval<br/>[git.ts]"]
end

subgraph group_management["Skill management"]
  node_add["Add skills<br/>[add.ts]"]
  node_skill_discovery["Discover skills<br/>[skills.ts]"]
  node_install["Install skills<br/>[installer.ts]"]
  node_list["List skills<br/>[list.ts]"]
  node_use["Use skill<br/>[use.ts]"]
  node_update["Update skills<br/>[update.ts]"]
  node_remove["Remove skills<br/>[remove.ts]"]
  node_sync["Dependency sync<br/>[sync.ts]"]
end

subgraph group_agents["Agent integration"]
  node_agent_registry["Agent definitions<br/>[agents.ts]"]
  node_agent_detect["Detect agents<br/>[detect-agent.ts]"]
end

subgraph group_shared["Shared services"]
  node_local_lock[("Project lockfile<br/>[local-lock.ts]")]
  node_skill_lock[("Skill lock state<br/>[skill-lock.ts]")]
  node_diagnostics["Diagnostics<br/>[diagnostics.ts]"]
  node_telemetry["Telemetry<br/>[telemetry.ts]"]
end

node_user(("Developer"))
node_telemetry_service["Skills telemetry"]

node_user -->|"runs commands"| node_cli
node_user -->|"calls API"| node_api
node_api -->|"resolves settings"| node_api_config
node_api -->|"installs via"| node_add
node_api -->|"lists via"| node_list
node_api -->|"removes via"| node_remove
node_api -->|"resolves sources"| node_source_parse
node_add -->|"parses source"| node_source_parse
node_add -->|"fetches from"| node_providers
node_add -->|"discovers skills"| node_skill_discovery
node_add -->|"installs selected"| node_install
node_add -->|"targets agents"| node_agent_registry
node_add -->|"updates lockfile"| node_local_lock
node_add -->|"reads selection"| node_skill_lock
node_add -->|"tracks install"| node_telemetry
node_source_parse -->|"checks commits"| node_git
node_providers -->|"provides skills"| node_skill_discovery
node_install -->|"uses agent paths"| node_agent_registry
node_install -->|"parses skill files"| node_skill_discovery
node_api_config -->|"validates agents"| node_agent_registry
node_agent_detect -->|"detects supported agents"| node_agent_registry
node_sync -->|"adds synced skills"| node_add
node_update -->|"reinstalls updates"| node_add
node_update -->|"reads lock state"| node_skill_lock
node_remove -->|"updates lockfile"| node_local_lock
node_remove -->|"updates selection"| node_skill_lock
node_telemetry -.->|"sends events"| node_telemetry_service

click node_cli "https://github.com/mohssinehakimpro-maker/skills/blob/main/src/cli.ts"
click node_api "https://github.com/mohssinehakimpro-maker/skills/blob/main/src/index.ts"
click node_api_config "https://github.com/mohssinehakimpro-maker/skills/blob/main/src/api/config.ts"
click node_add "https://github.com/mohssinehakimpro-maker/skills/blob/main/src/add.ts"
click node_find "https://github.com/mohssinehakimpro-maker/skills/blob/main/src/find.ts"
click node_source_parse "https://github.com/mohssinehakimpro-maker/skills/blob/main/src/source-parser.ts"
click node_providers "https://github.com/mohssinehakimpro-maker/skills/blob/main/src/providers/wellknown.ts"
click node_git "https://github.com/mohssinehakimpro-maker/skills/blob/main/src/git.ts"
click node_skill_discovery "https://github.com/mohssinehakimpro-maker/skills/blob/main/src/skills.ts"
click node_install "https://github.com/mohssinehakimpro-maker/skills/blob/main/src/installer.ts"
click node_list "https://github.com/mohssinehakimpro-maker/skills/blob/main/src/list.ts"
click node_use "https://github.com/mohssinehakimpro-maker/skills/blob/main/src/use.ts"
click node_update "https://github.com/mohssinehakimpro-maker/skills/blob/main/src/update.ts"
click node_remove "https://github.com/mohssinehakimpro-maker/skills/blob/main/src/remove.ts"
click node_sync "https://github.com/mohssinehakimpro-maker/skills/blob/main/src/sync.ts"
click node_agent_registry "https://github.com/mohssinehakimpro-maker/skills/blob/main/src/agents.ts"
click node_agent_detect "https://github.com/mohssinehakimpro-maker/skills/blob/main/src/detect-agent.ts"
click node_local_lock "https://github.com/mohssinehakimpro-maker/skills/blob/main/src/local-lock.ts"
click node_skill_lock "https://github.com/mohssinehakimpro-maker/skills/blob/main/src/skill-lock.ts"
click node_diagnostics "https://github.com/mohssinehakimpro-maker/skills/blob/main/src/diagnostics.ts"
click node_telemetry "https://github.com/mohssinehakimpro-maker/skills/blob/main/src/telemetry.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_cli,node_api,node_api_config toneBlue
class node_find,node_source_parse,node_providers,node_git toneAmber
class node_add,node_skill_discovery,node_install,node_list,node_use,node_update,node_remove,node_sync toneMint
class node_agent_registry,node_agent_detect toneRose
class node_local_lock,node_skill_lock,node_diagnostics,node_telemetry,node_user,node_telemetry_service toneIndigo
```

## Components

### Entry points

- [CLI commands](https://github.com/mohssinehakimpro-maker/skills/blob/main/src/cli.ts): `src/cli.ts`
- [Public API](https://github.com/mohssinehakimpro-maker/skills/blob/main/src/index.ts): `src/index.ts`
- [API configuration](https://github.com/mohssinehakimpro-maker/skills/blob/main/src/api/config.ts): `src/api/config.ts`

### Source discovery

- [Find skills](https://github.com/mohssinehakimpro-maker/skills/blob/main/src/find.ts): `src/find.ts`
- [Parse source](https://github.com/mohssinehakimpro-maker/skills/blob/main/src/source-parser.ts): `src/source-parser.ts`
- [Source providers](https://github.com/mohssinehakimpro-maker/skills/blob/main/src/providers/wellknown.ts): `src/providers/wellknown.ts`
- [Git retrieval](https://github.com/mohssinehakimpro-maker/skills/blob/main/src/git.ts): `src/git.ts`

### Skill management

- [Add skills](https://github.com/mohssinehakimpro-maker/skills/blob/main/src/add.ts): `src/add.ts`
- [Discover skills](https://github.com/mohssinehakimpro-maker/skills/blob/main/src/skills.ts): `src/skills.ts`
- [Install skills](https://github.com/mohssinehakimpro-maker/skills/blob/main/src/installer.ts): `src/installer.ts`
- [List skills](https://github.com/mohssinehakimpro-maker/skills/blob/main/src/list.ts): `src/list.ts`
- [Use skill](https://github.com/mohssinehakimpro-maker/skills/blob/main/src/use.ts): `src/use.ts`
- [Update skills](https://github.com/mohssinehakimpro-maker/skills/blob/main/src/update.ts): `src/update.ts`
- [Remove skills](https://github.com/mohssinehakimpro-maker/skills/blob/main/src/remove.ts): `src/remove.ts`
- [Dependency sync](https://github.com/mohssinehakimpro-maker/skills/blob/main/src/sync.ts): `src/sync.ts`

### Agent integration

- [Agent definitions](https://github.com/mohssinehakimpro-maker/skills/blob/main/src/agents.ts): `src/agents.ts`
- [Detect agents](https://github.com/mohssinehakimpro-maker/skills/blob/main/src/detect-agent.ts): `src/detect-agent.ts`

### Shared services

- [Project lockfile](https://github.com/mohssinehakimpro-maker/skills/blob/main/src/local-lock.ts): `src/local-lock.ts`
- [Skill lock state](https://github.com/mohssinehakimpro-maker/skills/blob/main/src/skill-lock.ts): `src/skill-lock.ts`
- [Diagnostics](https://github.com/mohssinehakimpro-maker/skills/blob/main/src/diagnostics.ts): `src/diagnostics.ts`
- [Telemetry](https://github.com/mohssinehakimpro-maker/skills/blob/main/src/telemetry.ts): `src/telemetry.ts`

### Other components

- **Developer**
- **Skills telemetry**

## Connections

- Developer → CLI commands: runs commands
- Developer → Public API: calls API
- Public API → API configuration: resolves settings (evidence: `src/api/config.ts`)
- Public API → Add skills: installs via
- Public API → List skills: lists via
- Public API → Remove skills: removes via
- Public API → Parse source: resolves sources
- Add skills → Parse source: parses source (evidence: `src/add.ts`)
- Add skills → Source providers: fetches from (evidence: `src/add.ts`)
- Add skills → Discover skills: discovers skills (evidence: `src/add.ts`)
- Add skills → Install skills: installs selected (evidence: `src/add.ts`)
- Add skills → Agent definitions: targets agents (evidence: `src/add.ts`)
- Add skills → Project lockfile: updates lockfile (evidence: `src/add.ts`)
- Add skills → Skill lock state: reads selection (evidence: `src/add.ts`)
- Add skills → Telemetry: tracks install (evidence: `src/add.ts`)
- Parse source → Git retrieval: checks commits (evidence: `src/source-parser.ts`)
- Source providers → Discover skills: provides skills (evidence: `src/providers/wellknown.ts`)
- Install skills → Agent definitions: uses agent paths (evidence: `src/installer.ts`)
- Install skills → Discover skills: parses skill files (evidence: `src/installer.ts`)
- API configuration → Agent definitions: validates agents (evidence: `src/api/config.ts`)
- Detect agents → Agent definitions: detects supported agents (evidence: `src/detect-agent.ts`)
- Dependency sync → Add skills: adds synced skills (evidence: `src/sync.ts`)
- Update skills → Add skills: reinstalls updates (evidence: `src/update.ts`)
- Update skills → Skill lock state: reads lock state (evidence: `src/update.ts`)
- Remove skills → Project lockfile: updates lockfile (evidence: `src/remove.ts`)
- Remove skills → Skill lock state: updates selection (evidence: `src/remove.ts`)
- Telemetry → Skills telemetry: sends events
