Skip to content

Latest commit

 

History

History
71 lines (60 loc) · 2.61 KB

File metadata and controls

71 lines (60 loc) · 2.61 KB

Architecture

Overview

Skillmo is a thin CLI wrapper over git submodule that makes it friendly to add, remove, and update AI agent skill repos in .claude/skills/.

Core Design

User CLI command → Commander parser → Command handler → git submodule operation

No custom package manager, no registry, no config file. .gitmodules is the manifest.

File Tree

skillmo/
├── CLAUDE.md              # AI working instructions
├── SPEC.md                # Product spec
├── ARCH.md                # This file
├── TASKS.md               # Task tracking
├── README.md              # Public docs
├── package.json           # npm config
├── tsconfig.json          # TypeScript config
├── .context/              # AI memory bank
│   ├── activeContext.md
│   ├── progress.md
│   ├── techContext.md
│   └── systemPatterns.md
├── .claude/               # Claude Code config
│   ├── settings.json
│   ├── hooks/
│   ├── commands/
│   └── skills/
├── .cursor/               # Cursor IDE config
│   └── rules/
├── src/
│   ├── cli.ts             # Entry point, Commander setup
│   ├── types.ts           # Shared types
│   ├── commands/
│   │   ├── init.ts        # Initialize submodules
│   │   ├── add.ts         # Add skill (submodule add)
│   │   ├── remove.ts      # Remove skill (deinit + rm + cleanup)
│   │   ├── update.ts      # Update skills (submodule update --remote)
│   │   └── status.ts      # Show skill status
│   └── git/
│       ├── submodule.ts   # All git submodule operations
│       └── resolve.ts     # GitHub shorthand → URL resolution
├── tests/
│   └── git/
│       ├── resolve.test.ts
│       └── submodule.test.ts
└── dist/                  # Build output (gitignored)

Key Modules

src/git/resolve.ts

Resolves GitHub shorthand (org/repo) to full SSH URL (git@github.com:org/repo.git). Also accepts full SSH and HTTPS URLs passthrough.

src/git/submodule.ts

Wraps all git submodule commands via child_process.exec. Handles:

  • add with destination path and optional --branch for ref pinning
  • deinit -f + git rm -f + .git/modules/ cleanup for removal
  • update --remote --merge for updates
  • update --init for initialization
  • status parsing into structured objects

src/commands/*

One file per CLI command. Each imports from git/submodule.ts and git/resolve.ts. Handles user output and error formatting.