How haydenull/skills-manager works
1. What this app is
- skills-manager is an Electron desktop app that manages local “skills” for two external agents: Claude Code and Codex.
- The core job is to install, update, debug-toggle, and remove skills from the user’s local filesystem and from the agents’ configured skills directories.
2. Top-level process split
- The repository is clearly divided into Electron’s three-part architecture:
- src/main: privileged backend/runtime process
- src/preload: typed IPC bridge
- src/renderer: React UI
- This boundary matters because the renderer handles user interaction only, while filesystem, network, and OS integration live in the main process.
3. Main-process domain layer
- src/main/skills-service.ts is the likely core domain service for skill management.
- It appears to own the business logic for:
- discovering skills from GitHub, GitLab, or local directories
- reading update metadata
- installing/removing skills into managed storage
- switching debug mode between managed storage and a user-selected local directory
- syncing entries into Claude Code / Codex skill locations
- This is the main architectural boundary where repository-independent skill logic lives.
4. Renderer UI structure
- The renderer is a single-page React app with route-based screens under src/renderer/src/routes.
- Main screens are:
- install.tsx for previewing and installing skills from a source
- settings.tsx for theme, GitLab tokens, update checks, and directory shortcuts
- index.tsx as the installed-skills view
- __root.tsx and routeTree.gen.ts indicate TanStack Router-style routing with generated route metadata.
5. Renderer-to-main data flow
- The renderer never directly touches the filesystem or external APIs.
- Instead, UI actions call typed query/helper modules such as:
- src/renderer/src/skills-queries.ts
- likely IPC-backed data access from the preload bridge
- That gives the architecture a clean flow: user action in React UI → IPC call → main-process service → filesystem/network result → UI state update.
6. Preload as the trust boundary
- src/preload/index.ts and its declarations in src/preload/index.d.ts provide the secure bridge between renderer and main.
- The existence of explicit typings suggests the app exposes a limited API surface rather than enabling arbitrary Node access in the UI.
- This is the key security boundary for a desktop app that manages local files and tokens.
7. Shared types and UI/domain consistency
- src/shared/skills-types.ts contains shared TypeScript contracts used by both sides.
- This likely includes the shape of a skill record, install/update metadata, source descriptors, and agent targets.
- Shared types keep renderer views and main-process operations aligned, which is important because the app’s data model crosses process boundaries.
8. External source and update model
- The README shows three source classes the architecture must support:
- GitHub repositories
- self-hosted GitLab repositories
- local directories
- Update detection differs by source:
- GitHub uses directory tree SHA comparison
- GitLab and local sources use sha256 file-hash-based tracking
- This implies the main service needs source-specific adapters and metadata normalization before the UI can present “updatable” status.
9. Filesystem integration and agent directories
- The app manages two external filesystem targets:
- Claude Code skills directory
- Codex skills directory
- Default locations are user-home based, but can be overridden via environment variables (CLAUDE_CONFIG_DIR, CODEX_HOME).
- The app also stores its own managed copy of skills in an application data directory, which acts as the authoritative local cache for installed skills and debug state.
10. GitLab token storage and authenticated access
- Settings include per-host GitLab Personal Access Tokens.
- The token is associated with a GitLab host, not globally, which implies the main process persists host-scoped credentials and injects them only when calling the matching GitLab API.
- This is a separate infrastructure concern from skill storage and affects source fetching only.
11. Update and distribution layer
- App self-update is part of the settings screen, so the main process likely integrates with Electron update or release mechanics.
- Build and packaging are handled by:
- electron-vite for development/build bundling
- electron-builder.yml for packaging/distribution
- GitHub Actions release workflow under .github/workflows/release.yml
- This makes the repo both an app and a distributable desktop product.
12. UI composition and styling
- The renderer uses React components plus local CSS assets:
- src/renderer/src/assets/base.css
- src/renderer/src/assets/main.css
- src/renderer/src/components/Versions.tsx
- The UI appears lightweight and route-driven rather than using a heavy global state framework.
- Styling and component structure are secondary to the app’s main concern: presenting skill inventory and actions.
13. Architecture diagram emphasis
- If drawing the system, the most important boxes are:
- React renderer screens
- preload IPC bridge
- main-process skill service
- managed app-data skill store
- external agent directories for Claude Code and Codex
- remote skill sources: GitHub/GitLab/local filesystem
- The primary arrows are:
- UI requests → IPC → skill service
- skill service ↔ remote source
- skill service ↔ managed store
- skill service → agent directories
- settings ↔ persisted app config/token store
14. Repo shape summary
- This is not a server-client app; it is a desktop orchestration tool with a thin UI and a centralized main-process domain service.
- The architecture is optimized for safe local automation around filesystem state, source fetching, and agent-specific integration rather than for network serving or background distributed compute.
Main entry points: skills-service.ts Skills service · skills-queries.ts Skills queries · __root.tsx Route root · index.tsx Installed view
Components 18
Main process
Privileged Electron backend and domain logic
- Main entry · Bootstraps the Electron app and wires IPC/service setup
src/main/index.ts - Skills service · Core skill management logic for discover, install, update, debug toggle, and sync
src/main/skills-service.ts
Preload bridge
Typed IPC boundary between renderer and main
- IPC bridge · Secure typed API exposed to the renderer
src/preload/index.ts - Bridge types · Type declarations for the preload-exposed surface
src/preload/index.d.ts
Renderer UI
React screens and client-side data flow
- Renderer app · Client-side UI bootstrap and route host
src/renderer/src/main.tsx - Route root · Top-level router composition
src/renderer/src/routes/__root.tsx - Installed view · Shows installed skills and their status
src/renderer/src/routes/index.tsx - Install screen · Previews and installs skills from a source
src/renderer/src/routes/install.tsx - Settings screen · Configures theme, tokens, update checks, and shortcuts
src/renderer/src/routes/settings.tsx - Skills queries · Renderer-side helpers for IPC-backed skill operations
src/renderer/src/skills-queries.ts - Versions UI · Small reusable version/status display component
src/renderer/src/components/Versions.tsx
Shared types
Contracts used across process boundaries
- Skill types · Cross-process TypeScript models for skills, sources, and updates
src/shared/skills-types.ts
External systems
Remote sources and local filesystem targets
- Skill sources · GitHub, GitLab, and local-directory discovery and metadata normalization
- Managed store · Authoritative local cache for installed skills and debug state
- Claude skills · External skills directory used by Claude Code
- Codex skills · External skills directory used by Codex
- Config store · Saved app settings including tokens, paths, and update preferences
Build and release
Bundling and packaging pipeline
- Build pipeline · Development bundling, desktop packaging, and release automation
electron.vite.config.ts
Connections 22
- Main entry → Skills service: initializes · Main process wires the skill domain service
- Skills service → Skill sources: fetches from · Discovers and normalizes skills from remote and local sources
- Skills service → Managed store: reads/writes · Maintains installed skill records and debug-local state
- Skills service → Claude skills: syncs to · Installs or removes skills in Claude Code's directory
- Skills service → Codex skills: syncs to · Installs or removes skills in Codex's directory
- Skills service → Config store: persists · Uses saved paths, tokens, and update preferences
- IPC bridge → Skills service: IPC calls · Renderer requests are forwarded through the trusted bridge
- IPC bridge → Bridge types: exposes · Typed surface definitions for renderer consumption
- Renderer app → Route root: mounts · Renderer bootstraps the routed UI
- Route root → Installed view: navigates · Installed-skills screen
- Route root → Install screen: navigates · Install workflow screen
- Route root → Settings screen: navigates · Settings and preferences screen
- Installed view → Skills queries: uses · Fetches installed skills and actions
- Install screen → Skills queries: uses · Queries previews and triggers installs
- Settings screen → Skills queries: uses · Reads and updates app settings
- Skills queries → IPC bridge: calls through · Renderer-side helper layer delegates to IPC
- Installed view → Versions UI: renders · Shows version or update status metadata
- Skills service → Skill types: conforms to · Domain objects align with shared contracts
- Skills queries → Skill types: conforms to · Client-side data helpers use the same contracts
- Bridge types → Skill types: mirrors · Bridge API is typed to match shared models
- Build pipeline → Main entry: bundles · Desktop build includes main-process code
- Build pipeline → Renderer app: bundles · Desktop build includes renderer assets