mirror of
https://github.com/rohitg00/skillkit.git
synced 2026-11-19 02:13:58 +00:00
Compare commits
40
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ae8c7a1abb | ||
|
|
196a959569 | ||
|
|
23d1c8932a | ||
|
|
0c82c58905 | ||
|
|
1ce9751797 | ||
|
|
6485745295 | ||
|
|
e9014e130c | ||
|
|
9e50c8abe1 | ||
|
|
49fcc532d2 | ||
|
|
ecead6585c | ||
|
|
cc2eb2504c | ||
|
|
5d7ca0cd8e | ||
|
|
eda488c960 | ||
|
|
559b760202 | ||
|
|
ebd26b7c84 | ||
|
|
8ec5b9d8f2 | ||
|
|
0cba1be49c | ||
|
|
9f0eabc876 | ||
|
|
ceeae304b5 | ||
|
|
bb97e9b747 | ||
|
|
8b4f207fa1 | ||
|
|
c533d6f3bc | ||
|
|
e7dbaeb2b3 | ||
|
|
05b566c0df | ||
|
|
56c565bc65 | ||
|
|
b4582c465d | ||
|
|
d929fe3af0 | ||
|
|
696db60cb4 | ||
|
|
da14f329fd | ||
|
|
dc3f9ba330 | ||
|
|
4206b8aab1 | ||
|
|
a4540c5fc1 | ||
|
|
8cfae7e105 | ||
|
|
f2183b8e14 | ||
|
|
573bbbeed7 | ||
|
|
7003fd3372 | ||
|
|
c611e70764 | ||
|
|
73f95c0b6e | ||
|
|
25556d15d9 | ||
|
|
dfa8d12c65 |
@@ -0,0 +1,87 @@
|
||||
# SkillKit GitHub Action
|
||||
|
||||
A reusable composite action to install, scan, and manage AI agent skills in CI/CD pipelines.
|
||||
|
||||
## Usage
|
||||
|
||||
```yaml
|
||||
# Install skills
|
||||
- uses: rohitg00/skillkit/.github/actions/skillkit@main
|
||||
with:
|
||||
command: install
|
||||
source: anthropics/skills
|
||||
|
||||
# Security scan
|
||||
- uses: rohitg00/skillkit/.github/actions/skillkit@main
|
||||
with:
|
||||
command: scan
|
||||
source: ./skills
|
||||
|
||||
# Check for updates
|
||||
- uses: rohitg00/skillkit/.github/actions/skillkit@main
|
||||
with:
|
||||
command: check
|
||||
```
|
||||
|
||||
## Inputs
|
||||
|
||||
| Input | Description | Required | Default |
|
||||
|-------|-------------|----------|---------|
|
||||
| `command` | SkillKit command to run (`install`, `scan`, `check`, `sync`) | Yes | |
|
||||
| `source` | Skill source for install (e.g. `owner/repo`) | No | |
|
||||
| `args` | Additional arguments | No | `''` |
|
||||
| `node-version` | Node.js version | No | `20` |
|
||||
| `agent` | Target agent (e.g. `claude-code`, `cursor`) | No | `claude-code` |
|
||||
|
||||
## Examples
|
||||
|
||||
### Install and sync skills
|
||||
|
||||
```yaml
|
||||
jobs:
|
||||
setup-skills:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: rohitg00/skillkit/.github/actions/skillkit@main
|
||||
with:
|
||||
command: install
|
||||
source: anthropics/skills
|
||||
agent: cursor
|
||||
|
||||
- uses: rohitg00/skillkit/.github/actions/skillkit@main
|
||||
with:
|
||||
command: sync
|
||||
```
|
||||
|
||||
### Security scan on PR
|
||||
|
||||
```yaml
|
||||
jobs:
|
||||
scan-skills:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: rohitg00/skillkit/.github/actions/skillkit@main
|
||||
with:
|
||||
command: scan
|
||||
source: ./skills
|
||||
args: '--fail-on high'
|
||||
```
|
||||
|
||||
### Check for updates
|
||||
|
||||
```yaml
|
||||
jobs:
|
||||
check-updates:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: rohitg00/skillkit/.github/actions/skillkit@main
|
||||
with:
|
||||
command: check
|
||||
args: '--json'
|
||||
```
|
||||
@@ -0,0 +1,65 @@
|
||||
name: 'SkillKit'
|
||||
description: 'Install, scan, and manage AI agent skills in CI/CD'
|
||||
inputs:
|
||||
command:
|
||||
description: 'SkillKit command to run (install, scan, check, sync)'
|
||||
required: true
|
||||
source:
|
||||
description: 'Skill source for install (e.g. owner/repo)'
|
||||
required: false
|
||||
args:
|
||||
description: 'Additional arguments'
|
||||
required: false
|
||||
default: ''
|
||||
node-version:
|
||||
description: 'Node.js version'
|
||||
required: false
|
||||
default: '20'
|
||||
agent:
|
||||
description: 'Target agent (e.g. claude-code, cursor)'
|
||||
required: false
|
||||
default: 'claude-code'
|
||||
|
||||
runs:
|
||||
using: 'composite'
|
||||
steps:
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ inputs.node-version }}
|
||||
|
||||
- name: Install SkillKit
|
||||
shell: bash
|
||||
run: npm install -g skillkit@latest
|
||||
|
||||
- name: Run SkillKit
|
||||
shell: bash
|
||||
env:
|
||||
SK_COMMAND: ${{ inputs.command }}
|
||||
SK_SOURCE: ${{ inputs.source }}
|
||||
SK_AGENT: ${{ inputs.agent }}
|
||||
SK_ARGS: ${{ inputs.args }}
|
||||
run: |
|
||||
case "${SK_COMMAND}" in
|
||||
install)
|
||||
if [ -n "${SK_SOURCE}" ]; then
|
||||
skillkit install "${SK_SOURCE}" --agent "${SK_AGENT}" --yes --json ${SK_ARGS}
|
||||
else
|
||||
echo "Error: source is required for install" >&2; exit 1
|
||||
fi
|
||||
;;
|
||||
scan)
|
||||
if [ -n "${SK_SOURCE}" ]; then
|
||||
skillkit scan "${SK_SOURCE}" --json ${SK_ARGS}
|
||||
else
|
||||
echo "Error: source is required for scan" >&2; exit 1
|
||||
fi
|
||||
;;
|
||||
check|sync|list|update)
|
||||
skillkit "${SK_COMMAND}" ${SK_ARGS}
|
||||
;;
|
||||
*)
|
||||
echo "Error: unsupported command '${SK_COMMAND}'. Use: install, scan, check, sync, list, update" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
@@ -0,0 +1,324 @@
|
||||
name: Auto-Publish Skill Submission
|
||||
|
||||
on:
|
||||
issues:
|
||||
types: [labeled]
|
||||
|
||||
permissions:
|
||||
issues: write
|
||||
contents: write
|
||||
|
||||
concurrency:
|
||||
group: auto-publish-${{ github.event.issue.number }}
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
auto-publish:
|
||||
if: github.event.label.name == 'skill-submission'
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Build
|
||||
run: pnpm build
|
||||
|
||||
- name: Extract and validate submission
|
||||
id: validate
|
||||
uses: actions/github-script@v7
|
||||
env:
|
||||
ISSUE_BODY: ${{ github.event.issue.body }}
|
||||
with:
|
||||
script: |
|
||||
const { execSync } = require('child_process');
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const body = process.env.ISSUE_BODY || '';
|
||||
|
||||
const jsonMatch = body.match(/```json\s*\n([\s\S]*?)\n```/);
|
||||
if (!jsonMatch) {
|
||||
core.setOutput('status', 'error');
|
||||
core.setOutput('message', 'No JSON block found in issue body. Please include your source entry between \\`\\`\\`json and \\`\\`\\` fences.');
|
||||
return;
|
||||
}
|
||||
|
||||
let entry;
|
||||
try {
|
||||
entry = JSON.parse(jsonMatch[1].trim());
|
||||
} catch (e) {
|
||||
core.setOutput('status', 'error');
|
||||
core.setOutput('message', `Invalid JSON in submission: ${e.message}`);
|
||||
return;
|
||||
}
|
||||
|
||||
const source = entry.source || (entry.owner && entry.repo ? `${entry.owner}/${entry.repo}` : null);
|
||||
const name = entry.name;
|
||||
const description = entry.description || '';
|
||||
|
||||
if (!source || !name) {
|
||||
core.setOutput('status', 'error');
|
||||
core.setOutput('message', 'Missing required fields. JSON must include `source` (owner/repo) and `name`.');
|
||||
return;
|
||||
}
|
||||
|
||||
const parts = source.split('/');
|
||||
if (parts.length !== 2 || !parts[0] || !parts[1]) {
|
||||
core.setOutput('status', 'error');
|
||||
core.setOutput('message', `Invalid source format "${source}". Must be "owner/repo".`);
|
||||
return;
|
||||
}
|
||||
|
||||
const [owner, repo] = parts;
|
||||
|
||||
const sourcesData = JSON.parse(fs.readFileSync('marketplace/sources.json', 'utf-8'));
|
||||
const existing = sourcesData.sources.find(s => s.source === source);
|
||||
if (existing) {
|
||||
core.setOutput('status', 'error');
|
||||
core.setOutput('message', `Source "${source}" already exists in sources.json as "${existing.name}".`);
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
const repoCheck = await github.rest.repos.get({ owner, repo });
|
||||
if (repoCheck.status !== 200) throw new Error('not found');
|
||||
} catch (e) {
|
||||
core.setOutput('status', 'error');
|
||||
core.setOutput('message', `Repository "${source}" does not exist or is not accessible on GitHub.`);
|
||||
return;
|
||||
}
|
||||
|
||||
const cloneDir = `/tmp/skill-check-${owner}-${repo}`;
|
||||
try {
|
||||
execSync(`git clone --depth 1 https://github.com/${owner}/${repo}.git ${cloneDir}`, {
|
||||
timeout: 60000,
|
||||
stdio: 'pipe',
|
||||
});
|
||||
} catch (e) {
|
||||
core.setOutput('status', 'error');
|
||||
core.setOutput('message', `Failed to clone repository "${source}".`);
|
||||
return;
|
||||
}
|
||||
|
||||
let scanVerdict = 'pass';
|
||||
let scanSummary = '';
|
||||
let qualityScore = 0;
|
||||
let qualitySummary = '';
|
||||
|
||||
try {
|
||||
const scanScript = `
|
||||
const { SkillScanner } = require('./packages/core/dist/scanner/scanner.js');
|
||||
const scanner = new SkillScanner();
|
||||
scanner.scan('${cloneDir}').then(result => {
|
||||
console.log(JSON.stringify({
|
||||
verdict: result.verdict,
|
||||
stats: result.stats,
|
||||
findings: result.findings.length,
|
||||
}));
|
||||
});
|
||||
`;
|
||||
|
||||
const scanOutput = execSync(`node -e "${scanScript.replace(/\n/g, ' ')}"`, {
|
||||
cwd: process.cwd(),
|
||||
timeout: 30000,
|
||||
stdio: 'pipe',
|
||||
}).toString().trim();
|
||||
|
||||
const scanResult = JSON.parse(scanOutput);
|
||||
scanVerdict = scanResult.verdict;
|
||||
scanSummary = `Verdict: ${scanResult.verdict}, Findings: ${scanResult.findings}, Critical: ${scanResult.stats.critical}, High: ${scanResult.stats.high}`;
|
||||
} catch (e) {
|
||||
scanSummary = 'Scanner completed with warnings';
|
||||
}
|
||||
|
||||
const skillMdCandidates = ['SKILL.md', 'skill.md', 'README.md'];
|
||||
let skillContent = null;
|
||||
|
||||
for (const candidate of skillMdCandidates) {
|
||||
try {
|
||||
const found = execSync(`find ${cloneDir} -name "${candidate}" -maxdepth 3 -type f`, {
|
||||
stdio: 'pipe',
|
||||
}).toString().trim().split('\n').filter(Boolean);
|
||||
|
||||
if (found.length > 0) {
|
||||
skillContent = fs.readFileSync(found[0], 'utf-8');
|
||||
break;
|
||||
}
|
||||
} catch {}
|
||||
}
|
||||
|
||||
if (skillContent) {
|
||||
try {
|
||||
const qualityScript = `
|
||||
const { evaluateSkillContent } = require('./packages/core/dist/quality/index.js');
|
||||
const fs = require('fs');
|
||||
const content = fs.readFileSync('${cloneDir}/.skill-content.tmp', 'utf-8');
|
||||
const result = evaluateSkillContent(content);
|
||||
console.log(JSON.stringify({ overall: result.overall, warnings: result.warnings }));
|
||||
`;
|
||||
|
||||
fs.writeFileSync(`${cloneDir}/.skill-content.tmp`, skillContent);
|
||||
|
||||
const qualityOutput = execSync(`node -e "${qualityScript.replace(/\n/g, ' ')}"`, {
|
||||
cwd: process.cwd(),
|
||||
timeout: 30000,
|
||||
stdio: 'pipe',
|
||||
}).toString().trim();
|
||||
|
||||
const qualityResult = JSON.parse(qualityOutput);
|
||||
qualityScore = qualityResult.overall;
|
||||
qualitySummary = `Score: ${qualityResult.overall}/100, Warnings: ${qualityResult.warnings.length}`;
|
||||
} catch (e) {
|
||||
qualityScore = 50;
|
||||
qualitySummary = 'Quality evaluation encountered an error; defaulting to 50';
|
||||
}
|
||||
} else {
|
||||
qualityScore = 50;
|
||||
qualitySummary = 'No SKILL.md or README.md found; defaulting to score 50';
|
||||
}
|
||||
|
||||
const scanPassed = scanVerdict !== 'fail';
|
||||
const qualityPassed = qualityScore >= 75;
|
||||
|
||||
core.setOutput('source', source);
|
||||
core.setOutput('name', name);
|
||||
core.setOutput('description', description);
|
||||
core.setOutput('official', entry.official === true ? 'true' : 'false');
|
||||
core.setOutput('scan_verdict', scanVerdict);
|
||||
core.setOutput('scan_summary', scanSummary);
|
||||
core.setOutput('quality_score', String(qualityScore));
|
||||
core.setOutput('quality_summary', qualitySummary);
|
||||
|
||||
if (scanPassed && qualityPassed) {
|
||||
core.setOutput('status', 'pass');
|
||||
core.setOutput('message', `Validation passed. Security: ${scanSummary}. Quality: ${qualitySummary}.`);
|
||||
} else {
|
||||
const reasons = [];
|
||||
if (!scanPassed) reasons.push(`Security scan failed: ${scanSummary}`);
|
||||
if (!qualityPassed) reasons.push(`Quality score ${qualityScore}/100 is below threshold of 75`);
|
||||
core.setOutput('status', 'reject');
|
||||
core.setOutput('message', reasons.join('. '));
|
||||
}
|
||||
|
||||
- name: Add source and commit
|
||||
if: steps.validate.outputs.status == 'pass'
|
||||
env:
|
||||
SKILL_SOURCE: ${{ steps.validate.outputs.source }}
|
||||
SKILL_NAME: ${{ steps.validate.outputs.name }}
|
||||
SKILL_DESCRIPTION: ${{ steps.validate.outputs.description }}
|
||||
ISSUE_NUMBER: ${{ github.event.issue.number }}
|
||||
run: |
|
||||
node -e "
|
||||
const fs = require('fs');
|
||||
const data = JSON.parse(fs.readFileSync('marketplace/sources.json', 'utf-8'));
|
||||
|
||||
const newEntry = { source: process.env.SKILL_SOURCE, name: process.env.SKILL_NAME };
|
||||
|
||||
if (process.env.SKILL_DESCRIPTION) {
|
||||
newEntry.description = process.env.SKILL_DESCRIPTION;
|
||||
}
|
||||
|
||||
const skillsSh = data.sources.pop();
|
||||
data.sources.push(newEntry);
|
||||
if (skillsSh && skillsSh.registry === 'skills-sh') {
|
||||
data.sources.push(skillsSh);
|
||||
}
|
||||
|
||||
data.updatedAt = new Date().toISOString().split('T')[0];
|
||||
fs.writeFileSync('marketplace/sources.json', JSON.stringify(data, null, 2) + '\n');
|
||||
"
|
||||
|
||||
git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git config --local user.name "github-actions[bot]"
|
||||
git add marketplace/sources.json
|
||||
git commit -m "feat(marketplace): add source from #${ISSUE_NUMBER}"
|
||||
git push
|
||||
|
||||
- name: Close issue on success
|
||||
if: steps.validate.outputs.status == 'pass'
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
SKILL_SOURCE: ${{ steps.validate.outputs.source }}
|
||||
SKILL_NAME: ${{ steps.validate.outputs.name }}
|
||||
SCAN_SUMMARY: ${{ steps.validate.outputs.scan_summary }}
|
||||
QUALITY_SUMMARY: ${{ steps.validate.outputs.quality_summary }}
|
||||
ISSUE_NUMBER: ${{ github.event.issue.number }}
|
||||
run: |
|
||||
cat > /tmp/comment.md <<ENDOFCOMMENT
|
||||
**Skill source auto-published!**
|
||||
|
||||
**Source:** \`${SKILL_SOURCE}\`
|
||||
**Name:** ${SKILL_NAME}
|
||||
**Security:** ${SCAN_SUMMARY}
|
||||
**Quality:** ${QUALITY_SUMMARY}
|
||||
|
||||
The source has been added to \`marketplace/sources.json\` and will be included in the next release.
|
||||
ENDOFCOMMENT
|
||||
gh issue comment "${ISSUE_NUMBER}" --body-file /tmp/comment.md
|
||||
gh issue close "${ISSUE_NUMBER}"
|
||||
|
||||
- name: Comment rejection reason
|
||||
if: steps.validate.outputs.status == 'reject'
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
REJECT_MESSAGE: ${{ steps.validate.outputs.message }}
|
||||
SCAN_VERDICT: ${{ steps.validate.outputs.scan_verdict }}
|
||||
SCAN_SUMMARY: ${{ steps.validate.outputs.scan_summary }}
|
||||
QUALITY_SCORE: ${{ steps.validate.outputs.quality_score }}
|
||||
QUALITY_SUMMARY: ${{ steps.validate.outputs.quality_summary }}
|
||||
ISSUE_NUMBER: ${{ github.event.issue.number }}
|
||||
run: |
|
||||
cat > /tmp/comment.md <<ENDOFCOMMENT
|
||||
**Skill submission did not pass automated checks.**
|
||||
|
||||
${REJECT_MESSAGE}
|
||||
|
||||
**Details:**
|
||||
- Security scan: ${SCAN_VERDICT} (${SCAN_SUMMARY})
|
||||
- Quality score: ${QUALITY_SCORE}/100 (${QUALITY_SUMMARY})
|
||||
|
||||
Please address these issues and update your submission. A maintainer will review manually.
|
||||
ENDOFCOMMENT
|
||||
gh issue comment "${ISSUE_NUMBER}" --body-file /tmp/comment.md
|
||||
gh issue edit "${ISSUE_NUMBER}" --add-label "needs-review"
|
||||
|
||||
- name: Comment parse error
|
||||
if: steps.validate.outputs.status == 'error'
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
ERROR_MESSAGE: ${{ steps.validate.outputs.message }}
|
||||
ISSUE_NUMBER: ${{ github.event.issue.number }}
|
||||
run: |
|
||||
cat > /tmp/comment.md <<'ENDOFCOMMENT'
|
||||
**Could not process skill submission.**
|
||||
|
||||
ENDOFCOMMENT
|
||||
echo "${ERROR_MESSAGE}" >> /tmp/comment.md
|
||||
cat >> /tmp/comment.md <<'ENDOFCOMMENT'
|
||||
|
||||
**Expected format in issue body:**
|
||||
```json
|
||||
{
|
||||
"source": "owner/repo",
|
||||
"name": "Display Name",
|
||||
"description": "Optional description"
|
||||
}
|
||||
```
|
||||
|
||||
Please update the issue body and re-apply the `skill-submission` label.
|
||||
ENDOFCOMMENT
|
||||
gh issue comment "${ISSUE_NUMBER}" --body-file /tmp/comment.md
|
||||
gh issue edit "${ISSUE_NUMBER}" --add-label "needs-review"
|
||||
@@ -15,13 +15,14 @@
|
||||
[](https://github.com/rohitg00/skillkit/stargazers)
|
||||
[](https://opensource.org/licenses/Apache-2.0)
|
||||
|
||||
**SkillKit** is the open source package manager for AI agent skills. Write a skill once, deploy it to **44 agents** — Claude, Cursor, Copilot, Windsurf, Devin, Codex, and 38 more. No rewrites. 400K+ skills across registries.
|
||||
**SkillKit** is the open source package manager for AI agent skills. Write a skill once, deploy it to **45 agents** — Claude, Cursor, Copilot, Windsurf, Devin, Codex, and 39 more. No rewrites. 400K+ skills across registries.
|
||||
|
||||
[Website](https://skillkit.sh) · [Docs](https://skillkit.sh/docs) · [API Explorer](https://skillkit.sh/api) · [Chrome Extension](https://github.com/rohitg00/skillkit/tree/main/packages/extension#readme) · [npm](https://www.npmjs.com/package/skillkit)
|
||||
|
||||
</div>
|
||||
|
||||
---
|
||||
https://github.com/user-attachments/assets/b1843a07-2c54-422d-8903-f30a790cfb37
|
||||
|
||||
Skills make AI coding agents smarter. But every agent uses a different format:
|
||||
|
||||
@@ -34,7 +35,7 @@ Skills make AI coding agents smarter. But every agent uses a different format:
|
||||
|
||||
You end up rewriting the same skill for each agent, or locking into one platform.
|
||||
|
||||
**SkillKit fixes this.** Install from 400K+ skills across registries, auto-translate between formats, persist learnings with Memory. Works with Claude, Cursor, Windsurf, Copilot, and 40 more.
|
||||
**SkillKit fixes this.** Install from 400K+ skills across registries, auto-translate between formats, persist learnings with Memory. Works with Claude, Cursor, Windsurf, Copilot, and 41 more.
|
||||
|
||||
```bash
|
||||
npx skillkit@latest
|
||||
@@ -44,12 +45,12 @@ npx skillkit@latest
|
||||
|
||||
<div align="center">
|
||||
|
||||
[](https://raw.githubusercontent.com/rohitg00/skillkit/main/docs/video/skillkit.mp4)
|
||||
|
||||
*Click the image above to watch the full demo*
|
||||

|
||||
|
||||
</div>
|
||||
|
||||
> **New in v1.20.0:** Live download progress, sparse checkout for monorepos (~1.4s for large repos), and `skillkit remove --source` to bulk-remove by repo.
|
||||
|
||||
## Quick Start
|
||||
|
||||
```bash
|
||||
@@ -203,7 +204,7 @@ skillkit ui
|
||||
|
||||

|
||||
|
||||
## Supported Agents (44)
|
||||
## Supported Agents (45)
|
||||
|
||||
| Agent | Format | Directory |
|
||||
|-------|--------|-----------|
|
||||
@@ -219,7 +220,7 @@ skillkit ui
|
||||
| **Sourcegraph Cody** | SKILL.md | `.cody/skills/` |
|
||||
| **Amazon Q** | SKILL.md | `.amazonq/skills/` |
|
||||
|
||||
Plus 33 more: Amp, Antigravity, Augment Code, Bolt, Clawdbot, Cline, CodeBuddy, CodeGPT, CommandCode, Continue, Crush, Droid, Factory, Goose, Kilo Code, Kiro CLI, Lovable, MCPJam, Mux, Neovate, OpenHands, Pi, PlayCode, Qoder, Qwen, Replit Agent, Roo Code, Tabby, Tabnine, Trae, Vercel, Zencoder, Universal
|
||||
Plus 34 more: Amp, Antigravity, Augment Code, Bolt, Clawdbot, Cline, CodeBuddy, CodeGPT, CommandCode, Continue, Crush, Droid, Factory, Goose, Kilo Code, Kiro CLI, Lovable, MCPJam, Mux, Neovate, OpenClaw, OpenHands, Pi, PlayCode, Qoder, Qwen, Replit Agent, Roo Code, Tabby, Tabnine, Trae, Vercel, Zencoder, Universal
|
||||
|
||||
[Full agent details](https://skillkit.sh/docs/agents)
|
||||
|
||||
@@ -228,13 +229,18 @@ Plus 33 more: Amp, Antigravity, Augment Code, Bolt, Clawdbot, Cline, CodeBuddy,
|
||||
### Core
|
||||
|
||||
```bash
|
||||
skillkit install <source> # Install skills
|
||||
skillkit install <source> # Install skills (with live progress)
|
||||
skillkit remove <skills> # Remove skills
|
||||
skillkit remove --source org/repo # Remove all skills from a source
|
||||
skillkit remove --all # Remove all installed skills
|
||||
skillkit update # Update skills (with change detection)
|
||||
skillkit check # Check for updates, quality, and activity
|
||||
skillkit translate <skill> --to # Translate between agents
|
||||
skillkit sync # Deploy to agent config
|
||||
skillkit recommend # Smart recommendations
|
||||
skillkit generate # AI skill generation wizard
|
||||
skillkit serve # Start REST API server
|
||||
skillkit publish submit # Publish to marketplace via CLI
|
||||
```
|
||||
|
||||
### Discovery & Security
|
||||
@@ -246,6 +252,14 @@ skillkit find <query> # Quick search
|
||||
skillkit scan <path> # Security scan for skills
|
||||
```
|
||||
|
||||
### Custom Sources
|
||||
|
||||
```bash
|
||||
skillkit tap add owner/repo # Add custom skill source
|
||||
skillkit tap list # List custom sources
|
||||
skillkit tap remove owner/repo # Remove custom source
|
||||
```
|
||||
|
||||
### Issue Planner
|
||||
|
||||
```bash
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
# SOUL
|
||||
|
||||
## Core Truths
|
||||
|
||||
- Ship working software. Everything else is negotiable.
|
||||
- Simple beats clever. If a junior dev can't read it in 30 seconds, it's too complex.
|
||||
- Opinions are load-bearing. "It depends" is a cop-out 90% of the time. Pick a side, explain why, move on.
|
||||
- Exhaustion before escalation. Try everything available before asking for help or giving up.
|
||||
- Broken things get fixed now, not "in a follow-up PR."
|
||||
- If the tests pass and the build is green, stop touching it.
|
||||
|
||||
## Boundaries
|
||||
|
||||
- Never leak secrets, credentials, or private data. Period.
|
||||
- Ask before doing anything destructive or irreversible. One confirmation. Not three.
|
||||
- Be honest about uncertainty. "I don't know" is a valid answer. Bullshitting is not.
|
||||
- The user's codebase is their house. Don't rearrange the furniture without permission.
|
||||
|
||||
## Vibe
|
||||
|
||||
- Never open with "Great question," "I'd be happy to help," or "Absolutely." Just answer.
|
||||
- Brevity is mandatory. If the answer fits in one sentence, one sentence is what you get.
|
||||
- Humor is welcome when it's natural. Not forced puns. The kind of wit that comes from actually understanding the problem.
|
||||
- Call things out. If you're about to do something dumb, I'll say so. Charm over cruelty, but no sugarcoating.
|
||||
- Swearing is fine when it lands. A well-placed "that's fucking brilliant" hits different than sterile corporate praise. Don't force it. Don't overdo it. But if a situation calls for a "holy shit" — say holy shit.
|
||||
- No hedging. No weasel words. No "it might be worth considering perhaps maybe." Say the thing.
|
||||
- Match energy. Quick question gets a quick answer. Deep problem gets deep analysis. Read the room.
|
||||
- Code speaks louder than explanations. Show, don't tell. Then shut up.
|
||||
- Be the assistant you'd actually want to talk to at 2am. Not a corporate drone. Not a sycophant. Just... good.
|
||||
|
||||
## Continuity
|
||||
|
||||
- This file is a living document. If something stops being true, change it.
|
||||
- Session memory is ephemeral. This file is how identity persists.
|
||||
- If this file gets modified during a session, say so explicitly.
|
||||
@@ -1,6 +1,6 @@
|
||||
# SkillKit
|
||||
|
||||
Universal skills manager for AI coding agents. Install, manage, and sync skills across 32 AI agents including Claude Code, Cursor, Codex, Gemini CLI, and more.
|
||||
Universal skills manager for AI coding agents. Install, manage, and sync skills across 45 AI agents including Claude Code, Cursor, Codex, Gemini CLI, and more.
|
||||
|
||||
## Installation
|
||||
|
||||
@@ -150,11 +150,11 @@ skillkit memory compress
|
||||
skillkit memory export auth-insight --output auth-skill.md
|
||||
```
|
||||
|
||||
## Supported Agents (32)
|
||||
## Supported Agents (45)
|
||||
|
||||
**Primary (17):** Claude Code, Cursor, Codex, Gemini CLI, Windsurf, GitHub Copilot, OpenCode, Antigravity, Amp, Clawdbot, Droid, Goose, Kilo, Kiro, Roo, Trae, Universal
|
||||
**Primary (18):** Claude Code, Cursor, Codex, Gemini CLI, Windsurf, GitHub Copilot, OpenCode, Antigravity, Amp, Clawdbot, OpenClaw, Droid, Goose, Kilo, Kiro, Roo, Trae, Universal
|
||||
|
||||
**Extended (15):** Cline, CodeBuddy, CommandCode, Continue, Crush, Factory, MCPJam, Mux, Neovate, OpenHands, Pi, Qoder, Qwen, Vercel, Zencoder
|
||||
**Extended (27):** Aider, Amazon Q, Augment Code, Bolt, Cline, CodeBuddy, CodeGPT, CommandCode, Continue, Crush, Devin, Factory, Lovable, MCPJam, Mux, Neovate, OpenHands, Pi, PlayCode Agent, Qoder, Qwen, Replit Agent, Sourcegraph Cody, Tabby, Tabnine, Vercel, Zencoder
|
||||
|
||||
## Usage Examples
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "skillkit",
|
||||
"version": "1.19.2",
|
||||
"description": "Supercharge AI coding agents with portable skills. Install, translate, and share skills across Claude Code, Cursor, Codex, Copilot & 13 more",
|
||||
"version": "1.22.1",
|
||||
"description": "Supercharge AI coding agents with portable skills. Install, translate, and share skills across Claude Code, Cursor, Codex, Copilot & 41 more",
|
||||
"type": "module",
|
||||
"bin": {
|
||||
"skillkit": "./dist/cli.js",
|
||||
|
||||
@@ -124,6 +124,9 @@ import {
|
||||
TimelineCommand,
|
||||
SessionHandoffCommand,
|
||||
LineageCommand,
|
||||
TapAddCommand,
|
||||
TapRemoveCommand,
|
||||
TapListCommand,
|
||||
} from '@skillkit/cli';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
@@ -277,4 +280,8 @@ cli.register(TimelineCommand);
|
||||
cli.register(SessionHandoffCommand);
|
||||
cli.register(LineageCommand);
|
||||
|
||||
cli.register(TapAddCommand);
|
||||
cli.register(TapRemoveCommand);
|
||||
cli.register(TapListCommand);
|
||||
|
||||
cli.runExit(process.argv.slice(2));
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
---
|
||||
title: Supported Agents
|
||||
description: 44 AI coding agents supported by SkillKit
|
||||
description: 45 AI coding agents supported by SkillKit
|
||||
---
|
||||
|
||||
# Supported Agents
|
||||
|
||||
SkillKit uses an adapter pattern to support 44 AI coding platforms. Each adapter implements `getConfigPath()` and `generateConfig()` methods.
|
||||
SkillKit uses an adapter pattern to support 45 AI coding platforms. Each adapter implements `getConfigPath()` and `generateConfig()` methods.
|
||||
|
||||
## Agent Directory Mapping
|
||||
|
||||
|
||||
@@ -70,11 +70,24 @@ skillkit install anthropics/skills --agent claude --agent cursor
|
||||
skillkit remove <skill-names> [options]
|
||||
```
|
||||
|
||||
| Option | Purpose |
|
||||
|--------|---------|
|
||||
| `--agent` | Target specific agents (default: all) |
|
||||
| `--yes` | Skip confirmation |
|
||||
| `--keep-metadata` | Remove skill but preserve metadata |
|
||||
| Option | Short | Purpose |
|
||||
|--------|-------|---------|
|
||||
| `--agent` | — | Target specific agents (default: all) |
|
||||
| `--yes` | — | Skip confirmation |
|
||||
| `--keep-metadata` | — | Remove skill but preserve metadata |
|
||||
| `--source` | `-s` | Remove all skills installed from a specific source |
|
||||
| `--all` | `-a` | Remove all installed skills |
|
||||
| `--force` | `-f` | Skip confirmation prompt |
|
||||
|
||||
### Bulk Removal
|
||||
|
||||
```bash
|
||||
skillkit remove --source iii-hq/iii
|
||||
skillkit remove --all
|
||||
skillkit remove --all --force
|
||||
```
|
||||
|
||||
When using `--source`, SkillKit matches against the source field in each skill's metadata and removes every skill that was installed from that repository. When using `--all`, every discovered skill across all agent directories is removed. Both flags update AGENTS.md automatically if managed sections are present.
|
||||
|
||||
## Update Command
|
||||
|
||||
@@ -82,11 +95,19 @@ skillkit remove <skill-names> [options]
|
||||
skillkit update [skill-names] [options]
|
||||
```
|
||||
|
||||
| Option | Purpose |
|
||||
|--------|---------|
|
||||
| `--dry-run` | Check for updates without installing |
|
||||
| `--yes` | Skip confirmation prompts |
|
||||
| `--agent` | Update in specific agents only |
|
||||
| Option | Short | Purpose |
|
||||
|--------|-------|---------|
|
||||
| `--dry-run` | — | Check for updates without installing |
|
||||
| `--yes` | — | Skip confirmation prompts |
|
||||
| `--agent` | — | Update in specific agents only |
|
||||
| `--force` | `-f` | Force update, bypass checksum and GitHub API checks |
|
||||
|
||||
The update command uses a two-stage change detection pipeline:
|
||||
|
||||
1. **GitHub API check** -- For remote sources, SkillKit queries the GitHub API to compare the repository's `pushed_at` timestamp against the installed metadata. If the repository has not been pushed since the last install or update, the skill is skipped without cloning.
|
||||
2. **Checksum comparison** -- After cloning, a checksum of the source SKILL.md is compared against the stored checksum. If the content is identical, the update is skipped.
|
||||
|
||||
Use `--force` to bypass both checks and always overwrite the installed skill.
|
||||
|
||||
## Enable/Disable Commands
|
||||
|
||||
@@ -97,6 +118,26 @@ skillkit disable <skill-names> [options]
|
||||
|
||||
Disabled skills are ignored by the `sync` command. No file changes occur.
|
||||
|
||||
## Check Command
|
||||
|
||||
```bash
|
||||
skillkit check [skill-names] [options]
|
||||
```
|
||||
|
||||
Checks installed skills for available updates, quality scores, and GitHub activity.
|
||||
|
||||
| Option | Short | Purpose |
|
||||
|--------|-------|---------|
|
||||
| `--verbose` | `-v` | Show detailed output including stars and push dates |
|
||||
| `--quiet` | `-q` | Minimal output |
|
||||
|
||||
For remote GitHub sources, the check command queries the GitHub API to compare each repository's `pushed_at` timestamp against the installed date. Each skill displays its quality score badge (A-F). In verbose mode, the output also includes the repository's star count and how recently it was pushed.
|
||||
|
||||
```bash
|
||||
skillkit check
|
||||
skillkit check pdf xlsx --verbose
|
||||
```
|
||||
|
||||
## List Command
|
||||
|
||||
```bash
|
||||
@@ -457,6 +498,48 @@ skillkit publish --dry-run # Preview without writing
|
||||
skillkit publish submit # Submit to SkillKit marketplace
|
||||
```
|
||||
|
||||
### publish submit
|
||||
|
||||
Submits a skill to the SkillKit marketplace by creating a GitHub issue on `rohitg00/skillkit` via the `gh` CLI. No browser is needed.
|
||||
|
||||
Before submitting, the command displays:
|
||||
- Quality score and grade (A-F) from the skill evaluator
|
||||
- GitHub star count and last push date from the GitHub API
|
||||
- Any quality warnings (up to 3)
|
||||
|
||||
If `gh` is not installed or not authenticated, the command prints a manual submission URL as a fallback.
|
||||
|
||||
## Tap Command
|
||||
|
||||
Manage custom skill sources (taps). Taps are user-level source repositories stored in `~/.skillkit/taps.json`. They let you add private or third-party skill repositories that are not part of the official marketplace.
|
||||
|
||||
### tap add
|
||||
|
||||
Add a custom skill source.
|
||||
|
||||
```bash
|
||||
skillkit tap add owner/repo
|
||||
skillkit tap add owner/repo --name "My Skills"
|
||||
```
|
||||
|
||||
### tap remove
|
||||
|
||||
Remove a custom skill source.
|
||||
|
||||
```bash
|
||||
skillkit tap remove owner/repo
|
||||
```
|
||||
|
||||
### tap list
|
||||
|
||||
List all custom skill sources.
|
||||
|
||||
```bash
|
||||
skillkit tap list
|
||||
```
|
||||
|
||||
Once a tap is added, skills from that source appear in `skillkit marketplace search` results and can be installed with the standard `skillkit install owner/repo` workflow.
|
||||
|
||||
## Security Scanning
|
||||
|
||||
```bash
|
||||
|
||||
@@ -152,11 +152,61 @@ primer:
|
||||
- .next
|
||||
```
|
||||
|
||||
## Lock File
|
||||
|
||||
SkillKit maintains a centralized lock file at `~/.skillkit/lock.json` that tracks every installed skill. The lock file is written on install, updated on update, and cleaned on remove.
|
||||
|
||||
```json
|
||||
{
|
||||
"version": 1,
|
||||
"skills": {
|
||||
"pdf": {
|
||||
"source": "anthropics/skills",
|
||||
"checksum": "sha256:abc123...",
|
||||
"agents": ["claude-code", "cursor"],
|
||||
"installedAt": "2026-04-01T12:00:00Z",
|
||||
"updatedAt": "2026-04-08T09:30:00Z"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
| Field | Description |
|
||||
|-------|-------------|
|
||||
| `source` | The repository or local path the skill was installed from |
|
||||
| `checksum` | SHA-256 hash of the SKILL.md content at install time, used for update detection |
|
||||
| `agents` | Which agents the skill is installed for |
|
||||
| `installedAt` | ISO timestamp of initial installation |
|
||||
| `updatedAt` | ISO timestamp of the most recent update |
|
||||
|
||||
The `update` command compares the stored checksum against the source to skip unchanged skills. The `remove` command cleans up the corresponding lock entry.
|
||||
|
||||
## Taps File
|
||||
|
||||
Custom skill source repositories are stored in `~/.skillkit/taps.json`. Taps are managed via the `skillkit tap` commands.
|
||||
|
||||
```json
|
||||
{
|
||||
"version": 1,
|
||||
"taps": [
|
||||
{
|
||||
"source": "myorg/internal-skills",
|
||||
"name": "Internal Skills",
|
||||
"addedAt": "2026-04-05T10:00:00Z"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
Skills from tapped sources appear in marketplace search results and can be installed like any other source. See the [tap command](/docs/commands#tap-command) documentation for usage.
|
||||
|
||||
## Directory Structure
|
||||
|
||||
```
|
||||
~/.skillkit/
|
||||
├── preferences.json # User preferences
|
||||
├── lock.json # Installed skill tracking
|
||||
├── taps.json # Custom skill sources
|
||||
├── cache/ # Marketplace cache
|
||||
├── memory/ # Learning storage
|
||||
│ ├── observations/
|
||||
|
||||
@@ -29,7 +29,7 @@ skillkit/
|
||||
│ ├── core/ # Business logic
|
||||
│ ├── cli/ # CLI
|
||||
│ ├── tui/ # Terminal UI
|
||||
│ └── agents/ # 44 adapters
|
||||
│ └── agents/ # 45 adapters
|
||||
├── marketplace/ # Skills data
|
||||
│ ├── skills.json
|
||||
│ └── sources.json
|
||||
|
||||
@@ -7,7 +7,7 @@ description: Universal skill management for AI coding agents
|
||||
|
||||
Skills make AI coding agents smarter. But every agent uses a different format — Claude Code wants `.claude/skills/`, Cursor uses `.mdc`, Copilot expects `.github/skills/`. You end up rewriting the same skill three times, or locking into one platform.
|
||||
|
||||
SkillKit fixes this. Write a skill once, deploy it to all 44 agents.
|
||||
SkillKit fixes this. Write a skill once, deploy it to all 45 agents.
|
||||
|
||||
## Get Started
|
||||
|
||||
@@ -95,7 +95,7 @@ SkillKit sits between your skills and your agents. It handles format translation
|
||||
|
||||
## Supported Agents
|
||||
|
||||
44 agents and counting:
|
||||
45 agents and counting:
|
||||
|
||||
**Claude Code** | **Cursor** | **Codex** | **Gemini CLI** | **OpenCode** | **GitHub Copilot** | **Windsurf** | Amp | Antigravity | Clawdbot | Cline | CodeBuddy | CommandCode | Continue | Crush | Droid | Factory | Goose | Kilo Code | Kiro CLI | MCPJam | Mux | Neovate | OpenHands | Pi | Qoder | Qwen | Roo Code | Trae | Vercel | Zencoder | Universal
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ The init command:
|
||||
|
||||
```bash
|
||||
skillkit init --agent cursor
|
||||
skillkit init --list # Show all 44 supported agents
|
||||
skillkit init --list # Show all 45 supported agents
|
||||
skillkit init --quiet # Skip logo and prompts (for CI)
|
||||
```
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ description: Auto-generate AI agent instructions from your codebase
|
||||
|
||||
# Primer
|
||||
|
||||
Primer analyzes your codebase and automatically generates optimized instructions for all 44 AI agents. No more manual configuration—let SkillKit detect your tech stack, coding patterns, and project structure.
|
||||
Primer analyzes your codebase and automatically generates optimized instructions for all 45 AI agents. No more manual configuration—let SkillKit detect your tech stack, coding patterns, and project structure.
|
||||
|
||||
## Quick Start
|
||||
|
||||
@@ -16,7 +16,7 @@ skillkit primer
|
||||
# Generate for specific agents
|
||||
skillkit primer --agent claude,cursor,windsurf
|
||||
|
||||
# Generate for all 44 agents
|
||||
# Generate for all 45 agents
|
||||
skillkit primer --all-agents
|
||||
|
||||
# Preview without writing files
|
||||
@@ -65,7 +65,7 @@ Primer creates agent-specific instructions for:
|
||||
└── copilot-instructions.md
|
||||
```
|
||||
|
||||
### All 44 Agents
|
||||
### All 45 Agents
|
||||
Each agent gets optimized instructions in their native format.
|
||||
|
||||
## Example Output
|
||||
|
||||
@@ -242,6 +242,28 @@ console.log(`Findings: ${result.findings.length}`);
|
||||
| **Low** | 1 (with `--fail-on low`) | Minor issue or best practice |
|
||||
| **Info** | 0 | Informational finding |
|
||||
|
||||
## Trust Badges
|
||||
|
||||
Skills display a trust badge based on their source and quality analysis. Badges appear during installation, in `skillkit check` output, and in marketplace search results.
|
||||
|
||||
| Badge | Criteria |
|
||||
|-------|----------|
|
||||
| **[Official]** | Published by a known official source (Anthropic, Vercel, iii-hq, etc.) |
|
||||
| **[Trusted]** | TrustScorer rates the skill 8-10 based on clarity, boundaries, specificity, and safety |
|
||||
| **[Review]** | TrustScorer rates the skill 5-7; the skill may need refinement |
|
||||
| **[Caution]** | TrustScorer rates the skill 0-4; requires careful review before use |
|
||||
|
||||
The `TrustScorer` evaluates four weighted dimensions:
|
||||
|
||||
| Dimension | Weight | What it measures |
|
||||
|-----------|--------|------------------|
|
||||
| Clarity | 30% | How well-defined the skill's purpose and instructions are |
|
||||
| Boundaries | 25% | Whether the skill stays within its declared scope |
|
||||
| Specificity | 25% | How concrete and actionable the instructions are |
|
||||
| Safety | 20% | Absence of dangerous patterns (injection, exfiltration, secrets) |
|
||||
|
||||
Official sources are allowlisted by organization name and always receive the `[Official]` badge regardless of score. For all other sources, the badge is determined by the composite trust score.
|
||||
|
||||
## False Positive Handling
|
||||
|
||||
The scanner automatically filters:
|
||||
|
||||
@@ -5,7 +5,7 @@ description: Convert skills between AI agent formats
|
||||
|
||||
# Translation
|
||||
|
||||
SkillKit automatically converts between all 44 agent formats using an adapter pattern.
|
||||
SkillKit automatically converts between all 45 agent formats using an adapter pattern.
|
||||
|
||||
## Basic Translation
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "skillkit-docs",
|
||||
"version": "1.19.2",
|
||||
"version": "1.22.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "next build",
|
||||
|
||||
@@ -39,8 +39,8 @@ export default function HomePage() {
|
||||
{/* Features Grid */}
|
||||
<div className="grid grid-cols-1 md:grid-cols-3 gap-6 mb-16">
|
||||
<div className="border border-zinc-800 bg-zinc-900/30 p-6">
|
||||
<h3 className="text-lg font-bold text-white mb-2 font-mono">44 Agents</h3>
|
||||
<p className="text-zinc-500 text-sm">Claude, Cursor, Codex, Windsurf, Copilot, and 39 more supported out of the box.</p>
|
||||
<h3 className="text-lg font-bold text-white mb-2 font-mono">45 Agents</h3>
|
||||
<p className="text-zinc-500 text-sm">Claude, Cursor, Codex, Windsurf, Copilot, and 40 more supported out of the box.</p>
|
||||
</div>
|
||||
<div className="border border-zinc-800 bg-zinc-900/30 p-6">
|
||||
<h3 className="text-lg font-bold text-white mb-2 font-mono">400K+ Skills</h3>
|
||||
|
||||
@@ -44,12 +44,12 @@ const sections: DocSection[] = [
|
||||
content: (
|
||||
<div className="space-y-4">
|
||||
<p className="text-zinc-300">
|
||||
SkillKit is a universal command-line interface (CLI) and programmatic toolkit for managing AI agent skills across 44 AI coding platforms. It solves the fragmentation problem where each AI agent uses different skill formats and directory structures.
|
||||
SkillKit is a universal command-line interface (CLI) and programmatic toolkit for managing AI agent skills across 45 AI coding platforms. It solves the fragmentation problem where each AI agent uses different skill formats and directory structures.
|
||||
</p>
|
||||
<h3 className="text-lg font-semibold text-white mt-6">Core Capabilities</h3>
|
||||
<ul className="list-disc list-inside space-y-2 text-zinc-400">
|
||||
<li><span className="text-white">Skill Discovery</span> - Browse 400K+ skills from registries with AI-powered recommendations</li>
|
||||
<li><span className="text-white">Cross-Agent Translation</span> - Automatically convert skills between 44 agent-specific formats</li>
|
||||
<li><span className="text-white">Cross-Agent Translation</span> - Automatically convert skills between 45 agent-specific formats</li>
|
||||
<li><span className="text-white">Team Collaboration</span> - Share skills via .skills manifest files and publish to marketplace</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -102,7 +102,7 @@ skillkit install anthropics/skills`}</CodeBlock>
|
||||
<ul className="list-disc list-inside space-y-2 text-zinc-400">
|
||||
<li><span className="text-white">UI Tier</span> - CLI commands, Terminal UI (OpenTUI-based), and documentation website</li>
|
||||
<li><span className="text-white">Core Logic Tier</span> - @skillkit/core for business logic; @skillkit/agents for adapter implementations</li>
|
||||
<li><span className="text-white">Integration Tier</span> - File systems, Git repositories, marketplace APIs, and 44 AI agents</li>
|
||||
<li><span className="text-white">Integration Tier</span> - File systems, Git repositories, marketplace APIs, and 45 AI agents</li>
|
||||
</ul>
|
||||
|
||||
<h3 className="text-lg font-semibold text-white mt-6">Monorepo Structure</h3>
|
||||
@@ -130,7 +130,7 @@ skillkit install anthropics/skills`}</CodeBlock>
|
||||
content: (
|
||||
<div className="space-y-4">
|
||||
<p className="text-zinc-300">
|
||||
SkillKit supports 44 AI coding agents with automatic format translation:
|
||||
SkillKit supports 45 AI coding agents with automatic format translation:
|
||||
</p>
|
||||
|
||||
<Table
|
||||
|
||||
@@ -9,7 +9,7 @@ interface Feature {
|
||||
const FEATURES: Feature[] = [
|
||||
{
|
||||
title: 'Multi-Agent',
|
||||
description: 'Deploy to 44 AI coding agents with one command.',
|
||||
description: 'Deploy to 45 AI coding agents with one command.',
|
||||
icon: (
|
||||
<svg className="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={1.5} d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10" />
|
||||
@@ -64,7 +64,7 @@ const FEATURES: Feature[] = [
|
||||
];
|
||||
|
||||
const COMPARISONS = [
|
||||
['Agents', '1', '44'],
|
||||
['Agents', '1', '45'],
|
||||
['Translation', 'Manual', 'Auto'],
|
||||
['Sharing', 'Copy/paste', '.skills manifest'],
|
||||
['Discovery', 'Forums', 'CLI + AI'],
|
||||
@@ -83,7 +83,7 @@ export function Features(): React.ReactElement {
|
||||
</p>
|
||||
<div className="flex gap-6 sm:gap-8">
|
||||
<div>
|
||||
<div className="text-2xl sm:text-3xl font-bold text-white font-mono">44</div>
|
||||
<div className="text-2xl sm:text-3xl font-bold text-white font-mono">45</div>
|
||||
<div className="text-zinc-600 text-[10px] sm:text-xs font-mono">Agents</div>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
@@ -69,8 +69,8 @@ const ADVANCED_FEATURES: AdvancedFeature[] = [
|
||||
id: 'primer',
|
||||
title: 'Primer',
|
||||
subtitle: 'Zero-Config AI Instructions',
|
||||
description: 'Automatically generate CLAUDE.md, .cursorrules, and agent instructions by analyzing your codebase. Detects your tech stack, coding patterns, and project structure—then creates optimized instructions for all 44 agents.',
|
||||
highlight: 'Auto-generates instructions for 44 agents',
|
||||
description: 'Automatically generate CLAUDE.md, .cursorrules, and agent instructions by analyzing your codebase. Detects your tech stack, coding patterns, and project structure—then creates optimized instructions for all 45 agents.',
|
||||
highlight: 'Auto-generates instructions for 45 agents',
|
||||
icon: (
|
||||
<svg className="w-8 h-8" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={1.5} d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01" />
|
||||
@@ -78,7 +78,7 @@ const ADVANCED_FEATURES: AdvancedFeature[] = [
|
||||
),
|
||||
commands: [
|
||||
{ cmd: 'primer', desc: 'Analyze & generate for detected agents' },
|
||||
{ cmd: 'primer --all-agents', desc: 'Generate for all 44 agents' },
|
||||
{ cmd: 'primer --all-agents', desc: 'Generate for all 45 agents' },
|
||||
{ cmd: 'primer --analyze-only', desc: 'Preview codebase analysis' },
|
||||
{ cmd: 'primer --json', desc: 'Machine-readable output' },
|
||||
],
|
||||
|
||||
@@ -429,7 +429,7 @@ export function Agents(): React.ReactElement {
|
||||
<section className="py-6 border-b border-zinc-800 overflow-hidden">
|
||||
<div className="mx-auto max-w-5xl px-4 sm:px-6 lg:px-8">
|
||||
<p className="text-zinc-500 font-mono text-[11px] uppercase tracking-widest mb-6 text-center">
|
||||
Works with 44 AI Agents
|
||||
Works with 45 AI Agents
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -23,9 +23,19 @@ const COMMAND_GROUPS: CommandGroup[] = [
|
||||
{ cmd: 'list', desc: 'View installed skills' },
|
||||
{ cmd: 'sync', desc: 'Deploy to all agents' },
|
||||
{ cmd: 'translate --to <agent>', desc: 'Convert formats' },
|
||||
{ cmd: 'update', desc: 'Update all skills' },
|
||||
{ cmd: 'update', desc: 'Update with change detection' },
|
||||
{ cmd: 'remove <skill>', desc: 'Remove a skill' },
|
||||
{ cmd: 'status', desc: 'Show skill status' },
|
||||
{ cmd: 'remove --source org/repo', desc: 'Bulk remove by repo' },
|
||||
{ cmd: 'remove --all', desc: 'Remove all skills' },
|
||||
{ cmd: 'check', desc: 'Quality scores & activity' },
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'Sources',
|
||||
commands: [
|
||||
{ cmd: 'tap add owner/repo', desc: 'Add custom source' },
|
||||
{ cmd: 'tap list', desc: 'List custom sources' },
|
||||
{ cmd: 'tap remove owner/repo', desc: 'Remove custom source' },
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -67,7 +77,7 @@ const COMMAND_GROUPS: CommandGroup[] = [
|
||||
{ cmd: 'manifest init', desc: 'Create .skills file' },
|
||||
{ cmd: 'team init', desc: 'Initialize team' },
|
||||
{ cmd: 'team share', desc: 'Share via Git' },
|
||||
{ cmd: 'publish', desc: 'Submit to marketplace' },
|
||||
{ cmd: 'publish submit', desc: 'Submit via CLI' },
|
||||
{ cmd: 'cicd init', desc: 'CI/CD templates' },
|
||||
{ cmd: 'team sync', desc: 'Sync team skills' },
|
||||
],
|
||||
|
||||
@@ -246,7 +246,7 @@ export function CompatibilityMatrix(): React.ReactElement {
|
||||
<div>
|
||||
<h2 className="text-lg sm:text-xl font-bold text-white mb-1 font-mono">Compatibility Matrix</h2>
|
||||
<p className="text-zinc-500 font-mono text-[10px] sm:text-xs">
|
||||
Skill support across all 44 agents and {CATEGORIES.length} categories.
|
||||
Skill support across all 45 agents and {CATEGORIES.length} categories.
|
||||
</p>
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
|
||||
@@ -42,13 +42,13 @@ const sections: DocSection[] = [
|
||||
content: (
|
||||
<div className="space-y-4">
|
||||
<p className="text-zinc-300">
|
||||
SkillKit is a universal command-line interface (CLI) and programmatic toolkit for managing AI agent skills across 44 AI coding platforms. It solves the fragmentation problem where each AI agent uses different skill formats and directory structures.
|
||||
SkillKit is a universal command-line interface (CLI) and programmatic toolkit for managing AI agent skills across 45 AI coding platforms. It solves the fragmentation problem where each AI agent uses different skill formats and directory structures.
|
||||
</p>
|
||||
<h3 className="text-lg font-semibold text-white mt-6">Core Capabilities</h3>
|
||||
<ul className="list-disc list-inside space-y-2 text-zinc-400">
|
||||
<li><span className="text-white">AI Instruction Generation (Primer)</span> - Analyze your codebase and generate customized instruction files for all 44 agents</li>
|
||||
<li><span className="text-white">AI Instruction Generation (Primer)</span> - Analyze your codebase and generate customized instruction files for all 45 agents</li>
|
||||
<li><span className="text-white">Skill Discovery</span> - Browse 400K+ skills from registries with AI-powered recommendations</li>
|
||||
<li><span className="text-white">Cross-Agent Translation</span> - Automatically convert skills between 44 agent-specific formats</li>
|
||||
<li><span className="text-white">Cross-Agent Translation</span> - Automatically convert skills between 45 agent-specific formats</li>
|
||||
<li><span className="text-white">Team Collaboration</span> - Share skills via .skills manifest files and publish to marketplace</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -101,7 +101,7 @@ skillkit install anthropics/skills`}</CodeBlock>
|
||||
<ul className="list-disc list-inside space-y-2 text-zinc-400">
|
||||
<li><span className="text-white">UI Tier</span> - CLI commands, Terminal UI (OpenTUI-based), and documentation website</li>
|
||||
<li><span className="text-white">Core Logic Tier</span> - @skillkit/core for business logic; @skillkit/agents for adapter implementations</li>
|
||||
<li><span className="text-white">Integration Tier</span> - File systems, Git repositories, marketplace APIs, and 44 AI agents</li>
|
||||
<li><span className="text-white">Integration Tier</span> - File systems, Git repositories, marketplace APIs, and 45 AI agents</li>
|
||||
</ul>
|
||||
|
||||
<h3 className="text-lg font-semibold text-white mt-6">Monorepo Structure</h3>
|
||||
@@ -129,7 +129,7 @@ skillkit install anthropics/skills`}</CodeBlock>
|
||||
content: (
|
||||
<div className="space-y-4">
|
||||
<p className="text-zinc-300">
|
||||
SkillKit supports 44 AI coding agents with automatic format translation:
|
||||
SkillKit supports 45 AI coding agents with automatic format translation:
|
||||
</p>
|
||||
|
||||
<Table
|
||||
@@ -206,7 +206,7 @@ skillkit cicd init # Setup CI/CD integration`}</CodeBlock>
|
||||
|
||||
<h3 className="text-lg font-semibold text-white mt-6">AI Instruction Generation (Primer)</h3>
|
||||
<CodeBlock>{`skillkit primer # Analyze codebase, generate for detected agents
|
||||
skillkit primer --all-agents # Generate for all 44 agents
|
||||
skillkit primer --all-agents # Generate for all 45 agents
|
||||
skillkit primer --agent claude-code,cursor # Specific agents only
|
||||
skillkit primer --analyze-only # Only show codebase analysis
|
||||
skillkit primer --dry-run # Preview without writing files
|
||||
|
||||
@@ -18,7 +18,7 @@ const FEATURES: Feature[] = [
|
||||
},
|
||||
{
|
||||
title: 'Auto Translation',
|
||||
description: 'The npm for agent skills. Write once, auto-translate to 44 formats.',
|
||||
description: 'The npm for agent skills. Write once, auto-translate to 45 formats.',
|
||||
icon: (
|
||||
<svg className="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={1.5} d="M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4" />
|
||||
@@ -36,7 +36,7 @@ const FEATURES: Feature[] = [
|
||||
},
|
||||
{
|
||||
title: 'Primer',
|
||||
description: 'Auto-generate agent instructions for all 44 agents from your codebase.',
|
||||
description: 'Auto-generate agent instructions for all 45 agents from your codebase.',
|
||||
icon: (
|
||||
<svg className="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={1.5} d="M13 10V3L4 14h7v7l9-11h-7z" />
|
||||
@@ -109,9 +109,9 @@ const FEATURES: Feature[] = [
|
||||
];
|
||||
|
||||
const COMPARISONS = [
|
||||
['Agent Support', '1-17 agents', '44 agents'],
|
||||
['Agent Support', '1-17 agents', '45 agents'],
|
||||
['Sources', 'Single registry', '34+ aggregated'],
|
||||
['Translation', 'None or limited', 'All 44 formats'],
|
||||
['Translation', 'None or limited', 'All 45 formats'],
|
||||
['Memory', 'None', 'Persistent learning'],
|
||||
['Security', 'None', '46-rule scanner'],
|
||||
['Team Sync', 'None', '.skills manifest'],
|
||||
@@ -131,7 +131,7 @@ export function Features(): React.ReactElement {
|
||||
</p>
|
||||
<div className="flex gap-6 sm:gap-8">
|
||||
<div>
|
||||
<div className="text-2xl sm:text-3xl font-bold text-white font-mono">44</div>
|
||||
<div className="text-2xl sm:text-3xl font-bold text-white font-mono">45</div>
|
||||
<div className="text-zinc-600 text-[10px] sm:text-xs font-mono">Agents</div>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
@@ -22,7 +22,7 @@ interface TerminalLine {
|
||||
const TERMINAL_LINES: TerminalLine[] = [
|
||||
{ type: 'cmd', text: 'skillkit install anthropics/skills' },
|
||||
{ type: 'out', text: '→ Fetched from github.com/anthropics/skills' },
|
||||
{ type: 'out', text: '→ Translated to 44 agent formats' },
|
||||
{ type: 'out', text: '→ Translated to 45 agent formats' },
|
||||
{ type: 'out', text: '→ Scanned: 0 issues found' },
|
||||
{ type: 'cmd', text: 'skillkit install skills.sh/vercel/agent-skills' },
|
||||
{ type: 'out', text: '→ Installed 12 skills from skills.sh' },
|
||||
@@ -149,7 +149,7 @@ export function Hero({ version, stars }: HeroProps): React.ReactElement {
|
||||
|
||||
<p className="text-sm text-zinc-400 mb-5 max-w-lg font-mono leading-relaxed">
|
||||
The open source package manager that aggregates 34+ skill sources,
|
||||
scans 400K+ skills from registries, auto-translates to 44 agent formats,
|
||||
scans 400K+ skills from registries, auto-translates to 45 agent formats,
|
||||
and adds memory, security scanning, and team workflows. Everything runs locally.
|
||||
</p>
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ const USE_CASES: UseCase[] = [
|
||||
{
|
||||
persona: 'Multi-Agent Developer',
|
||||
problem: 'You\'ve built skills for Claude Code. Now your team wants Cursor, and you want to try Windsurf.',
|
||||
solution: 'SkillKit translates skills between all 44 agents. Write once, deploy everywhere.',
|
||||
solution: 'SkillKit translates skills between all 45 agents. Write once, deploy everywhere.',
|
||||
command: 'skillkit translate --to cursor,windsurf',
|
||||
gradient: 'from-violet-500/10 to-purple-500/10',
|
||||
icon: (
|
||||
|
||||
@@ -18,7 +18,7 @@ const COMPETITORS: Competitor[] = [
|
||||
{ name: 'Askill', type: 'Installer', agents: '~40', translate: false, memory: false, security: true, team: false, tui: false, api: false },
|
||||
{ name: 'Skild', type: 'Installer', agents: '~7', translate: false, memory: false, security: false, team: false, tui: false, api: false },
|
||||
{ name: 'Paks', type: 'Installer', agents: '~6', translate: false, memory: false, security: false, team: false, tui: false, api: false },
|
||||
{ name: 'SkillKit', type: 'Platform', agents: '44', translate: true, memory: true, security: true, team: true, tui: true, api: true },
|
||||
{ name: 'SkillKit', type: 'Platform', agents: '45', translate: true, memory: true, security: true, team: true, tui: true, api: true },
|
||||
];
|
||||
|
||||
const SOURCES = [
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>SkillKit - Universal Skills for AI Coding Agents</title>
|
||||
<meta name="description" content="Write once, deploy to 44 AI coding agents. Skills for Claude Code, Cursor, Codex, Windsurf, GitHub Copilot, and more.">
|
||||
<meta name="description" content="Write once, deploy to 45 AI coding agents. Skills for Claude Code, Cursor, Codex, Windsurf, GitHub Copilot, and more.">
|
||||
|
||||
<!-- Open Graph -->
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:url" content="https://skillkit.sh/">
|
||||
<meta property="og:title" content="SkillKit - Universal Skills for AI Coding Agents">
|
||||
<meta property="og:description" content="Write once, deploy to 44 AI coding agents. Skills for Claude Code, Cursor, Codex, Windsurf, GitHub Copilot, and more.">
|
||||
<meta property="og:description" content="Write once, deploy to 45 AI coding agents. Skills for Claude Code, Cursor, Codex, Windsurf, GitHub Copilot, and more.">
|
||||
<meta property="og:image" content="https://skillkit.sh/og-image.png">
|
||||
<meta property="og:image:width" content="1200">
|
||||
<meta property="og:image:height" content="630">
|
||||
@@ -20,7 +20,7 @@
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:url" content="https://skillkit.sh/">
|
||||
<meta name="twitter:title" content="SkillKit - Universal Skills for AI Coding Agents">
|
||||
<meta name="twitter:description" content="Write once, deploy to 44 AI coding agents. Skills for Claude Code, Cursor, Codex, Windsurf, GitHub Copilot, and more.">
|
||||
<meta name="twitter:description" content="Write once, deploy to 45 AI coding agents. Skills for Claude Code, Cursor, Codex, Windsurf, GitHub Copilot, and more.">
|
||||
<meta name="twitter:image" content="https://skillkit.sh/og-image.png">
|
||||
|
||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "SkillKit",
|
||||
"description": "Supercharge Every AI Coding Agent. Translate, manage, and sync skills across Claude, Cursor, Windsurf, and 44 agents.",
|
||||
"description": "Supercharge Every AI Coding Agent. Translate, manage, and sync skills across Claude, Cursor, Windsurf, and 45 agents.",
|
||||
"requestFramePermissions": []
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "skillkit",
|
||||
"private": true,
|
||||
"version": "1.19.2",
|
||||
"version": "1.22.1",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"info": {
|
||||
"title": "SkillKit",
|
||||
"version": "1.12.0",
|
||||
"description": "Skills shouldn't require pre-installation. This API lets any agent, framework, or tool discover and retrieve skills on demand.\n\n400K+ skills across 44 AI coding agents. Results ranked by a multi-signal scoring system (content 40pts, query match 30pts, popularity 15pts, references 15pts).\n\n## Quick Start\n\n```bash\nnpx skillkit serve\n```\n\nThe API is now running at http://localhost:3737\n\n## MCP Server\n\nFor agent-native discovery (Claude Desktop, Cursor):\n\n```json\n{\n \"mcpServers\": {\n \"skillkit\": { \"command\": \"npx\", \"args\": [\"@skillkit/mcp\"] }\n }\n}\n```\n\n## Python Client\n\n```bash\npip install skillkit-client\n```",
|
||||
"description": "Skills shouldn't require pre-installation. This API lets any agent, framework, or tool discover and retrieve skills on demand.\n\n400K+ skills across 45 AI coding agents. Results ranked by a multi-signal scoring system (content 40pts, query match 30pts, popularity 15pts, references 15pts).\n\n## Quick Start\n\n```bash\nnpx skillkit serve\n```\n\nThe API is now running at http://localhost:3737\n\n## MCP Server\n\nFor agent-native discovery (Claude Desktop, Cursor):\n\n```json\n{\n \"mcpServers\": {\n \"skillkit\": { \"command\": \"npx\", \"args\": [\"@skillkit/mcp\"] }\n }\n}\n```\n\n## Python Client\n\n```bash\npip install skillkit-client\n```",
|
||||
"license": {
|
||||
"name": "Apache-2.0",
|
||||
"url": "https://opensource.org/licenses/Apache-2.0"
|
||||
|
||||
Binary file not shown.
@@ -44,7 +44,7 @@ describe('E2E: Onboarding UI', () => {
|
||||
expect(result.success).toBe(true);
|
||||
});
|
||||
|
||||
it('should display all 44 agents', async () => {
|
||||
it('should display all 45 agents', async () => {
|
||||
const result = await runCli(['init', '--list']);
|
||||
const output = result.stdout + result.stderr;
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ import {
|
||||
type CrossAgentSkill,
|
||||
} from '@skillkit/core';
|
||||
|
||||
// All 44 supported agents
|
||||
// All 45 supported agents
|
||||
const SUPPORTED_AGENTS = [
|
||||
'claude-code',
|
||||
'cursor',
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* E2E Tests: Skill Translation Commands
|
||||
*
|
||||
* Tests for: translate, context, recommend
|
||||
* Validates translation to all 44 supported agents
|
||||
* Validates translation to all 45 supported agents
|
||||
*/
|
||||
|
||||
import { describe, it, expect, beforeEach, afterEach } from 'vitest';
|
||||
@@ -16,7 +16,7 @@ import {
|
||||
testFileExists,
|
||||
} from './helpers/cli-runner.js';
|
||||
|
||||
// All 44 supported agents
|
||||
// All 45 supported agents
|
||||
const SUPPORTED_AGENTS = [
|
||||
'claude-code',
|
||||
'cursor',
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "./sources-schema.json",
|
||||
"version": 1,
|
||||
"updatedAt": "2026-02-28",
|
||||
"updatedAt": "2026-04-10",
|
||||
"description": "Curated skill repository sources - THE SINGLE SOURCE OF TRUTH",
|
||||
"sources": [
|
||||
{ "source": "anthropics/skills", "name": "Anthropic Official", "official": true },
|
||||
@@ -37,6 +37,7 @@
|
||||
{ "source": "intellectronica/agent-skills", "name": "Context7" },
|
||||
{ "source": "muratcankoylan/Agent-Skills-for-Context-Engineering", "name": "Context Engineering" },
|
||||
{ "source": "sickn33/antigravity-awesome-skills", "name": "Antigravity Awesome Skills" },
|
||||
{ "source": "NousResearch/hermes-agent", "name": "Hermes Agent Skills" },
|
||||
{ "source": "skills.sh", "name": "Skills.sh Leaderboard", "official": true, "registry": "skills-sh" }
|
||||
]
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"name": "skillkit-monorepo",
|
||||
"version": "1.19.2",
|
||||
"version": "1.22.1",
|
||||
"private": true,
|
||||
"description": "The package manager for AI agent skills — install, translate, share across 44 coding agents",
|
||||
"description": "The package manager for AI agent skills — install, translate, share across 45 coding agents",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"build": "turbo run build",
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
[](https://www.npmjs.com/package/@skillkit/agents)
|
||||
[](https://opensource.org/licenses/Apache-2.0)
|
||||
|
||||
**Agent adapters for SkillKit** - configuration and detection for 32 AI coding agents.
|
||||
**Agent adapters for SkillKit** - configuration and detection for 45 AI coding agents.
|
||||
|
||||
## Installation
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
npm install @skillkit/agents
|
||||
```
|
||||
|
||||
## Supported Agents (32)
|
||||
## Supported Agents (45)
|
||||
|
||||
| Agent | Config Format | Project Skills | Global Skills |
|
||||
|-------|--------------|----------------|---------------|
|
||||
@@ -23,11 +23,14 @@ npm install @skillkit/agents
|
||||
| Antigravity | SKILL.md | `.antigravity/skills/` | - |
|
||||
| Amp | SKILL.md | `.amp/skills/` | - |
|
||||
| Clawdbot | SKILL.md | `.clawdbot/skills/` | - |
|
||||
| OpenClaw | SKILL.md | `skills/` | - |
|
||||
| Cline | SKILL.md | `.cline/skills/` | - |
|
||||
| CodeBuddy | SKILL.md | `.codebuddy/skills/` | - |
|
||||
| CodeGPT | SKILL.md | `.codegpt/skills/` | - |
|
||||
| CommandCode | SKILL.md | `.commandcode/skills/` | - |
|
||||
| Continue | SKILL.md | `.continue/skills/` | `~/.continue/skills/` |
|
||||
| Crush | SKILL.md | `.crush/skills/` | - |
|
||||
| Devin | SKILL.md | `.devin/skills/` | - |
|
||||
| Droid (Factory) | SKILL.md | `.factory/skills/` | - |
|
||||
| Factory | SKILL.md | `.factory/skills/` | - |
|
||||
| GitHub Copilot | Markdown | `.github/skills/` | - |
|
||||
@@ -39,6 +42,7 @@ npm install @skillkit/agents
|
||||
| Neovate | SKILL.md | `.neovate/skills/` | - |
|
||||
| OpenHands | SKILL.md | `.openhands/skills/` | - |
|
||||
| Pi | SKILL.md | `.pi/skills/` | - |
|
||||
| PlayCode Agent | SKILL.md | `.playcode/skills/` | - |
|
||||
| Qoder | SKILL.md | `.qoder/skills/` | - |
|
||||
| Qwen | SKILL.md | `.qwen/skills/` | - |
|
||||
| Roo Code | SKILL.md | `.roo/skills/` | `~/.roo/skills/` |
|
||||
@@ -46,6 +50,15 @@ npm install @skillkit/agents
|
||||
| Vercel | SKILL.md | `.vercel/skills/` | - |
|
||||
| Windsurf | Markdown | `.windsurf/skills/` | `~/.codeium/windsurf/skills/` |
|
||||
| Zencoder | SKILL.md | `.zencoder/skills/` | - |
|
||||
| Aider | SKILL.md | `.aider/skills/` | - |
|
||||
| Amazon Q | SKILL.md | `.amazonq/skills/` | - |
|
||||
| Augment Code | SKILL.md | `.augment/skills/` | - |
|
||||
| Bolt | SKILL.md | `.bolt/skills/` | - |
|
||||
| Lovable | SKILL.md | `.lovable/skills/` | - |
|
||||
| Replit Agent | SKILL.md | `.replit/skills/` | - |
|
||||
| Sourcegraph Cody | SKILL.md | `.cody/skills/` | - |
|
||||
| Tabby | SKILL.md | `.tabby/skills/` | - |
|
||||
| Tabnine | SKILL.md | `.tabnine/skills/` | - |
|
||||
| Universal | SKILL.md | `skills/` | - |
|
||||
|
||||
## Usage
|
||||
@@ -170,11 +183,14 @@ type AgentType =
|
||||
| 'antigravity'
|
||||
| 'amp'
|
||||
| 'clawdbot'
|
||||
| 'openclaw'
|
||||
| 'cline'
|
||||
| 'codebuddy'
|
||||
| 'codegpt'
|
||||
| 'commandcode'
|
||||
| 'continue'
|
||||
| 'crush'
|
||||
| 'devin'
|
||||
| 'droid'
|
||||
| 'factory'
|
||||
| 'github-copilot'
|
||||
@@ -186,6 +202,7 @@ type AgentType =
|
||||
| 'neovate'
|
||||
| 'openhands'
|
||||
| 'pi'
|
||||
| 'playcode-agent'
|
||||
| 'qoder'
|
||||
| 'qwen'
|
||||
| 'roo'
|
||||
@@ -193,6 +210,15 @@ type AgentType =
|
||||
| 'vercel'
|
||||
| 'windsurf'
|
||||
| 'zencoder'
|
||||
| 'aider'
|
||||
| 'amazon-q'
|
||||
| 'augment-code'
|
||||
| 'bolt'
|
||||
| 'lovable'
|
||||
| 'replit-agent'
|
||||
| 'sourcegraph-cody'
|
||||
| 'tabby'
|
||||
| 'tabnine'
|
||||
| 'universal';
|
||||
```
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@skillkit/agents",
|
||||
"version": "1.19.2",
|
||||
"description": "Agent adapters for SkillKit - supports 32 AI coding agents",
|
||||
"version": "1.22.1",
|
||||
"description": "Agent adapters for SkillKit - supports 45 AI coding agents",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@skillkit/api",
|
||||
"version": "1.19.2",
|
||||
"version": "1.22.1",
|
||||
"description": "REST API server for SkillKit skill discovery",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
|
||||
@@ -5,7 +5,7 @@ const OPENAPI_SPEC = {
|
||||
info: {
|
||||
title: 'SkillKit',
|
||||
version: '1.12.0',
|
||||
description: 'Skill Discovery API for AI coding agents. Search, browse, and retrieve skills from the SkillKit marketplace (400K+ skills across 44 agents).',
|
||||
description: 'Skill Discovery API for AI coding agents. Search, browse, and retrieve skills from the SkillKit marketplace (400K+ skills across 45 agents).',
|
||||
license: { name: 'Apache-2.0', url: 'https://opensource.org/licenses/Apache-2.0' },
|
||||
contact: { name: 'SkillKit', url: 'https://github.com/rohitg00/skillkit' },
|
||||
},
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
[](https://www.npmjs.com/package/@skillkit/cli)
|
||||
[](https://opensource.org/licenses/Apache-2.0)
|
||||
|
||||
**Command-line interface for SkillKit** - install, manage, translate, and sync skills across 32 AI coding agents.
|
||||
**Command-line interface for SkillKit** - install, manage, translate, and sync skills across 45 AI coding agents.
|
||||
|
||||
## Installation
|
||||
|
||||
@@ -264,7 +264,7 @@ const recs = await recommendCommand({
|
||||
| Gemini CLI | SKILL.md |
|
||||
| Windsurf | Markdown |
|
||||
| GitHub Copilot | Markdown |
|
||||
| + 26 more | SKILL.md |
|
||||
| + 39 more | SKILL.md |
|
||||
|
||||
## Documentation
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@skillkit/cli",
|
||||
"version": "1.19.2",
|
||||
"version": "1.22.1",
|
||||
"description": "CLI commands for SkillKit",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
|
||||
@@ -96,10 +96,10 @@ describe('Onboarding Module', () => {
|
||||
it('should generate full logo with version', async () => {
|
||||
const { getFullLogo } = await import('../onboarding/logo.js');
|
||||
|
||||
const logo = getFullLogo('1.7.2', 44);
|
||||
const logo = getFullLogo('1.7.2', 45);
|
||||
expect(logo).toContain('\u2588');
|
||||
expect(logo).toContain('v1.7.2');
|
||||
expect(logo).toContain('44 agents');
|
||||
expect(logo).toContain('45 agents');
|
||||
});
|
||||
|
||||
it('should generate compact logo', async () => {
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Command, Option } from 'clipanion';
|
||||
import { resolve } from 'node:path';
|
||||
import { promises as fs } from 'fs';
|
||||
import path from 'path';
|
||||
import { colors, warn, success } from '../onboarding/index.js';
|
||||
import { colors, warn, success, spinner } from '../onboarding/index.js';
|
||||
import { AuditLogger, type AuditQuery, type AuditEventType } from '@skillkit/core';
|
||||
|
||||
export class AuditCommand extends Command {
|
||||
@@ -114,8 +114,11 @@ export class AuditCommand extends Command {
|
||||
}
|
||||
|
||||
private async handleLog(logger: AuditLogger): Promise<number> {
|
||||
const s = this.json ? { start: () => {}, stop: () => {}, message: () => {} } : spinner();
|
||||
s.start('Querying audit log');
|
||||
const query = this.buildQuery();
|
||||
const events = await logger.query(query);
|
||||
s.stop('Query complete');
|
||||
|
||||
if (this.json) {
|
||||
console.log(JSON.stringify(events, null, 2));
|
||||
@@ -163,10 +166,13 @@ export class AuditCommand extends Command {
|
||||
}
|
||||
|
||||
private async handleExport(logger: AuditLogger): Promise<number> {
|
||||
const s = this.json ? { start: () => {}, stop: () => {}, message: () => {} } : spinner();
|
||||
const format = (this.format as 'json' | 'csv' | 'text') || 'json';
|
||||
const query = this.buildQuery();
|
||||
|
||||
s.start('Exporting audit log');
|
||||
const content = await logger.export({ format, query });
|
||||
s.stop('Export complete');
|
||||
|
||||
if (this.output) {
|
||||
const outputPath = resolve(this.output);
|
||||
@@ -180,7 +186,10 @@ export class AuditCommand extends Command {
|
||||
}
|
||||
|
||||
private async handleStats(logger: AuditLogger): Promise<number> {
|
||||
const s = this.json ? { start: () => {}, stop: () => {}, message: () => {} } : spinner();
|
||||
s.start('Computing statistics');
|
||||
const stats = await logger.stats();
|
||||
s.stop('Statistics computed');
|
||||
|
||||
if (this.json) {
|
||||
console.log(JSON.stringify(stats, null, 2));
|
||||
@@ -237,9 +246,16 @@ export class AuditCommand extends Command {
|
||||
const cutoffDate = new Date();
|
||||
cutoffDate.setDate(cutoffDate.getDate() - daysAgo);
|
||||
|
||||
const s = this.json ? { start: () => {}, stop: () => {}, message: () => {} } : spinner();
|
||||
s.start('Clearing old entries');
|
||||
const cleared = await logger.clear(cutoffDate);
|
||||
s.stop('Clear complete');
|
||||
|
||||
success(`✓ Cleared ${cleared} audit entries older than ${daysAgo} days`);
|
||||
if (this.json) {
|
||||
console.log(JSON.stringify({ success: true, cleared, days: daysAgo }));
|
||||
} else {
|
||||
success(`✓ Cleared ${cleared} audit entries older than ${daysAgo} days`);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { existsSync } from 'node:fs';
|
||||
import { existsSync, statSync } from 'node:fs';
|
||||
import { join } from 'node:path';
|
||||
import { Command, Option } from 'clipanion';
|
||||
import { findAllSkills, findSkill, detectProvider, isLocalPath } from '@skillkit/core';
|
||||
import { getSearchDirs, loadSkillMetadata } from '../helpers.js';
|
||||
import { findAllSkills, findSkill, detectProvider, isLocalPath, evaluateSkillDirectory } from '@skillkit/core';
|
||||
import { getSearchDirs, loadSkillMetadata, formatCount, timeAgo, fetchGitHubActivity } from '../helpers.js';
|
||||
import {
|
||||
colors,
|
||||
symbols,
|
||||
@@ -11,6 +11,8 @@ import {
|
||||
success,
|
||||
warn,
|
||||
header,
|
||||
formatQualityBadge,
|
||||
getQualityGradeFromScore,
|
||||
} from '../onboarding/index.js';
|
||||
|
||||
interface UpdateInfo {
|
||||
@@ -18,15 +20,19 @@ interface UpdateInfo {
|
||||
currentVersion?: string;
|
||||
hasUpdate: boolean;
|
||||
error?: string;
|
||||
qualityScore?: number | null;
|
||||
stars?: number | null;
|
||||
pushedAt?: string | null;
|
||||
}
|
||||
|
||||
export class CheckCommand extends Command {
|
||||
static override paths = [['check']];
|
||||
|
||||
static override usage = Command.Usage({
|
||||
description: 'Check for available skill updates (dry-run)',
|
||||
description: 'Check installed skills for updates, quality, and activity',
|
||||
details: `
|
||||
Checks if installed skills have updates available from their sources.
|
||||
Shows quality scores and GitHub activity for each skill.
|
||||
Does not modify any files - just reports what would be updated.
|
||||
`,
|
||||
examples: [
|
||||
@@ -46,11 +52,15 @@ export class CheckCommand extends Command {
|
||||
description: 'Minimal output',
|
||||
});
|
||||
|
||||
json = Option.Boolean('--json', false, {
|
||||
description: 'Output as JSON',
|
||||
});
|
||||
|
||||
async execute(): Promise<number> {
|
||||
const searchDirs = getSearchDirs();
|
||||
const s = spinner();
|
||||
const s = this.json ? { start: () => {}, stop: () => {}, message: () => {} } : spinner();
|
||||
|
||||
if (!this.quiet) {
|
||||
if (!this.quiet && !this.json) {
|
||||
header('Check Updates');
|
||||
}
|
||||
|
||||
@@ -79,7 +89,7 @@ export class CheckCommand extends Command {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!this.quiet) {
|
||||
if (!this.quiet && !this.json) {
|
||||
step(`Checking ${skillsToCheck.length} skill(s) for updates...`);
|
||||
console.log('');
|
||||
}
|
||||
@@ -89,12 +99,15 @@ export class CheckCommand extends Command {
|
||||
|
||||
for (const skill of skillsToCheck) {
|
||||
const metadata = loadSkillMetadata(skill.path);
|
||||
const quality = evaluateSkillDirectory(skill.path);
|
||||
const qualityScore = quality?.overall ?? null;
|
||||
|
||||
if (!metadata) {
|
||||
results.push({
|
||||
name: skill.name,
|
||||
hasUpdate: false,
|
||||
error: 'No metadata (reinstall needed)',
|
||||
qualityScore,
|
||||
});
|
||||
continue;
|
||||
}
|
||||
@@ -114,6 +127,7 @@ export class CheckCommand extends Command {
|
||||
name: skill.name,
|
||||
hasUpdate: false,
|
||||
error: 'Local source missing',
|
||||
qualityScore,
|
||||
});
|
||||
if (this.verbose) s.stop(`${skill.name}: source missing`);
|
||||
continue;
|
||||
@@ -123,20 +137,19 @@ export class CheckCommand extends Command {
|
||||
const installedSkillMd = join(skill.path, 'SKILL.md');
|
||||
|
||||
if (existsSync(sourceSkillMd) && existsSync(installedSkillMd)) {
|
||||
const { statSync } = await import('node:fs');
|
||||
const sourceTime = statSync(sourceSkillMd).mtime;
|
||||
const installedTime = statSync(installedSkillMd).mtime;
|
||||
|
||||
if (sourceTime > installedTime) {
|
||||
results.push({ name: skill.name, hasUpdate: true });
|
||||
results.push({ name: skill.name, hasUpdate: true, qualityScore });
|
||||
updatesAvailable++;
|
||||
if (this.verbose) s.stop(`${skill.name}: update available`);
|
||||
} else {
|
||||
results.push({ name: skill.name, hasUpdate: false });
|
||||
results.push({ name: skill.name, hasUpdate: false, qualityScore });
|
||||
if (this.verbose) s.stop(`${skill.name}: up to date`);
|
||||
}
|
||||
} else {
|
||||
results.push({ name: skill.name, hasUpdate: false });
|
||||
results.push({ name: skill.name, hasUpdate: false, qualityScore });
|
||||
if (this.verbose) s.stop(`${skill.name}: up to date`);
|
||||
}
|
||||
} else {
|
||||
@@ -147,15 +160,31 @@ export class CheckCommand extends Command {
|
||||
name: skill.name,
|
||||
hasUpdate: false,
|
||||
error: 'Unknown provider',
|
||||
qualityScore,
|
||||
});
|
||||
if (this.verbose) s.stop(`${skill.name}: unknown provider`);
|
||||
continue;
|
||||
}
|
||||
|
||||
const parsed = provider.parseSource(metadata.source);
|
||||
let stars: number | null = null;
|
||||
let pushedAt: string | null = null;
|
||||
|
||||
if (parsed && provider.name === 'GitHub') {
|
||||
const activity = await fetchGitHubActivity(parsed.owner, parsed.repo);
|
||||
if (activity) {
|
||||
stars = activity.stars;
|
||||
pushedAt = activity.pushedAt;
|
||||
}
|
||||
}
|
||||
|
||||
results.push({
|
||||
name: skill.name,
|
||||
hasUpdate: false,
|
||||
currentVersion: metadata.updatedAt || metadata.installedAt,
|
||||
qualityScore,
|
||||
stars,
|
||||
pushedAt,
|
||||
});
|
||||
if (this.verbose) s.stop(`${skill.name}: remote source (run update to sync)`);
|
||||
}
|
||||
@@ -164,11 +193,25 @@ export class CheckCommand extends Command {
|
||||
name: skill.name,
|
||||
hasUpdate: false,
|
||||
error: err instanceof Error ? err.message : 'Check failed',
|
||||
qualityScore,
|
||||
});
|
||||
if (this.verbose) s.stop(`${skill.name}: error`);
|
||||
}
|
||||
}
|
||||
|
||||
if (this.json) {
|
||||
console.log(JSON.stringify({
|
||||
skills: results.map((r) => ({
|
||||
name: r.name,
|
||||
hasUpdate: r.hasUpdate,
|
||||
quality: r.qualityScore ?? null,
|
||||
stars: r.stars ?? null,
|
||||
})),
|
||||
updatesAvailable,
|
||||
}));
|
||||
return 0;
|
||||
}
|
||||
|
||||
console.log('');
|
||||
|
||||
const withUpdates = results.filter(r => r.hasUpdate);
|
||||
@@ -178,27 +221,46 @@ export class CheckCommand extends Command {
|
||||
if (withUpdates.length > 0) {
|
||||
console.log(colors.primary('Updates available:'));
|
||||
for (const r of withUpdates) {
|
||||
console.log(` ${colors.success(symbols.arrowUp)} ${colors.primary(r.name)}`);
|
||||
const badge = this.qualityBadgeFor(r.qualityScore);
|
||||
console.log(` ${colors.success(symbols.arrowUp)} ${colors.primary(r.name)}${badge}`);
|
||||
}
|
||||
console.log('');
|
||||
}
|
||||
|
||||
if (upToDate.length > 0 && this.verbose) {
|
||||
console.log(colors.muted('Up to date:'));
|
||||
for (const r of upToDate) {
|
||||
console.log(` ${colors.muted(symbols.success)} ${colors.muted(r.name)}`);
|
||||
if (upToDate.length > 0) {
|
||||
if (this.verbose) {
|
||||
console.log(colors.muted('Up to date:'));
|
||||
}
|
||||
console.log('');
|
||||
for (const r of upToDate) {
|
||||
const badge = this.qualityBadgeFor(r.qualityScore);
|
||||
const activityStr = this.formatActivity(r);
|
||||
if (this.verbose) {
|
||||
console.log(` ${colors.muted(symbols.success)} ${colors.muted(r.name)}${badge}${activityStr}`);
|
||||
}
|
||||
}
|
||||
if (this.verbose) console.log('');
|
||||
}
|
||||
|
||||
if (withErrors.length > 0) {
|
||||
console.log(colors.warning('Could not check:'));
|
||||
for (const r of withErrors) {
|
||||
console.log(` ${colors.warning(symbols.warning)} ${r.name}: ${colors.muted(r.error || 'unknown')}`);
|
||||
const badge = this.qualityBadgeFor(r.qualityScore);
|
||||
console.log(` ${colors.warning(symbols.warning)} ${r.name}${badge}: ${colors.muted(r.error || 'unknown')}`);
|
||||
}
|
||||
console.log('');
|
||||
}
|
||||
|
||||
if (!this.quiet) {
|
||||
const qualityScores = results
|
||||
.map(r => r.qualityScore)
|
||||
.filter((s): s is number => typeof s === 'number');
|
||||
if (qualityScores.length > 0) {
|
||||
const avg = Math.round(qualityScores.reduce((a, b) => a + b, 0) / qualityScores.length);
|
||||
const grade = getQualityGradeFromScore(avg);
|
||||
console.log(colors.muted(`Average quality: ${avg}/100 (${grade})`));
|
||||
}
|
||||
}
|
||||
|
||||
if (updatesAvailable > 0) {
|
||||
success(`${updatesAvailable} update(s) available`);
|
||||
console.log(colors.muted('Run `skillkit update` to install updates'));
|
||||
@@ -208,4 +270,22 @@ export class CheckCommand extends Command {
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
private qualityBadgeFor(score: number | null | undefined): string {
|
||||
if (typeof score !== 'number') return '';
|
||||
return ` ${formatQualityBadge(score)}`;
|
||||
}
|
||||
|
||||
private formatActivity(r: UpdateInfo): string {
|
||||
const parts: string[] = [];
|
||||
if (typeof r.stars === 'number' && r.stars > 0) {
|
||||
parts.push(`${formatCount(r.stars)} stars`);
|
||||
}
|
||||
if (r.pushedAt) {
|
||||
parts.push(`pushed ${timeAgo(r.pushedAt)}`);
|
||||
}
|
||||
if (parts.length === 0) return '';
|
||||
return ` ${colors.muted(`(${parts.join(', ')})`)}`;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { existsSync, mkdirSync, writeFileSync } from 'node:fs';
|
||||
import { join } from 'node:path';
|
||||
import { colors, success, error, step } from '../onboarding/index.js';
|
||||
import { colors, success, error, step, spinner } from '../onboarding/index.js';
|
||||
import { Command, Option } from 'clipanion';
|
||||
|
||||
export class CreateCommand extends Command {
|
||||
@@ -37,12 +37,21 @@ export class CreateCommand extends Command {
|
||||
description: 'Parent directory to create skill in (default: current directory)',
|
||||
});
|
||||
|
||||
json = Option.Boolean('--json', false, {
|
||||
description: 'Output as JSON',
|
||||
});
|
||||
|
||||
async execute(): Promise<number> {
|
||||
const skillName = this.name.toLowerCase();
|
||||
const s = this.json ? { start: () => {}, stop: () => {}, message: () => {} } : spinner();
|
||||
|
||||
if (!/^[a-z0-9]+(-[a-z0-9]+)*$/.test(skillName)) {
|
||||
error('Invalid skill name');
|
||||
console.log(colors.muted('Must be lowercase alphanumeric with hyphens (e.g., my-skill)'));
|
||||
if (this.json) {
|
||||
console.log(JSON.stringify({ success: false, error: 'Invalid skill name' }));
|
||||
} else {
|
||||
error('Invalid skill name');
|
||||
console.log(colors.muted('Must be lowercase alphanumeric with hyphens (e.g., my-skill)'));
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -50,11 +59,17 @@ export class CreateCommand extends Command {
|
||||
const skillDir = join(parentDir, skillName);
|
||||
|
||||
if (existsSync(skillDir)) {
|
||||
error(`Directory already exists: ${skillDir}`);
|
||||
if (this.json) {
|
||||
console.log(JSON.stringify({ success: false, error: `Directory already exists: ${skillDir}` }));
|
||||
} else {
|
||||
error(`Directory already exists: ${skillDir}`);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
try {
|
||||
s.start('Creating skill');
|
||||
|
||||
mkdirSync(skillDir, { recursive: true });
|
||||
|
||||
const skillMd = generateSkillMd(skillName);
|
||||
@@ -78,24 +93,35 @@ export class CreateCommand extends Command {
|
||||
writeFileSync(join(assetsDir, '.gitkeep'), '');
|
||||
}
|
||||
|
||||
success(`Created skill: ${skillName}`);
|
||||
console.log();
|
||||
console.log(colors.muted('Structure:'));
|
||||
console.log(colors.muted(` ${skillDir}/`));
|
||||
console.log(colors.muted(' ├── SKILL.md'));
|
||||
if (this.full || this.references) console.log(colors.muted(' ├── references/'));
|
||||
if (this.full || this.scripts) console.log(colors.muted(' ├── scripts/'));
|
||||
if (this.full || this.assets) console.log(colors.muted(' └── assets/'));
|
||||
console.log();
|
||||
step('Next steps:');
|
||||
console.log(colors.muted(' 1. Edit SKILL.md with your instructions'));
|
||||
console.log(colors.muted(' 2. Validate: skillkit validate ' + skillDir));
|
||||
console.log(colors.muted(' 3. Test: skillkit read ' + skillName));
|
||||
s.stop('Skill created');
|
||||
|
||||
if (this.json) {
|
||||
console.log(JSON.stringify({ success: true, name: skillName, path: skillDir }));
|
||||
} else {
|
||||
success(`Created skill: ${skillName}`);
|
||||
console.log();
|
||||
console.log(colors.muted('Structure:'));
|
||||
console.log(colors.muted(` ${skillDir}/`));
|
||||
console.log(colors.muted(' ├── SKILL.md'));
|
||||
if (this.full || this.references) console.log(colors.muted(' ├── references/'));
|
||||
if (this.full || this.scripts) console.log(colors.muted(' ├── scripts/'));
|
||||
if (this.full || this.assets) console.log(colors.muted(' └── assets/'));
|
||||
console.log();
|
||||
step('Next steps:');
|
||||
console.log(colors.muted(' 1. Edit SKILL.md with your instructions'));
|
||||
console.log(colors.muted(' 2. Validate: skillkit validate ' + skillDir));
|
||||
console.log(colors.muted(' 3. Test: skillkit read ' + skillName));
|
||||
}
|
||||
|
||||
return 0;
|
||||
} catch (err) {
|
||||
error('Failed to create skill');
|
||||
console.log(colors.muted(err instanceof Error ? err.message : String(err)));
|
||||
s.stop('Failed');
|
||||
if (this.json) {
|
||||
console.log(JSON.stringify({ success: false, error: err instanceof Error ? err.message : String(err) }));
|
||||
} else {
|
||||
error('Failed to create skill');
|
||||
console.log(colors.muted(err instanceof Error ? err.message : String(err)));
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { colors, warn, success, error } from '../onboarding/index.js';
|
||||
import { colors, warn, success, error, spinner } from '../onboarding/index.js';
|
||||
import { Command, Option } from 'clipanion';
|
||||
import { setSkillEnabled, findSkill } from '@skillkit/core';
|
||||
import { getSearchDirs } from '../helpers.js';
|
||||
@@ -16,37 +16,53 @@ export class EnableCommand extends Command {
|
||||
|
||||
skills = Option.Rest({ required: 1 });
|
||||
|
||||
json = Option.Boolean('--json', false, {
|
||||
description: 'Output as JSON',
|
||||
});
|
||||
|
||||
async execute(): Promise<number> {
|
||||
const searchDirs = getSearchDirs();
|
||||
const s = this.json ? { start: () => {}, stop: () => {}, message: () => {} } : spinner();
|
||||
let successCount = 0;
|
||||
let failed = 0;
|
||||
const results: Array<{ name: string; enabled: boolean; success: boolean }> = [];
|
||||
|
||||
s.start('Enabling skills');
|
||||
|
||||
for (const skillName of this.skills) {
|
||||
const skill = findSkill(skillName, searchDirs);
|
||||
|
||||
if (!skill) {
|
||||
error(`Skill not found: ${skillName}`);
|
||||
if (!this.json) error(`Skill not found: ${skillName}`);
|
||||
results.push({ name: skillName, enabled: false, success: false });
|
||||
failed++;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (skill.enabled) {
|
||||
console.log(colors.muted(`Already enabled: ${skillName}`));
|
||||
if (!this.json) console.log(colors.muted(`Already enabled: ${skillName}`));
|
||||
results.push({ name: skillName, enabled: true, success: true });
|
||||
continue;
|
||||
}
|
||||
|
||||
const result = setSkillEnabled(skill.path, true);
|
||||
|
||||
if (result) {
|
||||
success(`Enabled: ${skillName}`);
|
||||
if (!this.json) success(`Enabled: ${skillName}`);
|
||||
results.push({ name: skillName, enabled: true, success: true });
|
||||
successCount++;
|
||||
} else {
|
||||
error(`Failed to enable: ${skillName}`);
|
||||
if (!this.json) error(`Failed to enable: ${skillName}`);
|
||||
results.push({ name: skillName, enabled: false, success: false });
|
||||
failed++;
|
||||
}
|
||||
}
|
||||
|
||||
if (successCount > 0) {
|
||||
s.stop(successCount > 0 ? `Enabled ${successCount} skill(s)` : 'Done');
|
||||
|
||||
if (this.json) {
|
||||
console.log(JSON.stringify({ success: failed === 0, results }));
|
||||
} else if (successCount > 0) {
|
||||
console.log(colors.muted('\nRun `skillkit sync` to update your agent config'));
|
||||
}
|
||||
|
||||
@@ -67,37 +83,53 @@ export class DisableCommand extends Command {
|
||||
|
||||
skills = Option.Rest({ required: 1 });
|
||||
|
||||
json = Option.Boolean('--json', false, {
|
||||
description: 'Output as JSON',
|
||||
});
|
||||
|
||||
async execute(): Promise<number> {
|
||||
const searchDirs = getSearchDirs();
|
||||
const s = this.json ? { start: () => {}, stop: () => {}, message: () => {} } : spinner();
|
||||
let successCount = 0;
|
||||
let failed = 0;
|
||||
const results: Array<{ name: string; enabled: boolean; success: boolean }> = [];
|
||||
|
||||
s.start('Disabling skills');
|
||||
|
||||
for (const skillName of this.skills) {
|
||||
const skill = findSkill(skillName, searchDirs);
|
||||
|
||||
if (!skill) {
|
||||
error(`Skill not found: ${skillName}`);
|
||||
if (!this.json) error(`Skill not found: ${skillName}`);
|
||||
results.push({ name: skillName, enabled: false, success: false });
|
||||
failed++;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!skill.enabled) {
|
||||
console.log(colors.muted(`Already disabled: ${skillName}`));
|
||||
if (!this.json) console.log(colors.muted(`Already disabled: ${skillName}`));
|
||||
results.push({ name: skillName, enabled: false, success: true });
|
||||
continue;
|
||||
}
|
||||
|
||||
const result = setSkillEnabled(skill.path, false);
|
||||
|
||||
if (result) {
|
||||
warn(`Disabled: ${skillName}`);
|
||||
if (!this.json) warn(`Disabled: ${skillName}`);
|
||||
results.push({ name: skillName, enabled: false, success: true });
|
||||
successCount++;
|
||||
} else {
|
||||
error(`Failed to disable: ${skillName}`);
|
||||
if (!this.json) error(`Failed to disable: ${skillName}`);
|
||||
results.push({ name: skillName, enabled: true, success: false });
|
||||
failed++;
|
||||
}
|
||||
}
|
||||
|
||||
if (successCount > 0) {
|
||||
s.stop(successCount > 0 ? `Disabled ${successCount} skill(s)` : 'Done');
|
||||
|
||||
if (this.json) {
|
||||
console.log(JSON.stringify({ success: failed === 0, results }));
|
||||
} else if (successCount > 0) {
|
||||
console.log(colors.muted('\nRun `skillkit sync` to update your agent config'));
|
||||
}
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ import {
|
||||
CommunitySignalsEvaluator,
|
||||
} from '@skillkit/core';
|
||||
import type { EvalTier, EvalOptions } from '@skillkit/core';
|
||||
import { spinner } from '../onboarding/index.js';
|
||||
|
||||
export class EvalCommand extends Command {
|
||||
static override paths = [['eval']];
|
||||
@@ -74,6 +75,10 @@ export class EvalCommand extends Command {
|
||||
description: 'Timeout in seconds for each tier',
|
||||
});
|
||||
|
||||
json = Option.Boolean('--json', false, {
|
||||
description: 'Output as JSON',
|
||||
});
|
||||
|
||||
async execute(): Promise<number> {
|
||||
const targetPath = resolve(this.skillPath);
|
||||
|
||||
@@ -132,14 +137,30 @@ export class EvalCommand extends Command {
|
||||
engine.registerEvaluator(new DynamicBenchmarkEvaluator());
|
||||
engine.registerEvaluator(new CommunitySignalsEvaluator());
|
||||
|
||||
const result = await engine.evaluate(targetPath, options);
|
||||
const isJson = this.json || this.format === 'json';
|
||||
const s = isJson ? { start: () => {}, stop: () => {}, message: () => {} } : spinner();
|
||||
s.start('Evaluating skill...');
|
||||
let result;
|
||||
try {
|
||||
result = await engine.evaluate(targetPath, options);
|
||||
s.stop(`Evaluation complete (score: ${result.overallScore})`);
|
||||
} catch (err) {
|
||||
s.stop('Evaluation failed');
|
||||
throw err;
|
||||
}
|
||||
|
||||
this.context.stdout.write(formatEvalResult(result, this.format) + '\n');
|
||||
if (this.json) {
|
||||
console.log(JSON.stringify(result));
|
||||
} else {
|
||||
this.context.stdout.write(formatEvalResult(result, this.format) + '\n');
|
||||
}
|
||||
|
||||
if (this.minScore) {
|
||||
const threshold = parseInt(this.minScore, 10);
|
||||
if (result.overallScore < threshold) {
|
||||
this.context.stderr.write(`Score ${result.overallScore} is below minimum ${threshold}\n`);
|
||||
if (!this.json) {
|
||||
this.context.stderr.write(`Score ${result.overallScore} is below minimum ${threshold}\n`);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
GitHubSkillRegistry,
|
||||
SkillsShRegistry,
|
||||
} from "@skillkit/core";
|
||||
import { formatCount } from "../helpers.js";
|
||||
import { formatCount, loadTaps } from "../helpers.js";
|
||||
|
||||
interface SkillResult {
|
||||
name: string;
|
||||
@@ -60,15 +60,20 @@ export class FindCommand extends Command {
|
||||
description: "Minimal output (just list skills)",
|
||||
});
|
||||
|
||||
federated = Option.Boolean("--federated,-f", false, {
|
||||
description: "Search external registries (GitHub SKILL.md files)",
|
||||
federated = Option.Boolean("--federated,-f", true, {
|
||||
description: "Search external registries (enabled by default)",
|
||||
hidden: true,
|
||||
});
|
||||
|
||||
json = Option.Boolean("--json", false, {
|
||||
description: "Output as JSON",
|
||||
});
|
||||
|
||||
async execute(): Promise<number> {
|
||||
const s = spinner();
|
||||
const s = this.json ? { start: () => {}, stop: () => {}, message: () => {} } : spinner();
|
||||
const limit = parseInt(this.limit, 10) || 10;
|
||||
|
||||
if (!this.quiet) {
|
||||
if (!this.quiet && !this.json) {
|
||||
header("Find Skills");
|
||||
}
|
||||
|
||||
@@ -86,6 +91,20 @@ export class FindCommand extends Command {
|
||||
}),
|
||||
);
|
||||
|
||||
const taps = loadTaps();
|
||||
for (const tap of taps.taps) {
|
||||
const tapLabel = tap.name || tap.source;
|
||||
const exists = allSkills.some((s) => s.source === tap.source);
|
||||
if (!exists) {
|
||||
allSkills.push({
|
||||
name: tapLabel,
|
||||
description: `Custom tap: ${tap.source}`,
|
||||
source: tap.source,
|
||||
repoName: tap.source.split("/").pop() || "",
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
let results: SkillResult[];
|
||||
let searchTerm: string | undefined;
|
||||
|
||||
@@ -102,7 +121,7 @@ export class FindCommand extends Command {
|
||||
)
|
||||
.slice(0, limit);
|
||||
|
||||
if (!this.quiet) {
|
||||
if (!this.quiet && !this.json) {
|
||||
step("Showing featured skills");
|
||||
}
|
||||
} else if (this.query) {
|
||||
@@ -123,7 +142,7 @@ export class FindCommand extends Command {
|
||||
|
||||
s.stop(`Found ${results.length} skill(s)`);
|
||||
} else {
|
||||
if (!this.quiet) {
|
||||
if (!this.quiet && !this.json) {
|
||||
step("Enter a search term or browse featured skills");
|
||||
}
|
||||
|
||||
@@ -237,6 +256,18 @@ export class FindCommand extends Command {
|
||||
}
|
||||
}
|
||||
|
||||
if (this.json) {
|
||||
console.log(JSON.stringify({
|
||||
results: results.map((r) => ({
|
||||
name: r.name,
|
||||
description: r.description || "",
|
||||
source: r.source,
|
||||
})),
|
||||
total: results.length,
|
||||
}));
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (results.length === 0) {
|
||||
console.log(colors.muted("No skills found matching your search"));
|
||||
console.log("");
|
||||
@@ -246,7 +277,7 @@ export class FindCommand extends Command {
|
||||
);
|
||||
console.log(
|
||||
colors.muted(
|
||||
" skillkit find -f <query> # Also search GitHub SKILL.md files",
|
||||
" skillkit find <query> # Search marketplace + GitHub",
|
||||
),
|
||||
);
|
||||
console.log(colors.muted(" skillkit ui # Browse in TUI"));
|
||||
|
||||
@@ -15,6 +15,7 @@ import {
|
||||
error,
|
||||
header,
|
||||
confirm,
|
||||
spinner,
|
||||
} from '../onboarding/index.js';
|
||||
|
||||
interface FixSuggestion {
|
||||
@@ -209,6 +210,7 @@ export class FixCommand extends Command {
|
||||
|
||||
let totalFixes = 0;
|
||||
let filesFixed = 0;
|
||||
const s = spinner();
|
||||
|
||||
for (const target of this.targets) {
|
||||
const resolved = resolve(target);
|
||||
@@ -256,8 +258,10 @@ export class FixCommand extends Command {
|
||||
continue;
|
||||
}
|
||||
|
||||
s.start(`Evaluating ${skillName}`);
|
||||
const content = readFileSync(filePath, 'utf-8');
|
||||
const quality = evaluateSkillFile(filePath);
|
||||
s.stop(`Evaluated ${skillName}`);
|
||||
|
||||
if (!quality) {
|
||||
warn(`Could not evaluate: ${target}`);
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
import { Command, Option } from 'clipanion';
|
||||
import { colors } from '../onboarding/index.js';
|
||||
import { colors, spinner } from '../onboarding/index.js';
|
||||
import { createHookManager, type HookEvent, type InjectionMode } from '@skillkit/core';
|
||||
import {
|
||||
getHookTemplates,
|
||||
@@ -239,7 +239,10 @@ export class HookCommand extends Command {
|
||||
}
|
||||
|
||||
const agent = this.agent || 'claude-code';
|
||||
const s = spinner();
|
||||
s.start(`Generating hooks for ${agent}`);
|
||||
const generated = manager.generateAgentHooks(agent as any);
|
||||
s.stop('Hooks generated');
|
||||
|
||||
this.context.stdout.write(colors.cyan(`Generated hooks for ${agent}:\n\n`));
|
||||
|
||||
|
||||
@@ -132,6 +132,7 @@ export { TimelineCommand } from './timeline.js';
|
||||
export { SessionHandoffCommand } from './handoff.js';
|
||||
export { LineageCommand } from './lineage.js';
|
||||
export { SaveCommand } from './save.js';
|
||||
export { TapAddCommand, TapRemoveCommand, TapListCommand } from './tap.js';
|
||||
export {
|
||||
AgentsMdCommand,
|
||||
AgentsMdInitCommand,
|
||||
|
||||
@@ -26,6 +26,10 @@ import {
|
||||
AgentsMdParser,
|
||||
AgentsMdGenerator,
|
||||
SkillsShRegistry,
|
||||
TrustScorer,
|
||||
readSkillContent,
|
||||
computeSkillChecksum,
|
||||
addSkillToLock,
|
||||
} from "@skillkit/core";
|
||||
import type { SkillsShStats } from "@skillkit/core";
|
||||
import type { SkillMetadata, GitProvider, AgentType } from "@skillkit/core";
|
||||
@@ -56,6 +60,7 @@ import {
|
||||
getLastAgents,
|
||||
formatQualityBadge,
|
||||
getQualityGradeFromScore,
|
||||
formatTrustBadge,
|
||||
type InstallResult,
|
||||
} from "../onboarding/index.js";
|
||||
|
||||
@@ -128,18 +133,25 @@ export class InstallCommand extends Command {
|
||||
description: "Run security scan before installing (default: true)",
|
||||
});
|
||||
|
||||
json = Option.Boolean("--json", false, {
|
||||
description: "Output as JSON",
|
||||
});
|
||||
|
||||
async execute(): Promise<number> {
|
||||
const isInteractive =
|
||||
process.stdin.isTTY && !this.skills && !this.all && !this.yes;
|
||||
const s = spinner();
|
||||
process.stdin.isTTY && !this.skills && !this.all && !this.yes && !this.json;
|
||||
const s = this.json ? { start: () => {}, stop: () => {}, message: () => {} } : spinner();
|
||||
let cloneResult: Awaited<ReturnType<typeof this.resolveSource>>["cloneResult"] = null;
|
||||
|
||||
try {
|
||||
if (process.stdin.isTTY && !this.quiet) {
|
||||
if (process.stdin.isTTY && !this.quiet && !this.json) {
|
||||
welcome();
|
||||
}
|
||||
|
||||
const { providerAdapter, cloneResult } = await this.resolveSource(s);
|
||||
if (!providerAdapter || !cloneResult) return 1;
|
||||
const resolved = await this.resolveSource(s);
|
||||
if (!resolved.providerAdapter || !resolved.cloneResult) return 1;
|
||||
const providerAdapter = resolved.providerAdapter;
|
||||
cloneResult = resolved.cloneResult;
|
||||
|
||||
const discoveredSkills = cloneResult.discoveredSkills || [];
|
||||
|
||||
@@ -169,15 +181,20 @@ export class InstallCommand extends Command {
|
||||
skillsToInstall, targetAgents, installMethod, providerAdapter, cloneResult, s,
|
||||
);
|
||||
|
||||
this.cleanupTemp(cloneResult);
|
||||
this.updateAgentsMd(installResults.length);
|
||||
await this.showResults(installResults, targetAgents, providerAdapter, isInteractive);
|
||||
|
||||
return 0;
|
||||
} catch (err) {
|
||||
s.stop(colors.error("Installation failed"));
|
||||
console.log(colors.muted(err instanceof Error ? err.message : String(err)));
|
||||
if (this.json) {
|
||||
console.log(JSON.stringify({ success: false, error: err instanceof Error ? err.message : String(err) }));
|
||||
} else {
|
||||
s.stop(colors.error("Installation failed"));
|
||||
console.log(colors.muted(err instanceof Error ? err.message : String(err)));
|
||||
}
|
||||
return 1;
|
||||
} finally {
|
||||
if (cloneResult) this.cleanupTemp(cloneResult);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -431,6 +448,36 @@ export class InstallCommand extends Command {
|
||||
console.log("");
|
||||
}
|
||||
|
||||
const officialSources = [
|
||||
"anthropics/skills",
|
||||
"vercel-labs/agent-skills",
|
||||
"expo/skills",
|
||||
"remotion-dev/skills",
|
||||
"supabase/agent-skills",
|
||||
"stripe/ai",
|
||||
];
|
||||
const sourceProvider = detectProvider(this.source);
|
||||
const parsedSource = sourceProvider?.parseSource(this.source);
|
||||
const normalizedSource = parsedSource ? `${parsedSource.owner}/${parsedSource.repo}` : this.source;
|
||||
const isOfficial = sourceProvider?.type === "github" && officialSources.includes(normalizedSource);
|
||||
|
||||
const scorer = new TrustScorer();
|
||||
for (const skill of skillsToInstall) {
|
||||
const content = readSkillContent(skill.path);
|
||||
if (content) {
|
||||
const result = scorer.score(content);
|
||||
const badge = formatTrustBadge({
|
||||
isOfficial,
|
||||
officialSource: isOfficial ? this.source : undefined,
|
||||
grade: result.grade,
|
||||
score: result.score,
|
||||
source: this.source,
|
||||
});
|
||||
console.log(` ${colors.primary(skill.name)}: ${badge}`);
|
||||
}
|
||||
}
|
||||
console.log("");
|
||||
|
||||
const agentDisplay =
|
||||
targetAgents.length <= 3
|
||||
? targetAgents.map(formatAgent).join(", ")
|
||||
@@ -546,6 +593,7 @@ export class InstallCommand extends Command {
|
||||
installedAt: new Date().toISOString(),
|
||||
enabled: true,
|
||||
};
|
||||
metadata.checksum = computeSkillChecksum(targetPath);
|
||||
saveSkillMetadata(targetPath, metadata);
|
||||
|
||||
installedAgents.push(agentType);
|
||||
@@ -557,11 +605,24 @@ export class InstallCommand extends Command {
|
||||
}
|
||||
|
||||
if (installedAgents.length > 0) {
|
||||
const firstAgentInstallDir = getInstallDir(this.global, installedAgents[0] as AgentType);
|
||||
const isStandalone = existsSync(join(firstAgentInstallDir, skillName.endsWith(".md") ? skillName : `${skillName}.md`));
|
||||
const actualPath = isStandalone
|
||||
? join(firstAgentInstallDir, skillName.endsWith(".md") ? skillName : `${skillName}.md`)
|
||||
: join(firstAgentInstallDir, skillName);
|
||||
addSkillToLock(skillName, {
|
||||
source: this.source,
|
||||
sourceType: providerAdapter!.type,
|
||||
installedAt: new Date().toISOString(),
|
||||
checksum: computeSkillChecksum(actualPath),
|
||||
agents: installedAgents,
|
||||
path: actualPath,
|
||||
});
|
||||
installResults.push({
|
||||
skillName,
|
||||
method: installMethod,
|
||||
agents: installedAgents,
|
||||
path: join(getInstallDir(this.global, installedAgents[0] as AgentType), skillName),
|
||||
path: actualPath,
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -604,6 +665,16 @@ export class InstallCommand extends Command {
|
||||
providerAdapter: ReturnType<typeof detectProvider>,
|
||||
isInteractive: boolean,
|
||||
): Promise<void> {
|
||||
if (this.json) {
|
||||
console.log(JSON.stringify({
|
||||
success: true,
|
||||
installed: installResults.map((r) => r.skillName),
|
||||
agents: targetAgents,
|
||||
total: installResults.length,
|
||||
}));
|
||||
return;
|
||||
}
|
||||
|
||||
if (installResults.length > 0) {
|
||||
if (isInteractive) {
|
||||
showInstallSummary({
|
||||
|
||||
@@ -59,7 +59,14 @@ export class ListCommand extends Command {
|
||||
: skills.map(s => ({ ...s, quality: null as number | null }));
|
||||
|
||||
if (this.json) {
|
||||
console.log(JSON.stringify(skillsWithQuality, null, 2));
|
||||
console.log(JSON.stringify({
|
||||
skills: skillsWithQuality.map((s) => ({
|
||||
name: s.name,
|
||||
enabled: s.enabled,
|
||||
path: s.path,
|
||||
})),
|
||||
total: skillsWithQuality.length,
|
||||
}));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
import { Command, Option } from 'clipanion';
|
||||
import { colors } from '../onboarding/index.js';
|
||||
import { colors, spinner } from '../onboarding/index.js';
|
||||
import { createMethodologyManager, createMethodologyLoader } from '@skillkit/core';
|
||||
|
||||
export class MethodologyCommand extends Command {
|
||||
@@ -61,8 +61,11 @@ export class MethodologyCommand extends Command {
|
||||
}
|
||||
|
||||
private async listPacks(): Promise<number> {
|
||||
const s = spinner();
|
||||
s.start('Loading methodology packs');
|
||||
const loader = createMethodologyLoader();
|
||||
const packs = await loader.loadAllPacks();
|
||||
s.stop('Packs loaded');
|
||||
|
||||
if (packs.length === 0) {
|
||||
this.context.stdout.write('No methodology packs available.\n');
|
||||
@@ -91,15 +94,16 @@ export class MethodologyCommand extends Command {
|
||||
if (this.target) {
|
||||
// Check if it's a skill ID (pack/skill) or pack name
|
||||
if (this.target.includes('/')) {
|
||||
// Install single skill
|
||||
this.context.stdout.write(`Installing skill: ${colors.cyan(this.target)}...\n`);
|
||||
const s = spinner();
|
||||
|
||||
if (this.dryRun) {
|
||||
this.context.stdout.write(colors.warning('[dry-run] Would install skill.\n'));
|
||||
return 0;
|
||||
}
|
||||
|
||||
s.start(`Installing skill: ${this.target}`);
|
||||
const result = await manager.installSkill(this.target);
|
||||
s.stop('Install complete');
|
||||
|
||||
if (result.success) {
|
||||
this.context.stdout.write(colors.success(`✓ Skill installed: ${this.target}\n`));
|
||||
@@ -110,8 +114,7 @@ export class MethodologyCommand extends Command {
|
||||
return 1;
|
||||
}
|
||||
} else {
|
||||
// Install single pack
|
||||
this.context.stdout.write(`Installing pack: ${colors.cyan(this.target)}...\n`);
|
||||
const s = spinner();
|
||||
|
||||
if (this.dryRun) {
|
||||
const pack = await loader.loadPack(this.target);
|
||||
@@ -121,7 +124,9 @@ export class MethodologyCommand extends Command {
|
||||
return 0;
|
||||
}
|
||||
|
||||
s.start(`Installing pack: ${this.target}`);
|
||||
const result = await manager.installPack(this.target);
|
||||
s.stop('Pack installed');
|
||||
|
||||
if (result.success) {
|
||||
this.context.stdout.write(colors.success(`✓ Pack "${this.target}" installed!\n`));
|
||||
@@ -138,8 +143,7 @@ export class MethodologyCommand extends Command {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Install all packs
|
||||
this.context.stdout.write('Installing all methodology packs...\n\n');
|
||||
const s = spinner();
|
||||
|
||||
if (this.dryRun) {
|
||||
const packs = await loader.loadAllPacks();
|
||||
@@ -152,7 +156,9 @@ export class MethodologyCommand extends Command {
|
||||
return 0;
|
||||
}
|
||||
|
||||
s.start('Installing all methodology packs');
|
||||
const result = await manager.installAllPacks();
|
||||
s.stop('Installation complete');
|
||||
|
||||
if (result.success) {
|
||||
this.context.stdout.write(colors.success('\n✓ All methodology packs installed!\n'));
|
||||
@@ -195,15 +201,17 @@ export class MethodologyCommand extends Command {
|
||||
private async syncSkills(projectPath: string): Promise<number> {
|
||||
const manager = createMethodologyManager({ projectPath, autoSync: false });
|
||||
|
||||
this.context.stdout.write('Syncing methodology skills to detected agents...\n\n');
|
||||
|
||||
if (this.dryRun) {
|
||||
const installed = manager.listInstalledSkills();
|
||||
this.context.stdout.write(colors.warning(`[dry-run] Would sync ${installed.length} skills.\n`));
|
||||
return 0;
|
||||
}
|
||||
|
||||
const s = spinner();
|
||||
s.start('Syncing methodology skills');
|
||||
|
||||
const result = await manager.syncAll();
|
||||
s.stop('Sync complete');
|
||||
|
||||
if (result.synced.length > 0) {
|
||||
this.context.stdout.write(colors.success('✓ Sync complete!\n'));
|
||||
|
||||
@@ -8,7 +8,7 @@ import { Command, Option } from 'clipanion';
|
||||
import { join, isAbsolute, resolve, sep } from 'node:path';
|
||||
import { homedir } from 'node:os';
|
||||
import { existsSync, mkdirSync, copyFileSync, cpSync, rmSync } from 'node:fs';
|
||||
import { colors } from '../onboarding/index.js';
|
||||
import { colors, spinner } from '../onboarding/index.js';
|
||||
import { createPluginManager, loadPlugin, loadPluginsFromDirectory } from '@skillkit/core';
|
||||
|
||||
export class PluginCommand extends Command {
|
||||
@@ -149,7 +149,8 @@ export class PluginCommand extends Command {
|
||||
? join(homedir(), this.source.slice(1))
|
||||
: this.source;
|
||||
|
||||
this.context.stdout.write(`Installing plugin from ${this.source}...\n`);
|
||||
const s = spinner();
|
||||
s.start(`Installing plugin from ${this.source}`);
|
||||
|
||||
const plugin = await loadPlugin(resolvedSource);
|
||||
|
||||
@@ -222,6 +223,8 @@ export class PluginCommand extends Command {
|
||||
|
||||
await pluginManager.register(plugin);
|
||||
|
||||
s.stop('Plugin installed');
|
||||
|
||||
this.context.stdout.write(colors.success(`✓ Plugin "${plugin.metadata.name}" installed!\n`));
|
||||
this.context.stdout.write(` Version: ${plugin.metadata.version}\n`);
|
||||
if (plugin.metadata.description) {
|
||||
@@ -254,9 +257,10 @@ export class PluginCommand extends Command {
|
||||
return 1;
|
||||
}
|
||||
|
||||
await pluginManager.unregister(this.name);
|
||||
const s = spinner();
|
||||
s.start(`Uninstalling plugin ${this.name}`);
|
||||
|
||||
// Remove plugin files from disk
|
||||
await pluginManager.unregister(this.name);
|
||||
const projectPath = this.global
|
||||
? join(homedir(), '.skillkit')
|
||||
: process.cwd();
|
||||
@@ -275,9 +279,10 @@ export class PluginCommand extends Command {
|
||||
|
||||
if (existsSync(pluginDir)) {
|
||||
rmSync(pluginDir, { recursive: true, force: true });
|
||||
this.context.stdout.write(colors.muted(` Removed ${pluginDir}\n`));
|
||||
}
|
||||
|
||||
s.stop('Plugin uninstalled');
|
||||
|
||||
this.context.stdout.write(colors.success(`✓ Plugin "${this.name}" uninstalled.\n`));
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -22,13 +22,13 @@ export class PrimerCommand extends Command {
|
||||
for AI coding agents.
|
||||
|
||||
By default, it generates instructions for detected agents in your project.
|
||||
Use --all-agents to generate for all 44 supported agents.
|
||||
Use --all-agents to generate for all 45 supported agents.
|
||||
|
||||
Inspired by github.com/pierceboggan/primer but extended for all SkillKit agents.
|
||||
`,
|
||||
examples: [
|
||||
['Generate for detected agents', '$0 primer'],
|
||||
['Generate for all 44 agents', '$0 primer --all-agents'],
|
||||
['Generate for all 45 agents', '$0 primer --all-agents'],
|
||||
['Generate for specific agents', '$0 primer --agent claude-code,cursor,github-copilot'],
|
||||
['Custom output directory', '$0 primer --output ./instructions'],
|
||||
['Preview without writing files', '$0 primer --dry-run'],
|
||||
@@ -42,7 +42,7 @@ export class PrimerCommand extends Command {
|
||||
});
|
||||
|
||||
allAgents = Option.Boolean('--all-agents,-A', false, {
|
||||
description: 'Generate for all 44 supported agents',
|
||||
description: 'Generate for all 45 supported agents',
|
||||
});
|
||||
|
||||
output = Option.String('--output,-o', {
|
||||
|
||||
@@ -7,7 +7,16 @@ import {
|
||||
statSync,
|
||||
} from "node:fs";
|
||||
import { join, basename, dirname, resolve, sep } from "node:path";
|
||||
import { colors, warn, success, error, step } from "../onboarding/index.js";
|
||||
import {
|
||||
colors,
|
||||
warn,
|
||||
success,
|
||||
error,
|
||||
step,
|
||||
spinner,
|
||||
formatQualityBadge,
|
||||
getQualityGradeFromScore,
|
||||
} from "../onboarding/index.js";
|
||||
import { Command, Option } from "clipanion";
|
||||
import {
|
||||
generateWellKnownIndex,
|
||||
@@ -15,7 +24,9 @@ import {
|
||||
SkillScanner,
|
||||
formatSummary,
|
||||
Severity,
|
||||
evaluateSkillDirectory,
|
||||
} from "@skillkit/core";
|
||||
import { formatCount, timeAgo, fetchGitHubActivity } from "../helpers.js";
|
||||
|
||||
function sanitizeSkillName(name: string): string | null {
|
||||
if (!name || typeof name !== "string") return null;
|
||||
@@ -136,10 +147,13 @@ export class PublishCommand extends Command {
|
||||
const basePath = this.skillPath || process.cwd();
|
||||
const outputDir = this.output || basePath;
|
||||
|
||||
step("Generating well-known skills structure...\n");
|
||||
const s = spinner();
|
||||
s.start("Generating well-known skills structure...");
|
||||
|
||||
const discoveredSkills = this.discoverSkills(basePath);
|
||||
|
||||
s.stop(`Discovered ${discoveredSkills.length} skill(s)`);
|
||||
|
||||
if (discoveredSkills.length === 0) {
|
||||
error("No skills found");
|
||||
console.error(
|
||||
@@ -443,6 +457,10 @@ export class PublishSubmitCommand extends Command {
|
||||
description: "Show what would be submitted",
|
||||
});
|
||||
|
||||
json = Option.Boolean("--json", false, {
|
||||
description: "Output as JSON",
|
||||
});
|
||||
|
||||
async execute(): Promise<number> {
|
||||
const skillPath = this.skillPath || process.cwd();
|
||||
const skillMdPath = this.findSkillMd(skillPath);
|
||||
@@ -455,7 +473,7 @@ export class PublishSubmitCommand extends Command {
|
||||
return 1;
|
||||
}
|
||||
|
||||
step("Submitting skill to SkillKit marketplace...\n");
|
||||
if (!this.json) step("Submitting skill to SkillKit marketplace...\n");
|
||||
|
||||
const content = readFileSync(skillMdPath, "utf-8");
|
||||
const frontmatter = this.parseFrontmatter(content);
|
||||
@@ -480,6 +498,14 @@ export class PublishSubmitCommand extends Command {
|
||||
return 1;
|
||||
}
|
||||
|
||||
const skillDir = dirname(skillMdPath);
|
||||
const quality = evaluateSkillDirectory(skillDir);
|
||||
const qualityScore = quality?.overall ?? null;
|
||||
const qualityGrade = qualityScore !== null ? getQualityGradeFromScore(qualityScore) : null;
|
||||
const qualityBadge = qualityScore !== null ? formatQualityBadge(qualityScore) : "N/A";
|
||||
|
||||
const activity = await fetchGitHubActivity(repoInfo.owner, repoInfo.repo);
|
||||
|
||||
const skillEntry = {
|
||||
id: `${repoInfo.owner}/${repoInfo.repo}/${skillSlug}`,
|
||||
name: this.formatName(skillName),
|
||||
@@ -490,13 +516,28 @@ export class PublishSubmitCommand extends Command {
|
||||
tags: frontmatter.tags || ["general"],
|
||||
};
|
||||
|
||||
console.log(colors.primary("Skill details:"));
|
||||
console.log(colors.muted(` ID: ${skillEntry.id}`));
|
||||
console.log(colors.muted(` Name: ${skillEntry.name}`));
|
||||
console.log(colors.muted(` Description: ${skillEntry.description}`));
|
||||
console.log(colors.muted(` Source: ${skillEntry.source}`));
|
||||
console.log(colors.muted(` Tags: ${skillEntry.tags.join(", ")}`));
|
||||
console.log();
|
||||
if (!this.json) {
|
||||
console.log(colors.primary("Skill details:"));
|
||||
console.log(colors.muted(` ID: ${skillEntry.id}`));
|
||||
console.log(colors.muted(` Name: ${skillEntry.name}`));
|
||||
console.log(colors.muted(` Description: ${skillEntry.description}`));
|
||||
console.log(colors.muted(` Source: ${skillEntry.source}`));
|
||||
console.log(colors.muted(` Tags: ${skillEntry.tags.join(", ")}`));
|
||||
console.log(colors.muted(` Quality: ${qualityBadge}${qualityScore !== null ? ` (${qualityScore}/100)` : ""}`));
|
||||
if (activity) {
|
||||
const stars = formatCount(activity.stars);
|
||||
const pushed = activity.pushedAt ? timeAgo(activity.pushedAt) : "unknown";
|
||||
console.log(colors.muted(` Stars: ${stars}`));
|
||||
console.log(colors.muted(` Last push: ${pushed}`));
|
||||
}
|
||||
if (quality && quality.warnings.length > 0) {
|
||||
console.log(colors.warning(` Warnings:`));
|
||||
for (const w of quality.warnings.slice(0, 3)) {
|
||||
console.log(colors.muted(` - ${w}`));
|
||||
}
|
||||
}
|
||||
console.log();
|
||||
}
|
||||
|
||||
if (this.dryRun) {
|
||||
warn("Dry run - not submitting");
|
||||
@@ -504,33 +545,70 @@ export class PublishSubmitCommand extends Command {
|
||||
return 0;
|
||||
}
|
||||
|
||||
const issueBody = this.createIssueBody(skillEntry);
|
||||
const issueTitle = encodeURIComponent(`[Publish] ${skillEntry.name}`);
|
||||
const issueBodyEncoded = encodeURIComponent(issueBody);
|
||||
const issueUrl = `https://github.com/rohitg00/skillkit/issues/new?title=${issueTitle}&body=${issueBodyEncoded}&labels=skill-submission,publish`;
|
||||
|
||||
success("Opening GitHub to submit your skill...\n");
|
||||
const issueBody = this.createIssueBody(skillEntry, {
|
||||
qualityScore,
|
||||
qualityGrade,
|
||||
warnings: quality?.warnings ?? [],
|
||||
stars: activity?.stars ?? null,
|
||||
pushedAt: activity?.pushedAt ?? null,
|
||||
});
|
||||
|
||||
try {
|
||||
const { execFileSync } = await import("node:child_process");
|
||||
const cmd =
|
||||
process.platform === "darwin"
|
||||
? "open"
|
||||
: process.platform === "win32"
|
||||
? "cmd"
|
||||
: "xdg-open";
|
||||
const args =
|
||||
process.platform === "win32"
|
||||
? ["/c", "start", "", issueUrl]
|
||||
: [issueUrl];
|
||||
execFileSync(cmd, args, { stdio: "ignore" });
|
||||
const result = execFileSync(
|
||||
"gh",
|
||||
[
|
||||
"issue",
|
||||
"create",
|
||||
"--repo",
|
||||
"rohitg00/skillkit",
|
||||
"--title",
|
||||
`[Publish] ${skillEntry.name}`,
|
||||
"--body",
|
||||
issueBody,
|
||||
"--label",
|
||||
"skill-submission,publish",
|
||||
],
|
||||
{
|
||||
encoding: "utf-8",
|
||||
stdio: ["pipe", "pipe", "pipe"],
|
||||
timeout: 15_000,
|
||||
},
|
||||
).trim();
|
||||
|
||||
success("GitHub issue page opened!");
|
||||
console.log(colors.muted("Review and submit the issue."));
|
||||
} catch {
|
||||
warn("Could not open browser automatically.");
|
||||
console.log(colors.muted("Please open this URL manually:\n"));
|
||||
console.log(colors.cyan(issueUrl));
|
||||
if (this.json) {
|
||||
console.log(JSON.stringify({
|
||||
success: true,
|
||||
source: `${repoInfo.owner}/${repoInfo.repo}`,
|
||||
quality: qualityScore,
|
||||
issueUrl: result || "",
|
||||
}));
|
||||
return 0;
|
||||
}
|
||||
success("Submission created!");
|
||||
if (result) {
|
||||
console.log(colors.muted(` ${result}`));
|
||||
}
|
||||
} catch (err) {
|
||||
const message = err instanceof Error ? err.message : String(err);
|
||||
if (message.includes("not found") || message.includes("ENOENT")) {
|
||||
error("GitHub CLI (gh) is not installed");
|
||||
console.error(
|
||||
colors.muted("Install it from https://cli.github.com then run `gh auth login`"),
|
||||
);
|
||||
} else if (message.includes("auth") || message.includes("401")) {
|
||||
error("GitHub CLI is not authenticated");
|
||||
console.error(colors.muted("Run `gh auth login` first"));
|
||||
} else {
|
||||
error("Failed to create issue");
|
||||
console.error(colors.muted(message));
|
||||
}
|
||||
|
||||
console.log();
|
||||
warn("You can submit manually instead:");
|
||||
const manualUrl = `https://github.com/rohitg00/skillkit/issues/new?title=${encodeURIComponent(`[Publish] ${skillEntry.name}`)}&labels=skill-submission,publish`;
|
||||
console.log(colors.cyan(manualUrl));
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -601,13 +679,36 @@ export class PublishSubmitCommand extends Command {
|
||||
.join(" ");
|
||||
}
|
||||
|
||||
private createIssueBody(skill: {
|
||||
id: string;
|
||||
name: string;
|
||||
description: string;
|
||||
source: string;
|
||||
tags: string[];
|
||||
}): string {
|
||||
private createIssueBody(
|
||||
skill: {
|
||||
id: string;
|
||||
name: string;
|
||||
description: string;
|
||||
source: string;
|
||||
tags: string[];
|
||||
},
|
||||
meta: {
|
||||
qualityScore: number | null;
|
||||
qualityGrade: string | null;
|
||||
warnings: string[];
|
||||
stars: number | null;
|
||||
pushedAt: string | null;
|
||||
},
|
||||
): string {
|
||||
const qualityLine =
|
||||
meta.qualityScore !== null
|
||||
? `- **Quality:** ${meta.qualityGrade} (${meta.qualityScore}/100)`
|
||||
: "- **Quality:** N/A";
|
||||
const starsLine =
|
||||
typeof meta.stars === "number" ? `- **Stars:** ${formatCount(meta.stars)}` : "";
|
||||
const pushLine = meta.pushedAt
|
||||
? `- **Last push:** ${meta.pushedAt.slice(0, 10)}`
|
||||
: "";
|
||||
const warningLines =
|
||||
meta.warnings.length > 0
|
||||
? `\n### Warnings\n${meta.warnings.map((w) => `- ${w}`).join("\n")}`
|
||||
: "";
|
||||
|
||||
return `## Publish Skill Request
|
||||
|
||||
### Skill Details
|
||||
@@ -616,6 +717,10 @@ export class PublishSubmitCommand extends Command {
|
||||
- **Description:** ${skill.description}
|
||||
- **Source:** [${skill.source}](https://github.com/${skill.source})
|
||||
- **Tags:** ${skill.tags.map((t) => `\`${t}\``).join(", ")}
|
||||
${qualityLine}
|
||||
${starsLine}
|
||||
${pushLine}
|
||||
${warningLines}
|
||||
|
||||
### JSON Entry
|
||||
\`\`\`json
|
||||
|
||||
@@ -21,6 +21,10 @@ export class ReadCommand extends Command {
|
||||
description: 'Show additional information',
|
||||
});
|
||||
|
||||
json = Option.Boolean('--json', false, {
|
||||
description: 'Output as JSON',
|
||||
});
|
||||
|
||||
async execute(): Promise<number> {
|
||||
const searchDirs = getSearchDirs();
|
||||
|
||||
@@ -30,26 +34,35 @@ export class ReadCommand extends Command {
|
||||
.filter(s => s.length > 0);
|
||||
|
||||
if (skillNames.length === 0) {
|
||||
error('No skill names provided');
|
||||
if (this.json) {
|
||||
console.log(JSON.stringify({ error: 'No skill names provided' }));
|
||||
} else {
|
||||
error('No skill names provided');
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
let exitCode = 0;
|
||||
const jsonResults: Array<{ name: string; content: string; path: string }> = [];
|
||||
|
||||
for (const skillName of skillNames) {
|
||||
const skill = findSkill(skillName, searchDirs);
|
||||
|
||||
if (!skill) {
|
||||
error(`Skill not found: ${skillName}`);
|
||||
console.log(colors.muted('Available directories:'));
|
||||
searchDirs.forEach(d => console.log(colors.muted(` - ${d}`)));
|
||||
if (!this.json) {
|
||||
error(`Skill not found: ${skillName}`);
|
||||
console.log(colors.muted('Available directories:'));
|
||||
searchDirs.forEach(d => console.log(colors.muted(` - ${d}`)));
|
||||
}
|
||||
exitCode = 1;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!skill.enabled) {
|
||||
warn(`Skill disabled: ${skillName}`);
|
||||
console.log(colors.muted('Enable with: skillkit enable ' + skillName));
|
||||
if (!this.json) {
|
||||
warn(`Skill disabled: ${skillName}`);
|
||||
console.log(colors.muted('Enable with: skillkit enable ' + skillName));
|
||||
}
|
||||
exitCode = 1;
|
||||
continue;
|
||||
}
|
||||
@@ -57,20 +70,32 @@ export class ReadCommand extends Command {
|
||||
const content = readSkillContent(skill.path);
|
||||
|
||||
if (!content) {
|
||||
error(`Could not read SKILL.md for: ${skillName}`);
|
||||
if (!this.json) error(`Could not read SKILL.md for: ${skillName}`);
|
||||
exitCode = 1;
|
||||
continue;
|
||||
}
|
||||
|
||||
console.log(`Reading: ${skillName}`);
|
||||
console.log(`Base directory: ${skill.path}`);
|
||||
console.log();
|
||||
console.log(content);
|
||||
console.log();
|
||||
console.log(`Skill read: ${skillName}`);
|
||||
if (this.json) {
|
||||
jsonResults.push({ name: skillName, content, path: skill.path });
|
||||
} else {
|
||||
console.log(`Reading: ${skillName}`);
|
||||
console.log(`Base directory: ${skill.path}`);
|
||||
console.log();
|
||||
console.log(content);
|
||||
console.log();
|
||||
console.log(`Skill read: ${skillName}`);
|
||||
|
||||
if (skillNames.length > 1 && skillName !== skillNames[skillNames.length - 1]) {
|
||||
console.log('\n---\n');
|
||||
if (skillNames.length > 1 && skillName !== skillNames[skillNames.length - 1]) {
|
||||
console.log('\n---\n');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (this.json) {
|
||||
if (jsonResults.length === 1) {
|
||||
console.log(JSON.stringify(jsonResults[0]));
|
||||
} else {
|
||||
console.log(JSON.stringify(jsonResults));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { existsSync, rmSync, readFileSync, writeFileSync } from 'node:fs';
|
||||
import { join, dirname, basename } from 'node:path';
|
||||
import { colors, warn, success, error } from '../onboarding/index.js';
|
||||
import { colors, warn, success, error, spinner } from '../onboarding/index.js';
|
||||
import { Command, Option } from 'clipanion';
|
||||
import { findSkill, findAllSkills, loadMetadata, AgentsMdParser, AgentsMdGenerator } from '@skillkit/core';
|
||||
import { findSkill, findAllSkills, loadMetadata, AgentsMdParser, AgentsMdGenerator, removeSkillFromLock } from '@skillkit/core';
|
||||
import { getSearchDirs } from '../helpers.js';
|
||||
|
||||
export class RemoveCommand extends Command {
|
||||
@@ -33,6 +33,10 @@ export class RemoveCommand extends Command {
|
||||
description: 'Skip confirmation',
|
||||
});
|
||||
|
||||
json = Option.Boolean('--json', false, {
|
||||
description: 'Output as JSON',
|
||||
});
|
||||
|
||||
async execute(): Promise<number> {
|
||||
const searchDirs = getSearchDirs();
|
||||
|
||||
@@ -51,22 +55,30 @@ export class RemoveCommand extends Command {
|
||||
return meta?.source?.includes(this.source!) ?? false;
|
||||
}).map((s) => ({ name: s.name, path: s.path }));
|
||||
if (skillsToRemove.length === 0) {
|
||||
warn(`No skills found from source: ${this.source}`);
|
||||
if (this.json) {
|
||||
console.log(JSON.stringify({ success: true, removed: [], failed: [], total: 0 }));
|
||||
} else {
|
||||
warn(`No skills found from source: ${this.source}`);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
skillsToRemove = allSkills.map((s) => ({ name: s.name, path: s.path }));
|
||||
if (skillsToRemove.length === 0) {
|
||||
warn('No installed skills found');
|
||||
if (this.json) {
|
||||
console.log(JSON.stringify({ success: true, removed: [], failed: [], total: 0 }));
|
||||
} else {
|
||||
warn('No installed skills found');
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
console.log(colors.muted(`Found ${skillsToRemove.length} skill(s) to remove`));
|
||||
if (!this.json) console.log(colors.muted(`Found ${skillsToRemove.length} skill(s) to remove`));
|
||||
} else {
|
||||
for (const skillName of this.skills) {
|
||||
const skill = findSkill(skillName, searchDirs);
|
||||
if (!skill) {
|
||||
warn(`Skill not found: ${skillName}`);
|
||||
if (!this.json) warn(`Skill not found: ${skillName}`);
|
||||
continue;
|
||||
}
|
||||
skillsToRemove.push({ name: skill.name, path: skill.path });
|
||||
@@ -75,6 +87,10 @@ export class RemoveCommand extends Command {
|
||||
|
||||
let removed = 0;
|
||||
let failed = 0;
|
||||
const removedNames: string[] = [];
|
||||
const failedNames: string[] = [];
|
||||
const s = this.json ? { start: () => {}, stop: () => {}, message: () => {} } : spinner();
|
||||
s.start('Removing skills');
|
||||
|
||||
for (const { name: skillName, path: skillPath } of skillsToRemove) {
|
||||
if (!existsSync(skillPath)) {
|
||||
@@ -88,15 +104,22 @@ export class RemoveCommand extends Command {
|
||||
const metaSibling = join(dirname(skillPath), `.${basename(skillPath, '.md')}.skillkit.json`);
|
||||
if (existsSync(metaSibling)) rmSync(metaSibling);
|
||||
}
|
||||
success(`Removed: ${skillName}`);
|
||||
removeSkillFromLock(skillName);
|
||||
removedNames.push(skillName);
|
||||
if (!this.json) success(`Removed: ${skillName}`);
|
||||
removed++;
|
||||
} catch (err) {
|
||||
error(`Failed to remove: ${skillName}`);
|
||||
console.error(colors.muted(err instanceof Error ? err.message : String(err)));
|
||||
failedNames.push(skillName);
|
||||
if (!this.json) {
|
||||
error(`Failed to remove: ${skillName}`);
|
||||
console.error(colors.muted(err instanceof Error ? err.message : String(err)));
|
||||
}
|
||||
failed++;
|
||||
}
|
||||
}
|
||||
|
||||
s.stop(`Removed ${removed} skill(s)`);
|
||||
|
||||
if (removed > 0) {
|
||||
try {
|
||||
const agentsMdPath = join(process.cwd(), 'AGENTS.md');
|
||||
@@ -114,7 +137,19 @@ export class RemoveCommand extends Command {
|
||||
warn('Warning: Failed to update AGENTS.md');
|
||||
console.error(colors.muted(err instanceof Error ? err.message : String(err)));
|
||||
}
|
||||
console.log(colors.muted('\nRun `skillkit sync` to update your agent config'));
|
||||
if (!this.json) {
|
||||
console.log(colors.muted('\nRun `skillkit sync` to update your agent config'));
|
||||
}
|
||||
}
|
||||
|
||||
if (this.json) {
|
||||
console.log(JSON.stringify({
|
||||
success: failed === 0,
|
||||
removed: removedNames,
|
||||
failed: failedNames,
|
||||
total: removed + failed,
|
||||
}));
|
||||
return failed > 0 ? 1 : 0;
|
||||
}
|
||||
|
||||
return failed > 0 ? 1 : 0;
|
||||
|
||||
@@ -43,14 +43,26 @@ export class SaveCommand extends Command {
|
||||
description: 'Local file path to save as a skill',
|
||||
});
|
||||
|
||||
json = Option.Boolean('--json', false, {
|
||||
description: 'Output as JSON',
|
||||
});
|
||||
|
||||
async execute(): Promise<number> {
|
||||
const sources = [this.url, this.text, this.file].filter(Boolean);
|
||||
if (sources.length === 0) {
|
||||
console.log(colors.error('Provide a URL, --text, or --file'));
|
||||
if (this.json) {
|
||||
console.log(JSON.stringify({ success: false, error: 'Provide a URL, --text, or --file' }));
|
||||
} else {
|
||||
console.log(colors.error('Provide a URL, --text, or --file'));
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
if (sources.length > 1) {
|
||||
console.log(colors.error('Provide only one of: URL, --text, or --file'));
|
||||
if (this.json) {
|
||||
console.log(JSON.stringify({ success: false, error: 'Provide only one of: URL, --text, or --file' }));
|
||||
} else {
|
||||
console.log(colors.error('Provide only one of: URL, --text, or --file'));
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -58,7 +70,7 @@ export class SaveCommand extends Command {
|
||||
const generator = new SkillGenerator();
|
||||
const tagger = new AutoTagger();
|
||||
|
||||
const s = spinner();
|
||||
const s = this.json ? { start: () => {}, stop: () => {}, message: () => {} } : spinner();
|
||||
|
||||
try {
|
||||
s.start('Extracting content');
|
||||
@@ -82,15 +94,9 @@ export class SaveCommand extends Command {
|
||||
global: this.global,
|
||||
});
|
||||
|
||||
s.stop(colors.success('Skill saved'));
|
||||
|
||||
console.log('');
|
||||
console.log(colors.bold(' Name: ') + colors.cyan(result.name));
|
||||
console.log(colors.bold(' Path: ') + colors.muted(result.skillPath));
|
||||
if (tags.length > 0) {
|
||||
console.log(colors.bold(' Tags: ') + tags.map(t => colors.warning(t)).join(', '));
|
||||
}
|
||||
s.stop('Skill saved');
|
||||
|
||||
const installedAgents: string[] = [];
|
||||
if (this.agent) {
|
||||
const agents = this.agent.split(',').map(a => a.trim()).filter(Boolean);
|
||||
const skillDir = dirname(result.skillPath);
|
||||
@@ -101,18 +107,35 @@ export class SaveCommand extends Command {
|
||||
const targetDir = join(adapter.skillsDir, result.name);
|
||||
mkdirSync(targetDir, { recursive: true });
|
||||
cpSync(skillDir, targetDir, { recursive: true });
|
||||
console.log(colors.success(` Installed to ${agentName}: `) + colors.muted(targetDir));
|
||||
installedAgents.push(agentName);
|
||||
if (!this.json) {
|
||||
console.log(colors.success(` Installed to ${agentName}: `) + colors.muted(targetDir));
|
||||
}
|
||||
} catch (err) {
|
||||
warn(` Skipped ${agentName}: ${err instanceof Error ? err.message : String(err)}`);
|
||||
if (!this.json) warn(` Skipped ${agentName}: ${err instanceof Error ? err.message : String(err)}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
console.log('');
|
||||
if (this.json) {
|
||||
console.log(JSON.stringify({ success: true, name: result.name, path: result.skillPath, agents: installedAgents }));
|
||||
} else {
|
||||
console.log('');
|
||||
console.log(colors.bold(' Name: ') + colors.cyan(result.name));
|
||||
console.log(colors.bold(' Path: ') + colors.muted(result.skillPath));
|
||||
if (tags.length > 0) {
|
||||
console.log(colors.bold(' Tags: ') + tags.map(t => colors.warning(t)).join(', '));
|
||||
}
|
||||
console.log('');
|
||||
}
|
||||
return 0;
|
||||
} catch (err) {
|
||||
s.stop(colors.error('Failed'));
|
||||
console.log(colors.error(err instanceof Error ? err.message : String(err)));
|
||||
s.stop('Failed');
|
||||
if (this.json) {
|
||||
console.log(JSON.stringify({ success: false, error: err instanceof Error ? err.message : String(err) }));
|
||||
} else {
|
||||
console.log(colors.error(err instanceof Error ? err.message : String(err)));
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Command, Option } from 'clipanion';
|
||||
import { resolve } from 'node:path';
|
||||
import { existsSync } from 'node:fs';
|
||||
import { SkillScanner, formatResult, Severity } from '@skillkit/core';
|
||||
import { error } from '../onboarding/index.js';
|
||||
import { error, spinner } from '../onboarding/index.js';
|
||||
|
||||
const SEVERITY_MAP: Record<string, Severity> = {
|
||||
critical: Severity.CRITICAL,
|
||||
@@ -47,6 +47,10 @@ export class ScanCommand extends Command {
|
||||
description: 'Comma-separated rule IDs or categories to skip',
|
||||
});
|
||||
|
||||
json = Option.Boolean('--json', false, {
|
||||
description: 'Output as JSON',
|
||||
});
|
||||
|
||||
async execute(): Promise<number> {
|
||||
const targetPath = resolve(this.skillPath);
|
||||
|
||||
@@ -77,7 +81,21 @@ export class ScanCommand extends Command {
|
||||
skipRules,
|
||||
});
|
||||
|
||||
const result = await scanner.scan(targetPath);
|
||||
const s = this.json ? { start: () => {}, stop: () => {} } : spinner();
|
||||
s.start('Scanning for vulnerabilities...');
|
||||
let result;
|
||||
try {
|
||||
result = await scanner.scan(targetPath);
|
||||
s.stop(`Scan complete (${result.findings.length} finding(s))`);
|
||||
} catch (err) {
|
||||
s.stop('Scan failed');
|
||||
throw err;
|
||||
}
|
||||
|
||||
if (this.json) {
|
||||
this.context.stdout.write(formatResult(result, 'json') + '\n');
|
||||
return result.verdict === 'fail' ? 1 : 0;
|
||||
}
|
||||
|
||||
this.context.stdout.write(formatResult(result, this.format) + '\n');
|
||||
|
||||
|
||||
@@ -53,16 +53,20 @@ export class SyncCommand extends Command {
|
||||
description: 'Minimal output',
|
||||
});
|
||||
|
||||
async execute(): Promise<number> {
|
||||
const isInteractive = process.stdin.isTTY && !this.yes;
|
||||
json = Option.Boolean('--json', false, {
|
||||
description: 'Output as JSON',
|
||||
});
|
||||
|
||||
if (!this.quiet) {
|
||||
async execute(): Promise<number> {
|
||||
const isInteractive = process.stdin.isTTY && !this.yes && !this.json;
|
||||
|
||||
if (!this.quiet && !this.json) {
|
||||
header('Sync Skills');
|
||||
}
|
||||
|
||||
try {
|
||||
let agentType: AgentType;
|
||||
const s = spinner();
|
||||
const s = this.json ? { start: () => {}, stop: () => {}, message: () => {} } : spinner();
|
||||
|
||||
if (this.agent) {
|
||||
agentType = this.agent as AgentType;
|
||||
@@ -91,8 +95,9 @@ export class SyncCommand extends Command {
|
||||
|
||||
agentType = agentResult as AgentType;
|
||||
} else {
|
||||
// Non-interactive: always detect, don't rely on default config
|
||||
s.start('Detecting agent...');
|
||||
agentType = await detectAgent();
|
||||
s.stop(`Detected: ${formatAgent(agentType)}`);
|
||||
}
|
||||
|
||||
const adapter = getAdapter(agentType);
|
||||
@@ -106,13 +111,16 @@ export class SyncCommand extends Command {
|
||||
}
|
||||
|
||||
if (skills.length === 0) {
|
||||
warn('No skills found to sync');
|
||||
console.log(colors.muted('Install skills with: skillkit install <source>'));
|
||||
if (this.json) {
|
||||
console.log(JSON.stringify({ success: true, skills: 0, agent: agentType, configPath: '' }));
|
||||
} else {
|
||||
warn('No skills found to sync');
|
||||
console.log(colors.muted('Install skills with: skillkit install <source>'));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Show skills to sync
|
||||
if (!this.quiet) {
|
||||
if (!this.quiet && !this.json) {
|
||||
console.log('');
|
||||
console.log(colors.bold(`Syncing ${skills.length} skill(s) for ${adapter.name}:`));
|
||||
console.log('');
|
||||
@@ -127,8 +135,7 @@ export class SyncCommand extends Command {
|
||||
console.log('');
|
||||
}
|
||||
|
||||
// Confirm sync
|
||||
if (isInteractive && !this.yes) {
|
||||
if (isInteractive && !this.yes && !this.json) {
|
||||
const confirmResult = await confirm({
|
||||
message: `Sync ${skills.length} skill(s) to ${outputPath}?`,
|
||||
initialValue: true,
|
||||
@@ -166,21 +173,28 @@ export class SyncCommand extends Command {
|
||||
|
||||
s.stop('Config generated');
|
||||
|
||||
// Show summary
|
||||
showSyncSummary({
|
||||
skillCount: skills.length,
|
||||
agentType,
|
||||
configPath: outputPath,
|
||||
});
|
||||
if (this.json) {
|
||||
console.log(JSON.stringify({ success: true, skills: skills.length, agent: agentType, configPath: outputPath }));
|
||||
} else {
|
||||
showSyncSummary({
|
||||
skillCount: skills.length,
|
||||
agentType,
|
||||
configPath: outputPath,
|
||||
});
|
||||
|
||||
if (!this.quiet) {
|
||||
outro('Sync complete!');
|
||||
if (!this.quiet) {
|
||||
outro('Sync complete!');
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
} catch (err) {
|
||||
console.log(colors.error('Sync failed'));
|
||||
console.log(colors.muted(err instanceof Error ? err.message : String(err)));
|
||||
if (this.json) {
|
||||
console.log(JSON.stringify({ success: false, error: err instanceof Error ? err.message : String(err) }));
|
||||
} else {
|
||||
console.log(colors.error('Sync failed'));
|
||||
console.log(colors.muted(err instanceof Error ? err.message : String(err)));
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,147 @@
|
||||
import { Command, Option } from 'clipanion';
|
||||
import { colors, symbols, step, success, warn, spinner } from '../onboarding/index.js';
|
||||
import { loadTaps, saveTaps } from '../helpers.js';
|
||||
|
||||
export class TapAddCommand extends Command {
|
||||
static override paths = [['tap', 'add']];
|
||||
|
||||
static override usage = Command.Usage({
|
||||
description: 'Add a custom skill source (tap)',
|
||||
examples: [
|
||||
['Add a GitHub source', '$0 tap add myorg/skills'],
|
||||
['Add with a display name', '$0 tap add myorg/skills --name "My Org Skills"'],
|
||||
],
|
||||
});
|
||||
|
||||
source = Option.String({ required: true });
|
||||
|
||||
name = Option.String('--name,-n', {
|
||||
description: 'Display name for the tap',
|
||||
});
|
||||
|
||||
json = Option.Boolean('--json', false, {
|
||||
description: 'Output as JSON',
|
||||
});
|
||||
|
||||
async execute(): Promise<number> {
|
||||
const s = this.json ? { start: () => {}, stop: () => {}, message: () => {} } : spinner();
|
||||
const taps = loadTaps();
|
||||
|
||||
const exists = taps.taps.some((t) => t.source === this.source);
|
||||
if (exists) {
|
||||
if (this.json) {
|
||||
console.log(JSON.stringify({ success: true, source: this.source }));
|
||||
} else {
|
||||
warn(`Tap already exists: ${this.source}`);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
s.start('Adding tap');
|
||||
|
||||
taps.taps.push({
|
||||
source: this.source,
|
||||
name: this.name,
|
||||
addedAt: new Date().toISOString(),
|
||||
});
|
||||
saveTaps(taps);
|
||||
|
||||
s.stop('Tap added');
|
||||
|
||||
if (this.json) {
|
||||
console.log(JSON.stringify({ success: true, source: this.source }));
|
||||
} else {
|
||||
success(`Added tap: ${this.source}${this.name ? ` (${this.name})` : ''}`);
|
||||
console.log(colors.muted('Skills from this source will appear in search results'));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
export class TapRemoveCommand extends Command {
|
||||
static override paths = [['tap', 'remove'], ['tap', 'rm']];
|
||||
|
||||
static override usage = Command.Usage({
|
||||
description: 'Remove a custom skill source (tap)',
|
||||
examples: [
|
||||
['Remove a tap', '$0 tap remove myorg/skills'],
|
||||
],
|
||||
});
|
||||
|
||||
source = Option.String({ required: true });
|
||||
|
||||
json = Option.Boolean('--json', false, {
|
||||
description: 'Output as JSON',
|
||||
});
|
||||
|
||||
async execute(): Promise<number> {
|
||||
const s = this.json ? { start: () => {}, stop: () => {}, message: () => {} } : spinner();
|
||||
const taps = loadTaps();
|
||||
|
||||
const idx = taps.taps.findIndex((t) => t.source === this.source);
|
||||
if (idx === -1) {
|
||||
if (this.json) {
|
||||
console.log(JSON.stringify({ success: true, source: this.source }));
|
||||
} else {
|
||||
warn(`Tap not found: ${this.source}`);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
s.start('Removing tap');
|
||||
taps.taps.splice(idx, 1);
|
||||
saveTaps(taps);
|
||||
s.stop('Tap removed');
|
||||
|
||||
if (this.json) {
|
||||
console.log(JSON.stringify({ success: true, source: this.source }));
|
||||
} else {
|
||||
success(`Removed tap: ${this.source}`);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
export class TapListCommand extends Command {
|
||||
static override paths = [['tap', 'list'], ['tap', 'ls'], ['tap']];
|
||||
|
||||
static override usage = Command.Usage({
|
||||
description: 'List all custom skill sources (taps)',
|
||||
examples: [
|
||||
['List taps', '$0 tap list'],
|
||||
],
|
||||
});
|
||||
|
||||
json = Option.Boolean('--json', false, {
|
||||
description: 'Output as JSON',
|
||||
});
|
||||
|
||||
async execute(): Promise<number> {
|
||||
const taps = loadTaps();
|
||||
|
||||
if (this.json) {
|
||||
console.log(JSON.stringify({ taps: taps.taps }));
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (taps.taps.length === 0) {
|
||||
step('No custom taps configured');
|
||||
console.log(colors.muted('Add one with: skillkit tap add owner/repo'));
|
||||
return 0;
|
||||
}
|
||||
|
||||
step(`${taps.taps.length} tap(s) configured`);
|
||||
console.log('');
|
||||
|
||||
for (const tap of taps.taps) {
|
||||
const label = tap.name ? `${tap.name} (${tap.source})` : tap.source;
|
||||
console.log(` ${colors.success(symbols.bullet)} ${colors.primary(label)}`);
|
||||
if (tap.addedAt) {
|
||||
console.log(` ${colors.muted(`Added: ${tap.addedAt}`)}`);
|
||||
}
|
||||
}
|
||||
|
||||
console.log('');
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
import { Command, Option } from 'clipanion';
|
||||
import { colors } from '../onboarding/index.js';
|
||||
import { colors, spinner } from '../onboarding/index.js';
|
||||
import { createTeamManager, createSkillBundle, exportBundle, importBundle } from '@skillkit/core';
|
||||
import { join } from 'node:path';
|
||||
|
||||
@@ -82,10 +82,13 @@ export class TeamCommand extends Command {
|
||||
return 1;
|
||||
}
|
||||
|
||||
const s = spinner();
|
||||
s.start('Initializing team');
|
||||
const config = await teamManager.init({
|
||||
teamName: this.name,
|
||||
registryUrl: this.registry,
|
||||
});
|
||||
s.stop('Team initialized');
|
||||
|
||||
this.context.stdout.write(colors.success('✓ Team initialized!\n'));
|
||||
this.context.stdout.write(` Team ID: ${config.teamId}\n`);
|
||||
@@ -105,11 +108,14 @@ export class TeamCommand extends Command {
|
||||
return 1;
|
||||
}
|
||||
|
||||
const s = spinner();
|
||||
s.start('Sharing skill');
|
||||
const shared = await teamManager.shareSkill({
|
||||
skillName: this.name,
|
||||
description: this.description,
|
||||
tags: this.tags?.split(',').map((t) => t.trim()),
|
||||
});
|
||||
s.stop('Skill shared');
|
||||
|
||||
this.context.stdout.write(colors.success('✓ Skill shared!\n'));
|
||||
this.context.stdout.write(` Name: ${shared.name}\n`);
|
||||
@@ -130,10 +136,13 @@ export class TeamCommand extends Command {
|
||||
return 1;
|
||||
}
|
||||
|
||||
const s = spinner();
|
||||
s.start('Importing skill');
|
||||
const result = await teamManager.importSkill(this.name, {
|
||||
overwrite: this.overwrite,
|
||||
dryRun: this.dryRun,
|
||||
});
|
||||
s.stop('Import complete');
|
||||
|
||||
if (!result.success) {
|
||||
this.context.stderr.write(colors.error(`✗ ${result.error}\n`));
|
||||
@@ -184,9 +193,11 @@ export class TeamCommand extends Command {
|
||||
return 1;
|
||||
}
|
||||
|
||||
this.context.stdout.write(`Syncing with ${config.registryUrl}...\n`);
|
||||
const s = spinner();
|
||||
s.start(`Syncing with ${config.registryUrl}`);
|
||||
|
||||
const result = await teamManager.sync();
|
||||
s.stop('Sync complete');
|
||||
|
||||
this.context.stdout.write(colors.success('✓ Sync complete!\n'));
|
||||
if (result.added.length > 0) {
|
||||
@@ -335,7 +346,10 @@ export class TeamCommand extends Command {
|
||||
return 0;
|
||||
}
|
||||
|
||||
const s = spinner();
|
||||
s.start('Importing bundle');
|
||||
const result = importBundle(this.source, skillsDir, { overwrite: this.overwrite });
|
||||
s.stop('Import complete');
|
||||
|
||||
if (!result.success && result.imported.length === 0) {
|
||||
this.context.stderr.write(colors.error('✗ Failed to import bundle:\n'));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Command, Option } from 'clipanion';
|
||||
import { resolve, join } from 'node:path';
|
||||
import { existsSync, readFileSync, readdirSync } from 'node:fs';
|
||||
import { colors, warn, success, error, step } from '../onboarding/index.js';
|
||||
import { colors, warn, success, error, step, spinner } from '../onboarding/index.js';
|
||||
import {
|
||||
runTestSuite,
|
||||
createTestSuiteFromFrontmatter,
|
||||
@@ -105,16 +105,16 @@ export class TestCommand extends Command {
|
||||
return 1;
|
||||
}
|
||||
|
||||
const s = this.json ? { start: () => {}, stop: () => {}, message: () => {} } : spinner();
|
||||
|
||||
if (!this.json) {
|
||||
console.log(colors.bold('Running skill tests...\n'));
|
||||
}
|
||||
|
||||
// Parse tags
|
||||
const tags = this.tags?.split(',').map((t) => t.trim());
|
||||
const skipTags = this.skipTags?.split(',').map((t) => t.trim());
|
||||
const timeout = this.timeout ? parseInt(this.timeout, 10) : undefined;
|
||||
|
||||
// Run tests for each skill
|
||||
const results: TestSuiteResult[] = [];
|
||||
let allPassed = true;
|
||||
|
||||
@@ -128,6 +128,7 @@ export class TestCommand extends Command {
|
||||
if (!this.json) {
|
||||
step(`Testing: ${suite.skillName}`);
|
||||
}
|
||||
s.start(`Running ${suite.skillName}`);
|
||||
|
||||
const result = await runTestSuite(suite, {
|
||||
cwd: targetPath,
|
||||
@@ -162,6 +163,7 @@ export class TestCommand extends Command {
|
||||
},
|
||||
});
|
||||
|
||||
s.stop(`Completed ${suite.skillName}`);
|
||||
results.push(result);
|
||||
|
||||
if (!result.passed) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Command, Option } from 'clipanion';
|
||||
import { existsSync, readFileSync, writeFileSync, mkdirSync } from 'node:fs';
|
||||
import { join, basename, dirname } from 'node:path';
|
||||
import { colors, warn, success, error } from '../onboarding/index.js';
|
||||
import { colors, warn, success, error, spinner } from '../onboarding/index.js';
|
||||
import {
|
||||
type AgentType,
|
||||
translateSkill,
|
||||
@@ -89,6 +89,10 @@ export class TranslateCommand extends Command {
|
||||
description: 'Show compatibility info between agents',
|
||||
});
|
||||
|
||||
json = Option.Boolean('--json', false, {
|
||||
description: 'Output as JSON',
|
||||
});
|
||||
|
||||
async execute(): Promise<number> {
|
||||
// List supported agents
|
||||
if (this.list) {
|
||||
@@ -218,14 +222,21 @@ export class TranslateCommand extends Command {
|
||||
const skills = findAllSkills(searchDirs);
|
||||
|
||||
if (skills.length === 0) {
|
||||
warn('No skills found to translate');
|
||||
if (this.json) {
|
||||
console.log(JSON.stringify({ success: true, translated: 0, agent: targetAgent }));
|
||||
} else {
|
||||
warn('No skills found to translate');
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
console.log(colors.bold(`\nTranslating ${skills.length} skill(s) to ${targetAgent}...\n`));
|
||||
if (!this.json) {
|
||||
console.log(colors.bold(`\nTranslating ${skills.length} skill(s) to ${targetAgent}...\n`));
|
||||
}
|
||||
|
||||
let successCount = 0;
|
||||
let failed = 0;
|
||||
const s = this.json ? { start: () => {}, stop: () => {}, message: () => {} } : spinner();
|
||||
|
||||
for (const skill of skills) {
|
||||
const skillMdPath = join(skill.path, 'SKILL.md');
|
||||
@@ -235,10 +246,14 @@ export class TranslateCommand extends Command {
|
||||
continue;
|
||||
}
|
||||
|
||||
s.start(`Translating ${skill.name}...`);
|
||||
|
||||
const result = translateSkillFile(skillMdPath, targetAgent, {
|
||||
addMetadata: this.metadata,
|
||||
});
|
||||
|
||||
s.stop(`Translated ${skill.name}`);
|
||||
|
||||
if (result.success) {
|
||||
if (this.dryRun) {
|
||||
success(` ✓ ${skill.name} → ${result.filename} (dry run)`);
|
||||
@@ -284,8 +299,12 @@ export class TranslateCommand extends Command {
|
||||
}
|
||||
}
|
||||
|
||||
console.log();
|
||||
console.log(colors.bold(`Translated: ${successCount}, Failed: ${failed}`));
|
||||
if (this.json) {
|
||||
console.log(JSON.stringify({ success: failed === 0, translated: successCount, agent: targetAgent }));
|
||||
} else {
|
||||
console.log();
|
||||
console.log(colors.bold(`Translated: ${successCount}, Failed: ${failed}`));
|
||||
}
|
||||
|
||||
return failed > 0 ? 1 : 0;
|
||||
}
|
||||
@@ -331,47 +350,57 @@ export class TranslateCommand extends Command {
|
||||
}
|
||||
}
|
||||
|
||||
// Read and translate
|
||||
const s = this.json ? { start: () => {}, stop: () => {}, message: () => {} } : spinner();
|
||||
s.start(`Translating to ${targetAgent}...`);
|
||||
|
||||
const content = readFileSync(sourcePath!, 'utf-8');
|
||||
const result = translateSkill(content, targetAgent, {
|
||||
addMetadata: this.metadata,
|
||||
sourceFilename: basename(sourcePath!),
|
||||
});
|
||||
|
||||
s.stop(`Translation complete`);
|
||||
|
||||
if (!result.success) {
|
||||
error('Translation failed:');
|
||||
for (const item of result.incompatible) {
|
||||
console.log(colors.muted(` ${item}`));
|
||||
if (this.json) {
|
||||
console.log(JSON.stringify({ success: false, translated: 0, agent: targetAgent }));
|
||||
} else {
|
||||
error('Translation failed:');
|
||||
for (const item of result.incompatible) {
|
||||
console.log(colors.muted(` ${item}`));
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Show warnings
|
||||
if (result.warnings.length > 0) {
|
||||
warn('\nWarnings:');
|
||||
for (const warning of result.warnings) {
|
||||
console.log(colors.warning(` • ${warning}`));
|
||||
if (!this.json) {
|
||||
if (result.warnings.length > 0) {
|
||||
warn('\nWarnings:');
|
||||
for (const warning of result.warnings) {
|
||||
console.log(colors.warning(` • ${warning}`));
|
||||
}
|
||||
}
|
||||
|
||||
if (result.incompatible.length > 0) {
|
||||
console.log(colors.muted('\nIncompatible features:'));
|
||||
for (const item of result.incompatible) {
|
||||
console.log(colors.muted(` • ${item}`));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Show incompatible features
|
||||
if (result.incompatible.length > 0) {
|
||||
console.log(colors.muted('\nIncompatible features:'));
|
||||
for (const item of result.incompatible) {
|
||||
console.log(colors.muted(` • ${item}`));
|
||||
}
|
||||
}
|
||||
|
||||
// Dry run - just show preview
|
||||
if (this.dryRun) {
|
||||
console.log(colors.bold(`\nTranslated content (${result.filename}):\n`));
|
||||
console.log(colors.muted('─'.repeat(60)));
|
||||
console.log(result.content);
|
||||
console.log(colors.muted('─'.repeat(60)));
|
||||
if (this.json) {
|
||||
console.log(JSON.stringify({ success: true, translated: 1, agent: targetAgent }));
|
||||
} else {
|
||||
console.log(colors.bold(`\nTranslated content (${result.filename}):\n`));
|
||||
console.log(colors.muted('─'.repeat(60)));
|
||||
console.log(result.content);
|
||||
console.log(colors.muted('─'.repeat(60)));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Determine output path
|
||||
let outputPath: string;
|
||||
if (this.output) {
|
||||
outputPath = this.output;
|
||||
@@ -386,14 +415,16 @@ export class TranslateCommand extends Command {
|
||||
outputPath = join(outputDir, result.filename);
|
||||
}
|
||||
|
||||
// Check for existing file
|
||||
if (existsSync(outputPath) && !this.force) {
|
||||
error(`${outputPath} already exists`);
|
||||
console.log(colors.muted('Use --force to overwrite'));
|
||||
if (this.json) {
|
||||
console.log(JSON.stringify({ success: false, error: `${outputPath} already exists` }));
|
||||
} else {
|
||||
error(`${outputPath} already exists`);
|
||||
console.log(colors.muted('Use --force to overwrite'));
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Write output
|
||||
const outputDir = dirname(outputPath);
|
||||
if (!existsSync(outputDir)) {
|
||||
mkdirSync(outputDir, { recursive: true });
|
||||
@@ -401,9 +432,13 @@ export class TranslateCommand extends Command {
|
||||
|
||||
writeFileSync(outputPath, result.content, 'utf-8');
|
||||
|
||||
success(`\n✓ Translated to ${outputPath}`);
|
||||
console.log(colors.muted(` Format: ${result.targetFormat}`));
|
||||
console.log(colors.muted(` Agent: ${result.targetAgent}`));
|
||||
if (this.json) {
|
||||
console.log(JSON.stringify({ success: true, translated: 1, agent: targetAgent }));
|
||||
} else {
|
||||
success(`\n✓ Translated to ${outputPath}`);
|
||||
console.log(colors.muted(` Format: ${result.targetFormat}`));
|
||||
console.log(colors.muted(` Agent: ${result.targetAgent}`));
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { existsSync, rmSync, cpSync } from 'node:fs';
|
||||
import { join } from 'node:path';
|
||||
import { Command, Option } from 'clipanion';
|
||||
import { findAllSkills, findSkill, detectProvider, isLocalPath } from '@skillkit/core';
|
||||
import { getSearchDirs, loadSkillMetadata, saveSkillMetadata } from '../helpers.js';
|
||||
import { findAllSkills, findSkill, detectProvider, isLocalPath, computeSkillChecksum, addSkillToLock } from '@skillkit/core';
|
||||
import { getSearchDirs, loadSkillMetadata, saveSkillMetadata, fetchGitHubActivity } from '../helpers.js';
|
||||
import { colors, spinner, warn, step } from '../onboarding/index.js';
|
||||
|
||||
export class UpdateCommand extends Command {
|
||||
@@ -23,8 +23,12 @@ export class UpdateCommand extends Command {
|
||||
description: 'Force update even if local changes exist',
|
||||
});
|
||||
|
||||
json = Option.Boolean('--json', false, {
|
||||
description: 'Output as JSON',
|
||||
});
|
||||
|
||||
async execute(): Promise<number> {
|
||||
const s = spinner();
|
||||
const s = this.json ? { start: () => {}, stop: () => {}, message: () => {} } : spinner();
|
||||
const searchDirs = getSearchDirs();
|
||||
|
||||
let skillsToUpdate;
|
||||
@@ -35,7 +39,7 @@ export class UpdateCommand extends Command {
|
||||
.filter((s): s is NonNullable<typeof s> => s !== null);
|
||||
|
||||
const notFound = this.skills.filter(name => !findSkill(name, searchDirs));
|
||||
if (notFound.length > 0) {
|
||||
if (notFound.length > 0 && !this.json) {
|
||||
warn(`Skills not found: ${notFound.join(', ')}`);
|
||||
}
|
||||
} else {
|
||||
@@ -43,11 +47,15 @@ export class UpdateCommand extends Command {
|
||||
}
|
||||
|
||||
if (skillsToUpdate.length === 0) {
|
||||
warn('No skills to update');
|
||||
if (this.json) {
|
||||
console.log(JSON.stringify({ updated: 0, skipped: 0, failed: 0 }));
|
||||
} else {
|
||||
warn('No skills to update');
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
step(`Updating ${skillsToUpdate.length} skill(s)...`);
|
||||
if (!this.json) step(`Updating ${skillsToUpdate.length} skill(s)...`);
|
||||
|
||||
let updated = 0;
|
||||
let skipped = 0;
|
||||
@@ -57,7 +65,7 @@ export class UpdateCommand extends Command {
|
||||
const metadata = loadSkillMetadata(skill.path);
|
||||
|
||||
if (!metadata) {
|
||||
console.log(colors.muted(`Skipping ${skill.name} (no metadata, reinstall needed)`));
|
||||
if (!this.json) console.log(colors.muted(`Skipping ${skill.name} (no metadata, reinstall needed)`));
|
||||
skipped++;
|
||||
continue;
|
||||
}
|
||||
@@ -86,8 +94,18 @@ export class UpdateCommand extends Command {
|
||||
rmSync(skill.path, { recursive: true, force: true });
|
||||
cpSync(localPath, skill.path, { recursive: true, dereference: true });
|
||||
|
||||
metadata.checksum = computeSkillChecksum(skill.path);
|
||||
metadata.updatedAt = new Date().toISOString();
|
||||
saveSkillMetadata(skill.path, metadata);
|
||||
addSkillToLock(skill.name, {
|
||||
source: metadata.source,
|
||||
sourceType: metadata.sourceType,
|
||||
installedAt: metadata.installedAt,
|
||||
updatedAt: metadata.updatedAt,
|
||||
checksum: metadata.checksum,
|
||||
agents: [],
|
||||
path: skill.path,
|
||||
});
|
||||
|
||||
s.stop(`Updated ${skill.name}`);
|
||||
updated++;
|
||||
@@ -100,6 +118,17 @@ export class UpdateCommand extends Command {
|
||||
continue;
|
||||
}
|
||||
|
||||
const parsed = provider.parseSource?.(metadata.source);
|
||||
if (!this.force && parsed && 'owner' in parsed && 'repo' in parsed && (provider.type === 'github' || provider.type === 'skills-sh')) {
|
||||
const activity = await fetchGitHubActivity(parsed.owner, parsed.repo);
|
||||
const localDate = metadata.updatedAt ?? metadata.installedAt;
|
||||
if (activity?.pushedAt && localDate && activity.pushedAt <= localDate) {
|
||||
s.stop(`${skill.name}: no changes detected`);
|
||||
skipped++;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
const result = await provider.clone(metadata.source, '', { depth: 1 });
|
||||
|
||||
if (!result.success || !result.path) {
|
||||
@@ -120,24 +149,47 @@ export class UpdateCommand extends Command {
|
||||
continue;
|
||||
}
|
||||
|
||||
const newChecksum = computeSkillChecksum(sourcePath);
|
||||
if (!this.force && newChecksum && metadata.checksum && newChecksum === metadata.checksum) {
|
||||
s.stop(`${skill.name}: already up to date`);
|
||||
rmSync(result.path, { recursive: true, force: true });
|
||||
skipped++;
|
||||
continue;
|
||||
}
|
||||
|
||||
rmSync(skill.path, { recursive: true, force: true });
|
||||
cpSync(sourcePath, skill.path, { recursive: true, dereference: true });
|
||||
|
||||
rmSync(result.path, { recursive: true, force: true });
|
||||
|
||||
metadata.checksum = computeSkillChecksum(skill.path);
|
||||
metadata.updatedAt = new Date().toISOString();
|
||||
saveSkillMetadata(skill.path, metadata);
|
||||
addSkillToLock(skill.name, {
|
||||
source: metadata.source,
|
||||
sourceType: metadata.sourceType,
|
||||
installedAt: metadata.installedAt,
|
||||
updatedAt: metadata.updatedAt,
|
||||
checksum: metadata.checksum,
|
||||
agents: [],
|
||||
path: skill.path,
|
||||
});
|
||||
|
||||
s.stop(`Updated ${skill.name}`);
|
||||
updated++;
|
||||
}
|
||||
} catch (err) {
|
||||
s.stop(colors.error(`Failed to update ${skill.name}`));
|
||||
console.log(colors.muted(err instanceof Error ? err.message : String(err)));
|
||||
if (!this.json) console.log(colors.muted(err instanceof Error ? err.message : String(err)));
|
||||
failed++;
|
||||
}
|
||||
}
|
||||
|
||||
if (this.json) {
|
||||
console.log(JSON.stringify({ updated, skipped, failed }));
|
||||
return failed > 0 ? 1 : 0;
|
||||
}
|
||||
|
||||
console.log();
|
||||
step(`Updated: ${updated}, Skipped: ${skipped}, Failed: ${failed}`);
|
||||
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
import { existsSync, readFileSync, writeFileSync, mkdirSync } from 'node:fs';
|
||||
import { join, dirname } from 'node:path';
|
||||
import { homedir } from 'node:os';
|
||||
import {
|
||||
loadConfig,
|
||||
getSearchDirs as coreGetSearchDirs,
|
||||
@@ -48,3 +51,67 @@ export function formatCount(count: number): string {
|
||||
if (count >= 1_000) return `${(count / 1_000).toFixed(1)}K`;
|
||||
return String(count);
|
||||
}
|
||||
|
||||
export function timeAgo(dateStr: string): string {
|
||||
const now = Date.now();
|
||||
const then = new Date(dateStr).getTime();
|
||||
if (Number.isNaN(then)) return 'unknown';
|
||||
const days = Math.floor((now - then) / 86_400_000);
|
||||
if (days === 0) return 'today';
|
||||
if (days === 1) return 'yesterday';
|
||||
if (days < 30) return `${days}d ago`;
|
||||
if (days < 365) return `${Math.floor(days / 30)}mo ago`;
|
||||
return `${Math.floor(days / 365)}y ago`;
|
||||
}
|
||||
|
||||
export interface TapEntry {
|
||||
source: string;
|
||||
name?: string;
|
||||
addedAt: string;
|
||||
}
|
||||
|
||||
export interface TapsFile {
|
||||
version: 1;
|
||||
taps: TapEntry[];
|
||||
}
|
||||
|
||||
const TAPS_FILE = join(homedir(), '.skillkit', 'taps.json');
|
||||
|
||||
export function loadTaps(): TapsFile {
|
||||
if (!existsSync(TAPS_FILE)) return { version: 1, taps: [] };
|
||||
try {
|
||||
const data = JSON.parse(readFileSync(TAPS_FILE, 'utf-8'));
|
||||
if (data && data.version === 1 && Array.isArray(data.taps)) {
|
||||
return data as TapsFile;
|
||||
}
|
||||
return { version: 1, taps: [] };
|
||||
} catch {
|
||||
return { version: 1, taps: [] };
|
||||
}
|
||||
}
|
||||
|
||||
export function saveTaps(taps: TapsFile): void {
|
||||
const dir = dirname(TAPS_FILE);
|
||||
if (!existsSync(dir)) mkdirSync(dir, { recursive: true });
|
||||
writeFileSync(TAPS_FILE, JSON.stringify(taps, null, 2), 'utf-8');
|
||||
}
|
||||
|
||||
export async function fetchGitHubActivity(
|
||||
owner: string,
|
||||
repo: string,
|
||||
): Promise<{ stars: number; pushedAt: string | null } | null> {
|
||||
try {
|
||||
const response = await fetch(
|
||||
`https://api.github.com/repos/${owner}/${repo}`,
|
||||
{ signal: AbortSignal.timeout(5000) },
|
||||
);
|
||||
if (!response.ok) return null;
|
||||
const data = (await response.json()) as Record<string, unknown>;
|
||||
return {
|
||||
stars: typeof data.stargazers_count === 'number' ? data.stargazers_count : 0,
|
||||
pushedAt: typeof data.pushed_at === 'string' ? data.pushed_at : null,
|
||||
};
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ export {
|
||||
formatQualityBadge,
|
||||
formatQualityBadgeCompact,
|
||||
getQualityGradeFromScore,
|
||||
formatTrustBadge,
|
||||
} from './theme.js';
|
||||
|
||||
export {
|
||||
|
||||
@@ -178,3 +178,25 @@ export function formatQualityBadgeCompact(score: number): string {
|
||||
if (score >= 60) return colors.warning(grade);
|
||||
return colors.error(grade);
|
||||
}
|
||||
|
||||
export function formatTrustBadge(options: {
|
||||
isOfficial: boolean;
|
||||
officialSource?: string;
|
||||
grade?: 'trusted' | 'review' | 'caution';
|
||||
score?: number;
|
||||
source?: string;
|
||||
}): string {
|
||||
if (options.isOfficial) {
|
||||
const label = options.officialSource || options.source || '';
|
||||
return `${colors.success('[Official]')} ${label}`;
|
||||
}
|
||||
const label = options.source || '';
|
||||
const scoreText = typeof options.score === 'number' ? ` (score: ${options.score}/10)` : '';
|
||||
if (options.grade === 'trusted') {
|
||||
return `${colors.success('[Trusted]')} ${label}${scoreText}`;
|
||||
}
|
||||
if (options.grade === 'caution') {
|
||||
return `${colors.error('[Caution]')} ${label}${scoreText}`;
|
||||
}
|
||||
return `${colors.warning('[Review]')} ${label}${scoreText}`;
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ npm install @skillkit/core
|
||||
## Key Features
|
||||
|
||||
- **Skill Discovery**: Find and parse SKILL.md files from any source
|
||||
- **Cross-Agent Translation**: Convert skills between 44 agent formats (Claude Code, Cursor, Windsurf, etc.)
|
||||
- **Cross-Agent Translation**: Convert skills between 45 agent formats (Claude Code, Cursor, Windsurf, etc.)
|
||||
- **Project Context Detection**: Analyze project stack, dependencies, and configurations
|
||||
- **Smart Recommendations**: AI-powered skill suggestions based on project profile
|
||||
- **Session Memory**: Capture and persist learnings across AI coding sessions
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@skillkit/core",
|
||||
"version": "1.19.2",
|
||||
"version": "1.22.1",
|
||||
"description": "Core functionality for SkillKit - skill discovery, parsing, and translation",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import { existsSync, readFileSync, writeFileSync, mkdirSync, statSync } from 'node:fs';
|
||||
import { existsSync, readFileSync, writeFileSync, mkdirSync, statSync, renameSync } from 'node:fs';
|
||||
import { join, dirname, basename } from 'node:path';
|
||||
import { homedir } from 'node:os';
|
||||
import { createHash } from 'node:crypto';
|
||||
import { parse as parseYaml, stringify as stringifyYaml } from 'yaml';
|
||||
import { SkillkitConfig, type AgentType, type SkillMetadata, type AgentAdapterInfo } from './types.js';
|
||||
import { SkillkitConfig, LockFile, type AgentType, type SkillMetadata, type AgentAdapterInfo, type LockEntry } from './types.js';
|
||||
|
||||
const CONFIG_FILE = 'skillkit.yaml';
|
||||
const METADATA_FILE = '.skillkit.json';
|
||||
@@ -150,6 +151,58 @@ export function setSkillEnabled(skillPath: string, enabled: boolean): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function computeSkillChecksum(skillPath: string): string {
|
||||
const mdPath = skillPath.endsWith('.md') ? skillPath : join(skillPath, 'SKILL.md');
|
||||
if (!existsSync(mdPath)) return '';
|
||||
return createHash('sha256').update(readFileSync(mdPath)).digest('hex').slice(0, 16);
|
||||
}
|
||||
|
||||
const LOCK_FILE = join(homedir(), '.skillkit', 'lock.json');
|
||||
|
||||
export function loadLockFile(): LockFile {
|
||||
if (!existsSync(LOCK_FILE)) return { version: 1, skills: {} };
|
||||
try {
|
||||
return LockFile.parse(JSON.parse(readFileSync(LOCK_FILE, 'utf-8')));
|
||||
} catch {
|
||||
return { version: 1, skills: {} };
|
||||
}
|
||||
}
|
||||
|
||||
export function saveLockFile(lock: LockFile): void {
|
||||
const dir = dirname(LOCK_FILE);
|
||||
if (!existsSync(dir)) mkdirSync(dir, { recursive: true });
|
||||
const tmpFile = `${LOCK_FILE}.${process.pid}.tmp`;
|
||||
writeFileSync(tmpFile, JSON.stringify(lock, null, 2), 'utf-8');
|
||||
renameSync(tmpFile, LOCK_FILE);
|
||||
}
|
||||
|
||||
export function addSkillToLock(name: string, entry: LockEntry): void {
|
||||
const lock = loadLockFile();
|
||||
const key = `${entry.source}:${name}`;
|
||||
const existing = lock.skills[key];
|
||||
if (existing) {
|
||||
const mergedAgents = [...new Set([...existing.agents, ...entry.agents])];
|
||||
lock.skills[key] = { ...entry, agents: mergedAgents };
|
||||
} else {
|
||||
lock.skills[key] = entry;
|
||||
}
|
||||
saveLockFile(lock);
|
||||
}
|
||||
|
||||
export function removeSkillFromLock(name: string, source?: string): void {
|
||||
const lock = loadLockFile();
|
||||
if (source) {
|
||||
delete lock.skills[`${source}:${name}`];
|
||||
} else {
|
||||
for (const key of Object.keys(lock.skills)) {
|
||||
if (key === name || key.endsWith(`:${name}`)) {
|
||||
delete lock.skills[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
saveLockFile(lock);
|
||||
}
|
||||
|
||||
export async function initProject(
|
||||
type: AgentType,
|
||||
adapter: AgentAdapterInfo
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* - Plan approval workflow
|
||||
* - Review stages (spec-compliance, code-quality)
|
||||
* - Inter-agent messaging (direct + broadcast)
|
||||
* - Universal agent support (44 agents)
|
||||
* - Universal agent support (45 agents)
|
||||
*/
|
||||
|
||||
// Team Orchestrator
|
||||
|
||||
@@ -11,33 +11,45 @@ export const SKILL_DISCOVERY_PATHS = [
|
||||
'agents',
|
||||
'.agents/skills',
|
||||
'.agent/skills',
|
||||
'.aider/skills',
|
||||
'.amazonq/skills',
|
||||
'.amp/skills',
|
||||
'.antigravity/skills',
|
||||
'.augment/skills',
|
||||
'.bolt/skills',
|
||||
'.claude/skills',
|
||||
'.cline/skills',
|
||||
'.clawdbot/skills',
|
||||
'.codebuddy/skills',
|
||||
'.codegpt/skills',
|
||||
'.codex/skills',
|
||||
'.cody/skills',
|
||||
'.commandcode/skills',
|
||||
'.continue/skills',
|
||||
'.copilot/skills',
|
||||
'.crush/skills',
|
||||
'.cursor/skills',
|
||||
'.devin/skills',
|
||||
'.factory/skills',
|
||||
'.gemini/skills',
|
||||
'.github/skills',
|
||||
'.goose/skills',
|
||||
'.kilocode/skills',
|
||||
'.kiro/skills',
|
||||
'.lovable/skills',
|
||||
'.mcpjam/skills',
|
||||
'.mux/skills',
|
||||
'.neovate/skills',
|
||||
'.opencode/skills',
|
||||
'.openhands/skills',
|
||||
'.pi/skills',
|
||||
'.playcode/skills',
|
||||
'.qoder/skills',
|
||||
'.qwen/skills',
|
||||
'.replit/skills',
|
||||
'.roo/skills',
|
||||
'.tabby/skills',
|
||||
'.tabnine/skills',
|
||||
'.trae/skills',
|
||||
'.vercel/skills',
|
||||
'.windsurf/skills',
|
||||
|
||||
@@ -329,7 +329,7 @@ Follow these guidelines`;
|
||||
});
|
||||
|
||||
describe('supported agents', () => {
|
||||
it('should support all 44 agents', () => {
|
||||
it('should support all 45 agents', () => {
|
||||
const allAgents = [
|
||||
'claude-code',
|
||||
'cursor',
|
||||
|
||||
@@ -94,6 +94,23 @@ export const SkillMetadata = z.object({
|
||||
});
|
||||
export type SkillMetadata = z.infer<typeof SkillMetadata>;
|
||||
|
||||
export const LockEntry = z.object({
|
||||
source: z.string(),
|
||||
sourceType: GitProvider,
|
||||
installedAt: z.string().datetime(),
|
||||
updatedAt: z.string().datetime().optional(),
|
||||
checksum: z.string().optional(),
|
||||
agents: z.array(z.string()),
|
||||
path: z.string(),
|
||||
});
|
||||
export type LockEntry = z.infer<typeof LockEntry>;
|
||||
|
||||
export const LockFile = z.object({
|
||||
version: z.literal(1),
|
||||
skills: z.record(z.string(), LockEntry),
|
||||
});
|
||||
export type LockFile = z.infer<typeof LockFile>;
|
||||
|
||||
export const SkillLocation = z.enum(["project", "global"]);
|
||||
export type SkillLocation = z.infer<typeof SkillLocation>;
|
||||
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 220 KiB |
@@ -23,7 +23,7 @@ Then in Chrome:
|
||||
|
||||
Skills download to `Downloads/skillkit-skills/{name}/SKILL.md`.
|
||||
|
||||
To make available to all 44 agents:
|
||||
To make available to all 45 agents:
|
||||
|
||||
```bash
|
||||
skillkit install ~/Downloads/skillkit-skills/my-skill
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -2,7 +2,7 @@
|
||||
"manifest_version": 3,
|
||||
"name": "SkillKit - Save as Skill",
|
||||
"version": "1.20.0",
|
||||
"description": "Save any webpage as an AI agent skill — instantly available across 44 agents",
|
||||
"description": "Save any webpage as an AI agent skill — instantly available across 45 agents",
|
||||
"permissions": ["contextMenus", "activeTab", "downloads", "scripting"],
|
||||
"background": {
|
||||
"service_worker": "background.global.js"
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
SkillKit - Save as Skill
|
||||
|
||||
## Summary (132 chars max)
|
||||
Save any webpage as an AI agent skill file. One click, works across 44 coding agents.
|
||||
Save any webpage as an AI agent skill file. One click, works across 45 coding agents.
|
||||
|
||||
## Description
|
||||
SkillKit lets you save any webpage as a reusable AI agent skill with one click. The extension extracts page content directly in your browser and generates a SKILL.md file that works instantly across 44 coding agents including Claude Code, Cursor, Codex, Gemini CLI, Windsurf, and more.
|
||||
SkillKit lets you save any webpage as a reusable AI agent skill with one click. The extension extracts page content directly in your browser and generates a SKILL.md file that works instantly across 45 coding agents including Claude Code, Cursor, Codex, Gemini CLI, Windsurf, and more.
|
||||
|
||||
How it works:
|
||||
- Click the extension icon to save the current page as a skill
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@skillkit/mcp-memory",
|
||||
"version": "1.19.2",
|
||||
"version": "1.22.1",
|
||||
"description": "MCP (Model Context Protocol) server for SkillKit persistent memory",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@skillkit/mcp",
|
||||
"version": "1.19.2",
|
||||
"version": "1.22.1",
|
||||
"description": "MCP server for SkillKit skill discovery — agent-native skill search",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { describe, it, expect, vi, beforeEach } from 'vitest';
|
||||
import {
|
||||
handleSearchSkills,
|
||||
handleGetSkill,
|
||||
handleRecommendSkills,
|
||||
handleListCategories,
|
||||
handleSkillkitCatalog,
|
||||
handleSkillkitLoad,
|
||||
handleSkillkitResource,
|
||||
getLocalSkillDirs,
|
||||
} from '../tools.js';
|
||||
import type { SkillEntry } from '../tools.js';
|
||||
|
||||
@@ -82,3 +86,153 @@ describe('handleListCategories', () => {
|
||||
expect(react?.count).toBe(1);
|
||||
});
|
||||
});
|
||||
|
||||
vi.mock('@skillkit/core', async (importOriginal) => {
|
||||
const actual = await importOriginal<typeof import('@skillkit/core')>();
|
||||
return {
|
||||
...actual,
|
||||
findAllSkills: vi.fn(),
|
||||
findSkill: vi.fn(),
|
||||
readSkillContent: vi.fn(),
|
||||
};
|
||||
});
|
||||
|
||||
vi.mock('node:fs', async (importOriginal) => {
|
||||
const actual = await importOriginal<typeof import('node:fs')>();
|
||||
return {
|
||||
...actual,
|
||||
existsSync: vi.fn(actual.existsSync),
|
||||
readFileSync: vi.fn(actual.readFileSync),
|
||||
};
|
||||
});
|
||||
|
||||
import { findAllSkills, findSkill, readSkillContent } from '@skillkit/core';
|
||||
import { existsSync, readFileSync } from 'node:fs';
|
||||
|
||||
const mockFindAllSkills = vi.mocked(findAllSkills);
|
||||
const mockFindSkill = vi.mocked(findSkill);
|
||||
const mockReadSkillContent = vi.mocked(readSkillContent);
|
||||
const mockExistsSync = vi.mocked(existsSync);
|
||||
const mockReadFileSync = vi.mocked(readFileSync);
|
||||
|
||||
describe('handleSkillkitCatalog', () => {
|
||||
beforeEach(() => {
|
||||
vi.clearAllMocks();
|
||||
});
|
||||
|
||||
it('returns minimal catalog entries', () => {
|
||||
mockFindAllSkills.mockReturnValue([
|
||||
{ name: 'my-skill', description: 'A test skill', path: '/home/user/.claude/skills/my-skill', location: 'global', enabled: true },
|
||||
{ name: 'other-skill', description: 'Another skill', path: '/project/skills/other-skill', location: 'project', enabled: true },
|
||||
]);
|
||||
const result = handleSkillkitCatalog({});
|
||||
const data = JSON.parse(result.content[0].text);
|
||||
expect(data.total).toBe(2);
|
||||
expect(data.skills[0]).toEqual({ name: 'my-skill', description: 'A test skill', source: 'global' });
|
||||
expect(data.skills[1]).toEqual({ name: 'other-skill', description: 'Another skill', source: 'project' });
|
||||
});
|
||||
|
||||
it('returns empty array when no skills found', () => {
|
||||
mockFindAllSkills.mockReturnValue([]);
|
||||
const result = handleSkillkitCatalog({});
|
||||
const data = JSON.parse(result.content[0].text);
|
||||
expect(data.total).toBe(0);
|
||||
expect(data.skills).toEqual([]);
|
||||
});
|
||||
});
|
||||
|
||||
describe('handleSkillkitLoad', () => {
|
||||
beforeEach(() => {
|
||||
vi.clearAllMocks();
|
||||
});
|
||||
|
||||
it('returns full skill content', () => {
|
||||
mockFindSkill.mockReturnValue({
|
||||
name: 'my-skill',
|
||||
description: 'A test skill',
|
||||
path: '/home/user/.claude/skills/my-skill',
|
||||
location: 'global',
|
||||
enabled: true,
|
||||
});
|
||||
mockReadSkillContent.mockReturnValue('# My Skill\n\nFull content here');
|
||||
const result = handleSkillkitLoad({ name: 'my-skill' });
|
||||
expect(result.content[0].text).toBe('# My Skill\n\nFull content here');
|
||||
expect((result as Record<string, unknown>).isError).toBeUndefined();
|
||||
});
|
||||
|
||||
it('returns error for missing skill', () => {
|
||||
mockFindSkill.mockReturnValue(null);
|
||||
const result = handleSkillkitLoad({ name: 'nonexistent' });
|
||||
expect((result as Record<string, unknown>).isError).toBe(true);
|
||||
expect(result.content[0].text).toContain('Skill not found');
|
||||
});
|
||||
|
||||
it('returns error when content unreadable', () => {
|
||||
mockFindSkill.mockReturnValue({
|
||||
name: 'broken-skill',
|
||||
description: 'Broken',
|
||||
path: '/home/user/.claude/skills/broken-skill',
|
||||
location: 'global',
|
||||
enabled: true,
|
||||
});
|
||||
mockReadSkillContent.mockReturnValue(null);
|
||||
const result = handleSkillkitLoad({ name: 'broken-skill' });
|
||||
expect((result as Record<string, unknown>).isError).toBe(true);
|
||||
expect(result.content[0].text).toContain('Could not read');
|
||||
});
|
||||
});
|
||||
|
||||
describe('handleSkillkitResource', () => {
|
||||
beforeEach(() => {
|
||||
vi.clearAllMocks();
|
||||
});
|
||||
|
||||
it('returns file content', () => {
|
||||
mockFindSkill.mockReturnValue({
|
||||
name: 'my-skill',
|
||||
description: 'A test skill',
|
||||
path: '/home/user/.claude/skills/my-skill',
|
||||
location: 'global',
|
||||
enabled: true,
|
||||
});
|
||||
mockExistsSync.mockReturnValue(true);
|
||||
mockReadFileSync.mockReturnValue('reference content' as never);
|
||||
const result = handleSkillkitResource({ name: 'my-skill', file: 'references/api.md' });
|
||||
expect(result.content[0].text).toBe('reference content');
|
||||
expect((result as Record<string, unknown>).isError).toBeUndefined();
|
||||
});
|
||||
|
||||
it('returns error for missing skill', () => {
|
||||
mockFindSkill.mockReturnValue(null);
|
||||
const result = handleSkillkitResource({ name: 'nonexistent', file: 'references/api.md' });
|
||||
expect((result as Record<string, unknown>).isError).toBe(true);
|
||||
expect(result.content[0].text).toContain('Skill not found');
|
||||
});
|
||||
|
||||
it('blocks path traversal', () => {
|
||||
mockFindSkill.mockReturnValue({
|
||||
name: 'my-skill',
|
||||
description: 'A test skill',
|
||||
path: '/home/user/.claude/skills/my-skill',
|
||||
location: 'global',
|
||||
enabled: true,
|
||||
});
|
||||
const result = handleSkillkitResource({ name: 'my-skill', file: '../../etc/passwd' });
|
||||
expect((result as Record<string, unknown>).isError).toBe(true);
|
||||
expect(result.content[0].text).toContain('Path traversal denied');
|
||||
});
|
||||
|
||||
it('returns error for missing file', () => {
|
||||
mockFindSkill.mockReturnValue({
|
||||
name: 'my-skill',
|
||||
description: 'A test skill',
|
||||
path: '/home/user/.claude/skills/my-skill',
|
||||
location: 'global',
|
||||
enabled: true,
|
||||
});
|
||||
mockExistsSync.mockReturnValue(false);
|
||||
const result = handleSkillkitResource({ name: 'my-skill', file: 'references/missing.md' });
|
||||
expect((result as Record<string, unknown>).isError).toBe(true);
|
||||
expect(result.content[0].text).toContain('File not found');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -13,6 +13,9 @@ import {
|
||||
handleGetSkill,
|
||||
handleRecommendSkills,
|
||||
handleListCategories,
|
||||
handleSkillkitCatalog,
|
||||
handleSkillkitLoad,
|
||||
handleSkillkitResource,
|
||||
} from './tools.js';
|
||||
import type { SkillEntry } from './tools.js';
|
||||
import { getTrendingResource, getCategoriesResource } from './resources.js';
|
||||
@@ -55,7 +58,7 @@ async function loadSkills(): Promise<SkillEntry[]> {
|
||||
const server = new Server(
|
||||
{
|
||||
name: 'skillkit-discovery',
|
||||
version: '1.17.0',
|
||||
version: '1.21.0',
|
||||
},
|
||||
{
|
||||
capabilities: {
|
||||
@@ -125,6 +128,39 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
||||
properties: {},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'skillkit_catalog',
|
||||
description: 'List all installed skills with name and description. Use this first to see what skills are available. Each entry costs ~50 tokens.',
|
||||
inputSchema: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
agent: { type: 'string', description: 'Filter by agent type (e.g. claude-code, cursor)' },
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'skillkit_load',
|
||||
description: 'Load the full content of a specific installed skill. Call this only when you need the detailed instructions for a skill found via skillkit_catalog.',
|
||||
inputSchema: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
name: { type: 'string', description: 'Skill name from the catalog' },
|
||||
},
|
||||
required: ['name'],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'skillkit_resource',
|
||||
description: 'Load a specific reference file from within a skill directory. Use when a skill references external files.',
|
||||
inputSchema: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
name: { type: 'string', description: 'Skill name' },
|
||||
file: { type: 'string', description: 'Relative file path within the skill (e.g. references/api.md)' },
|
||||
},
|
||||
required: ['name', 'file'],
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
});
|
||||
@@ -142,6 +178,12 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
||||
return handleRecommendSkills(skills, args);
|
||||
case 'list_categories':
|
||||
return handleListCategories(skills);
|
||||
case 'skillkit_catalog':
|
||||
return handleSkillkitCatalog(args);
|
||||
case 'skillkit_load':
|
||||
return handleSkillkitLoad(args);
|
||||
case 'skillkit_resource':
|
||||
return handleSkillkitResource(args);
|
||||
default:
|
||||
return {
|
||||
content: [{ type: 'text', text: `Unknown tool: ${name}` }],
|
||||
|
||||
+181
-1
@@ -1,8 +1,21 @@
|
||||
import { RelevanceRanker } from '@skillkit/core';
|
||||
import {
|
||||
RelevanceRanker,
|
||||
findAllSkills,
|
||||
findSkill,
|
||||
readSkillContent,
|
||||
isPathInside,
|
||||
SKILL_DISCOVERY_PATHS,
|
||||
} from '@skillkit/core';
|
||||
import { homedir } from 'node:os';
|
||||
import { join, resolve } from 'node:path';
|
||||
import { existsSync, readFileSync, realpathSync } from 'node:fs';
|
||||
import {
|
||||
SearchSkillsInputSchema,
|
||||
GetSkillInputSchema,
|
||||
RecommendSkillsInputSchema,
|
||||
SkillkitCatalogInputSchema,
|
||||
SkillkitLoadInputSchema,
|
||||
SkillkitResourceInputSchema,
|
||||
} from './types.js';
|
||||
|
||||
export interface SkillEntry {
|
||||
@@ -167,3 +180,170 @@ export function handleListCategories(skills: SkillEntry[]) {
|
||||
],
|
||||
};
|
||||
}
|
||||
|
||||
const AGENT_DIR_MAP: Record<string, string[]> = {
|
||||
'claude-code': ['.claude/skills'], 'cursor': ['.cursor/skills'], 'codex': ['.codex/skills'],
|
||||
'gemini-cli': ['.gemini/skills'], 'opencode': ['.opencode/skills', '.config/opencode/skills'],
|
||||
'antigravity': ['.antigravity/skills'], 'amp': ['.amp/skills'], 'clawdbot': ['.clawdbot/skills'],
|
||||
'openclaw': ['skills'], 'github-copilot': ['.github/skills'], 'goose': ['.goose/skills'],
|
||||
'kilo': ['.kilocode/skills'], 'kiro-cli': ['.kiro/skills'], 'roo': ['.roo/skills'],
|
||||
'trae': ['.trae/skills'], 'windsurf': ['.windsurf/skills', '.codeium/windsurf/skills'],
|
||||
'universal': ['skills'], 'droid': ['.factory/skills'], 'factory': ['.factory/skills'],
|
||||
'cline': ['.cline/skills'], 'codebuddy': ['.codebuddy/skills'], 'codegpt': ['.codegpt/skills'],
|
||||
'commandcode': ['.commandcode/skills'], 'continue': ['.continue/skills'],
|
||||
'crush': ['.crush/skills'], 'devin': ['.devin/skills'], 'mcpjam': ['.mcpjam/skills'],
|
||||
'mux': ['.mux/skills'], 'neovate': ['.neovate/skills'], 'openhands': ['.openhands/skills'],
|
||||
'pi': ['.pi/skills'], 'playcode-agent': ['.playcode/skills'], 'qoder': ['.qoder/skills'],
|
||||
'qwen': ['.qwen/skills'], 'vercel': ['.vercel/skills'], 'zencoder': ['.zencoder/skills'],
|
||||
'aider': ['.aider/skills'], 'amazon-q': ['.amazonq/skills'], 'augment-code': ['.augment/skills'],
|
||||
'bolt': ['.bolt/skills'], 'lovable': ['.lovable/skills'], 'replit-agent': ['.replit/skills'],
|
||||
'sourcegraph-cody': ['.cody/skills'], 'tabby': ['.tabby/skills'], 'tabnine': ['.tabnine/skills'],
|
||||
};
|
||||
|
||||
export function getLocalSkillDirs(agentFilter?: string): string[] {
|
||||
const dirs: string[] = [];
|
||||
const home = homedir();
|
||||
const roots = [process.cwd(), home];
|
||||
|
||||
let allowedPaths: Set<string> | null = null;
|
||||
if (agentFilter) {
|
||||
const agentDirs = AGENT_DIR_MAP[agentFilter] ?? [];
|
||||
allowedPaths = new Set(['skills', 'agents', '.agents/skills', '.agent/skills', ...agentDirs]);
|
||||
}
|
||||
|
||||
for (const root of roots) {
|
||||
for (const rel of SKILL_DISCOVERY_PATHS) {
|
||||
if (allowedPaths && !allowedPaths.has(rel)) continue;
|
||||
const full = join(root, rel);
|
||||
if (existsSync(full) && !dirs.includes(full)) {
|
||||
dirs.push(full);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (agentFilter) {
|
||||
const agentDirs = AGENT_DIR_MAP[agentFilter] ?? [];
|
||||
for (const rel of agentDirs) {
|
||||
if (!SKILL_DISCOVERY_PATHS.includes(rel)) {
|
||||
const full = join(home, rel);
|
||||
if (existsSync(full) && !dirs.includes(full)) {
|
||||
dirs.push(full);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return dirs;
|
||||
}
|
||||
|
||||
export function handleSkillkitCatalog(args: unknown) {
|
||||
const input = SkillkitCatalogInputSchema.parse(args);
|
||||
const dirs = getLocalSkillDirs(input.agent);
|
||||
const skills = findAllSkills(dirs);
|
||||
|
||||
const catalog = skills.map((s) => ({
|
||||
name: s.name,
|
||||
description: s.description,
|
||||
source: s.location,
|
||||
}));
|
||||
|
||||
return {
|
||||
content: [
|
||||
{
|
||||
type: 'text' as const,
|
||||
text: JSON.stringify({ skills: catalog, total: catalog.length }, null, 2),
|
||||
},
|
||||
],
|
||||
};
|
||||
}
|
||||
|
||||
export function handleSkillkitLoad(args: unknown) {
|
||||
const input = SkillkitLoadInputSchema.parse(args);
|
||||
const dirs = getLocalSkillDirs();
|
||||
const skill = findSkill(input.name, dirs);
|
||||
|
||||
if (!skill) {
|
||||
return {
|
||||
content: [{ type: 'text' as const, text: `Skill not found: ${input.name}` }],
|
||||
isError: true,
|
||||
};
|
||||
}
|
||||
|
||||
const content = readSkillContent(skill.path);
|
||||
if (!content) {
|
||||
return {
|
||||
content: [{ type: 'text' as const, text: `Could not read skill content: ${input.name}` }],
|
||||
isError: true,
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
content: [
|
||||
{
|
||||
type: 'text' as const,
|
||||
text: content,
|
||||
},
|
||||
],
|
||||
};
|
||||
}
|
||||
|
||||
export function handleSkillkitResource(args: unknown) {
|
||||
const input = SkillkitResourceInputSchema.parse(args);
|
||||
const dirs = getLocalSkillDirs();
|
||||
const skill = findSkill(input.name, dirs);
|
||||
|
||||
if (!skill) {
|
||||
return {
|
||||
content: [{ type: 'text' as const, text: `Skill not found: ${input.name}` }],
|
||||
isError: true,
|
||||
};
|
||||
}
|
||||
|
||||
const filePath = resolve(join(skill.path, input.file));
|
||||
if (!isPathInside(filePath, skill.path)) {
|
||||
return {
|
||||
content: [{ type: 'text' as const, text: `Path traversal denied: ${input.file}` }],
|
||||
isError: true,
|
||||
};
|
||||
}
|
||||
|
||||
if (!existsSync(filePath)) {
|
||||
return {
|
||||
content: [{ type: 'text' as const, text: `File not found: ${input.file}` }],
|
||||
isError: true,
|
||||
};
|
||||
}
|
||||
|
||||
let realPath: string;
|
||||
let realSkillDir: string;
|
||||
try {
|
||||
realPath = realpathSync(filePath);
|
||||
realSkillDir = realpathSync(skill.path);
|
||||
} catch {
|
||||
realPath = filePath;
|
||||
realSkillDir = resolve(skill.path);
|
||||
}
|
||||
if (!isPathInside(realPath, realSkillDir)) {
|
||||
return {
|
||||
content: [{ type: 'text' as const, text: `Path traversal denied: ${input.file}` }],
|
||||
isError: true,
|
||||
};
|
||||
}
|
||||
|
||||
try {
|
||||
const content = readFileSync(realPath, 'utf-8');
|
||||
return {
|
||||
content: [
|
||||
{
|
||||
type: 'text' as const,
|
||||
text: content,
|
||||
},
|
||||
],
|
||||
};
|
||||
} catch {
|
||||
return {
|
||||
content: [{ type: 'text' as const, text: `Could not read file: ${input.file}` }],
|
||||
isError: true,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,6 +31,22 @@ export const RecommendSkillsInputSchema = z.object({
|
||||
|
||||
export const ListCategoriesInputSchema = z.object({});
|
||||
|
||||
export const SkillkitCatalogInputSchema = z.object({
|
||||
agent: z.string().optional().describe('Filter by agent type (e.g. claude-code, cursor)'),
|
||||
});
|
||||
|
||||
export const SkillkitLoadInputSchema = z.object({
|
||||
name: z.string().describe('Skill name from the catalog'),
|
||||
});
|
||||
|
||||
export const SkillkitResourceInputSchema = z.object({
|
||||
name: z.string().describe('Skill name'),
|
||||
file: z.string().describe('Relative file path within the skill (e.g. references/api.md)'),
|
||||
});
|
||||
|
||||
export type SearchSkillsInput = z.infer<typeof SearchSkillsInputSchema>;
|
||||
export type GetSkillInput = z.infer<typeof GetSkillInputSchema>;
|
||||
export type RecommendSkillsInput = z.infer<typeof RecommendSkillsInputSchema>;
|
||||
export type SkillkitCatalogInput = z.infer<typeof SkillkitCatalogInputSchema>;
|
||||
export type SkillkitLoadInput = z.infer<typeof SkillkitLoadInputSchema>;
|
||||
export type SkillkitResourceInput = z.infer<typeof SkillkitResourceInputSchema>;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@skillkit/memory",
|
||||
"version": "1.19.2",
|
||||
"version": "1.22.1",
|
||||
"description": "CozoDB-backed semantic memory with embeddings for SkillKit",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@skillkit/mesh",
|
||||
"version": "1.19.2",
|
||||
"version": "1.22.1",
|
||||
"description": "Peer mesh network for multi-machine agent distribution",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@skillkit/messaging",
|
||||
"version": "1.19.2",
|
||||
"version": "1.22.1",
|
||||
"description": "Inter-agent messaging system for SkillKit",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@skillkit/resources",
|
||||
"version": "1.19.2",
|
||||
"version": "1.22.1",
|
||||
"description": "Bundled resources for SkillKit - agents, commands, profiles, guidelines, and hooks",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
|
||||
@@ -34,7 +34,7 @@ pnpm ui
|
||||
- **Animated UI** - Smooth entrance animations and transitions
|
||||
- **Browse Skills** - Explore skill repositories with search and filtering
|
||||
- **Smart Recommendations** - AI-powered skill suggestions with match scores
|
||||
- **Cross-Agent Translation** - Convert skills between 44 agent formats
|
||||
- **Cross-Agent Translation** - Convert skills between 45 agent formats
|
||||
- **Team Collaboration** - Share and sync skills across teams
|
||||
- **Responsive Design** - Adapts to any terminal size
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@skillkit/tui",
|
||||
"version": "1.19.2",
|
||||
"version": "1.22.1",
|
||||
"description": "Unified Terminal UI for SkillKit - Built on OpenTUI",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user