mirror of
https://github.com/rohitg00/skillkit.git
synced 2026-11-19 02:13:58 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a763348922 | ||
|
|
4782b6773b | ||
|
|
75001a1310 | ||
|
|
73f9c26cbe | ||
|
|
e56873c491 | ||
|
|
eaeb7ef221 | ||
|
|
acec136e81 | ||
|
|
70cb4f74ff |
@@ -41,5 +41,3 @@ jobs:
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
generate_release_notes: true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
+20
@@ -12,6 +12,7 @@ coverage/
|
||||
.vscode/
|
||||
*.swp
|
||||
*.swo
|
||||
*.code-workspace
|
||||
|
||||
# OS
|
||||
.DS_Store
|
||||
@@ -37,3 +38,22 @@ temp/
|
||||
|
||||
# Installed skills (local testing)
|
||||
.agent/
|
||||
.claude/
|
||||
.cursor/
|
||||
.codex/
|
||||
.gemini/
|
||||
.opencode/
|
||||
.antigravity/
|
||||
.agents/
|
||||
.factory/
|
||||
.github/skills/
|
||||
.goose/
|
||||
.kilocode/
|
||||
.kiro/
|
||||
.roo/
|
||||
.trae/
|
||||
.windsurf/
|
||||
.agent/
|
||||
|
||||
# SkillKit config
|
||||
skillkit.yaml
|
||||
@@ -9,6 +9,33 @@ Universal skills loader for AI coding agents. Install, manage, and sync skills a
|
||||
|
||||
Skills follow the [Agent Skills](https://agentskills.io) open format—a simple, portable standard for giving agents new capabilities and expertise.
|
||||
|
||||

|
||||
|
||||
## Interactive TUI
|
||||
|
||||
Manage all your skills with a beautiful terminal interface:
|
||||
|
||||
```bash
|
||||
skillkit ui
|
||||
# or simply
|
||||
skillkit
|
||||
```
|
||||
|
||||

|
||||
|
||||
**Features:**
|
||||
- Browse 33+ skill repositories
|
||||
- Install skills with one keystroke
|
||||
- Multi-agent installation support
|
||||
- View installed skills
|
||||
- Sync across agents
|
||||
- Responsive design for all terminal sizes
|
||||
|
||||
**Navigation:**
|
||||
- `h` Home | `b` Browse | `l` List | `s` Sync | `,` Config
|
||||
- `↑↓` Navigate | `Enter` Select | `Esc` Back | `q` Quit
|
||||
- `m` Multi-agent selection | `r` Refresh/Back
|
||||
|
||||
### Compatible With
|
||||
|
||||
| Agent | Status |
|
||||
@@ -18,17 +45,23 @@ Skills follow the [Agent Skills](https://agentskills.io) open format—a simple,
|
||||
| Cursor | ✅ Native |
|
||||
| Gemini CLI | ✅ Native |
|
||||
| OpenCode | ✅ Native |
|
||||
| Amp | ✅ Supported |
|
||||
| Goose | ✅ Supported |
|
||||
| VS Code (Copilot) | ✅ Supported |
|
||||
| Letta | ✅ Supported |
|
||||
| Factory | ✅ Supported |
|
||||
| Antigravity | ✅ Native |
|
||||
| Amp | ✅ Native |
|
||||
| Clawdbot | ✅ Native |
|
||||
| Droid (Factory) | ✅ Native |
|
||||
| GitHub Copilot | ✅ Native |
|
||||
| Goose | ✅ Native |
|
||||
| Kilo Code | ✅ Native |
|
||||
| Kiro CLI | ✅ Native |
|
||||
| Roo Code | ✅ Native |
|
||||
| Trae | ✅ Native |
|
||||
| Windsurf | ✅ Native |
|
||||
| *Any markdown-config agent* | ✅ Universal |
|
||||
|
||||
## Features
|
||||
|
||||
- **Multi-Agent Support**: Works with 10+ AI coding agents out of the box
|
||||
- **Interactive TUI**: Beautiful terminal interface for managing skills
|
||||
- **Multi-Agent Support**: Works with 17+ AI coding agents out of the box
|
||||
- **Multi-Platform Git**: GitHub, GitLab, Bitbucket, and local paths
|
||||
- **CI/CD Friendly**: Non-interactive flags for automation (`--skills`, `--all`, `--yes`)
|
||||
- **Skill Toggle**: Enable/disable skills without removing them
|
||||
@@ -46,6 +79,9 @@ npx skillkit <command>
|
||||
## Quick Start
|
||||
|
||||
```bash
|
||||
# Launch interactive TUI
|
||||
skillkit ui
|
||||
|
||||
# Initialize in your project (auto-detects agent)
|
||||
skillkit init
|
||||
|
||||
@@ -58,6 +94,9 @@ skillkit install gitlab:owner/repo
|
||||
# Install specific skills (CI/CD friendly)
|
||||
skillkit install owner/repo --skills=pdf,xlsx,docx
|
||||
|
||||
# Create a new skill
|
||||
skillkit create my-skill
|
||||
|
||||
# Sync skills to your agent config
|
||||
skillkit sync
|
||||
|
||||
@@ -85,6 +124,34 @@ skillkit install vercel-labs/agent-skills/skills
|
||||
|
||||
## Commands
|
||||
|
||||
### `skillkit ui` / `skillkit`
|
||||
|
||||
Launch the interactive Terminal User Interface (TUI) for managing skills.
|
||||
|
||||
```bash
|
||||
skillkit ui # Explicit TUI launch
|
||||
skillkit # Launch TUI if no arguments provided
|
||||
```
|
||||
|
||||
**TUI Features:**
|
||||
- **Browse**: Discover skills from 33+ repositories
|
||||
- **List**: View all installed skills
|
||||
- **Sync**: Sync skills across multiple agents
|
||||
- **Settings**: Configure SkillKit preferences
|
||||
|
||||
**Keyboard Shortcuts:**
|
||||
- `h` - Home screen
|
||||
- `b` - Browse skills marketplace
|
||||
- `l` - List installed skills
|
||||
- `s` - Sync skills across agents
|
||||
- `,` - Settings
|
||||
- `↑↓` - Navigate lists
|
||||
- `Enter` - Select / Install
|
||||
- `m` - Multi-agent selection (when viewing skills)
|
||||
- `r` - Refresh / Go back
|
||||
- `Esc` - Return to home
|
||||
- `q` - Quit
|
||||
|
||||
### `skillkit install <source>`
|
||||
|
||||
Install skills from various sources.
|
||||
@@ -109,12 +176,14 @@ skillkit install ./my-skills
|
||||
skillkit install ~/dev/skills
|
||||
|
||||
# Options
|
||||
--list # List available skills without installing
|
||||
--skills=pdf,xlsx # Install specific skills only (CI/CD)
|
||||
--all # Install all discovered skills
|
||||
--yes # Skip confirmation prompts
|
||||
--global # Install to global directory
|
||||
--force # Overwrite existing skills
|
||||
--provider=gitlab # Force specific provider
|
||||
--agent=cursor # Install to specific agent (can specify multiple)
|
||||
```
|
||||
|
||||
### `skillkit sync`
|
||||
@@ -192,20 +261,45 @@ skillkit validate ./my-skill # Validate single skill
|
||||
skillkit validate ./skills --all # Validate all skills in directory
|
||||
```
|
||||
|
||||
### `skillkit create <skill-name>`
|
||||
|
||||
Create a new skill with proper structure and template.
|
||||
|
||||
```bash
|
||||
skillkit create my-skill # Basic skill
|
||||
skillkit create my-skill --full # Include all directories (references, scripts, assets)
|
||||
skillkit create my-skill --scripts # Include scripts directory
|
||||
skillkit create my-skill --references # Include references directory
|
||||
skillkit create my-skill --assets # Include assets directory
|
||||
skillkit create my-skill --dir ./skills # Create in specific directory
|
||||
```
|
||||
|
||||
## Supported Agents
|
||||
|
||||
| Agent | Config File | Skills Directory |
|
||||
|-------|-------------|------------------|
|
||||
| Claude Code | `AGENTS.md` | `.claude/skills/` |
|
||||
| Cursor | `.cursorrules` | `.cursor/skills/` |
|
||||
| Codex | `AGENTS.md` | `.codex/skills/` |
|
||||
| Gemini CLI | `GEMINI.md` | `.gemini/skills/` |
|
||||
| OpenCode | `AGENTS.md` | `.opencode/skills/` |
|
||||
| Antigravity | `AGENTS.md` | `.antigravity/skills/` |
|
||||
| Universal | `AGENTS.md` | `.agent/skills/` |
|
||||
| Agent | Config File | Project Path | Global Path |
|
||||
|-------|-------------|--------------|-------------|
|
||||
| Claude Code | `AGENTS.md` | `.claude/skills/` | `~/.claude/skills/` |
|
||||
| Cursor | `.cursorrules` | `.cursor/skills/` | `~/.cursor/skills/` |
|
||||
| Codex | `AGENTS.md` | `.codex/skills/` | `~/.codex/skills/` |
|
||||
| Gemini CLI | `GEMINI.md` | `.gemini/skills/` | `~/.gemini/skills/` |
|
||||
| OpenCode | `AGENTS.md` | `.opencode/skills/` | `~/.config/opencode/skills/` |
|
||||
| Antigravity | `AGENTS.md` | `.antigravity/skills/` | `~/.gemini/antigravity/skills/` |
|
||||
| Amp | `AGENTS.md` | `.agents/skills/` | `~/.config/agents/skills/` |
|
||||
| Clawdbot | `AGENTS.md` | `skills/` | `~/.clawdbot/skills/` |
|
||||
| Droid (Factory) | `AGENTS.md` | `.factory/skills/` | `~/.factory/skills/` |
|
||||
| GitHub Copilot | `AGENTS.md` | `.github/skills/` | `~/.copilot/skills/` |
|
||||
| Goose | `AGENTS.md` | `.goose/skills/` | `~/.config/goose/skills/` |
|
||||
| Kilo Code | `AGENTS.md` | `.kilocode/skills/` | `~/.kilocode/skills/` |
|
||||
| Kiro CLI | `AGENTS.md` | `.kiro/skills/` | `~/.kiro/skills/` |
|
||||
| Roo Code | `AGENTS.md` | `.roo/skills/` | `~/.roo/skills/` |
|
||||
| Trae | `AGENTS.md` | `.trae/skills/` | `~/.trae/skills/` |
|
||||
| Windsurf | `AGENTS.md` | `.windsurf/skills/` | `~/.codeium/windsurf/skills/` |
|
||||
| Universal | `AGENTS.md` | `.agent/skills/` | `~/.agent/skills/` |
|
||||
|
||||
## Creating Skills
|
||||
|
||||
Use `skillkit create <name>` to scaffold a new skill, or create manually:
|
||||
|
||||
A skill is a directory with a `SKILL.md` file:
|
||||
|
||||
```
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 280 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 94 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 184 KiB |
Generated
+572
-2
@@ -1,19 +1,24 @@
|
||||
{
|
||||
"name": "skillkit",
|
||||
"version": "1.0.0",
|
||||
"version": "1.2.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "skillkit",
|
||||
"version": "1.0.0",
|
||||
"version": "1.2.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"chalk": "^5.3.0",
|
||||
"clipanion": "^4.0.0-rc.4",
|
||||
"got": "^14.4.1",
|
||||
"ink": "^5.0.1",
|
||||
"ink-select-input": "^6.0.0",
|
||||
"ink-spinner": "^5.0.0",
|
||||
"ink-text-input": "^6.0.0",
|
||||
"isomorphic-git": "^1.27.1",
|
||||
"ora": "^8.1.0",
|
||||
"react": "^18.3.1",
|
||||
"yaml": "^2.6.1",
|
||||
"zod": "^3.24.1"
|
||||
},
|
||||
@@ -23,6 +28,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^22.10.5",
|
||||
"@types/react": "^18.3.18",
|
||||
"tsup": "^8.3.5",
|
||||
"typescript": "^5.7.2",
|
||||
"vitest": "^2.1.8"
|
||||
@@ -31,6 +37,19 @@
|
||||
"node": ">=18.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@alcalzone/ansi-tokenize": {
|
||||
"version": "0.1.3",
|
||||
"resolved": "https://registry.npmjs.org/@alcalzone/ansi-tokenize/-/ansi-tokenize-0.1.3.tgz",
|
||||
"integrity": "sha512-3yWxPTq3UQ/FY9p1ErPxIyfT64elWaMvM9lIHnaqpyft63tkxodF5aUElYHrdisWve5cETkh1+KBw1yJuW0aRw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"ansi-styles": "^6.2.1",
|
||||
"is-fullwidth-code-point": "^4.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.13.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/aix-ppc64": {
|
||||
"version": "0.27.2",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.27.2.tgz",
|
||||
@@ -909,6 +928,24 @@
|
||||
"undici-types": "~6.21.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/prop-types": {
|
||||
"version": "15.7.15",
|
||||
"resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.15.tgz",
|
||||
"integrity": "sha512-F6bEyamV9jKGAFBEmlQnesRPGOQqS2+Uwi0Em15xenOxHaf2hv6L8YCVn3rPdPJOiJfPiCnLIRyvwVaqMY3MIw==",
|
||||
"devOptional": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/react": {
|
||||
"version": "18.3.27",
|
||||
"resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.27.tgz",
|
||||
"integrity": "sha512-cisd7gxkzjBKU2GgdYrTdtQx1SORymWyaAFhaxQPK9bYO9ot3Y5OikQRvY0VYQtvwjeQnizCINJAenh/V7MK2w==",
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/prop-types": "*",
|
||||
"csstype": "^3.2.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@vitest/expect": {
|
||||
"version": "2.1.9",
|
||||
"resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-2.1.9.tgz",
|
||||
@@ -1061,6 +1098,21 @@
|
||||
"node": ">=0.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/ansi-escapes": {
|
||||
"version": "7.2.0",
|
||||
"resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-7.2.0.tgz",
|
||||
"integrity": "sha512-g6LhBsl+GBPRWGWsBtutpzBYuIIdBkLEvad5C/va/74Db018+5TZiyA26cZJAr3Rft5lprVqOIPxf5Vid6tqAw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"environment": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/ansi-regex": {
|
||||
"version": "6.2.2",
|
||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz",
|
||||
@@ -1073,6 +1125,18 @@
|
||||
"url": "https://github.com/chalk/ansi-regex?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/ansi-styles": {
|
||||
"version": "6.2.3",
|
||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz",
|
||||
"integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/any-promise": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz",
|
||||
@@ -1096,6 +1160,18 @@
|
||||
"integrity": "sha512-Az2ZTpuytrtqENulXwO3GGv1Bztugx6TT37NIo7imr/Qo0gsYiGtSdBa2B6fsXhTpVZDNfu1Qn3pk531e3q+nQ==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/auto-bind": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/auto-bind/-/auto-bind-5.0.1.tgz",
|
||||
"integrity": "sha512-ooviqdwwgfIfNmDwo94wlshcdzfO64XV0Cg6oDsDYBJfITDz1EngD2z7DkbvCWn+XIMsIqW27sEVF6qcpJrRcg==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/available-typed-arrays": {
|
||||
"version": "1.0.7",
|
||||
"resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz",
|
||||
@@ -1328,6 +1404,18 @@
|
||||
"integrity": "sha512-bLSptAy2P0s6hU4PzuIMKmMJJSE6gLXGH1cntDu7bWJUksvuM+7ReOK61mozULErYvP6a15rnYl0zFDef+pyPw==",
|
||||
"license": "Apache-2.0"
|
||||
},
|
||||
"node_modules/cli-boxes": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-3.0.0.tgz",
|
||||
"integrity": "sha512-/lzGpEWL/8PfI0BmBOPRwp0c/wFNX1RdUML3jK/RcSBA9T8mZDdQpqYBKtCFTOfQbwPqWEOpjqW+Fnayc0969g==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/cli-cursor": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-5.0.0.tgz",
|
||||
@@ -1355,6 +1443,38 @@
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/cli-truncate": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-4.0.0.tgz",
|
||||
"integrity": "sha512-nPdaFdQ0h/GEigbPClz11D0v/ZJEwxmeVZGeMo3Z5StPtUTkA9o1lD6QwoirYiSDzbcwn2XcjwmCp68W1IS4TA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"slice-ansi": "^5.0.0",
|
||||
"string-width": "^7.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/cli-truncate/node_modules/slice-ansi": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz",
|
||||
"integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"ansi-styles": "^6.0.0",
|
||||
"is-fullwidth-code-point": "^4.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/chalk/slice-ansi?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/clipanion": {
|
||||
"version": "4.0.0-rc.4",
|
||||
"resolved": "https://registry.npmjs.org/clipanion/-/clipanion-4.0.0-rc.4.tgz",
|
||||
@@ -1370,6 +1490,18 @@
|
||||
"typanion": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/code-excerpt": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/code-excerpt/-/code-excerpt-4.0.0.tgz",
|
||||
"integrity": "sha512-xxodCmBen3iy2i0WtAK8FlFNrRzjUqjRsMfho58xT/wvZU1YTM3fCnRjcy1gJPMepaRlgm/0e6w8SpWHpn3/cA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"convert-to-spaces": "^2.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/commander": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz",
|
||||
@@ -1397,6 +1529,15 @@
|
||||
"node": "^14.18.0 || >=16.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/convert-to-spaces": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/convert-to-spaces/-/convert-to-spaces-2.0.1.tgz",
|
||||
"integrity": "sha512-rcQ1bsQO9799wq24uE5AM2tAILy4gXGIK/njFWcVQkGNZ96edlpY+A7bjwvzjYvLDyzmG1MmMLZhpcsb+klNMQ==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/crc-32": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz",
|
||||
@@ -1409,6 +1550,13 @@
|
||||
"node": ">=0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/csstype": {
|
||||
"version": "3.2.3",
|
||||
"resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz",
|
||||
"integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==",
|
||||
"devOptional": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/debug": {
|
||||
"version": "4.4.3",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
|
||||
@@ -1495,6 +1643,18 @@
|
||||
"integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/environment": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/environment/-/environment-1.1.0.tgz",
|
||||
"integrity": "sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/es-define-property": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz",
|
||||
@@ -1532,6 +1692,16 @@
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/es-toolkit": {
|
||||
"version": "1.44.0",
|
||||
"resolved": "https://registry.npmjs.org/es-toolkit/-/es-toolkit-1.44.0.tgz",
|
||||
"integrity": "sha512-6penXeZalaV88MM3cGkFZZfOoLGWshWWfdy0tWw/RlVVyhvMaWSBTOvXNeiW3e5FwdS5ePW0LGEu17zT139ktg==",
|
||||
"license": "MIT",
|
||||
"workspaces": [
|
||||
"docs",
|
||||
"benchmarks"
|
||||
]
|
||||
},
|
||||
"node_modules/esbuild": {
|
||||
"version": "0.27.2",
|
||||
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.2.tgz",
|
||||
@@ -1574,6 +1744,15 @@
|
||||
"@esbuild/win32-x64": "0.27.2"
|
||||
}
|
||||
},
|
||||
"node_modules/escape-string-regexp": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz",
|
||||
"integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/estree-walker": {
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz",
|
||||
@@ -1630,6 +1809,21 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/figures": {
|
||||
"version": "6.1.0",
|
||||
"resolved": "https://registry.npmjs.org/figures/-/figures-6.1.0.tgz",
|
||||
"integrity": "sha512-d+l3qxjSesT4V7v2fh+QnmFnUWv9lSpjarhShNTgBOfA0ttejbQUAlHLitbjkoRiDulW0OPoQPYIGhIC8ohejg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"is-unicode-supported": "^2.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/fix-dts-default-cjs-exports": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/fix-dts-default-cjs-exports/-/fix-dts-default-cjs-exports-1.0.1.tgz",
|
||||
@@ -1892,12 +2086,174 @@
|
||||
"node": ">= 4"
|
||||
}
|
||||
},
|
||||
"node_modules/indent-string": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/indent-string/-/indent-string-5.0.0.tgz",
|
||||
"integrity": "sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/inherits": {
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
|
||||
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/ink": {
|
||||
"version": "5.2.1",
|
||||
"resolved": "https://registry.npmjs.org/ink/-/ink-5.2.1.tgz",
|
||||
"integrity": "sha512-BqcUyWrG9zq5HIwW6JcfFHsIYebJkWWb4fczNah1goUO0vv5vneIlfwuS85twyJ5hYR/y18FlAYUxrO9ChIWVg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@alcalzone/ansi-tokenize": "^0.1.3",
|
||||
"ansi-escapes": "^7.0.0",
|
||||
"ansi-styles": "^6.2.1",
|
||||
"auto-bind": "^5.0.1",
|
||||
"chalk": "^5.3.0",
|
||||
"cli-boxes": "^3.0.0",
|
||||
"cli-cursor": "^4.0.0",
|
||||
"cli-truncate": "^4.0.0",
|
||||
"code-excerpt": "^4.0.0",
|
||||
"es-toolkit": "^1.22.0",
|
||||
"indent-string": "^5.0.0",
|
||||
"is-in-ci": "^1.0.0",
|
||||
"patch-console": "^2.0.0",
|
||||
"react-reconciler": "^0.29.0",
|
||||
"scheduler": "^0.23.0",
|
||||
"signal-exit": "^3.0.7",
|
||||
"slice-ansi": "^7.1.0",
|
||||
"stack-utils": "^2.0.6",
|
||||
"string-width": "^7.2.0",
|
||||
"type-fest": "^4.27.0",
|
||||
"widest-line": "^5.0.0",
|
||||
"wrap-ansi": "^9.0.0",
|
||||
"ws": "^8.18.0",
|
||||
"yoga-layout": "~3.2.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@types/react": ">=18.0.0",
|
||||
"react": ">=18.0.0",
|
||||
"react-devtools-core": "^4.19.1"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@types/react": {
|
||||
"optional": true
|
||||
},
|
||||
"react-devtools-core": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/ink-select-input": {
|
||||
"version": "6.2.0",
|
||||
"resolved": "https://registry.npmjs.org/ink-select-input/-/ink-select-input-6.2.0.tgz",
|
||||
"integrity": "sha512-304fZXxkpYxJ9si5lxRCaX01GNlmPBgOZumXXRnPYbHW/iI31cgQynqk2tRypGLOF1cMIwPUzL2LSm6q4I5rQQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"figures": "^6.1.0",
|
||||
"to-rotated": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"ink": ">=5.0.0",
|
||||
"react": ">=18.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/ink-spinner": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ink-spinner/-/ink-spinner-5.0.0.tgz",
|
||||
"integrity": "sha512-EYEasbEjkqLGyPOUc8hBJZNuC5GvXGMLu0w5gdTNskPc7Izc5vO3tdQEYnzvshucyGCBXc86ig0ujXPMWaQCdA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"cli-spinners": "^2.7.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.16"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"ink": ">=4.0.0",
|
||||
"react": ">=18.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/ink-text-input": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ink-text-input/-/ink-text-input-6.0.0.tgz",
|
||||
"integrity": "sha512-Fw64n7Yha5deb1rHY137zHTAbSTNelUKuB5Kkk2HACXEtwIHBCf9OH2tP/LQ9fRYTl1F0dZgbW0zPnZk6FA9Lw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"chalk": "^5.3.0",
|
||||
"type-fest": "^4.18.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"ink": ">=5",
|
||||
"react": ">=18"
|
||||
}
|
||||
},
|
||||
"node_modules/ink/node_modules/cli-cursor": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-4.0.0.tgz",
|
||||
"integrity": "sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"restore-cursor": "^4.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/ink/node_modules/onetime": {
|
||||
"version": "5.1.2",
|
||||
"resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz",
|
||||
"integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"mimic-fn": "^2.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/ink/node_modules/restore-cursor": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-4.0.0.tgz",
|
||||
"integrity": "sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"onetime": "^5.1.0",
|
||||
"signal-exit": "^3.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/ink/node_modules/signal-exit": {
|
||||
"version": "3.0.7",
|
||||
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
|
||||
"integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/is-callable": {
|
||||
"version": "1.2.7",
|
||||
"resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz",
|
||||
@@ -1910,6 +2266,33 @@
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/is-fullwidth-code-point": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz",
|
||||
"integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/is-in-ci": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-in-ci/-/is-in-ci-1.0.0.tgz",
|
||||
"integrity": "sha512-eUuAjybVTHMYWm/U+vBO1sY/JOCgoPCXRxzdju0K+K0BiGW0SChEL1MLC0PoCIR1OlPo5YAp8HuQoUlsWEICwg==",
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"is-in-ci": "cli.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/is-interactive": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-2.0.0.tgz",
|
||||
@@ -2002,6 +2385,12 @@
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/js-tokens": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
|
||||
"integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/keyv": {
|
||||
"version": "5.5.5",
|
||||
"resolved": "https://registry.npmjs.org/keyv/-/keyv-5.5.5.tgz",
|
||||
@@ -2069,6 +2458,18 @@
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/loose-envify": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
|
||||
"integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"js-tokens": "^3.0.0 || ^4.0.0"
|
||||
},
|
||||
"bin": {
|
||||
"loose-envify": "cli.js"
|
||||
}
|
||||
},
|
||||
"node_modules/loupe": {
|
||||
"version": "3.2.1",
|
||||
"resolved": "https://registry.npmjs.org/loupe/-/loupe-3.2.1.tgz",
|
||||
@@ -2107,6 +2508,15 @@
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/mimic-fn": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
|
||||
"integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/mimic-function": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/mimic-function/-/mimic-function-5.0.1.tgz",
|
||||
@@ -2284,6 +2694,15 @@
|
||||
"integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==",
|
||||
"license": "(MIT AND Zlib)"
|
||||
},
|
||||
"node_modules/patch-console": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/patch-console/-/patch-console-2.0.0.tgz",
|
||||
"integrity": "sha512-0YNdUceMdaQwoKce1gatDScmMo5pu/tfABfnzEqeG0gtTmd7mh/WcwgUjtAeOU7N8nFFlbQBnFK2gXW5fGvmMA==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/pathe": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz",
|
||||
@@ -2454,6 +2873,34 @@
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/react": {
|
||||
"version": "18.3.1",
|
||||
"resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz",
|
||||
"integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"loose-envify": "^1.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/react-reconciler": {
|
||||
"version": "0.29.2",
|
||||
"resolved": "https://registry.npmjs.org/react-reconciler/-/react-reconciler-0.29.2.tgz",
|
||||
"integrity": "sha512-zZQqIiYgDCTP/f1N/mAR10nJGrPD2ZR+jDSEsKWJHYC7Cm2wodlwbR3upZRdC3cjIjSlTLNVyO7Iu0Yy7t2AYg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"loose-envify": "^1.1.0",
|
||||
"scheduler": "^0.23.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "^18.3.1"
|
||||
}
|
||||
},
|
||||
"node_modules/readable-stream": {
|
||||
"version": "4.7.0",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.7.0.tgz",
|
||||
@@ -2596,6 +3043,15 @@
|
||||
],
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/scheduler": {
|
||||
"version": "0.23.2",
|
||||
"resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz",
|
||||
"integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"loose-envify": "^1.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/set-function-length": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz",
|
||||
@@ -2724,6 +3180,37 @@
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/slice-ansi": {
|
||||
"version": "7.1.2",
|
||||
"resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-7.1.2.tgz",
|
||||
"integrity": "sha512-iOBWFgUX7caIZiuutICxVgX1SdxwAVFFKwt1EvMYYec/NWO5meOJ6K5uQxhrYBdQJne4KxiqZc+KptFOWFSI9w==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"ansi-styles": "^6.2.1",
|
||||
"is-fullwidth-code-point": "^5.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/chalk/slice-ansi?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/slice-ansi/node_modules/is-fullwidth-code-point": {
|
||||
"version": "5.1.0",
|
||||
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-5.1.0.tgz",
|
||||
"integrity": "sha512-5XHYaSyiqADb4RnZ1Bdad6cPp8Toise4TzEjcOYDHZkTCbKgiUl7WTUCpNWHuxmDt91wnsZBc9xinNzopv3JMQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"get-east-asian-width": "^1.3.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/source-map": {
|
||||
"version": "0.7.6",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.6.tgz",
|
||||
@@ -2744,6 +3231,18 @@
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/stack-utils": {
|
||||
"version": "2.0.6",
|
||||
"resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz",
|
||||
"integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"escape-string-regexp": "^2.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/stackback": {
|
||||
"version": "0.0.2",
|
||||
"resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz",
|
||||
@@ -2932,6 +3431,18 @@
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/to-rotated": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/to-rotated/-/to-rotated-1.0.0.tgz",
|
||||
"integrity": "sha512-KsEID8AfgUy+pxVRLsWp0VzCa69wxzUDZnzGbyIST/bcgcrMvTYoFBX/QORH4YApoD89EDuUovx4BTdpOn319Q==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/tree-kill": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz",
|
||||
@@ -3696,12 +4207,65 @@
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/widest-line": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/widest-line/-/widest-line-5.0.0.tgz",
|
||||
"integrity": "sha512-c9bZp7b5YtRj2wOe6dlj32MK+Bx/M/d+9VB2SHM1OtsUHR0aV0tdP6DWh/iMt0kWi1t5g1Iudu6hQRNd1A4PVA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"string-width": "^7.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/wrap-ansi": {
|
||||
"version": "9.0.2",
|
||||
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.2.tgz",
|
||||
"integrity": "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"ansi-styles": "^6.2.1",
|
||||
"string-width": "^7.0.0",
|
||||
"strip-ansi": "^7.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/chalk/wrap-ansi?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/wrappy": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
||||
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/ws": {
|
||||
"version": "8.19.0",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.19.0.tgz",
|
||||
"integrity": "sha512-blAT2mjOEIi0ZzruJfIhb3nps74PRWTCz1IjglWEEpQl5XS/UNama6u2/rjFkDDouqr4L67ry+1aGIALViWjDg==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=10.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"bufferutil": "^4.0.1",
|
||||
"utf-8-validate": ">=5.0.2"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"bufferutil": {
|
||||
"optional": true
|
||||
},
|
||||
"utf-8-validate": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/yaml": {
|
||||
"version": "2.8.2",
|
||||
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.2.tgz",
|
||||
@@ -3717,6 +4281,12 @@
|
||||
"url": "https://github.com/sponsors/eemeli"
|
||||
}
|
||||
},
|
||||
"node_modules/yoga-layout": {
|
||||
"version": "3.2.1",
|
||||
"resolved": "https://registry.npmjs.org/yoga-layout/-/yoga-layout-3.2.1.tgz",
|
||||
"integrity": "sha512-0LPOt3AxKqMdFBZA3HBAt/t/8vIKq7VaQYbuA8WxCgung+p9TVyKRYdpvCb80HcdTN2NkbIKbhNwKUfm3tQywQ==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/zod": {
|
||||
"version": "3.25.76",
|
||||
"resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz",
|
||||
|
||||
+7
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "skillkit",
|
||||
"version": "1.0.3",
|
||||
"version": "1.2.0",
|
||||
"description": "Universal skills loader for AI coding agents - supports Claude Code, Codex, Cursor, Antigravity, OpenCode, Gemini CLI and more",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
@@ -60,13 +60,19 @@
|
||||
"chalk": "^5.3.0",
|
||||
"clipanion": "^4.0.0-rc.4",
|
||||
"got": "^14.4.1",
|
||||
"ink": "^5.0.1",
|
||||
"ink-select-input": "^6.0.0",
|
||||
"ink-spinner": "^5.0.0",
|
||||
"ink-text-input": "^6.0.0",
|
||||
"isomorphic-git": "^1.27.1",
|
||||
"ora": "^8.1.0",
|
||||
"react": "^18.3.1",
|
||||
"yaml": "^2.6.1",
|
||||
"zod": "^3.24.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^22.10.5",
|
||||
"@types/react": "^18.3.18",
|
||||
"tsup": "^8.3.5",
|
||||
"typescript": "^5.7.2",
|
||||
"vitest": "^2.1.8"
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 8.4 MiB |
@@ -0,0 +1,75 @@
|
||||
import { existsSync } from 'node:fs';
|
||||
import { join } from 'node:path';
|
||||
import { homedir } from 'node:os';
|
||||
import type { AgentAdapter } from './base.js';
|
||||
import { createSkillXml } from './base.js';
|
||||
import type { Skill, AgentType } from '../core/types.js';
|
||||
|
||||
export class AmpAdapter implements AgentAdapter {
|
||||
readonly type: AgentType = 'amp';
|
||||
readonly name = 'Amp';
|
||||
readonly skillsDir = '.agents/skills';
|
||||
readonly configFile = 'AGENTS.md';
|
||||
readonly globalSkillsDir = join(homedir(), '.config', 'agents', 'skills');
|
||||
|
||||
generateConfig(skills: Skill[]): string {
|
||||
const enabledSkills = skills.filter(s => s.enabled);
|
||||
|
||||
if (enabledSkills.length === 0) {
|
||||
return '';
|
||||
}
|
||||
|
||||
const skillsXml = enabledSkills.map(createSkillXml).join('\n\n');
|
||||
|
||||
return `<skills_system priority="1">
|
||||
|
||||
## Available Skills
|
||||
|
||||
<!-- SKILLS_TABLE_START -->
|
||||
<usage>
|
||||
When users ask you to perform tasks, check if any of the available skills below can help complete the task more effectively. Skills provide specialized capabilities and domain knowledge.
|
||||
|
||||
How to use skills:
|
||||
- Invoke: \`skillkit read <skill-name>\` or \`npx skillkit read <skill-name>\`
|
||||
- The skill content will load with detailed instructions on how to complete the task
|
||||
- Base directory provided in output for resolving bundled resources (references/, scripts/, assets/)
|
||||
|
||||
Usage notes:
|
||||
- Only use skills listed in <available_skills> below
|
||||
- Do not invoke a skill that is already loaded in your context
|
||||
- Each skill invocation is stateless
|
||||
</usage>
|
||||
|
||||
<available_skills>
|
||||
|
||||
${skillsXml}
|
||||
|
||||
</available_skills>
|
||||
<!-- SKILLS_TABLE_END -->
|
||||
|
||||
</skills_system>`;
|
||||
}
|
||||
|
||||
parseConfig(content: string): string[] {
|
||||
const skillNames: string[] = [];
|
||||
const skillRegex = /<name>([^<]+)<\/name>/g;
|
||||
let match;
|
||||
|
||||
while ((match = skillRegex.exec(content)) !== null) {
|
||||
skillNames.push(match[1].trim());
|
||||
}
|
||||
|
||||
return skillNames;
|
||||
}
|
||||
|
||||
getInvokeCommand(skillName: string): string {
|
||||
return `skillkit read ${skillName}`;
|
||||
}
|
||||
|
||||
async isDetected(): Promise<boolean> {
|
||||
const projectAgents = join(process.cwd(), '.agents');
|
||||
const globalAgents = join(homedir(), '.config', 'agents');
|
||||
|
||||
return existsSync(projectAgents) || existsSync(globalAgents);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
import { existsSync } from 'node:fs';
|
||||
import { join } from 'node:path';
|
||||
import { homedir } from 'node:os';
|
||||
import type { AgentAdapter } from './base.js';
|
||||
import { createSkillXml } from './base.js';
|
||||
import type { Skill, AgentType } from '../core/types.js';
|
||||
|
||||
export class ClawdbotAdapter implements AgentAdapter {
|
||||
readonly type: AgentType = 'clawdbot';
|
||||
readonly name = 'Clawdbot';
|
||||
readonly skillsDir = 'skills';
|
||||
readonly configFile = 'AGENTS.md';
|
||||
readonly globalSkillsDir = join(homedir(), '.clawdbot', 'skills');
|
||||
|
||||
generateConfig(skills: Skill[]): string {
|
||||
const enabledSkills = skills.filter(s => s.enabled);
|
||||
|
||||
if (enabledSkills.length === 0) {
|
||||
return '';
|
||||
}
|
||||
|
||||
const skillsXml = enabledSkills.map(createSkillXml).join('\n\n');
|
||||
|
||||
return `<skills_system priority="1">
|
||||
|
||||
## Available Skills
|
||||
|
||||
<!-- SKILLS_TABLE_START -->
|
||||
<usage>
|
||||
When users ask you to perform tasks, check if any of the available skills below can help complete the task more effectively. Skills provide specialized capabilities and domain knowledge.
|
||||
|
||||
How to use skills:
|
||||
- Invoke: \`skillkit read <skill-name>\` or \`npx skillkit read <skill-name>\`
|
||||
- The skill content will load with detailed instructions on how to complete the task
|
||||
- Base directory provided in output for resolving bundled resources (references/, scripts/, assets/)
|
||||
|
||||
Usage notes:
|
||||
- Only use skills listed in <available_skills> below
|
||||
- Do not invoke a skill that is already loaded in your context
|
||||
- Each skill invocation is stateless
|
||||
</usage>
|
||||
|
||||
<available_skills>
|
||||
|
||||
${skillsXml}
|
||||
|
||||
</available_skills>
|
||||
<!-- SKILLS_TABLE_END -->
|
||||
|
||||
</skills_system>`;
|
||||
}
|
||||
|
||||
parseConfig(content: string): string[] {
|
||||
const skillNames: string[] = [];
|
||||
const skillRegex = /<name>([^<]+)<\/name>/g;
|
||||
let match;
|
||||
|
||||
while ((match = skillRegex.exec(content)) !== null) {
|
||||
skillNames.push(match[1].trim());
|
||||
}
|
||||
|
||||
return skillNames;
|
||||
}
|
||||
|
||||
getInvokeCommand(skillName: string): string {
|
||||
return `skillkit read ${skillName}`;
|
||||
}
|
||||
|
||||
async isDetected(): Promise<boolean> {
|
||||
const projectSkills = join(process.cwd(), 'skills');
|
||||
const globalClawdbot = join(homedir(), '.clawdbot');
|
||||
|
||||
return existsSync(globalClawdbot) || (existsSync(projectSkills) && existsSync(join(process.cwd(), '.clawdbot')));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
import { existsSync } from 'node:fs';
|
||||
import { join } from 'node:path';
|
||||
import { homedir } from 'node:os';
|
||||
import type { AgentAdapter } from './base.js';
|
||||
import { createSkillXml } from './base.js';
|
||||
import type { Skill, AgentType } from '../core/types.js';
|
||||
|
||||
export class DroidAdapter implements AgentAdapter {
|
||||
readonly type: AgentType = 'droid';
|
||||
readonly name = 'Droid (Factory)';
|
||||
readonly skillsDir = '.factory/skills';
|
||||
readonly configFile = 'AGENTS.md';
|
||||
readonly globalSkillsDir = join(homedir(), '.factory', 'skills');
|
||||
|
||||
generateConfig(skills: Skill[]): string {
|
||||
const enabledSkills = skills.filter(s => s.enabled);
|
||||
|
||||
if (enabledSkills.length === 0) {
|
||||
return '';
|
||||
}
|
||||
|
||||
const skillsXml = enabledSkills.map(createSkillXml).join('\n\n');
|
||||
|
||||
return `<skills_system priority="1">
|
||||
|
||||
## Available Skills
|
||||
|
||||
<!-- SKILLS_TABLE_START -->
|
||||
<usage>
|
||||
When users ask you to perform tasks, check if any of the available skills below can help complete the task more effectively. Skills provide specialized capabilities and domain knowledge.
|
||||
|
||||
How to use skills:
|
||||
- Invoke: \`skillkit read <skill-name>\` or \`npx skillkit read <skill-name>\`
|
||||
- The skill content will load with detailed instructions on how to complete the task
|
||||
- Base directory provided in output for resolving bundled resources (references/, scripts/, assets/)
|
||||
|
||||
Usage notes:
|
||||
- Only use skills listed in <available_skills> below
|
||||
- Do not invoke a skill that is already loaded in your context
|
||||
- Each skill invocation is stateless
|
||||
</usage>
|
||||
|
||||
<available_skills>
|
||||
|
||||
${skillsXml}
|
||||
|
||||
</available_skills>
|
||||
<!-- SKILLS_TABLE_END -->
|
||||
|
||||
</skills_system>`;
|
||||
}
|
||||
|
||||
parseConfig(content: string): string[] {
|
||||
const skillNames: string[] = [];
|
||||
const skillRegex = /<name>([^<]+)<\/name>/g;
|
||||
let match;
|
||||
|
||||
while ((match = skillRegex.exec(content)) !== null) {
|
||||
skillNames.push(match[1].trim());
|
||||
}
|
||||
|
||||
return skillNames;
|
||||
}
|
||||
|
||||
getInvokeCommand(skillName: string): string {
|
||||
return `skillkit read ${skillName}`;
|
||||
}
|
||||
|
||||
async isDetected(): Promise<boolean> {
|
||||
const projectFactory = join(process.cwd(), '.factory');
|
||||
const globalFactory = join(homedir(), '.factory');
|
||||
|
||||
return existsSync(projectFactory) || existsSync(globalFactory);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
import { existsSync } from 'node:fs';
|
||||
import { join } from 'node:path';
|
||||
import { homedir } from 'node:os';
|
||||
import type { AgentAdapter } from './base.js';
|
||||
import { createSkillXml } from './base.js';
|
||||
import type { Skill, AgentType } from '../core/types.js';
|
||||
|
||||
export class GitHubCopilotAdapter implements AgentAdapter {
|
||||
readonly type: AgentType = 'github-copilot';
|
||||
readonly name = 'GitHub Copilot';
|
||||
readonly skillsDir = '.github/skills';
|
||||
readonly configFile = 'AGENTS.md';
|
||||
readonly globalSkillsDir = join(homedir(), '.copilot', 'skills');
|
||||
|
||||
generateConfig(skills: Skill[]): string {
|
||||
const enabledSkills = skills.filter(s => s.enabled);
|
||||
|
||||
if (enabledSkills.length === 0) {
|
||||
return '';
|
||||
}
|
||||
|
||||
const skillsXml = enabledSkills.map(createSkillXml).join('\n\n');
|
||||
|
||||
return `<skills_system priority="1">
|
||||
|
||||
## Available Skills
|
||||
|
||||
<!-- SKILLS_TABLE_START -->
|
||||
<usage>
|
||||
When users ask you to perform tasks, check if any of the available skills below can help complete the task more effectively. Skills provide specialized capabilities and domain knowledge.
|
||||
|
||||
How to use skills:
|
||||
- Invoke: \`skillkit read <skill-name>\` or \`npx skillkit read <skill-name>\`
|
||||
- The skill content will load with detailed instructions on how to complete the task
|
||||
- Base directory provided in output for resolving bundled resources (references/, scripts/, assets/)
|
||||
|
||||
Usage notes:
|
||||
- Only use skills listed in <available_skills> below
|
||||
- Do not invoke a skill that is already loaded in your context
|
||||
- Each skill invocation is stateless
|
||||
</usage>
|
||||
|
||||
<available_skills>
|
||||
|
||||
${skillsXml}
|
||||
|
||||
</available_skills>
|
||||
<!-- SKILLS_TABLE_END -->
|
||||
|
||||
</skills_system>`;
|
||||
}
|
||||
|
||||
parseConfig(content: string): string[] {
|
||||
const skillNames: string[] = [];
|
||||
const skillRegex = /<name>([^<]+)<\/name>/g;
|
||||
let match;
|
||||
|
||||
while ((match = skillRegex.exec(content)) !== null) {
|
||||
skillNames.push(match[1].trim());
|
||||
}
|
||||
|
||||
return skillNames;
|
||||
}
|
||||
|
||||
getInvokeCommand(skillName: string): string {
|
||||
return `skillkit read ${skillName}`;
|
||||
}
|
||||
|
||||
async isDetected(): Promise<boolean> {
|
||||
const projectGithub = join(process.cwd(), '.github', 'skills');
|
||||
const globalCopilot = join(homedir(), '.copilot');
|
||||
|
||||
return existsSync(projectGithub) || existsSync(globalCopilot);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
import { existsSync } from 'node:fs';
|
||||
import { join } from 'node:path';
|
||||
import { homedir } from 'node:os';
|
||||
import type { AgentAdapter } from './base.js';
|
||||
import { createSkillXml } from './base.js';
|
||||
import type { Skill, AgentType } from '../core/types.js';
|
||||
|
||||
export class GooseAdapter implements AgentAdapter {
|
||||
readonly type: AgentType = 'goose';
|
||||
readonly name = 'Goose';
|
||||
readonly skillsDir = '.goose/skills';
|
||||
readonly configFile = 'AGENTS.md';
|
||||
readonly globalSkillsDir = join(homedir(), '.config', 'goose', 'skills');
|
||||
|
||||
generateConfig(skills: Skill[]): string {
|
||||
const enabledSkills = skills.filter(s => s.enabled);
|
||||
|
||||
if (enabledSkills.length === 0) {
|
||||
return '';
|
||||
}
|
||||
|
||||
const skillsXml = enabledSkills.map(createSkillXml).join('\n\n');
|
||||
|
||||
return `<skills_system priority="1">
|
||||
|
||||
## Available Skills
|
||||
|
||||
<!-- SKILLS_TABLE_START -->
|
||||
<usage>
|
||||
When users ask you to perform tasks, check if any of the available skills below can help complete the task more effectively. Skills provide specialized capabilities and domain knowledge.
|
||||
|
||||
How to use skills:
|
||||
- Invoke: \`skillkit read <skill-name>\` or \`npx skillkit read <skill-name>\`
|
||||
- The skill content will load with detailed instructions on how to complete the task
|
||||
- Base directory provided in output for resolving bundled resources (references/, scripts/, assets/)
|
||||
|
||||
Usage notes:
|
||||
- Only use skills listed in <available_skills> below
|
||||
- Do not invoke a skill that is already loaded in your context
|
||||
- Each skill invocation is stateless
|
||||
</usage>
|
||||
|
||||
<available_skills>
|
||||
|
||||
${skillsXml}
|
||||
|
||||
</available_skills>
|
||||
<!-- SKILLS_TABLE_END -->
|
||||
|
||||
</skills_system>`;
|
||||
}
|
||||
|
||||
parseConfig(content: string): string[] {
|
||||
const skillNames: string[] = [];
|
||||
const skillRegex = /<name>([^<]+)<\/name>/g;
|
||||
let match;
|
||||
|
||||
while ((match = skillRegex.exec(content)) !== null) {
|
||||
skillNames.push(match[1].trim());
|
||||
}
|
||||
|
||||
return skillNames;
|
||||
}
|
||||
|
||||
getInvokeCommand(skillName: string): string {
|
||||
return `skillkit read ${skillName}`;
|
||||
}
|
||||
|
||||
async isDetected(): Promise<boolean> {
|
||||
const projectGoose = join(process.cwd(), '.goose');
|
||||
const globalGoose = join(homedir(), '.config', 'goose');
|
||||
|
||||
return existsSync(projectGoose) || existsSync(globalGoose);
|
||||
}
|
||||
}
|
||||
+40
-1
@@ -6,6 +6,16 @@ import { CodexAdapter } from './codex.js';
|
||||
import { GeminiCliAdapter } from './gemini-cli.js';
|
||||
import { OpenCodeAdapter } from './opencode.js';
|
||||
import { AntigravityAdapter } from './antigravity.js';
|
||||
import { AmpAdapter } from './amp.js';
|
||||
import { ClawdbotAdapter } from './clawdbot.js';
|
||||
import { DroidAdapter } from './droid.js';
|
||||
import { GitHubCopilotAdapter } from './github-copilot.js';
|
||||
import { GooseAdapter } from './goose.js';
|
||||
import { KiloAdapter } from './kilo.js';
|
||||
import { KiroCliAdapter } from './kiro-cli.js';
|
||||
import { RooAdapter } from './roo.js';
|
||||
import { TraeAdapter } from './trae.js';
|
||||
import { WindsurfAdapter } from './windsurf.js';
|
||||
import { UniversalAdapter } from './universal.js';
|
||||
|
||||
export * from './base.js';
|
||||
@@ -15,6 +25,16 @@ export * from './codex.js';
|
||||
export * from './gemini-cli.js';
|
||||
export * from './opencode.js';
|
||||
export * from './antigravity.js';
|
||||
export * from './amp.js';
|
||||
export * from './clawdbot.js';
|
||||
export * from './droid.js';
|
||||
export * from './github-copilot.js';
|
||||
export * from './goose.js';
|
||||
export * from './kilo.js';
|
||||
export * from './kiro-cli.js';
|
||||
export * from './roo.js';
|
||||
export * from './trae.js';
|
||||
export * from './windsurf.js';
|
||||
export * from './universal.js';
|
||||
|
||||
const adapters: Record<AgentType, AgentAdapter> = {
|
||||
@@ -24,6 +44,16 @@ const adapters: Record<AgentType, AgentAdapter> = {
|
||||
'gemini-cli': new GeminiCliAdapter(),
|
||||
opencode: new OpenCodeAdapter(),
|
||||
antigravity: new AntigravityAdapter(),
|
||||
amp: new AmpAdapter(),
|
||||
clawdbot: new ClawdbotAdapter(),
|
||||
droid: new DroidAdapter(),
|
||||
'github-copilot': new GitHubCopilotAdapter(),
|
||||
goose: new GooseAdapter(),
|
||||
kilo: new KiloAdapter(),
|
||||
'kiro-cli': new KiroCliAdapter(),
|
||||
roo: new RooAdapter(),
|
||||
trae: new TraeAdapter(),
|
||||
windsurf: new WindsurfAdapter(),
|
||||
universal: new UniversalAdapter(),
|
||||
};
|
||||
|
||||
@@ -36,7 +66,6 @@ export function getAllAdapters(): AgentAdapter[] {
|
||||
}
|
||||
|
||||
export async function detectAgent(): Promise<AgentType> {
|
||||
|
||||
const checkOrder: AgentType[] = [
|
||||
'claude-code',
|
||||
'cursor',
|
||||
@@ -44,6 +73,16 @@ export async function detectAgent(): Promise<AgentType> {
|
||||
'gemini-cli',
|
||||
'opencode',
|
||||
'antigravity',
|
||||
'amp',
|
||||
'clawdbot',
|
||||
'droid',
|
||||
'github-copilot',
|
||||
'goose',
|
||||
'kilo',
|
||||
'kiro-cli',
|
||||
'roo',
|
||||
'trae',
|
||||
'windsurf',
|
||||
'universal',
|
||||
];
|
||||
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
import { existsSync } from 'node:fs';
|
||||
import { join } from 'node:path';
|
||||
import { homedir } from 'node:os';
|
||||
import type { AgentAdapter } from './base.js';
|
||||
import { createSkillXml } from './base.js';
|
||||
import type { Skill, AgentType } from '../core/types.js';
|
||||
|
||||
export class KiloAdapter implements AgentAdapter {
|
||||
readonly type: AgentType = 'kilo';
|
||||
readonly name = 'Kilo Code';
|
||||
readonly skillsDir = '.kilocode/skills';
|
||||
readonly configFile = 'AGENTS.md';
|
||||
readonly globalSkillsDir = join(homedir(), '.kilocode', 'skills');
|
||||
|
||||
generateConfig(skills: Skill[]): string {
|
||||
const enabledSkills = skills.filter(s => s.enabled);
|
||||
|
||||
if (enabledSkills.length === 0) {
|
||||
return '';
|
||||
}
|
||||
|
||||
const skillsXml = enabledSkills.map(createSkillXml).join('\n\n');
|
||||
|
||||
return `<skills_system priority="1">
|
||||
|
||||
## Available Skills
|
||||
|
||||
<!-- SKILLS_TABLE_START -->
|
||||
<usage>
|
||||
When users ask you to perform tasks, check if any of the available skills below can help complete the task more effectively. Skills provide specialized capabilities and domain knowledge.
|
||||
|
||||
How to use skills:
|
||||
- Invoke: \`skillkit read <skill-name>\` or \`npx skillkit read <skill-name>\`
|
||||
- The skill content will load with detailed instructions on how to complete the task
|
||||
- Base directory provided in output for resolving bundled resources (references/, scripts/, assets/)
|
||||
|
||||
Usage notes:
|
||||
- Only use skills listed in <available_skills> below
|
||||
- Do not invoke a skill that is already loaded in your context
|
||||
- Each skill invocation is stateless
|
||||
</usage>
|
||||
|
||||
<available_skills>
|
||||
|
||||
${skillsXml}
|
||||
|
||||
</available_skills>
|
||||
<!-- SKILLS_TABLE_END -->
|
||||
|
||||
</skills_system>`;
|
||||
}
|
||||
|
||||
parseConfig(content: string): string[] {
|
||||
const skillNames: string[] = [];
|
||||
const skillRegex = /<name>([^<]+)<\/name>/g;
|
||||
let match;
|
||||
|
||||
while ((match = skillRegex.exec(content)) !== null) {
|
||||
skillNames.push(match[1].trim());
|
||||
}
|
||||
|
||||
return skillNames;
|
||||
}
|
||||
|
||||
getInvokeCommand(skillName: string): string {
|
||||
return `skillkit read ${skillName}`;
|
||||
}
|
||||
|
||||
async isDetected(): Promise<boolean> {
|
||||
const projectKilo = join(process.cwd(), '.kilocode');
|
||||
const globalKilo = join(homedir(), '.kilocode');
|
||||
|
||||
return existsSync(projectKilo) || existsSync(globalKilo);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
import { existsSync } from 'node:fs';
|
||||
import { join } from 'node:path';
|
||||
import { homedir } from 'node:os';
|
||||
import type { AgentAdapter } from './base.js';
|
||||
import { createSkillXml } from './base.js';
|
||||
import type { Skill, AgentType } from '../core/types.js';
|
||||
|
||||
export class KiroCliAdapter implements AgentAdapter {
|
||||
readonly type: AgentType = 'kiro-cli';
|
||||
readonly name = 'Kiro CLI';
|
||||
readonly skillsDir = '.kiro/skills';
|
||||
readonly configFile = 'AGENTS.md';
|
||||
readonly globalSkillsDir = join(homedir(), '.kiro', 'skills');
|
||||
|
||||
generateConfig(skills: Skill[]): string {
|
||||
const enabledSkills = skills.filter(s => s.enabled);
|
||||
|
||||
if (enabledSkills.length === 0) {
|
||||
return '';
|
||||
}
|
||||
|
||||
const skillsXml = enabledSkills.map(createSkillXml).join('\n\n');
|
||||
|
||||
return `<skills_system priority="1">
|
||||
|
||||
## Available Skills
|
||||
|
||||
<!-- SKILLS_TABLE_START -->
|
||||
<usage>
|
||||
When users ask you to perform tasks, check if any of the available skills below can help complete the task more effectively. Skills provide specialized capabilities and domain knowledge.
|
||||
|
||||
How to use skills:
|
||||
- Invoke: \`skillkit read <skill-name>\` or \`npx skillkit read <skill-name>\`
|
||||
- The skill content will load with detailed instructions on how to complete the task
|
||||
- Base directory provided in output for resolving bundled resources (references/, scripts/, assets/)
|
||||
|
||||
Usage notes:
|
||||
- Only use skills listed in <available_skills> below
|
||||
- Do not invoke a skill that is already loaded in your context
|
||||
- Each skill invocation is stateless
|
||||
</usage>
|
||||
|
||||
<available_skills>
|
||||
|
||||
${skillsXml}
|
||||
|
||||
</available_skills>
|
||||
<!-- SKILLS_TABLE_END -->
|
||||
|
||||
</skills_system>
|
||||
|
||||
**Note for Kiro CLI users:** After installing skills, you need to manually add them to your custom agent's \`resources\` in \`.kiro/agents/<agent>.json\`:
|
||||
|
||||
\`\`\`json
|
||||
{
|
||||
"resources": [
|
||||
"skill://.kiro/skills/**/SKILL.md"
|
||||
]
|
||||
}
|
||||
\`\`\``;
|
||||
}
|
||||
|
||||
parseConfig(content: string): string[] {
|
||||
const skillNames: string[] = [];
|
||||
const skillRegex = /<name>([^<]+)<\/name>/g;
|
||||
let match;
|
||||
|
||||
while ((match = skillRegex.exec(content)) !== null) {
|
||||
skillNames.push(match[1].trim());
|
||||
}
|
||||
|
||||
return skillNames;
|
||||
}
|
||||
|
||||
getInvokeCommand(skillName: string): string {
|
||||
return `skillkit read ${skillName}`;
|
||||
}
|
||||
|
||||
async isDetected(): Promise<boolean> {
|
||||
const projectKiro = join(process.cwd(), '.kiro');
|
||||
const globalKiro = join(homedir(), '.kiro');
|
||||
|
||||
return existsSync(projectKiro) || existsSync(globalKiro);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
import { existsSync } from 'node:fs';
|
||||
import { join } from 'node:path';
|
||||
import { homedir } from 'node:os';
|
||||
import type { AgentAdapter } from './base.js';
|
||||
import { createSkillXml } from './base.js';
|
||||
import type { Skill, AgentType } from '../core/types.js';
|
||||
|
||||
export class RooAdapter implements AgentAdapter {
|
||||
readonly type: AgentType = 'roo';
|
||||
readonly name = 'Roo Code';
|
||||
readonly skillsDir = '.roo/skills';
|
||||
readonly configFile = 'AGENTS.md';
|
||||
readonly globalSkillsDir = join(homedir(), '.roo', 'skills');
|
||||
|
||||
generateConfig(skills: Skill[]): string {
|
||||
const enabledSkills = skills.filter(s => s.enabled);
|
||||
|
||||
if (enabledSkills.length === 0) {
|
||||
return '';
|
||||
}
|
||||
|
||||
const skillsXml = enabledSkills.map(createSkillXml).join('\n\n');
|
||||
|
||||
return `<skills_system priority="1">
|
||||
|
||||
## Available Skills
|
||||
|
||||
<!-- SKILLS_TABLE_START -->
|
||||
<usage>
|
||||
When users ask you to perform tasks, check if any of the available skills below can help complete the task more effectively. Skills provide specialized capabilities and domain knowledge.
|
||||
|
||||
How to use skills:
|
||||
- Invoke: \`skillkit read <skill-name>\` or \`npx skillkit read <skill-name>\`
|
||||
- The skill content will load with detailed instructions on how to complete the task
|
||||
- Base directory provided in output for resolving bundled resources (references/, scripts/, assets/)
|
||||
|
||||
Usage notes:
|
||||
- Only use skills listed in <available_skills> below
|
||||
- Do not invoke a skill that is already loaded in your context
|
||||
- Each skill invocation is stateless
|
||||
</usage>
|
||||
|
||||
<available_skills>
|
||||
|
||||
${skillsXml}
|
||||
|
||||
</available_skills>
|
||||
<!-- SKILLS_TABLE_END -->
|
||||
|
||||
</skills_system>`;
|
||||
}
|
||||
|
||||
parseConfig(content: string): string[] {
|
||||
const skillNames: string[] = [];
|
||||
const skillRegex = /<name>([^<]+)<\/name>/g;
|
||||
let match;
|
||||
|
||||
while ((match = skillRegex.exec(content)) !== null) {
|
||||
skillNames.push(match[1].trim());
|
||||
}
|
||||
|
||||
return skillNames;
|
||||
}
|
||||
|
||||
getInvokeCommand(skillName: string): string {
|
||||
return `skillkit read ${skillName}`;
|
||||
}
|
||||
|
||||
async isDetected(): Promise<boolean> {
|
||||
const projectRoo = join(process.cwd(), '.roo');
|
||||
const globalRoo = join(homedir(), '.roo');
|
||||
|
||||
return existsSync(projectRoo) || existsSync(globalRoo);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
import { existsSync } from 'node:fs';
|
||||
import { join } from 'node:path';
|
||||
import { homedir } from 'node:os';
|
||||
import type { AgentAdapter } from './base.js';
|
||||
import { createSkillXml } from './base.js';
|
||||
import type { Skill, AgentType } from '../core/types.js';
|
||||
|
||||
export class TraeAdapter implements AgentAdapter {
|
||||
readonly type: AgentType = 'trae';
|
||||
readonly name = 'Trae';
|
||||
readonly skillsDir = '.trae/skills';
|
||||
readonly configFile = 'AGENTS.md';
|
||||
readonly globalSkillsDir = join(homedir(), '.trae', 'skills');
|
||||
|
||||
generateConfig(skills: Skill[]): string {
|
||||
const enabledSkills = skills.filter(s => s.enabled);
|
||||
|
||||
if (enabledSkills.length === 0) {
|
||||
return '';
|
||||
}
|
||||
|
||||
const skillsXml = enabledSkills.map(createSkillXml).join('\n\n');
|
||||
|
||||
return `<skills_system priority="1">
|
||||
|
||||
## Available Skills
|
||||
|
||||
<!-- SKILLS_TABLE_START -->
|
||||
<usage>
|
||||
When users ask you to perform tasks, check if any of the available skills below can help complete the task more effectively. Skills provide specialized capabilities and domain knowledge.
|
||||
|
||||
How to use skills:
|
||||
- Invoke: \`skillkit read <skill-name>\` or \`npx skillkit read <skill-name>\`
|
||||
- The skill content will load with detailed instructions on how to complete the task
|
||||
- Base directory provided in output for resolving bundled resources (references/, scripts/, assets/)
|
||||
|
||||
Usage notes:
|
||||
- Only use skills listed in <available_skills> below
|
||||
- Do not invoke a skill that is already loaded in your context
|
||||
- Each skill invocation is stateless
|
||||
</usage>
|
||||
|
||||
<available_skills>
|
||||
|
||||
${skillsXml}
|
||||
|
||||
</available_skills>
|
||||
<!-- SKILLS_TABLE_END -->
|
||||
|
||||
</skills_system>`;
|
||||
}
|
||||
|
||||
parseConfig(content: string): string[] {
|
||||
const skillNames: string[] = [];
|
||||
const skillRegex = /<name>([^<]+)<\/name>/g;
|
||||
let match;
|
||||
|
||||
while ((match = skillRegex.exec(content)) !== null) {
|
||||
skillNames.push(match[1].trim());
|
||||
}
|
||||
|
||||
return skillNames;
|
||||
}
|
||||
|
||||
getInvokeCommand(skillName: string): string {
|
||||
return `skillkit read ${skillName}`;
|
||||
}
|
||||
|
||||
async isDetected(): Promise<boolean> {
|
||||
const projectTrae = join(process.cwd(), '.trae');
|
||||
const globalTrae = join(homedir(), '.trae');
|
||||
|
||||
return existsSync(projectTrae) || existsSync(globalTrae);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
import { existsSync } from 'node:fs';
|
||||
import { join } from 'node:path';
|
||||
import { homedir } from 'node:os';
|
||||
import type { AgentAdapter } from './base.js';
|
||||
import { createSkillXml } from './base.js';
|
||||
import type { Skill, AgentType } from '../core/types.js';
|
||||
|
||||
export class WindsurfAdapter implements AgentAdapter {
|
||||
readonly type: AgentType = 'windsurf';
|
||||
readonly name = 'Windsurf';
|
||||
readonly skillsDir = '.windsurf/skills';
|
||||
readonly configFile = 'AGENTS.md';
|
||||
readonly globalSkillsDir = join(homedir(), '.codeium', 'windsurf', 'skills');
|
||||
|
||||
generateConfig(skills: Skill[]): string {
|
||||
const enabledSkills = skills.filter(s => s.enabled);
|
||||
|
||||
if (enabledSkills.length === 0) {
|
||||
return '';
|
||||
}
|
||||
|
||||
const skillsXml = enabledSkills.map(createSkillXml).join('\n\n');
|
||||
|
||||
return `<skills_system priority="1">
|
||||
|
||||
## Available Skills
|
||||
|
||||
<!-- SKILLS_TABLE_START -->
|
||||
<usage>
|
||||
When users ask you to perform tasks, check if any of the available skills below can help complete the task more effectively. Skills provide specialized capabilities and domain knowledge.
|
||||
|
||||
How to use skills:
|
||||
- Invoke: \`skillkit read <skill-name>\` or \`npx skillkit read <skill-name>\`
|
||||
- The skill content will load with detailed instructions on how to complete the task
|
||||
- Base directory provided in output for resolving bundled resources (references/, scripts/, assets/)
|
||||
|
||||
Usage notes:
|
||||
- Only use skills listed in <available_skills> below
|
||||
- Do not invoke a skill that is already loaded in your context
|
||||
- Each skill invocation is stateless
|
||||
</usage>
|
||||
|
||||
<available_skills>
|
||||
|
||||
${skillsXml}
|
||||
|
||||
</available_skills>
|
||||
<!-- SKILLS_TABLE_END -->
|
||||
|
||||
</skills_system>`;
|
||||
}
|
||||
|
||||
parseConfig(content: string): string[] {
|
||||
const skillNames: string[] = [];
|
||||
const skillRegex = /<name>([^<]+)<\/name>/g;
|
||||
let match;
|
||||
|
||||
while ((match = skillRegex.exec(content)) !== null) {
|
||||
skillNames.push(match[1].trim());
|
||||
}
|
||||
|
||||
return skillNames;
|
||||
}
|
||||
|
||||
getInvokeCommand(skillName: string): string {
|
||||
return `skillkit read ${skillName}`;
|
||||
}
|
||||
|
||||
async isDetected(): Promise<boolean> {
|
||||
const projectWindsurf = join(process.cwd(), '.windsurf');
|
||||
const globalWindsurf = join(homedir(), '.codeium', 'windsurf');
|
||||
|
||||
return existsSync(projectWindsurf) || existsSync(globalWindsurf);
|
||||
}
|
||||
}
|
||||
+5
-1
@@ -11,12 +11,14 @@ import {
|
||||
RemoveCommand,
|
||||
InitCommand,
|
||||
ValidateCommand,
|
||||
CreateCommand,
|
||||
UICommand,
|
||||
} from './commands/index.js';
|
||||
|
||||
const cli = new Cli({
|
||||
binaryLabel: 'skillkit',
|
||||
binaryName: 'skillkit',
|
||||
binaryVersion: '1.0.0',
|
||||
binaryVersion: '1.1.0',
|
||||
});
|
||||
|
||||
cli.register(Builtins.HelpCommand);
|
||||
@@ -32,5 +34,7 @@ cli.register(UpdateCommand);
|
||||
cli.register(RemoveCommand);
|
||||
cli.register(InitCommand);
|
||||
cli.register(ValidateCommand);
|
||||
cli.register(CreateCommand);
|
||||
cli.register(UICommand);
|
||||
|
||||
cli.runExit(process.argv.slice(2));
|
||||
|
||||
@@ -0,0 +1,130 @@
|
||||
import { existsSync, mkdirSync, writeFileSync } from 'node:fs';
|
||||
import { join } from 'node:path';
|
||||
import chalk from 'chalk';
|
||||
import { Command, Option } from 'clipanion';
|
||||
|
||||
export class CreateCommand extends Command {
|
||||
static override paths = [['create'], ['new']];
|
||||
|
||||
static override usage = Command.Usage({
|
||||
description: 'Create a new skill with proper structure',
|
||||
examples: [
|
||||
['Create a new skill', '$0 create my-skill'],
|
||||
['Create with all optional directories', '$0 create my-skill --full'],
|
||||
['Create with scripts directory', '$0 create my-skill --scripts'],
|
||||
],
|
||||
});
|
||||
|
||||
name = Option.String({ required: true, name: 'skill-name' });
|
||||
|
||||
full = Option.Boolean('--full,-f', false, {
|
||||
description: 'Include all optional directories (references, scripts, assets)',
|
||||
});
|
||||
|
||||
scripts = Option.Boolean('--scripts', false, {
|
||||
description: 'Include scripts directory',
|
||||
});
|
||||
|
||||
references = Option.Boolean('--references', false, {
|
||||
description: 'Include references directory',
|
||||
});
|
||||
|
||||
assets = Option.Boolean('--assets', false, {
|
||||
description: 'Include assets directory',
|
||||
});
|
||||
|
||||
directory = Option.String('--dir,-d', {
|
||||
description: 'Parent directory to create skill in (default: current directory)',
|
||||
});
|
||||
|
||||
async execute(): Promise<number> {
|
||||
const skillName = this.name.toLowerCase();
|
||||
|
||||
if (!/^[a-z0-9]+(-[a-z0-9]+)*$/.test(skillName)) {
|
||||
console.error(chalk.red('Invalid skill name'));
|
||||
console.error(chalk.dim('Must be lowercase alphanumeric with hyphens (e.g., my-skill)'));
|
||||
return 1;
|
||||
}
|
||||
|
||||
const parentDir = this.directory || process.cwd();
|
||||
const skillDir = join(parentDir, skillName);
|
||||
|
||||
if (existsSync(skillDir)) {
|
||||
console.error(chalk.red(`Directory already exists: ${skillDir}`));
|
||||
return 1;
|
||||
}
|
||||
|
||||
try {
|
||||
mkdirSync(skillDir, { recursive: true });
|
||||
|
||||
const skillMd = generateSkillMd(skillName);
|
||||
writeFileSync(join(skillDir, 'SKILL.md'), skillMd);
|
||||
|
||||
if (this.full || this.references) {
|
||||
const refsDir = join(skillDir, 'references');
|
||||
mkdirSync(refsDir);
|
||||
writeFileSync(join(refsDir, '.gitkeep'), '');
|
||||
}
|
||||
|
||||
if (this.full || this.scripts) {
|
||||
const scriptsDir = join(skillDir, 'scripts');
|
||||
mkdirSync(scriptsDir);
|
||||
writeFileSync(join(scriptsDir, '.gitkeep'), '');
|
||||
}
|
||||
|
||||
if (this.full || this.assets) {
|
||||
const assetsDir = join(skillDir, 'assets');
|
||||
mkdirSync(assetsDir);
|
||||
writeFileSync(join(assetsDir, '.gitkeep'), '');
|
||||
}
|
||||
|
||||
console.log(chalk.green(`Created skill: ${skillName}`));
|
||||
console.log();
|
||||
console.log(chalk.dim('Structure:'));
|
||||
console.log(chalk.dim(` ${skillDir}/`));
|
||||
console.log(chalk.dim(' ├── SKILL.md'));
|
||||
if (this.full || this.references) console.log(chalk.dim(' ├── references/'));
|
||||
if (this.full || this.scripts) console.log(chalk.dim(' ├── scripts/'));
|
||||
if (this.full || this.assets) console.log(chalk.dim(' └── assets/'));
|
||||
console.log();
|
||||
console.log(chalk.cyan('Next steps:'));
|
||||
console.log(chalk.dim(' 1. Edit SKILL.md with your instructions'));
|
||||
console.log(chalk.dim(' 2. Validate: skillkit validate ' + skillDir));
|
||||
console.log(chalk.dim(' 3. Test: skillkit read ' + skillName));
|
||||
|
||||
return 0;
|
||||
} catch (error) {
|
||||
console.error(chalk.red('Failed to create skill'));
|
||||
console.error(chalk.dim(error instanceof Error ? error.message : String(error)));
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function generateSkillMd(name: string): string {
|
||||
const title = name
|
||||
.split('-')
|
||||
.map(word => word.charAt(0).toUpperCase() + word.slice(1))
|
||||
.join(' ');
|
||||
|
||||
return `---
|
||||
name: ${name}
|
||||
description: Describe what this skill does and when to use it. Include trigger keywords.
|
||||
---
|
||||
|
||||
# ${title}
|
||||
|
||||
Instructions for the AI agent on how to use this skill.
|
||||
|
||||
## When to Use
|
||||
|
||||
- Scenario 1
|
||||
- Scenario 2
|
||||
|
||||
## Steps
|
||||
|
||||
1. First step
|
||||
2. Second step
|
||||
3. Third step
|
||||
`;
|
||||
}
|
||||
@@ -7,3 +7,5 @@ export { UpdateCommand } from './update.js';
|
||||
export { RemoveCommand } from './remove.js';
|
||||
export { InitCommand } from './init.js';
|
||||
export { ValidateCommand } from './validate.js';
|
||||
export { CreateCommand } from './create.js';
|
||||
export { UICommand } from './ui.js';
|
||||
+64
-3
@@ -6,7 +6,8 @@ import { Command, Option } from 'clipanion';
|
||||
import { detectProvider, isLocalPath } from '../providers/index.js';
|
||||
import { getInstallDir, saveSkillMetadata } from '../core/config.js';
|
||||
import { isPathInside } from '../core/skills.js';
|
||||
import type { SkillMetadata, GitProvider } from '../core/types.js';
|
||||
import { getAdapter, detectAgent } from '../agents/index.js';
|
||||
import type { SkillMetadata, GitProvider, AgentType } from '../core/types.js';
|
||||
|
||||
export class InstallCommand extends Command {
|
||||
static override paths = [['install'], ['i']];
|
||||
@@ -21,6 +22,8 @@ export class InstallCommand extends Command {
|
||||
['Install all skills non-interactively', '$0 install owner/repo --all'],
|
||||
['Install from local path', '$0 install ./my-skills'],
|
||||
['Install globally', '$0 install owner/repo --global'],
|
||||
['List available skills', '$0 install owner/repo --list'],
|
||||
['Install to specific agents', '$0 install owner/repo --agent claude-code --agent cursor'],
|
||||
],
|
||||
});
|
||||
|
||||
@@ -50,6 +53,14 @@ export class InstallCommand extends Command {
|
||||
description: 'Force specific provider (github, gitlab, bitbucket)',
|
||||
});
|
||||
|
||||
list = Option.Boolean('--list,-l', false, {
|
||||
description: 'List available skills without installing',
|
||||
});
|
||||
|
||||
agent = Option.Array('--agent', {
|
||||
description: 'Target specific agents (can specify multiple)',
|
||||
});
|
||||
|
||||
async execute(): Promise<number> {
|
||||
const spinner = ora();
|
||||
|
||||
@@ -84,6 +95,28 @@ export class InstallCommand extends Command {
|
||||
|
||||
const discoveredSkills = result.discoveredSkills || [];
|
||||
|
||||
if (this.list) {
|
||||
if (discoveredSkills.length === 0) {
|
||||
console.log(chalk.yellow('\nNo skills found in this repository'));
|
||||
} else {
|
||||
console.log(chalk.cyan('\nAvailable skills:\n'));
|
||||
for (const skill of discoveredSkills) {
|
||||
console.log(` ${chalk.green(skill.name)}`);
|
||||
}
|
||||
console.log();
|
||||
console.log(chalk.dim(`Total: ${discoveredSkills.length} skill(s)`));
|
||||
console.log(chalk.dim('\nTo install specific skills: skillkit install <source> --skills=skill1,skill2'));
|
||||
console.log(chalk.dim('To install all skills: skillkit install <source> --all'));
|
||||
}
|
||||
|
||||
const cleanupPath = result.tempRoot || result.path;
|
||||
if (!isLocalPath(this.source) && cleanupPath && existsSync(cleanupPath)) {
|
||||
rmSync(cleanupPath, { recursive: true, force: true });
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
let skillsToInstall = discoveredSkills;
|
||||
|
||||
if (this.skills) {
|
||||
@@ -115,12 +148,29 @@ export class InstallCommand extends Command {
|
||||
return 0;
|
||||
}
|
||||
|
||||
const installDir = getInstallDir(this.global);
|
||||
let targetAgents: AgentType[];
|
||||
if (this.agent && this.agent.length > 0) {
|
||||
targetAgents = this.agent as AgentType[];
|
||||
} else {
|
||||
const detectedAgent = await detectAgent();
|
||||
targetAgents = [detectedAgent];
|
||||
}
|
||||
|
||||
let totalInstalled = 0;
|
||||
const installResults: { agent: string; dir: string; count: number }[] = [];
|
||||
|
||||
for (const agentType of targetAgents) {
|
||||
const adapter = getAdapter(agentType);
|
||||
const installDir = getInstallDir(this.global, agentType);
|
||||
|
||||
if (!existsSync(installDir)) {
|
||||
mkdirSync(installDir, { recursive: true });
|
||||
}
|
||||
|
||||
if (targetAgents.length > 1) {
|
||||
console.log(chalk.cyan(`\nInstalling to ${adapter.name}...`));
|
||||
}
|
||||
|
||||
let installed = 0;
|
||||
for (const skill of skillsToInstall) {
|
||||
const skillName = skill.name;
|
||||
@@ -164,6 +214,10 @@ export class InstallCommand extends Command {
|
||||
spinner.fail(chalk.red(`Failed to install ${skillName}`));
|
||||
console.error(chalk.dim(error instanceof Error ? error.message : String(error)));
|
||||
}
|
||||
}
|
||||
|
||||
totalInstalled += installed;
|
||||
installResults.push({ agent: adapter.name, dir: installDir, count: installed });
|
||||
}
|
||||
|
||||
const cleanupPath = result.tempRoot || result.path;
|
||||
@@ -172,7 +226,14 @@ export class InstallCommand extends Command {
|
||||
}
|
||||
|
||||
console.log();
|
||||
console.log(chalk.green(`Installed ${installed} skill(s) to ${installDir}`));
|
||||
if (targetAgents.length > 1) {
|
||||
console.log(chalk.green(`Installed ${totalInstalled} skill(s) across ${targetAgents.length} agents:`));
|
||||
for (const r of installResults) {
|
||||
console.log(chalk.dim(` - ${r.agent}: ${r.count} skill(s) to ${r.dir}`));
|
||||
}
|
||||
} else {
|
||||
console.log(chalk.green(`Installed ${totalInstalled} skill(s) to ${installResults[0]?.dir}`));
|
||||
}
|
||||
|
||||
if (!this.yes) {
|
||||
console.log(chalk.dim('\nRun `skillkit sync` to update your agent config'));
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
import { Command } from 'clipanion';
|
||||
|
||||
export class UICommand extends Command {
|
||||
static override paths = [['ui'], ['tui']];
|
||||
|
||||
static override usage = Command.Usage({
|
||||
description: 'Launch the interactive TUI (Terminal User Interface)',
|
||||
examples: [
|
||||
['Open interactive TUI', '$0 ui'],
|
||||
['Alias for TUI', '$0 tui'],
|
||||
],
|
||||
});
|
||||
|
||||
async execute(): Promise<number> {
|
||||
const { startTUI } = await import('../tui/index.js');
|
||||
await startTUI();
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
+112
-1
@@ -3,7 +3,32 @@ import { join, basename } from 'node:path';
|
||||
import { parse as parseYaml } from 'yaml';
|
||||
import { SkillFrontmatter, SkillMetadata, type Skill, type SkillLocation } from './types.js';
|
||||
|
||||
export function discoverSkills(dir: string): Skill[] {
|
||||
export const SKILL_DISCOVERY_PATHS = [
|
||||
'skills',
|
||||
'skills/.curated',
|
||||
'skills/.experimental',
|
||||
'skills/.system',
|
||||
'.agents/skills',
|
||||
'.agent/skills',
|
||||
'.claude/skills',
|
||||
'.codex/skills',
|
||||
'.cursor/skills',
|
||||
'.factory/skills',
|
||||
'.gemini/skills',
|
||||
'.github/skills',
|
||||
'.goose/skills',
|
||||
'.kilocode/skills',
|
||||
'.kiro/skills',
|
||||
'.opencode/skills',
|
||||
'.roo/skills',
|
||||
'.trae/skills',
|
||||
'.windsurf/skills',
|
||||
'.clawdbot/skills',
|
||||
'.antigravity/skills',
|
||||
'.copilot/skills',
|
||||
];
|
||||
|
||||
function discoverSkillsInDir(dir: string): Skill[] {
|
||||
const skills: Skill[] = [];
|
||||
|
||||
if (!existsSync(dir)) {
|
||||
@@ -29,6 +54,92 @@ export function discoverSkills(dir: string): Skill[] {
|
||||
return skills;
|
||||
}
|
||||
|
||||
/**
|
||||
* Recursively search for skills in all subdirectories
|
||||
*/
|
||||
function discoverSkillsRecursive(
|
||||
dir: string,
|
||||
seen: Set<string>,
|
||||
maxDepth: number = 5,
|
||||
currentDepth: number = 0
|
||||
): Skill[] {
|
||||
const skills: Skill[] = [];
|
||||
|
||||
if (currentDepth >= maxDepth || !existsSync(dir)) {
|
||||
return skills;
|
||||
}
|
||||
|
||||
try {
|
||||
const entries = readdirSync(dir, { withFileTypes: true });
|
||||
|
||||
for (const entry of entries) {
|
||||
if (entry.name === 'node_modules' || entry.name === '.git') {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!entry.isDirectory()) continue;
|
||||
|
||||
const entryPath = join(dir, entry.name);
|
||||
const skillMdPath = join(entryPath, 'SKILL.md');
|
||||
|
||||
if (existsSync(skillMdPath)) {
|
||||
const skill = parseSkill(entryPath);
|
||||
if (skill && !seen.has(skill.name)) {
|
||||
seen.add(skill.name);
|
||||
skills.push(skill);
|
||||
}
|
||||
} else {
|
||||
const subSkills = discoverSkillsRecursive(entryPath, seen, maxDepth, currentDepth + 1);
|
||||
skills.push(...subSkills);
|
||||
}
|
||||
}
|
||||
} catch {}
|
||||
|
||||
return skills;
|
||||
}
|
||||
|
||||
export function discoverSkills(rootDir: string): Skill[] {
|
||||
const skills: Skill[] = [];
|
||||
const seen = new Set<string>();
|
||||
|
||||
const rootSkillMd = join(rootDir, 'SKILL.md');
|
||||
if (existsSync(rootSkillMd)) {
|
||||
const skill = parseSkill(rootDir);
|
||||
if (skill && !seen.has(skill.name)) {
|
||||
seen.add(skill.name);
|
||||
skills.push(skill);
|
||||
}
|
||||
}
|
||||
|
||||
// Search all standard paths
|
||||
for (const searchPath of SKILL_DISCOVERY_PATHS) {
|
||||
const fullPath = join(rootDir, searchPath);
|
||||
if (existsSync(fullPath)) {
|
||||
for (const skill of discoverSkillsInDir(fullPath)) {
|
||||
if (!seen.has(skill.name)) {
|
||||
seen.add(skill.name);
|
||||
skills.push(skill);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Try direct discovery in root (for flat structures)
|
||||
for (const skill of discoverSkillsInDir(rootDir)) {
|
||||
if (!seen.has(skill.name)) {
|
||||
seen.add(skill.name);
|
||||
skills.push(skill);
|
||||
}
|
||||
}
|
||||
|
||||
// Fallback: recursive search if nothing found
|
||||
if (skills.length === 0) {
|
||||
skills.push(...discoverSkillsRecursive(rootDir, seen));
|
||||
}
|
||||
|
||||
return skills;
|
||||
}
|
||||
|
||||
export function parseSkill(skillPath: string, location: SkillLocation = 'project'): Skill | null {
|
||||
const skillMdPath = join(skillPath, 'SKILL.md');
|
||||
|
||||
|
||||
@@ -7,6 +7,16 @@ export const AgentType = z.enum([
|
||||
'antigravity',
|
||||
'opencode',
|
||||
'gemini-cli',
|
||||
'amp',
|
||||
'clawdbot',
|
||||
'droid',
|
||||
'github-copilot',
|
||||
'goose',
|
||||
'kilo',
|
||||
'kiro-cli',
|
||||
'roo',
|
||||
'trae',
|
||||
'windsurf',
|
||||
'universal',
|
||||
]);
|
||||
export type AgentType = z.infer<typeof AgentType>;
|
||||
|
||||
@@ -76,6 +76,11 @@ export class LocalProvider implements GitProviderAdapter {
|
||||
success: true,
|
||||
path: actualPath,
|
||||
skills: skills.map(s => s.name),
|
||||
discoveredSkills: skills.map(s => ({
|
||||
name: s.name,
|
||||
dirName: basename(s.path),
|
||||
path: s.path,
|
||||
})),
|
||||
};
|
||||
} catch (error) {
|
||||
const message = error instanceof Error ? error.message : String(error);
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
import { useState } from 'react';
|
||||
import { Box, Text, useInput, useApp, useStdout } from 'ink';
|
||||
import { Sidebar } from './components/Sidebar.js';
|
||||
import { Home } from './screens/Home.js';
|
||||
import { Browse } from './screens/Browse.js';
|
||||
import { Installed } from './screens/Installed.js';
|
||||
import { Sync } from './screens/Sync.js';
|
||||
import { Settings } from './screens/Settings.js';
|
||||
|
||||
export type Screen = 'home' | 'browse' | 'installed' | 'sync' | 'settings';
|
||||
|
||||
export function App() {
|
||||
const [screen, setScreen] = useState<Screen>('home');
|
||||
const { exit } = useApp();
|
||||
const { stdout } = useStdout();
|
||||
|
||||
const cols = stdout?.columns || 80;
|
||||
const rows = stdout?.rows || 24;
|
||||
const showSidebar = cols >= 70;
|
||||
|
||||
useInput((input, key) => {
|
||||
if (input === 'q') {
|
||||
exit();
|
||||
return;
|
||||
}
|
||||
if (key.escape) {
|
||||
setScreen('home');
|
||||
return;
|
||||
}
|
||||
if (input === 'h') setScreen('home');
|
||||
if (input === 'b') setScreen('browse');
|
||||
if (input === 'l') setScreen('installed');
|
||||
if (input === 's') setScreen('sync');
|
||||
if (input === ',') setScreen('settings');
|
||||
});
|
||||
|
||||
const renderScreen = () => {
|
||||
switch (screen) {
|
||||
case 'home': return <Home onNavigate={setScreen} cols={cols} rows={rows} />;
|
||||
case 'browse': return <Browse cols={cols} rows={rows} />;
|
||||
case 'installed': return <Installed cols={cols} rows={rows} />;
|
||||
case 'sync': return <Sync cols={cols} rows={rows} />;
|
||||
case 'settings': return <Settings cols={cols} rows={rows} />;
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<Box flexDirection="column">
|
||||
<Box flexDirection="row" flexGrow={1}>
|
||||
{showSidebar && <Sidebar screen={screen} onNavigate={setScreen} />}
|
||||
<Box flexDirection="column" flexGrow={1} marginLeft={1}>
|
||||
{renderScreen()}
|
||||
</Box>
|
||||
</Box>
|
||||
<Text dimColor>h Home b Browse l List s Sync , Config Esc Back q Quit</Text>
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
import { Box, Text } from 'ink';
|
||||
import { colors, symbols } from '../theme.js';
|
||||
|
||||
interface HeaderProps {
|
||||
title: string;
|
||||
subtitle?: string;
|
||||
count?: number;
|
||||
}
|
||||
|
||||
export function Header({ title, subtitle, count }: HeaderProps) {
|
||||
return (
|
||||
<Box flexDirection="column" marginBottom={1}>
|
||||
<Box justifyContent="space-between">
|
||||
<Text color={colors.primary} bold>
|
||||
{title.toUpperCase()}
|
||||
</Text>
|
||||
{count !== undefined && (
|
||||
<Text color={colors.secondaryDim}>
|
||||
{symbols.star} {count}
|
||||
</Text>
|
||||
)}
|
||||
</Box>
|
||||
{subtitle && (
|
||||
<Text color={colors.secondaryDim} dimColor>
|
||||
{subtitle}
|
||||
</Text>
|
||||
)}
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
import { Box, Text } from 'ink';
|
||||
import TextInput from 'ink-text-input';
|
||||
import { colors } from '../theme.js';
|
||||
|
||||
interface SearchInputProps {
|
||||
value: string;
|
||||
onChange: (value: string) => void;
|
||||
placeholder?: string;
|
||||
isFocused?: boolean;
|
||||
}
|
||||
|
||||
export function SearchInput({
|
||||
value,
|
||||
onChange,
|
||||
placeholder = 'Search skills...',
|
||||
isFocused = false,
|
||||
}: SearchInputProps) {
|
||||
return (
|
||||
<Box
|
||||
borderStyle="single"
|
||||
borderColor={isFocused ? colors.primary : colors.borderDim}
|
||||
paddingX={1}
|
||||
>
|
||||
<Text color={colors.secondaryDim}>🔍 </Text>
|
||||
{isFocused ? (
|
||||
<TextInput
|
||||
value={value}
|
||||
onChange={onChange}
|
||||
placeholder={placeholder}
|
||||
/>
|
||||
) : (
|
||||
<Text color={value ? colors.secondary : colors.secondaryDim}>
|
||||
{value || placeholder}
|
||||
</Text>
|
||||
)}
|
||||
<Box flexGrow={1} />
|
||||
<Text color={colors.secondaryDim}>/</Text>
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
import { Box, Text } from 'ink';
|
||||
import { colors, symbols } from '../theme.js';
|
||||
import type { Screen } from '../App.js';
|
||||
|
||||
interface SidebarProps {
|
||||
screen: Screen;
|
||||
onNavigate: (screen: Screen) => void;
|
||||
isCompact?: boolean;
|
||||
}
|
||||
|
||||
const NAV: { id: Screen; label: string }[] = [
|
||||
{ id: 'home', label: 'Home' },
|
||||
{ id: 'browse', label: 'Browse' },
|
||||
{ id: 'installed', label: 'List' },
|
||||
{ id: 'sync', label: 'Sync' },
|
||||
{ id: 'settings', label: 'Config' },
|
||||
];
|
||||
|
||||
export function Sidebar({ screen }: SidebarProps) {
|
||||
return (
|
||||
<Box flexDirection="column" width={14} borderStyle="single" paddingX={1}>
|
||||
<Text bold color={colors.primary}>SkillKit</Text>
|
||||
|
||||
{NAV.slice(0, 2).map((item) => (
|
||||
<Text key={item.id} inverse={screen === item.id}>
|
||||
{screen === item.id ? symbols.bullet : ' '}{item.label}
|
||||
</Text>
|
||||
))}
|
||||
|
||||
<Text> </Text>
|
||||
|
||||
{NAV.slice(2).map((item) => (
|
||||
<Text key={item.id} inverse={screen === item.id}>
|
||||
{screen === item.id ? symbols.bullet : ' '}{item.label}
|
||||
</Text>
|
||||
))}
|
||||
|
||||
<Box flexGrow={1} />
|
||||
|
||||
<Text dimColor>? Help</Text>
|
||||
<Text dimColor>q Quit</Text>
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
import { Box, Text } from 'ink';
|
||||
import { colors, symbols } from '../theme.js';
|
||||
|
||||
export interface SkillItem {
|
||||
name: string;
|
||||
description?: string;
|
||||
source?: string;
|
||||
installs?: number;
|
||||
enabled?: boolean;
|
||||
}
|
||||
|
||||
interface SkillListProps {
|
||||
skills: SkillItem[];
|
||||
selectedIndex: number;
|
||||
showInstalls?: boolean;
|
||||
showRank?: boolean;
|
||||
showSource?: boolean;
|
||||
maxVisible?: number;
|
||||
}
|
||||
|
||||
function formatInstalls(count: number): string {
|
||||
if (count >= 1000) {
|
||||
return `${(count / 1000).toFixed(1)}K`;
|
||||
}
|
||||
return String(count);
|
||||
}
|
||||
|
||||
export function SkillList({
|
||||
skills,
|
||||
selectedIndex,
|
||||
showInstalls = false,
|
||||
showRank = false,
|
||||
showSource = true,
|
||||
maxVisible = 10,
|
||||
}: SkillListProps) {
|
||||
if (skills.length === 0) {
|
||||
return (
|
||||
<Box>
|
||||
<Text color={colors.secondaryDim} dimColor>
|
||||
No skills found
|
||||
</Text>
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
|
||||
const startIndex = Math.max(0, selectedIndex - Math.floor(maxVisible / 2));
|
||||
const visibleSkills = skills.slice(startIndex, startIndex + maxVisible);
|
||||
const actualStartIndex = startIndex;
|
||||
|
||||
return (
|
||||
<Box flexDirection="column">
|
||||
{showRank && (
|
||||
<Box marginBottom={1}>
|
||||
<Text color={colors.secondaryDim}>
|
||||
{' # SKILL'}
|
||||
{showSource && ' SOURCE'}
|
||||
{showInstalls && ' INSTALLS'}
|
||||
</Text>
|
||||
</Box>
|
||||
)}
|
||||
|
||||
{visibleSkills.map((skill, idx) => {
|
||||
const realIndex = actualStartIndex + idx;
|
||||
const isSelected = realIndex === selectedIndex;
|
||||
const skillName = skill.name.padEnd(28).slice(0, 28);
|
||||
const sourceName = skill.source ? skill.source.slice(0, 25) : '';
|
||||
|
||||
return (
|
||||
<Box key={`${skill.source}-${skill.name}`}>
|
||||
<Text
|
||||
color={isSelected ? colors.primary : colors.secondary}
|
||||
bold={isSelected}
|
||||
inverse={isSelected}
|
||||
>
|
||||
{isSelected ? symbols.pointer : ' '}
|
||||
{showRank ? String(realIndex + 1).padStart(2, ' ') : ''}
|
||||
{' '}
|
||||
{skillName}
|
||||
</Text>
|
||||
{showSource && (
|
||||
<Text color={colors.secondaryDim} dimColor={!isSelected}>
|
||||
{' '}{sourceName}
|
||||
</Text>
|
||||
)}
|
||||
{showInstalls && skill.installs !== undefined && (
|
||||
<Text color={colors.secondaryDim}>
|
||||
{formatInstalls(skill.installs).padStart(8)}
|
||||
</Text>
|
||||
)}
|
||||
</Box>
|
||||
);
|
||||
})}
|
||||
|
||||
{skills.length > maxVisible && (
|
||||
<Box marginTop={1}>
|
||||
<Text color={colors.secondaryDim} dimColor>
|
||||
Showing {startIndex + 1}-{Math.min(startIndex + maxVisible, skills.length)} of {skills.length}
|
||||
</Text>
|
||||
</Box>
|
||||
)}
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
import { Box, Text } from 'ink';
|
||||
import { colors, symbols } from '../theme.js';
|
||||
|
||||
interface Shortcut {
|
||||
key: string;
|
||||
label: string;
|
||||
}
|
||||
|
||||
interface StatusBarProps {
|
||||
shortcuts: Shortcut[];
|
||||
message?: string;
|
||||
}
|
||||
|
||||
export function StatusBar({ shortcuts, message }: StatusBarProps) {
|
||||
return (
|
||||
<Box
|
||||
borderStyle="single"
|
||||
borderColor={colors.borderDim}
|
||||
borderTop
|
||||
borderBottom={false}
|
||||
borderLeft={false}
|
||||
borderRight={false}
|
||||
paddingX={1}
|
||||
justifyContent="space-between"
|
||||
>
|
||||
<Box gap={2}>
|
||||
{shortcuts.map((shortcut, idx) => (
|
||||
<Box key={idx} gap={1}>
|
||||
<Text color={colors.primary} bold>
|
||||
{shortcut.key}
|
||||
</Text>
|
||||
<Text color={colors.secondaryDim}>{shortcut.label}</Text>
|
||||
</Box>
|
||||
))}
|
||||
</Box>
|
||||
|
||||
{message && (
|
||||
<Text color={colors.success}>
|
||||
{symbols.check} {message}
|
||||
</Text>
|
||||
)}
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
export { Sidebar } from './Sidebar.js';
|
||||
export { Header } from './Header.js';
|
||||
export { SkillList, type SkillItem } from './SkillList.js';
|
||||
export { StatusBar } from './StatusBar.js';
|
||||
export { SearchInput } from './SearchInput.js';
|
||||
@@ -0,0 +1,3 @@
|
||||
export { useSkills } from './useSkills.js';
|
||||
export { useMarketplace } from './useMarketplace.js';
|
||||
export { useKeyboard, useListNavigation } from './useKeyboard.js';
|
||||
@@ -0,0 +1,93 @@
|
||||
import { useState, useCallback, useEffect } from 'react';
|
||||
import { useInput, useApp } from 'ink';
|
||||
import type { Screen } from '../App.js';
|
||||
|
||||
interface UseKeyboardOptions {
|
||||
onNavigate?: (screen: Screen) => void;
|
||||
onSelect?: () => void;
|
||||
onSearch?: () => void;
|
||||
onInstall?: () => void;
|
||||
onBack?: () => void;
|
||||
onUp?: () => void;
|
||||
onDown?: () => void;
|
||||
disabled?: boolean;
|
||||
}
|
||||
|
||||
export function useKeyboard(options: UseKeyboardOptions = {}) {
|
||||
const { exit } = useApp();
|
||||
|
||||
useInput((input, key) => {
|
||||
if (options.disabled) return;
|
||||
|
||||
if (input === 'q' || (key.ctrl && input === 'c')) {
|
||||
exit();
|
||||
return;
|
||||
}
|
||||
|
||||
if (key.escape && options.onBack) {
|
||||
options.onBack();
|
||||
return;
|
||||
}
|
||||
|
||||
if (key.return && options.onSelect) {
|
||||
options.onSelect();
|
||||
return;
|
||||
}
|
||||
|
||||
if (key.upArrow && options.onUp) {
|
||||
options.onUp();
|
||||
return;
|
||||
}
|
||||
|
||||
if (key.downArrow && options.onDown) {
|
||||
options.onDown();
|
||||
return;
|
||||
}
|
||||
|
||||
if (input === '/' && options.onSearch) {
|
||||
options.onSearch();
|
||||
return;
|
||||
}
|
||||
|
||||
if (input === 'i' && options.onInstall) {
|
||||
options.onInstall();
|
||||
return;
|
||||
}
|
||||
|
||||
if (input === 'h' && options.onNavigate) {
|
||||
options.onNavigate('home');
|
||||
} else if (input === 'b' && options.onNavigate) {
|
||||
options.onNavigate('browse');
|
||||
} else if (input === 'l' && options.onNavigate) {
|
||||
options.onNavigate('installed');
|
||||
} else if (input === 's' && options.onNavigate) {
|
||||
options.onNavigate('sync');
|
||||
} else if (input === ',' && options.onNavigate) {
|
||||
options.onNavigate('settings');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export function useListNavigation(listLength: number, initialIndex = 0) {
|
||||
const [selectedIndex, setSelectedIndex] = useState(initialIndex);
|
||||
|
||||
useEffect(() => {
|
||||
if (selectedIndex >= listLength && listLength > 0) {
|
||||
setSelectedIndex(listLength - 1);
|
||||
}
|
||||
}, [listLength, selectedIndex]);
|
||||
|
||||
const moveUp = useCallback(() => {
|
||||
setSelectedIndex((prev) => Math.max(0, prev - 1));
|
||||
}, []);
|
||||
|
||||
const moveDown = useCallback(() => {
|
||||
setSelectedIndex((prev) => Math.min(listLength - 1, prev + 1));
|
||||
}, [listLength]);
|
||||
|
||||
const reset = useCallback(() => {
|
||||
setSelectedIndex(0);
|
||||
}, []);
|
||||
|
||||
return { selectedIndex, setSelectedIndex, moveUp, moveDown, reset };
|
||||
}
|
||||
@@ -0,0 +1,183 @@
|
||||
import { useState, useCallback, useEffect } from 'react';
|
||||
import { detectProvider } from '../../providers/index.js';
|
||||
import type { SkillItem } from '../components/SkillList.js';
|
||||
|
||||
export interface RepoInfo {
|
||||
source: string;
|
||||
name: string;
|
||||
}
|
||||
|
||||
const POPULAR_REPOS: RepoInfo[] = [
|
||||
{ source: 'anthropics/skills', name: 'Anthropic Official' },
|
||||
{ source: 'vercel-labs/agent-skills', name: 'Vercel Labs' },
|
||||
{ source: 'expo/skills', name: 'Expo / React Native' },
|
||||
{ source: 'remotion-dev/skills', name: 'Remotion Video' },
|
||||
{ source: 'ComposioHQ/awesome-claude-skills', name: 'Composio Awesome' },
|
||||
{ source: 'travisvn/awesome-claude-skills', name: 'Travis Awesome' },
|
||||
{ source: 'mhattingpete/claude-skills-marketplace', name: 'Skills Marketplace' },
|
||||
{ source: 'coreyhaines31/marketingskills', name: 'Marketing Skills' },
|
||||
{ source: 'obra/superpowers', name: 'Superpowers TDD' },
|
||||
{ source: 'softaworks/agent-toolkit', name: 'Softaworks Toolkit' },
|
||||
{ source: 'wshobson/agents', name: 'Dev Patterns' },
|
||||
{ source: 'langgenius/dify', name: 'Dify Frontend' },
|
||||
{ source: 'trailofbits/skills', name: 'Trail of Bits Security' },
|
||||
{ source: 'better-auth/skills', name: 'Better Auth' },
|
||||
{ source: 'onmax/nuxt-skills', name: 'Nuxt / Vue' },
|
||||
{ source: 'hyf0/vue-skills', name: 'Vue Best Practices' },
|
||||
{ source: 'jezweb/claude-skills', name: 'Cloudflare / TanStack' },
|
||||
{ source: 'elysiajs/skills', name: 'ElysiaJS / Bun' },
|
||||
{ source: 'kadajett/agent-nestjs-skills', name: 'NestJS' },
|
||||
{ source: 'callstackincubator/agent-skills', name: 'React Native' },
|
||||
{ source: 'cloudai-x/threejs-skills', name: 'Three.js' },
|
||||
{ source: 'emalorenzo/three-agent-skills', name: 'Three.js Advanced' },
|
||||
{ source: 'dimillian/skills', name: 'SwiftUI iOS' },
|
||||
{ source: 'stripe/ai', name: 'Stripe Payments' },
|
||||
{ source: 'waynesutton/convexskills', name: 'Convex Backend' },
|
||||
{ source: 'kepano/obsidian-skills', name: 'Obsidian Notes' },
|
||||
{ source: 'jimliu/baoyu-skills', name: 'Baoyu Tools' },
|
||||
{ source: 'giuseppe-trisciuoglio/developer-kit', name: 'Shadcn / Radix' },
|
||||
{ source: 'openrouterteam/agent-skills', name: 'OpenRouter SDK' },
|
||||
{ source: 'intellectronica/agent-skills', name: 'Context7' },
|
||||
{ source: 'boristane/agent-skills', name: 'Logging Patterns' },
|
||||
{ source: 'f/awesome-chatgpt-prompts', name: 'ChatGPT Prompts' },
|
||||
{ source: 'rohitg00/openskills', name: 'OpenSkills' },
|
||||
];
|
||||
|
||||
interface FetchedSkill {
|
||||
name: string;
|
||||
source: string;
|
||||
repoName: string;
|
||||
description?: string;
|
||||
}
|
||||
|
||||
interface UseMarketplaceResult {
|
||||
skills: SkillItem[];
|
||||
loading: boolean;
|
||||
error: string | null;
|
||||
totalCount: number;
|
||||
repos: RepoInfo[];
|
||||
currentRepo: string | null;
|
||||
refresh: () => void;
|
||||
search: (query: string) => void;
|
||||
fetchRepo: (source: string) => Promise<void>;
|
||||
fetchAllRepos: () => Promise<void>;
|
||||
}
|
||||
|
||||
export function useMarketplace(): UseMarketplaceResult {
|
||||
const [allSkills, setAllSkills] = useState<FetchedSkill[]>([]);
|
||||
const [filteredSkills, setFilteredSkills] = useState<FetchedSkill[]>([]);
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [error, setError] = useState<string | null>(null);
|
||||
const [currentRepo, setCurrentRepo] = useState<string | null>(null);
|
||||
const [fetchedRepos, setFetchedRepos] = useState<Set<string>>(new Set());
|
||||
|
||||
const fetchRepo = useCallback(async (source: string) => {
|
||||
if (fetchedRepos.has(source)) return;
|
||||
|
||||
setLoading(true);
|
||||
setError(null);
|
||||
setCurrentRepo(source);
|
||||
|
||||
try {
|
||||
const provider = detectProvider(source);
|
||||
if (!provider) {
|
||||
throw new Error(`Could not detect provider for: ${source}`);
|
||||
}
|
||||
|
||||
const result = await provider.clone(source, '', { depth: 1 });
|
||||
|
||||
if (!result.success || !result.discoveredSkills) {
|
||||
throw new Error(result.error || 'Failed to fetch skills');
|
||||
}
|
||||
|
||||
const repoName = POPULAR_REPOS.find(r => r.source === source)?.name || source;
|
||||
const newSkills: FetchedSkill[] = result.discoveredSkills.map(skill => ({
|
||||
name: skill.name,
|
||||
source: source,
|
||||
repoName: repoName,
|
||||
description: undefined,
|
||||
}));
|
||||
|
||||
setAllSkills(prev => {
|
||||
const updated = [...prev, ...newSkills];
|
||||
return updated.sort((a, b) => a.name.localeCompare(b.name));
|
||||
});
|
||||
|
||||
setFetchedRepos(prev => new Set([...prev, source]));
|
||||
|
||||
if (result.tempRoot) {
|
||||
const { rmSync } = await import('node:fs');
|
||||
rmSync(result.tempRoot, { recursive: true, force: true });
|
||||
}
|
||||
} catch (err) {
|
||||
setError(err instanceof Error ? err.message : 'Failed to fetch repository');
|
||||
} finally {
|
||||
setLoading(false);
|
||||
setCurrentRepo(null);
|
||||
}
|
||||
}, [fetchedRepos]);
|
||||
|
||||
const fetchAllRepos = useCallback(async () => {
|
||||
setLoading(true);
|
||||
setError(null);
|
||||
|
||||
for (const repo of POPULAR_REPOS) {
|
||||
if (!fetchedRepos.has(repo.source)) {
|
||||
setCurrentRepo(repo.source);
|
||||
try {
|
||||
await fetchRepo(repo.source);
|
||||
} catch {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
setLoading(false);
|
||||
setCurrentRepo(null);
|
||||
}, [fetchRepo, fetchedRepos]);
|
||||
|
||||
const search = useCallback((query: string) => {
|
||||
if (!query.trim()) {
|
||||
setFilteredSkills(allSkills);
|
||||
} else {
|
||||
const lowerQuery = query.toLowerCase();
|
||||
setFilteredSkills(
|
||||
allSkills.filter(
|
||||
(s) =>
|
||||
s.name.toLowerCase().includes(lowerQuery) ||
|
||||
s.source.toLowerCase().includes(lowerQuery) ||
|
||||
s.repoName.toLowerCase().includes(lowerQuery) ||
|
||||
s.description?.toLowerCase().includes(lowerQuery)
|
||||
)
|
||||
);
|
||||
}
|
||||
}, [allSkills]);
|
||||
|
||||
const refresh = useCallback(() => {
|
||||
setFetchedRepos(new Set());
|
||||
setAllSkills([]);
|
||||
setFilteredSkills([]);
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
setFilteredSkills(allSkills);
|
||||
}, [allSkills]);
|
||||
|
||||
const skills: SkillItem[] = filteredSkills.map((s) => ({
|
||||
name: s.name,
|
||||
description: s.description || s.repoName,
|
||||
source: s.source,
|
||||
}));
|
||||
|
||||
return {
|
||||
skills,
|
||||
loading,
|
||||
error,
|
||||
totalCount: allSkills.length,
|
||||
repos: POPULAR_REPOS,
|
||||
currentRepo,
|
||||
refresh,
|
||||
search,
|
||||
fetchRepo,
|
||||
fetchAllRepos,
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
import { useState, useEffect } from 'react';
|
||||
import { getSearchDirs } from '../../core/config.js';
|
||||
import { findAllSkills } from '../../core/skills.js';
|
||||
import type { SkillItem } from '../components/SkillList.js';
|
||||
|
||||
interface UseSkillsResult {
|
||||
skills: SkillItem[];
|
||||
loading: boolean;
|
||||
error: string | null;
|
||||
refresh: () => void;
|
||||
remove: (name: string) => Promise<void>;
|
||||
}
|
||||
|
||||
export function useSkills(): UseSkillsResult {
|
||||
const [skills, setSkills] = useState<SkillItem[]>([]);
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [error, setError] = useState<string | null>(null);
|
||||
|
||||
const refresh = () => {
|
||||
setLoading(true);
|
||||
setError(null);
|
||||
|
||||
try {
|
||||
const searchDirs = getSearchDirs();
|
||||
const foundSkills = findAllSkills(searchDirs);
|
||||
|
||||
const skillItems: SkillItem[] = foundSkills.map((s) => ({
|
||||
name: s.name,
|
||||
description: s.description,
|
||||
source: s.metadata?.source,
|
||||
enabled: s.enabled,
|
||||
}));
|
||||
|
||||
setSkills(skillItems);
|
||||
} catch (err) {
|
||||
setError(err instanceof Error ? err.message : 'Failed to load skills');
|
||||
} finally {
|
||||
setLoading(false);
|
||||
}
|
||||
};
|
||||
|
||||
const remove = async (name: string) => {
|
||||
const { rmSync } = await import('node:fs');
|
||||
const foundSkill = skills.find(s => s.name === name);
|
||||
if (foundSkill) {
|
||||
const searchDirs = getSearchDirs();
|
||||
const allSkills = findAllSkills(searchDirs);
|
||||
const skill = allSkills.find(s => s.name === name);
|
||||
if (skill) {
|
||||
rmSync(skill.path, { recursive: true, force: true });
|
||||
refresh();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
refresh();
|
||||
}, []);
|
||||
|
||||
return { skills, loading, error, refresh, remove };
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
import { render } from 'ink';
|
||||
import { App } from './App.js';
|
||||
|
||||
export function startTUI() {
|
||||
const { waitUntilExit } = render(<App />);
|
||||
return waitUntilExit();
|
||||
}
|
||||
@@ -0,0 +1,223 @@
|
||||
import { useState } from 'react';
|
||||
import { existsSync, mkdirSync, cpSync, rmSync } from 'node:fs';
|
||||
import { join } from 'node:path';
|
||||
import { Box, Text, useInput } from 'ink';
|
||||
import { colors, symbols } from '../theme.js';
|
||||
import { useMarketplace } from '../hooks/useMarketplace.js';
|
||||
import { detectProvider } from '../../providers/index.js';
|
||||
import { detectAgent, getAdapter, getAllAdapters } from '../../agents/index.js';
|
||||
import { getInstallDir, saveSkillMetadata } from '../../core/config.js';
|
||||
import type { SkillMetadata, AgentType } from '../../core/types.js';
|
||||
|
||||
type View = 'repos' | 'skills' | 'agents';
|
||||
|
||||
interface Props {
|
||||
cols?: number;
|
||||
rows?: number;
|
||||
}
|
||||
|
||||
export function Browse({ rows = 24 }: Props) {
|
||||
const { repos, skills, loading, currentRepo, fetchRepo, fetchAllRepos } = useMarketplace();
|
||||
const [view, setView] = useState<View>('repos');
|
||||
const [sel, setSel] = useState(0);
|
||||
const [installing, setInstalling] = useState<string | null>(null);
|
||||
const [message, setMessage] = useState<string | null>(null);
|
||||
const [selectedSkill, setSelectedSkill] = useState<{ name: string; source: string } | null>(null);
|
||||
const [agents, setAgents] = useState<{ type: AgentType; name: string; detected: boolean }[]>([]);
|
||||
|
||||
const items = view === 'repos' ? repos : view === 'skills' ? skills : agents;
|
||||
const maxVisible = Math.max(5, rows - 8);
|
||||
const start = Math.max(0, Math.min(sel - Math.floor(maxVisible / 2), items.length - maxVisible));
|
||||
const visible = items.slice(start, start + maxVisible);
|
||||
|
||||
const showAgentSelection = async (skillName: string, source: string) => {
|
||||
setSelectedSkill({ name: skillName, source });
|
||||
const adapters = getAllAdapters();
|
||||
const agentList: typeof agents = [];
|
||||
for (const a of adapters) {
|
||||
agentList.push({
|
||||
type: a.type as AgentType,
|
||||
name: a.name,
|
||||
detected: await a.isDetected(),
|
||||
});
|
||||
}
|
||||
setAgents(agentList);
|
||||
setView('agents');
|
||||
setSel(0);
|
||||
};
|
||||
|
||||
const installSkill = async (skillName: string, source: string, agentType?: AgentType) => {
|
||||
setInstalling(skillName);
|
||||
setMessage(null);
|
||||
|
||||
try {
|
||||
const provider = detectProvider(source);
|
||||
if (!provider) {
|
||||
setMessage(`Error: Unknown provider for ${source}`);
|
||||
setInstalling(null);
|
||||
return;
|
||||
}
|
||||
|
||||
const result = await provider.clone(source, '', { depth: 1 });
|
||||
|
||||
if (!result.success || !result.discoveredSkills) {
|
||||
setMessage(`Error: ${result.error || 'Failed to fetch'}`);
|
||||
setInstalling(null);
|
||||
return;
|
||||
}
|
||||
|
||||
const skill = result.discoveredSkills.find(s => s.name === skillName);
|
||||
if (!skill) {
|
||||
setMessage(`Error: Skill ${skillName} not found`);
|
||||
setInstalling(null);
|
||||
return;
|
||||
}
|
||||
|
||||
const targetAgentType = agentType || await detectAgent();
|
||||
const adapter = getAdapter(targetAgentType);
|
||||
const installDir = getInstallDir(false, targetAgentType);
|
||||
|
||||
if (!existsSync(installDir)) {
|
||||
mkdirSync(installDir, { recursive: true });
|
||||
}
|
||||
|
||||
const targetPath = join(installDir, skillName);
|
||||
|
||||
if (existsSync(targetPath)) {
|
||||
rmSync(targetPath, { recursive: true, force: true });
|
||||
}
|
||||
|
||||
cpSync(skill.path, targetPath, { recursive: true, dereference: true });
|
||||
|
||||
const metadata: SkillMetadata = {
|
||||
name: skillName,
|
||||
description: '',
|
||||
source: source,
|
||||
sourceType: provider.type,
|
||||
subpath: skillName,
|
||||
installedAt: new Date().toISOString(),
|
||||
enabled: true,
|
||||
};
|
||||
saveSkillMetadata(targetPath, metadata);
|
||||
|
||||
if (result.tempRoot) {
|
||||
rmSync(result.tempRoot, { recursive: true, force: true });
|
||||
}
|
||||
|
||||
setMessage(`✓ Installed ${skillName} to ${adapter.name}`);
|
||||
if (!agentType) {
|
||||
setView('skills');
|
||||
}
|
||||
} catch (err) {
|
||||
setMessage(`Error: ${err instanceof Error ? err.message : 'Unknown error'}`);
|
||||
} finally {
|
||||
setInstalling(null);
|
||||
if (agentType) {
|
||||
setSelectedSkill(null);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
useInput((input, key) => {
|
||||
if (loading || installing) return;
|
||||
|
||||
if (key.upArrow) setSel(i => Math.max(0, i - 1));
|
||||
else if (key.downArrow) setSel(i => Math.min(items.length - 1, i + 1));
|
||||
else if (key.return) {
|
||||
if (view === 'repos' && repos[sel]) {
|
||||
fetchRepo(repos[sel].source);
|
||||
setView('skills');
|
||||
setSel(0);
|
||||
setMessage(null);
|
||||
} else if (view === 'skills' && skills[sel]?.source) {
|
||||
installSkill(skills[sel].name, skills[sel].source);
|
||||
} else if (view === 'agents' && agents[sel]) {
|
||||
installSkill(selectedSkill!.name, selectedSkill!.source, agents[sel].type);
|
||||
}
|
||||
}
|
||||
else if (input === 'm' && view === 'skills' && skills[sel]?.source) {
|
||||
showAgentSelection(skills[sel].name, skills[sel].source!);
|
||||
}
|
||||
else if (input === 'r') {
|
||||
if (view === 'skills') {
|
||||
setView('repos');
|
||||
setSel(0);
|
||||
setMessage(null);
|
||||
} else if (view === 'agents') {
|
||||
setView('skills');
|
||||
setSel(0);
|
||||
}
|
||||
}
|
||||
else if (input === 'a' && view === 'repos') {
|
||||
fetchAllRepos();
|
||||
setView('skills');
|
||||
setSel(0);
|
||||
}
|
||||
});
|
||||
|
||||
if (view === 'agents') {
|
||||
return (
|
||||
<Box flexDirection="column">
|
||||
<Text bold color={colors.primary}>SELECT AGENT</Text>
|
||||
<Text dimColor>Install "{selectedSkill?.name}" to which agent?</Text>
|
||||
<Text dimColor>(All agents supported - directory created if needed)</Text>
|
||||
|
||||
<Box marginTop={1} flexDirection="column">
|
||||
{visible.map((agent, i) => {
|
||||
const idx = start + i;
|
||||
const isSel = idx === sel;
|
||||
const a = agent as typeof agents[0];
|
||||
const status = a.detected ? '(ready)' : '(will create)';
|
||||
return (
|
||||
<Text key={a.type} inverse={isSel}>
|
||||
{isSel ? symbols.pointer : ' '} {a.name.padEnd(20)} <Text color={colors.secondaryDim}>{status}</Text>
|
||||
</Text>
|
||||
);
|
||||
})}
|
||||
</Box>
|
||||
|
||||
<Box marginTop={1}>
|
||||
<Text dimColor>Enter=install to selected agent r=back q=quit</Text>
|
||||
</Box>
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<Box flexDirection="column">
|
||||
<Text bold color={colors.primary}>{view === 'repos' ? 'REPOSITORIES' : 'SKILLS'}</Text>
|
||||
{loading && <Text dimColor>Loading {currentRepo}...</Text>}
|
||||
{installing && <Text>Installing {installing}...</Text>}
|
||||
{message && <Text dimColor>{message}</Text>}
|
||||
<Text dimColor>{items.length} items</Text>
|
||||
|
||||
<Box marginTop={1} flexDirection="column">
|
||||
{start > 0 && <Text dimColor> ↑ {start} more</Text>}
|
||||
{visible.map((item, i) => {
|
||||
const idx = start + i;
|
||||
const isSel = idx === sel;
|
||||
const name = view === 'repos'
|
||||
? (item as typeof repos[0]).name
|
||||
: (item as typeof skills[0]).name;
|
||||
const src = view === 'repos'
|
||||
? (item as typeof repos[0]).source
|
||||
: (item as typeof skills[0]).source || '';
|
||||
return (
|
||||
<Text key={src + name} inverse={isSel}>
|
||||
{isSel ? symbols.pointer : ' '}{name.padEnd(25)} <Text color={colors.secondaryDim}>{src}</Text>
|
||||
</Text>
|
||||
);
|
||||
})}
|
||||
{start + maxVisible < items.length && <Text dimColor> ↓ {items.length - start - maxVisible} more</Text>}
|
||||
</Box>
|
||||
|
||||
<Box marginTop={1}>
|
||||
<Text dimColor>
|
||||
{view === 'repos'
|
||||
? 'Enter=fetch a=all q=quit'
|
||||
: 'Enter=quick install m=choose agent r=back q=quit'}
|
||||
</Text>
|
||||
</Box>
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
import { useState, useEffect } from 'react';
|
||||
import { Box, Text } from 'ink';
|
||||
import { colors, logo } from '../theme.js';
|
||||
import type { Screen } from '../App.js';
|
||||
|
||||
interface HomeProps {
|
||||
onNavigate: (screen: Screen) => void;
|
||||
cols?: number;
|
||||
rows?: number;
|
||||
}
|
||||
|
||||
const CHARS = '01█▓▒░╔╗╚╝║═';
|
||||
|
||||
const logoSmall = `
|
||||
╔═╗╦╔═╦╦ ╦ ╦╔═╦╔╦╗
|
||||
╚═╗╠╩╗║║ ║ ╠╩╗║ ║
|
||||
╚═╝╩ ╩╩╩═╝╩═╝╩ ╩╩ ╩
|
||||
`.trim();
|
||||
|
||||
function scramble(target: string, progress: number): string {
|
||||
return target.split('\n').map(line => {
|
||||
return line.split('').map((char, i) => {
|
||||
if (char === ' ') return char;
|
||||
if (progress > (i / line.length) * 100) return char;
|
||||
return CHARS[Math.floor(Math.random() * CHARS.length)];
|
||||
}).join('');
|
||||
}).join('\n');
|
||||
}
|
||||
|
||||
export function Home({ cols = 80, rows = 24 }: HomeProps) {
|
||||
const [progress, setProgress] = useState(0);
|
||||
const [display, setDisplay] = useState('');
|
||||
|
||||
const useLogo = cols < 80 ? logoSmall : logo;
|
||||
|
||||
useEffect(() => {
|
||||
if (progress >= 100) {
|
||||
setDisplay(useLogo);
|
||||
return;
|
||||
}
|
||||
const t = setInterval(() => {
|
||||
setProgress(p => {
|
||||
const next = p + 12;
|
||||
setDisplay(scramble(useLogo, next));
|
||||
return next;
|
||||
});
|
||||
}, 35);
|
||||
return () => clearInterval(t);
|
||||
}, [progress, useLogo]);
|
||||
|
||||
return (
|
||||
<Box flexDirection="column">
|
||||
<Text color={colors.primary}>{display || useLogo}</Text>
|
||||
|
||||
<Box marginTop={1}>
|
||||
<Text>Manage AI agent skills from your terminal.</Text>
|
||||
</Box>
|
||||
|
||||
<Box marginTop={1} flexDirection="column">
|
||||
<Text bold>Quick Actions:</Text>
|
||||
<Text dimColor> [b] Browse skills marketplace</Text>
|
||||
<Text dimColor> [l] View installed skills</Text>
|
||||
<Text dimColor> [s] Sync skills across agents</Text>
|
||||
<Text dimColor> [,] Settings</Text>
|
||||
</Box>
|
||||
|
||||
{rows >= 18 && (
|
||||
<Box marginTop={1} flexDirection="column">
|
||||
<Text bold>Navigation:</Text>
|
||||
<Text dimColor> ↑↓ Navigate lists</Text>
|
||||
<Text dimColor> Enter Select / Confirm</Text>
|
||||
<Text dimColor> Esc Go back / Home</Text>
|
||||
<Text dimColor> q Quit</Text>
|
||||
</Box>
|
||||
)}
|
||||
|
||||
<Box marginTop={1}>
|
||||
<Text dimColor>v1.1.0 - Works with 17 AI agents</Text>
|
||||
</Box>
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
import { useState } from 'react';
|
||||
import { Box, Text, useInput } from 'ink';
|
||||
import { colors, symbols } from '../theme.js';
|
||||
import { useSkills } from '../hooks/useSkills.js';
|
||||
|
||||
interface Props {
|
||||
cols?: number;
|
||||
rows?: number;
|
||||
}
|
||||
|
||||
export function Installed({ rows = 24 }: Props) {
|
||||
const { skills, loading, refresh, remove } = useSkills();
|
||||
const [sel, setSel] = useState(0);
|
||||
|
||||
const maxVisible = Math.max(5, rows - 6);
|
||||
const start = Math.max(0, Math.min(sel - Math.floor(maxVisible / 2), skills.length - maxVisible));
|
||||
const visible = skills.slice(start, start + maxVisible);
|
||||
|
||||
useInput((input, key) => {
|
||||
if (loading) return;
|
||||
if (key.upArrow) setSel(i => Math.max(0, i - 1));
|
||||
else if (key.downArrow) setSel(i => Math.min(skills.length - 1, i + 1));
|
||||
else if (input === 'r') refresh();
|
||||
else if (input === 'd' && skills[sel]) remove(skills[sel].name);
|
||||
});
|
||||
|
||||
return (
|
||||
<Box flexDirection="column">
|
||||
<Text bold color={colors.primary}>INSTALLED SKILLS</Text>
|
||||
<Text dimColor>{skills.length} skills</Text>
|
||||
|
||||
{loading && <Text>Loading...</Text>}
|
||||
|
||||
{!loading && skills.length === 0 && (
|
||||
<Text dimColor>No skills installed. Press b to browse.</Text>
|
||||
)}
|
||||
|
||||
{!loading && skills.length > 0 && (
|
||||
<Box marginTop={1} flexDirection="column">
|
||||
{start > 0 && <Text dimColor> ↑ {start} more</Text>}
|
||||
{visible.map((skill, i) => {
|
||||
const idx = start + i;
|
||||
const isSel = idx === sel;
|
||||
return (
|
||||
<Text key={skill.name} inverse={isSel}>
|
||||
{isSel ? symbols.pointer : ' '}{skill.name.padEnd(30)} {skill.source && <Text color={colors.secondaryDim}>{skill.source}</Text>}
|
||||
</Text>
|
||||
);
|
||||
})}
|
||||
{start + maxVisible < skills.length && <Text dimColor> ↓ {skills.length - start - maxVisible} more</Text>}
|
||||
</Box>
|
||||
)}
|
||||
|
||||
<Box marginTop={1}>
|
||||
<Text dimColor>r=refresh d=delete q=quit</Text>
|
||||
</Box>
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
import { useState } from 'react';
|
||||
import { Box, Text, useInput } from 'ink';
|
||||
import { colors, symbols } from '../theme.js';
|
||||
|
||||
interface Props {
|
||||
cols?: number;
|
||||
rows?: number;
|
||||
}
|
||||
|
||||
const SETTINGS = [
|
||||
{ id: 'agent', label: 'Default Agent', value: 'auto-detect' },
|
||||
{ id: 'sync', label: 'Auto Sync', value: 'disabled' },
|
||||
{ id: 'cache', label: 'Cache Dir', value: '~/.skillkit/cache' },
|
||||
];
|
||||
|
||||
export function Settings({}: Props) {
|
||||
const [sel, setSel] = useState(0);
|
||||
|
||||
useInput((_, key) => {
|
||||
if (key.upArrow) setSel(i => Math.max(0, i - 1));
|
||||
else if (key.downArrow) setSel(i => Math.min(SETTINGS.length - 1, i + 1));
|
||||
});
|
||||
|
||||
return (
|
||||
<Box flexDirection="column">
|
||||
<Text bold color={colors.primary}>SETTINGS</Text>
|
||||
<Text dimColor>Configure SkillKit</Text>
|
||||
|
||||
<Box marginTop={1} flexDirection="column">
|
||||
{SETTINGS.map((s, i) => {
|
||||
const isSel = i === sel;
|
||||
return (
|
||||
<Text key={s.id} inverse={isSel}>
|
||||
{isSel ? symbols.pointer : ' '}{s.label.padEnd(16)} <Text color={colors.secondaryDim}>{s.value}</Text>
|
||||
</Text>
|
||||
);
|
||||
})}
|
||||
</Box>
|
||||
|
||||
<Box marginTop={1}>
|
||||
<Text dimColor>Enter=edit q=quit</Text>
|
||||
</Box>
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
import { useState, useEffect } from 'react';
|
||||
import { Box, Text, useInput } from 'ink';
|
||||
import { colors, symbols } from '../theme.js';
|
||||
import { getAllAdapters } from '../../agents/index.js';
|
||||
|
||||
interface AgentStatus {
|
||||
name: string;
|
||||
type: string;
|
||||
detected: boolean;
|
||||
}
|
||||
|
||||
interface Props {
|
||||
cols?: number;
|
||||
rows?: number;
|
||||
}
|
||||
|
||||
export function Sync({ rows = 24 }: Props) {
|
||||
const [agents, setAgents] = useState<AgentStatus[]>([]);
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [sel, setSel] = useState(0);
|
||||
const [syncing, setSyncing] = useState(false);
|
||||
|
||||
const maxVisible = Math.max(5, rows - 6);
|
||||
const start = Math.max(0, Math.min(sel - Math.floor(maxVisible / 2), agents.length - maxVisible));
|
||||
const visible = agents.slice(start, start + maxVisible);
|
||||
|
||||
useEffect(() => {
|
||||
(async () => {
|
||||
const adapters = getAllAdapters();
|
||||
const s: AgentStatus[] = [];
|
||||
for (const a of adapters) {
|
||||
s.push({ name: a.name, type: a.type, detected: await a.isDetected() });
|
||||
}
|
||||
setAgents(s);
|
||||
setLoading(false);
|
||||
})();
|
||||
}, []);
|
||||
|
||||
useInput((input, key) => {
|
||||
if (loading || syncing) return;
|
||||
if (key.upArrow) setSel(i => Math.max(0, i - 1));
|
||||
else if (key.downArrow) setSel(i => Math.min(agents.length - 1, i + 1));
|
||||
else if (input === 'a') { setSyncing(true); setTimeout(() => setSyncing(false), 500); }
|
||||
else if (key.return && agents[sel]?.detected) { setSyncing(true); setTimeout(() => setSyncing(false), 300); }
|
||||
});
|
||||
|
||||
const detected = agents.filter(a => a.detected).length;
|
||||
|
||||
return (
|
||||
<Box flexDirection="column">
|
||||
<Text bold color={colors.primary}>SYNC SKILLS</Text>
|
||||
<Text dimColor>{detected}/{agents.length} agents detected</Text>
|
||||
|
||||
{loading && <Text>Detecting agents...</Text>}
|
||||
{syncing && <Text>Syncing...</Text>}
|
||||
|
||||
{!loading && !syncing && (
|
||||
<Box marginTop={1} flexDirection="column">
|
||||
{start > 0 && <Text dimColor> ↑ {start} more</Text>}
|
||||
{visible.map((agent, i) => {
|
||||
const idx = start + i;
|
||||
const isSel = idx === sel;
|
||||
return (
|
||||
<Text key={agent.type} inverse={isSel} dimColor={!agent.detected}>
|
||||
{isSel ? symbols.pointer : ' '}{agent.detected ? symbols.checkboxOn : symbols.checkboxOff} {agent.name.padEnd(20)} {agent.detected ? 'Ready' : 'N/A'}
|
||||
</Text>
|
||||
);
|
||||
})}
|
||||
{start + maxVisible < agents.length && <Text dimColor> ↓ {agents.length - start - maxVisible} more</Text>}
|
||||
</Box>
|
||||
)}
|
||||
|
||||
<Box marginTop={1}>
|
||||
<Text dimColor>Enter=sync a=all q=quit</Text>
|
||||
</Box>
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
export { Home } from './Home.js';
|
||||
export { Browse } from './Browse.js';
|
||||
export { Installed } from './Installed.js';
|
||||
export { Sync } from './Sync.js';
|
||||
export { Settings } from './Settings.js';
|
||||
@@ -0,0 +1,31 @@
|
||||
import chalk from 'chalk';
|
||||
|
||||
export const colors = {
|
||||
primary: 'white',
|
||||
secondary: 'white',
|
||||
secondaryDim: 'gray',
|
||||
success: 'white',
|
||||
danger: 'white',
|
||||
warning: 'white',
|
||||
background: 'bgBlack',
|
||||
borderDim: 'gray',
|
||||
};
|
||||
|
||||
export const symbols = {
|
||||
pointer: chalk.white('❯'),
|
||||
bullet: '●',
|
||||
checkboxOn: chalk.white('✔'),
|
||||
checkboxOff: chalk.dim('✖'),
|
||||
check: chalk.white('✓'),
|
||||
star: '★',
|
||||
spinner: ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'],
|
||||
};
|
||||
|
||||
export const logo = `
|
||||
███████╗██╗ ██╗██╗██╗ ██╗ ██╗ ██╗██╗████████╗
|
||||
██╔════╝██║ ██╔╝██║██║ ██║ ██║ ██╔╝██║╚══██╔══╝
|
||||
███████╗█████╔╝ ██║██║ ██║ █████╔╝ ██║ ██║
|
||||
╚════██║██╔═██╗ ██║██║ ██║ ██╔═██╗ ██║ ██║
|
||||
███████║██║ ██╗██║███████╗███████╗██║ ██╗██║ ██║
|
||||
╚══════╝╚═╝ ╚═╝╚═╝╚══════╝╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝
|
||||
`;
|
||||
+75
-2
@@ -71,15 +71,88 @@ describe('agents', () => {
|
||||
expect(adapter.type).toBe('universal');
|
||||
expect(adapter.name).toBe('Universal (Any Agent)');
|
||||
});
|
||||
|
||||
it('should return adapter for amp', () => {
|
||||
const adapter = getAdapter('amp');
|
||||
expect(adapter.type).toBe('amp');
|
||||
expect(adapter.name).toBe('Amp');
|
||||
expect(adapter.skillsDir).toBe('.agents/skills');
|
||||
});
|
||||
|
||||
it('should return adapter for clawdbot', () => {
|
||||
const adapter = getAdapter('clawdbot');
|
||||
expect(adapter.type).toBe('clawdbot');
|
||||
expect(adapter.name).toBe('Clawdbot');
|
||||
expect(adapter.skillsDir).toBe('skills');
|
||||
});
|
||||
|
||||
it('should return adapter for droid', () => {
|
||||
const adapter = getAdapter('droid');
|
||||
expect(adapter.type).toBe('droid');
|
||||
expect(adapter.name).toBe('Droid (Factory)');
|
||||
expect(adapter.skillsDir).toBe('.factory/skills');
|
||||
});
|
||||
|
||||
it('should return adapter for github-copilot', () => {
|
||||
const adapter = getAdapter('github-copilot');
|
||||
expect(adapter.type).toBe('github-copilot');
|
||||
expect(adapter.name).toBe('GitHub Copilot');
|
||||
expect(adapter.skillsDir).toBe('.github/skills');
|
||||
});
|
||||
|
||||
it('should return adapter for goose', () => {
|
||||
const adapter = getAdapter('goose');
|
||||
expect(adapter.type).toBe('goose');
|
||||
expect(adapter.name).toBe('Goose');
|
||||
expect(adapter.skillsDir).toBe('.goose/skills');
|
||||
});
|
||||
|
||||
it('should return adapter for kilo', () => {
|
||||
const adapter = getAdapter('kilo');
|
||||
expect(adapter.type).toBe('kilo');
|
||||
expect(adapter.name).toBe('Kilo Code');
|
||||
expect(adapter.skillsDir).toBe('.kilocode/skills');
|
||||
});
|
||||
|
||||
it('should return adapter for kiro-cli', () => {
|
||||
const adapter = getAdapter('kiro-cli');
|
||||
expect(adapter.type).toBe('kiro-cli');
|
||||
expect(adapter.name).toBe('Kiro CLI');
|
||||
expect(adapter.skillsDir).toBe('.kiro/skills');
|
||||
});
|
||||
|
||||
it('should return adapter for roo', () => {
|
||||
const adapter = getAdapter('roo');
|
||||
expect(adapter.type).toBe('roo');
|
||||
expect(adapter.name).toBe('Roo Code');
|
||||
expect(adapter.skillsDir).toBe('.roo/skills');
|
||||
});
|
||||
|
||||
it('should return adapter for trae', () => {
|
||||
const adapter = getAdapter('trae');
|
||||
expect(adapter.type).toBe('trae');
|
||||
expect(adapter.name).toBe('Trae');
|
||||
expect(adapter.skillsDir).toBe('.trae/skills');
|
||||
});
|
||||
|
||||
it('should return adapter for windsurf', () => {
|
||||
const adapter = getAdapter('windsurf');
|
||||
expect(adapter.type).toBe('windsurf');
|
||||
expect(adapter.name).toBe('Windsurf');
|
||||
expect(adapter.skillsDir).toBe('.windsurf/skills');
|
||||
});
|
||||
});
|
||||
|
||||
describe('getAllAdapters', () => {
|
||||
it('should return all adapters', () => {
|
||||
it('should return all 17 adapters', () => {
|
||||
const adapters = getAllAdapters();
|
||||
expect(adapters.length).toBeGreaterThanOrEqual(7);
|
||||
expect(adapters.length).toBe(17);
|
||||
expect(adapters.map(a => a.type)).toContain('claude-code');
|
||||
expect(adapters.map(a => a.type)).toContain('cursor');
|
||||
expect(adapters.map(a => a.type)).toContain('universal');
|
||||
expect(adapters.map(a => a.type)).toContain('amp');
|
||||
expect(adapters.map(a => a.type)).toContain('goose');
|
||||
expect(adapters.map(a => a.type)).toContain('windsurf');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -112,6 +112,146 @@ description: A test skill for testing purposes
|
||||
const skills = discoverSkills('/nonexistent/path');
|
||||
expect(skills).toHaveLength(0);
|
||||
});
|
||||
|
||||
it('should discover skill when root is itself a skill', () => {
|
||||
writeFileSync(
|
||||
join(testDir, 'SKILL.md'),
|
||||
`---
|
||||
name: root-skill
|
||||
description: A skill at the root level for testing
|
||||
---
|
||||
# Root Skill`
|
||||
);
|
||||
|
||||
const skills = discoverSkills(testDir);
|
||||
expect(skills).toHaveLength(1);
|
||||
expect(skills[0].name).toBe('root-skill');
|
||||
});
|
||||
|
||||
it('should discover skills in standard paths like skills/', () => {
|
||||
const skillsDir = join(testDir, 'skills');
|
||||
mkdirSync(skillsDir, { recursive: true });
|
||||
|
||||
const skillDir = join(skillsDir, 'my-skill');
|
||||
mkdirSync(skillDir);
|
||||
writeFileSync(
|
||||
join(skillDir, 'SKILL.md'),
|
||||
`---
|
||||
name: my-skill
|
||||
description: A skill in the skills directory for testing
|
||||
---
|
||||
# My Skill`
|
||||
);
|
||||
|
||||
const skills = discoverSkills(testDir);
|
||||
expect(skills).toHaveLength(1);
|
||||
expect(skills[0].name).toBe('my-skill');
|
||||
});
|
||||
|
||||
it('should discover skills in .claude/skills/', () => {
|
||||
const claudeSkillsDir = join(testDir, '.claude', 'skills');
|
||||
mkdirSync(claudeSkillsDir, { recursive: true });
|
||||
|
||||
const skillDir = join(claudeSkillsDir, 'claude-skill');
|
||||
mkdirSync(skillDir);
|
||||
writeFileSync(
|
||||
join(skillDir, 'SKILL.md'),
|
||||
`---
|
||||
name: claude-skill
|
||||
description: A skill in the claude skills directory for testing
|
||||
---
|
||||
# Claude Skill`
|
||||
);
|
||||
|
||||
const skills = discoverSkills(testDir);
|
||||
expect(skills).toHaveLength(1);
|
||||
expect(skills[0].name).toBe('claude-skill');
|
||||
});
|
||||
|
||||
it('should deduplicate skills with same name from different paths', () => {
|
||||
// Create skill in root
|
||||
const rootSkill = join(testDir, 'duplicate-skill');
|
||||
mkdirSync(rootSkill);
|
||||
writeFileSync(
|
||||
join(rootSkill, 'SKILL.md'),
|
||||
`---
|
||||
name: duplicate-skill
|
||||
description: First occurrence of duplicate skill
|
||||
---
|
||||
# First`
|
||||
);
|
||||
|
||||
// Create same skill in skills/
|
||||
const skillsDir = join(testDir, 'skills', 'duplicate-skill');
|
||||
mkdirSync(skillsDir, { recursive: true });
|
||||
writeFileSync(
|
||||
join(skillsDir, 'SKILL.md'),
|
||||
`---
|
||||
name: duplicate-skill
|
||||
description: Second occurrence of duplicate skill
|
||||
---
|
||||
# Second`
|
||||
);
|
||||
|
||||
const skills = discoverSkills(testDir);
|
||||
expect(skills).toHaveLength(1);
|
||||
expect(skills[0].name).toBe('duplicate-skill');
|
||||
});
|
||||
|
||||
it('should perform recursive search when no skills in standard paths', () => {
|
||||
// Create nested skill structure
|
||||
const nestedDir = join(testDir, 'deeply', 'nested', 'path');
|
||||
mkdirSync(nestedDir, { recursive: true });
|
||||
|
||||
const skillDir = join(nestedDir, 'hidden-skill');
|
||||
mkdirSync(skillDir);
|
||||
writeFileSync(
|
||||
join(skillDir, 'SKILL.md'),
|
||||
`---
|
||||
name: hidden-skill
|
||||
description: A skill hidden in a deeply nested directory
|
||||
---
|
||||
# Hidden Skill`
|
||||
);
|
||||
|
||||
const skills = discoverSkills(testDir);
|
||||
expect(skills).toHaveLength(1);
|
||||
expect(skills[0].name).toBe('hidden-skill');
|
||||
});
|
||||
|
||||
it('should skip node_modules during recursive search', () => {
|
||||
// Create skill in node_modules (should be skipped)
|
||||
const nodeModulesSkill = join(testDir, 'node_modules', 'some-package', 'skill');
|
||||
mkdirSync(nodeModulesSkill, { recursive: true });
|
||||
writeFileSync(
|
||||
join(nodeModulesSkill, 'SKILL.md'),
|
||||
`---
|
||||
name: node-modules-skill
|
||||
description: Should not be discovered
|
||||
---
|
||||
# Should Skip`
|
||||
);
|
||||
|
||||
const skills = discoverSkills(testDir);
|
||||
expect(skills).toHaveLength(0);
|
||||
});
|
||||
|
||||
it('should skip .git during recursive search', () => {
|
||||
// Create skill in .git (should be skipped)
|
||||
const gitSkill = join(testDir, '.git', 'hooks', 'skill');
|
||||
mkdirSync(gitSkill, { recursive: true });
|
||||
writeFileSync(
|
||||
join(gitSkill, 'SKILL.md'),
|
||||
`---
|
||||
name: git-skill
|
||||
description: Should not be discovered
|
||||
---
|
||||
# Should Skip`
|
||||
);
|
||||
|
||||
const skills = discoverSkills(testDir);
|
||||
expect(skills).toHaveLength(0);
|
||||
});
|
||||
});
|
||||
|
||||
describe('parseSkill', () => {
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "bundler",
|
||||
"lib": ["ES2022"],
|
||||
"jsx": "react-jsx",
|
||||
"outDir": "./dist",
|
||||
"rootDir": "./src",
|
||||
"strict": true,
|
||||
|
||||
+6
-2
@@ -14,6 +14,10 @@ export default defineConfig({
|
||||
splitting: false,
|
||||
skipNodeModulesBundle: true,
|
||||
platform: 'node',
|
||||
// Remove banner - npm handles shebang via package.json bin field
|
||||
// For local dev, use: node dist/cli.js
|
||||
esbuildOptions(options) {
|
||||
options.jsx = 'automatic';
|
||||
},
|
||||
loader: {
|
||||
'.tsx': 'tsx',
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user