antikit 1.9.0 → 1.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +47 -13
- package/package.json +1 -1
- package/src/utils/configManager.js +22 -1
- package/src/utils/github.js +22 -8
package/README.md
CHANGED
|
@@ -8,25 +8,54 @@ CLI tool to manage AI agent skills from multiple repositories. Easily discover,
|
|
|
8
8
|
npm install -g antikit
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
+
## Features
|
|
12
|
+
|
|
13
|
+
- **Multi-source Support**: Fetch skills from any GitHub repository.
|
|
14
|
+
- **Sub-directory Support**: Skills can reside in sub-folders (e.g. `.claude/skills`).
|
|
15
|
+
- **Interactive UI**: Browse, select, and update skills with a rich terminal UI.
|
|
16
|
+
- **Dependency Management**: Automatically resolves and installs skill dependencies defined in `SKILL.md`.
|
|
17
|
+
- **Smart Upgrades**: Detects version changes and allows easy upgrades.
|
|
18
|
+
- **Autocomplete**: Full Zsh/Bash comparison support.
|
|
19
|
+
|
|
11
20
|
## Usage
|
|
12
21
|
|
|
13
|
-
###
|
|
22
|
+
### � Quick Start
|
|
14
23
|
|
|
15
|
-
|
|
24
|
+
**1. Setup Autocomplete (Recommended)**
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
antikit completion
|
|
28
|
+
# Follow instructions to add to ~/.zshrc or ~/.bashrc
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
**2. Browse & Install Skills**
|
|
16
32
|
|
|
17
33
|
```bash
|
|
18
34
|
antikit list
|
|
19
|
-
# or
|
|
35
|
+
# or simply
|
|
36
|
+
antikit ls
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
_Shows an interactive menu to search, select, and install/update skills._
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
### �📦 Manage Skills
|
|
44
|
+
|
|
45
|
+
#### List available skills
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
# Interactive mode (Default) - Browse, Multi-select, Update
|
|
20
49
|
antikit ls
|
|
21
50
|
|
|
22
51
|
# Search skills by name
|
|
23
|
-
antikit
|
|
52
|
+
antikit ls -s <query>
|
|
24
53
|
|
|
25
|
-
#
|
|
26
|
-
antikit
|
|
54
|
+
# Text mode (Non-interactive list)
|
|
55
|
+
antikit ls --text
|
|
27
56
|
|
|
28
57
|
# Filter by source
|
|
29
|
-
antikit
|
|
58
|
+
antikit ls --source official
|
|
30
59
|
```
|
|
31
60
|
|
|
32
61
|
#### Install a skill
|
|
@@ -49,6 +78,8 @@ Update your local skills to the latest version from their sources.
|
|
|
49
78
|
```bash
|
|
50
79
|
# Upgrade all installed skills
|
|
51
80
|
antikit upgrade
|
|
81
|
+
# or
|
|
82
|
+
antikit ug
|
|
52
83
|
|
|
53
84
|
# Upgrade a specific skill
|
|
54
85
|
antikit upgrade <skill-name>
|
|
@@ -77,14 +108,17 @@ antikit rm <skill-name>
|
|
|
77
108
|
|
|
78
109
|
### 📡 Manage Sources
|
|
79
110
|
|
|
80
|
-
You can fetch skills from multiple GitHub repositories.
|
|
111
|
+
You can fetch skills from multiple GitHub repositories, even from sub-directories.
|
|
81
112
|
|
|
82
113
|
```bash
|
|
83
114
|
# List configured sources
|
|
84
115
|
antikit source list
|
|
85
116
|
|
|
86
|
-
# Add a
|
|
87
|
-
antikit source add vunamhung/
|
|
117
|
+
# Add a standard Repo source (GitHub owner/repo)
|
|
118
|
+
antikit source add vunamhung/antiskills
|
|
119
|
+
|
|
120
|
+
# Add a source from a SUB-DIRECTORY (e.g. monorepo)
|
|
121
|
+
antikit source add mrgoonie/claudekit-skills --path .claude/skills --name claudekit
|
|
88
122
|
|
|
89
123
|
# Add with a custom name
|
|
90
124
|
antikit source add vunamhung/private-skills --name private
|
|
@@ -116,14 +150,15 @@ _Note: You will also be notified automatically if a new version is available whe
|
|
|
116
150
|
|
|
117
151
|
A skill is a directory containing a `SKILL.md` file.
|
|
118
152
|
|
|
119
|
-
### Defining Dependencies
|
|
153
|
+
### Defining Version & Dependencies
|
|
120
154
|
|
|
121
|
-
You can specify dependencies in the `SKILL.md` frontmatter.
|
|
155
|
+
You can specify version and dependencies in the `SKILL.md` frontmatter.
|
|
122
156
|
|
|
123
157
|
```yaml
|
|
124
158
|
---
|
|
125
159
|
name: my-skill
|
|
126
160
|
description: A powerful skill that needs helpers
|
|
161
|
+
version: 1.0.1
|
|
127
162
|
dependencies:
|
|
128
163
|
- sql-helper
|
|
129
164
|
- python-runner
|
|
@@ -136,7 +171,6 @@ dependencies:
|
|
|
136
171
|
|
|
137
172
|
- Node.js >= 18.0.0
|
|
138
173
|
- Git (for cloning skills)
|
|
139
|
-
- A project with `.agent/skills` directory (created automatically)
|
|
140
174
|
|
|
141
175
|
## License
|
|
142
176
|
|
package/package.json
CHANGED
|
@@ -13,6 +13,20 @@ const DEFAULT_CONFIG = {
|
|
|
13
13
|
repo: 'antiskills',
|
|
14
14
|
branch: 'main',
|
|
15
15
|
default: true
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
name: 'claudekit',
|
|
19
|
+
owner: 'mrgoonie',
|
|
20
|
+
repo: 'claudekit-skills',
|
|
21
|
+
branch: 'main',
|
|
22
|
+
path: '.claude/skills'
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
name: 'ui-ux-pro',
|
|
26
|
+
owner: 'nextlevelbuilder',
|
|
27
|
+
repo: 'ui-ux-pro-max-skill',
|
|
28
|
+
branch: 'main',
|
|
29
|
+
path: '.claude/skills'
|
|
16
30
|
}
|
|
17
31
|
]
|
|
18
32
|
};
|
|
@@ -58,7 +72,14 @@ export function saveConfig(config) {
|
|
|
58
72
|
*/
|
|
59
73
|
export function getSources() {
|
|
60
74
|
const config = loadConfig();
|
|
61
|
-
|
|
75
|
+
const sources = config.sources || [];
|
|
76
|
+
|
|
77
|
+
// Enforce 'official' source always at the top
|
|
78
|
+
return sources.sort((a, b) => {
|
|
79
|
+
if (a.name === 'official') return -1;
|
|
80
|
+
if (b.name === 'official') return 1;
|
|
81
|
+
return 0;
|
|
82
|
+
});
|
|
62
83
|
}
|
|
63
84
|
|
|
64
85
|
/**
|
package/src/utils/github.js
CHANGED
|
@@ -2,6 +2,18 @@ import { getSources } from './configManager.js';
|
|
|
2
2
|
|
|
3
3
|
const GITHUB_API = 'https://api.github.com';
|
|
4
4
|
|
|
5
|
+
function getHeaders() {
|
|
6
|
+
const headers = {
|
|
7
|
+
Accept: 'application/vnd.github.v3+json',
|
|
8
|
+
'User-Agent': 'antikit-cli'
|
|
9
|
+
};
|
|
10
|
+
const token = process.env.ANTIKIT_GITHUB_TOKEN || process.env.GITHUB_TOKEN;
|
|
11
|
+
if (token) {
|
|
12
|
+
headers.Authorization = `token ${token}`;
|
|
13
|
+
}
|
|
14
|
+
return headers;
|
|
15
|
+
}
|
|
16
|
+
|
|
5
17
|
/**
|
|
6
18
|
* Fetch list of skills from a specific source
|
|
7
19
|
*/
|
|
@@ -12,14 +24,19 @@ async function fetchSkillsFromSource(source) {
|
|
|
12
24
|
}
|
|
13
25
|
|
|
14
26
|
const response = await fetch(url, {
|
|
15
|
-
headers:
|
|
16
|
-
Accept: 'application/vnd.github.v3+json',
|
|
17
|
-
'User-Agent': 'antikit-cli'
|
|
18
|
-
}
|
|
27
|
+
headers: getHeaders()
|
|
19
28
|
});
|
|
20
29
|
|
|
21
30
|
if (!response.ok) {
|
|
22
31
|
const data = await response.json().catch(() => ({}));
|
|
32
|
+
|
|
33
|
+
// Check for rate limit
|
|
34
|
+
if (response.status === 403 && data.message.includes('rate limit')) {
|
|
35
|
+
console.error('\n⚠️ GitHub API rate limit exceeded.');
|
|
36
|
+
console.error(
|
|
37
|
+
'Please set GITHUB_TOKEN or ANTIKIT_GITHUB_TOKEN environment variable to increase limit.\n'
|
|
38
|
+
);
|
|
39
|
+
}
|
|
23
40
|
// Handle empty repository
|
|
24
41
|
if (data.message === 'This repository is empty.') {
|
|
25
42
|
return [];
|
|
@@ -91,10 +108,7 @@ export async function fetchSkillInfo(skillName, owner, repo, path = null) {
|
|
|
91
108
|
url += `/${skillName}/SKILL.md`;
|
|
92
109
|
|
|
93
110
|
const response = await fetch(url, {
|
|
94
|
-
headers:
|
|
95
|
-
Accept: 'application/vnd.github.v3+json',
|
|
96
|
-
'User-Agent': 'antikit-cli'
|
|
97
|
-
}
|
|
111
|
+
headers: getHeaders()
|
|
98
112
|
});
|
|
99
113
|
|
|
100
114
|
if (!response.ok) {
|