@easbot/skills 0.3.11 → 0.3.12
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.en.md +166 -59
- package/README.md +172 -62
- package/dist/chunks/blob-DOVEGVIE.cjs +1 -0
- package/dist/chunks/blob-JSMTOYEN.mjs +1 -0
- package/dist/chunks/chunk-2VZUPTI7.cjs +1 -0
- package/dist/chunks/chunk-2YVJ7YP6.mjs +22 -0
- package/dist/chunks/chunk-4R6NKPNW.mjs +3 -0
- package/dist/chunks/chunk-676OG55M.mjs +5 -0
- package/dist/chunks/chunk-6PJ3YQA7.mjs +2 -0
- package/dist/chunks/chunk-72DXY4B7.mjs +1 -0
- package/dist/chunks/chunk-CFMOYU7R.mjs +2 -0
- package/dist/chunks/chunk-GR2NJUJ6.mjs +255 -0
- package/dist/chunks/chunk-JFEBB5CL.cjs +22 -0
- package/dist/chunks/chunk-KV7EP6AW.cjs +255 -0
- package/dist/chunks/chunk-OWG6N2K6.cjs +5 -0
- package/dist/chunks/chunk-RWSBKHQ2.cjs +3 -0
- package/dist/chunks/chunk-RWZ4LFSN.mjs +1 -0
- package/dist/chunks/chunk-S6YNGR7S.cjs +2 -0
- package/dist/chunks/chunk-TCFGU43L.cjs +2 -0
- package/dist/chunks/chunk-VRHWDHQV.cjs +1 -0
- package/dist/chunks/chunk-WQGSYA5D.mjs +1 -0
- package/dist/chunks/chunk-XGUPIAAF.cjs +1 -0
- package/dist/chunks/cli-handler-RAJ42VDN.mjs +1 -0
- package/dist/chunks/cli-handler-YAJ5J5VA.cjs +1 -0
- package/dist/chunks/installer-FB26E7JZ.mjs +1 -0
- package/dist/chunks/installer-GOQTCUJ4.cjs +1 -0
- package/dist/chunks/interfaces-S47ZGORM.mjs +1 -0
- package/dist/chunks/interfaces-UIS44Q7A.cjs +1 -0
- package/dist/chunks/local-lock-4AA55ORE.cjs +1 -0
- package/dist/chunks/local-lock-LG5YL33V.mjs +1 -0
- package/dist/chunks/scan-QEVID2TF.mjs +1 -0
- package/dist/chunks/scan-XWU3FCE3.cjs +1 -0
- package/dist/chunks/skill-lock-KHPVP7AD.mjs +1 -0
- package/dist/chunks/skill-lock-LET33FVT.cjs +1 -0
- package/dist/chunks/store-3NRBE47N.mjs +1 -0
- package/dist/chunks/store-EHYH46YY.cjs +1 -0
- package/dist/chunks/telemetry-7T6MUW5A.mjs +1 -0
- package/dist/chunks/telemetry-LCGTSJDM.cjs +1 -0
- package/dist/cli.cjs +1 -1
- package/dist/cli.mjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +242 -127
- package/dist/index.d.ts +242 -127
- package/dist/index.mjs +1 -1
- package/package.json +4 -4
- package/dist/chunks/blob-LYSE5I24.mjs +0 -1
- package/dist/chunks/blob-NYUAIVUS.cjs +0 -1
- package/dist/chunks/chunk-4IO7TNWC.mjs +0 -223
- package/dist/chunks/chunk-IWCI7DET.mjs +0 -6
- package/dist/chunks/chunk-KJPMAUXZ.cjs +0 -1
- package/dist/chunks/chunk-L6KE3VIY.mjs +0 -2
- package/dist/chunks/chunk-PGDLW2JN.cjs +0 -2
- package/dist/chunks/chunk-S76WRD5J.cjs +0 -6
- package/dist/chunks/chunk-WQJKBJSM.cjs +0 -223
- package/dist/chunks/chunk-Y2X6FBMZ.mjs +0 -1
- package/dist/chunks/scan-47YPOLJX.mjs +0 -1
- package/dist/chunks/scan-5G765ZEF.cjs +0 -1
package/README.en.md
CHANGED
|
@@ -2,19 +2,34 @@
|
|
|
2
2
|
|
|
3
3
|
# @easbot/skills
|
|
4
4
|
|
|
5
|
-
Skill
|
|
5
|
+
Skill management subsystem for the EASBot ecosystem. Handles discovery, installation, removal, search, update, one-shot use (use), and store/cache/index operations for skills (SKILL.md). Also acts as the **Plugin Source Registry** (decision 0044), abstracting well-known, marketplace, and local plugin sources into `PluginSource` for `@easbot/agent` to inject into `PluginDefinition.skills`.
|
|
6
6
|
|
|
7
|
-
Usable both as a standalone CLI (`easbot
|
|
7
|
+
Usable both as a standalone CLI (`easbot-skills`) and as a library delegated to by the `@easbot/agent` main CLI via Commander.js, making `easbot skills ...` and `easbot-skills ...` equivalent.
|
|
8
|
+
|
|
9
|
+
## Version
|
|
10
|
+
|
|
11
|
+
v0.3.11
|
|
12
|
+
|
|
13
|
+
## Target Files
|
|
14
|
+
|
|
15
|
+
The package only operates on **SKILL.md** (and optional local `plugin.json`):
|
|
16
|
+
- Skill name comes from the `name` field in the `SKILL.md` frontmatter
|
|
17
|
+
- Plugin manifest comes from `plugin.json` (if present; otherwise defaulting to `*.md`)
|
|
8
18
|
|
|
9
19
|
## Features
|
|
10
20
|
|
|
11
|
-
- **Type Safety**:
|
|
12
|
-
- **Multi-Source**: GitHub shorthand / HTTPS / SSH / Well-Known / local path
|
|
13
|
-
- **Multi-Agent**:
|
|
14
|
-
- **
|
|
15
|
-
- **
|
|
16
|
-
- **
|
|
17
|
-
- **
|
|
21
|
+
- **Type Safety**: Full TypeScript types + Zod frontmatter validation + Zod remote-skill payload validation
|
|
22
|
+
- **Multi-Source**: GitHub shorthand (`owner/repo`) / HTTPS / SSH / Well-Known index / local path / GitHub API blob fallback
|
|
23
|
+
- **Multi-Agent**: 72+ agent types (`easbot`, `claude-code`, `cursor`, `codex`, `amp`, `eve`, `gemini-cli`, `github-copilot`, `opencode`, `qwen-code`, `trae`, `trae-cn`, `windsurf`, `zed`, `roo`, `cline`, `iflow-cli`, `kimi-code-cli`, `augment`, `devin`, `goose`, `depto` etc.)
|
|
24
|
+
- **Universal shared path**: `eve` / `amp` / `gemini-cli` / `github-copilot` / `qwen-code` / `roo` / `windsurf` / `zed` / `claude-code` and 16 universal agents share `.agents/skills` directory
|
|
25
|
+
- **Non-universal agents**: each maintains independent skill directories
|
|
26
|
+
- **Install Matrix / Post-Install Reconcile**: `AgentInstallMatrix` (agent × skill 2D table, `probeCell` cell-by-cell), post-install cell reconcile (missing → link, excess → remove)
|
|
27
|
+
- **Dependency Injection** (voting 0043): `setGlobalAdapter` / `setInstanceAdapter` / `setAgentAdapter` inject `IGlobal.Path` / `IInstance.directory` so skills uses the host's unified XDG data tree
|
|
28
|
+
- **Incremental Sync**: Lockfile-based `add` / `remove` / `update` / `store` with local SHA-256 hashing (`skill-lock.ts` / `local-lock.ts`)
|
|
29
|
+
- **Store-Centric Ops** (voting 36A): `skills store list / clean / update / remove` manage store dirs + index + cache without touching agent distributions
|
|
30
|
+
- **Local Source Hard Protection**: `store clean --force` / `store remove` refuse to delete cache / user directory for local sources
|
|
31
|
+
- **i18n**: Built-in zh-CN / en-US translations; all user-facing strings go through `t()`, with fallback to English literal when key is missing
|
|
32
|
+
- **Telemetry + Audit**: Built-in `skills.sh` partner-audit reporting, OpenClaw risk scoping, telemetry flush (`flushTelemetry`)
|
|
18
33
|
|
|
19
34
|
## Installation
|
|
20
35
|
|
|
@@ -32,41 +47,101 @@ Or as a monorepo workspace dependency:
|
|
|
32
47
|
}
|
|
33
48
|
```
|
|
34
49
|
|
|
50
|
+
## Directory Layout
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
src/
|
|
54
|
+
├── types.ts # AgentType, Skill, AgentConfig, ParsedSource, RemoteSkill
|
|
55
|
+
├── agents.ts # Agent config matrix (72+) + classification functions
|
|
56
|
+
├── skills.ts # Skill discovery: parseSkillMd, discoverSkills, filterSkills
|
|
57
|
+
├── installer/
|
|
58
|
+
│ ├── installer.ts # Physical install: installSkillForAgent, installRemoteSkillForAgent, installBlobSkillForAgent
|
|
59
|
+
│ ├── post-install.ts # Post-install reconcile matrix: planActions, buildMatrix, probeCell
|
|
60
|
+
│ ├── store.ts # Three-layer store (source→cache→install): ensureCachedSource, acquireSourceClone, cleanCache
|
|
61
|
+
│ └── types.ts # InstallMode, InstalledSkill etc.
|
|
62
|
+
├── add.ts # Skill add pipeline
|
|
63
|
+
├── find.ts # Search (skills.sh / fuzzy filter / local store query)
|
|
64
|
+
├── list.ts # List installed (project/global/agent filtered)
|
|
65
|
+
├── remove.ts # Remove skills
|
|
66
|
+
├── update.ts # Incremental update (by filter, update one or more)
|
|
67
|
+
├── use.ts # One-shot use: materializeUseSkill, buildUsePrompt, launchAgentInteractively
|
|
68
|
+
├── doctor.ts # Health check + dangling symlink cleanup
|
|
69
|
+
├── store-cmd.ts # Store ops subcommands (list / clean / update / remove)
|
|
70
|
+
├── init-template.ts # Create a new skill from locale template
|
|
71
|
+
├── sanitize.ts # Control char sanitization: sanitizeMetadata, stripTerminalEscapes
|
|
72
|
+
├── telemetry.ts # Telemetry: track, flushTelemetry, fetchAuditData, setVersion
|
|
73
|
+
├── detect-agent.ts # Detect running AI agent: detectAgent, isRunningInAgent
|
|
74
|
+
├── skill-lock.ts # Global lockfile (skill-lock.json)
|
|
75
|
+
├── local-lock.ts # Project lockfile (skills-lock.json) + folder SHA-256
|
|
76
|
+
├── git.ts # Repo clone / cleanupTempDir / parseGitHubRepoUrl
|
|
77
|
+
├── blob.ts # GitHub API fallback: fetchRepoTree, tryBlobInstall, toSkillSlug
|
|
78
|
+
├── source-parser.ts # Source normalization: parseSource, parseOwnerRepo, sanitizeSubpath, shRepoPrivate
|
|
79
|
+
├── interfaces.ts # Dependency injection: setGlobalAdapter / setInstanceAdapter / getGlobal / getXdgData
|
|
80
|
+
├── constants.ts # AGENTS_DIR / SKILLS_SUBDIR / UNIVERSAL_SKILLS_DIR
|
|
81
|
+
├── frontmatter.ts # YAML frontmatter parser
|
|
82
|
+
├── format.ts # ANSI color helpers
|
|
83
|
+
├── providers/
|
|
84
|
+
│ ├── wellknown.ts # WellKnownProvider: fetch index + scan + load
|
|
85
|
+
│ └── registry.ts # Provider registry + HostProvider interface
|
|
86
|
+
├── sources/
|
|
87
|
+
│ ├── index.ts # PluginSource entry: createWellKnownSource / createLocalPluginSource factories
|
|
88
|
+
│ ├── registry.ts # Registry: registerSource / listSources / findSource / listAllEntries
|
|
89
|
+
│ ├── wellknown.ts # Wellknown source adapter
|
|
90
|
+
│ ├── local.ts # Local plugin dir (plugin.json) adapter
|
|
91
|
+
│ └── types.ts # PluginSource / PluginSourceCategory / PluginSourceEntry interfaces
|
|
92
|
+
├── i18n/ # Full i18n (zh-CN / en-US)
|
|
93
|
+
├── prompts/ # Search multi-select prompt
|
|
94
|
+
├── utils/ # Helpers (ansi / format)
|
|
95
|
+
├── cli.ts # Standalone CLI entry (easbot-skills)
|
|
96
|
+
├── cli-handler.ts # CLI handler (for agent reuse)
|
|
97
|
+
└── src/sources/ # PluginSource registry (voting 0044)
|
|
98
|
+
```
|
|
99
|
+
|
|
35
100
|
## CLI Usage
|
|
36
101
|
|
|
37
102
|
### Standalone CLI
|
|
38
103
|
|
|
39
104
|
```bash
|
|
40
105
|
# Add a skill
|
|
41
|
-
easbot
|
|
42
|
-
easbot
|
|
106
|
+
easbot-skills add houjallen/agent-skills
|
|
107
|
+
easbot-skills add https://github.com/houjallen/agent-skills -g
|
|
43
108
|
|
|
44
|
-
# Search
|
|
45
|
-
easbot
|
|
109
|
+
# Search (interactive fzf picker)
|
|
110
|
+
easbot-skills find typescript --owner houjallen
|
|
46
111
|
|
|
47
|
-
# List installed
|
|
48
|
-
easbot
|
|
112
|
+
# List installed (project/global)
|
|
113
|
+
easbot-skills list --json
|
|
114
|
+
easbot-skills ls -g -a claude-code
|
|
49
115
|
|
|
50
116
|
# Remove
|
|
51
|
-
easbot
|
|
117
|
+
easbot-skills remove my-skill -y
|
|
118
|
+
easbot-skills rm --agent claude-code my-skill
|
|
52
119
|
|
|
53
120
|
# Update
|
|
54
|
-
easbot
|
|
121
|
+
easbot-skills update -g
|
|
122
|
+
easbot-skills update my-skill --all
|
|
55
123
|
|
|
56
124
|
# One-shot use (no lockfile mutation)
|
|
57
|
-
easbot
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
easbot skills
|
|
62
|
-
|
|
63
|
-
#
|
|
64
|
-
easbot
|
|
125
|
+
easbot-skills use houjallen/agent-skills@houjallen
|
|
126
|
+
easbot-skills use --skill my-skill --agent claude
|
|
127
|
+
|
|
128
|
+
# Store-centric ops (store + cache + index)
|
|
129
|
+
easbot-skills store list [keyword] # List store skills (name filter)
|
|
130
|
+
easbot-skills store list --json # Full index as JSON
|
|
131
|
+
easbot-skills store clean # Reset store (delete store dirs + clear index)
|
|
132
|
+
easbot-skills store clean --force # Same + clear cache (local source protected)
|
|
133
|
+
easbot-skills store remove <sourceKey> # Remove source
|
|
134
|
+
easbot-skills store remove <sourceKey> --force # Extra clear cache
|
|
135
|
+
|
|
136
|
+
# Health check (check + cleanup dangling symlinks)
|
|
137
|
+
easbot-skills doctor
|
|
138
|
+
easbot-skills doctor -a easbot -t # check one agent + auto-cleanup
|
|
139
|
+
easbot-skills dr -g # global only
|
|
65
140
|
```
|
|
66
141
|
|
|
67
142
|
### Delegated from a host CLI
|
|
68
143
|
|
|
69
|
-
`@easbot/agent` reuses
|
|
144
|
+
`@easbot/agent`'s `easbot skills ...` reuses all sub-commands via `handleSkillsCli(args, deps)`:
|
|
70
145
|
|
|
71
146
|
```typescript
|
|
72
147
|
import { handleSkillsCli, setGlobalAdapter, setInstanceAdapter } from '@easbot/skills';
|
|
@@ -74,43 +149,66 @@ import { handleSkillsCli, setGlobalAdapter, setInstanceAdapter } from '@easbot/s
|
|
|
74
149
|
setGlobalAdapter({ Path: Global.Path });
|
|
75
150
|
setInstanceAdapter({ directory: ctx.config.directory, worktree: Instance.worktree });
|
|
76
151
|
|
|
77
|
-
await handleSkillsCli(['add', 'houjallen/agent-skills', '-y'], {
|
|
152
|
+
const result = await handleSkillsCli(['add', 'houjallen/agent-skills', '-y'], {
|
|
78
153
|
version: ctx.programVersion,
|
|
154
|
+
cwd: ctx.config.directory,
|
|
79
155
|
});
|
|
156
|
+
// process.exit(result.code) if result.code !== 0
|
|
80
157
|
```
|
|
81
158
|
|
|
159
|
+
`easbot skills` is registered in `packages/agent/src/cli/commands/skills.ts` via `registerSkillsCommand()`. Commander.js `skills.<subcommand>` converts flags to argv and dispatches to `handleSkillsCli`. The `skills store` sub-family is also registered in the same module via `registerSkillsCommand()`.
|
|
160
|
+
|
|
82
161
|
## API
|
|
83
162
|
|
|
84
163
|
| Module | Exports | Notes |
|
|
85
164
|
|---|---|---|
|
|
86
|
-
| `
|
|
87
|
-
| `
|
|
88
|
-
| `
|
|
89
|
-
| `
|
|
90
|
-
| `
|
|
91
|
-
| `
|
|
92
|
-
| `
|
|
93
|
-
| `
|
|
94
|
-
| `
|
|
95
|
-
| `
|
|
96
|
-
| `
|
|
97
|
-
| `
|
|
98
|
-
| `
|
|
99
|
-
| `
|
|
100
|
-
| `
|
|
101
|
-
| `
|
|
165
|
+
| `types` | `AgentType`, `Skill`, `AgentConfig`, `ParsedSource`, `RemoteSkill` | Core type definitions (70+ AgentType union) |
|
|
166
|
+
| `agents` | `agents`, `detectInstalledAgents`, `getAgentConfig`, `getAgentSkillDirs`, `getUniversalAgents`, `getAgentGlobalSkillDirs`, `isUniversalAgent`, `matchesUniversalScope` etc. | Agent config matrix + classifiers |
|
|
167
|
+
| `skills` | `parseSkillMd`, `discoverSkills`, `filterSkills`, `getSkillDisplayName`, `isSubpathSafe`, `shouldInstallInternalSkills` | SKILL.md discovery/parse |
|
|
168
|
+
| `installer` | `installSkillForAgent`, `installRemoteSkillForAgent`, `installBlobSkillForAgent`, `installWellKnownSkillForAgent`, `listInstalledSkills`, `isSkillInstalled`, `getCanonicalSkillsDir`, `getInstallPath`, `sanitizeName` | Physical install APIs |
|
|
169
|
+
| `installer/post-install` | `buildMatrix`, `planActions`, `applyActions`, `probeCell`, `runPostInstallReconcile` | Install matrix + diff application |
|
|
170
|
+
| `installer/store` | `acquireSourceClone`, `ensureCachedSource`, `installFromCache`, `cleanCache`, `getCacheRepoDir`, `getSourceDir` | Three-layer source/cache/install architecture |
|
|
171
|
+
| `add` | `runAdd`, `parseAddOptions`, `initTelemetry`, `AddOptions` | Add flow |
|
|
172
|
+
| `find` | `runFind`, `parseFindOptions`, `searchSkillsAPI`, `FindOptions`, `SearchSkill` | Search (skills.sh + local store) |
|
|
173
|
+
| `list` | `runList`, `parseListOptions` | List |
|
|
174
|
+
| `remove` | `removeCommand`, `parseRemoveOptions`, `RemoveOptions` | Remove |
|
|
175
|
+
| `update` | `runUpdate`, `parseUpdateOptions`, `hasProjectSkills`, `matchesSkillFilter`, `resolveUpdateScope`, `UpdateScope` | Incremental update |
|
|
176
|
+
| `store-cmd` | `runStore`, `parseStoreOptions`, `runStoreList`, `runStoreClean`, `runStoreUpdate`, `runStoreRemove`, `StoreOptions` | Ops: store/cache/index management |
|
|
177
|
+
| `use` | `runUse`, `parseUseOptions`, `buildUsePrompt`, `materializeUseSkill`, `launchAgentInteractively`, `UseOptions`, `MaterializedUseSkill` | one-shot use |
|
|
178
|
+
| `doctor` | `runDoctor` | Health check + link cleanup |
|
|
179
|
+
| `cli-handler` | `handleSkillsCli`, `renderBanner`, `renderHelp`, `SkillsCliDeps`, `SkillsCliResult` | CLI bridge for agent reuse |
|
|
180
|
+
| `interfaces` | `setGlobalAdapter`, `setInstanceAdapter`, `setAgentAdapter`, `getGlobal`, `getInstance`, `getHomeDir`, `getXdgData`, `getXdgConfig`, `getXdgState`, `getXdgCache`, `getProjectDirectory`, `resetGlobalAdapter`, `resetInstanceAdapter`, `hasAgentAdapter` | Path/Agent DI |
|
|
181
|
+
| `skill-lock` | `readSkillLock`, `writeSkillLock`, `addSkillToLock`, `removeSkillFromLock`, `getSkillFromLock`, `getGitHubToken`, `getAllLockedSkills`, `dismissPrompt`, `isPromptDismissed`, `resetGhAuthWarning` | Global lockfile |
|
|
182
|
+
| `local-lock` | `readLocalLock`, `writeLocalLock`, `addSkillToLocalLock`, `removeSkillFromLocalLock`, `computeSkillFolderHash`, `getLocalLockPath` | Project lockfile |
|
|
183
|
+
| `git` | `cloneRepo`, `cleanupTempDir`, `parseGitHubRepoUrl`, `isGitHubHttpsCloneUrl`, `isGitHubSsoAuthError`, `GitCloneError` | Git subprocess cloning with fallbacks |
|
|
184
|
+
| `blob` | `fetchRepoTree`, `findSkillMdPaths`, `getSkillFolderHashFromTree`, `tryBlobInstall`, `toSkillSlug`, `resetRepoTreeAuthState` | GitHub API blob fallback |
|
|
185
|
+
| `telemetry` | `track`, `flushTelemetry`, `setVersion`, `fetchAuditData`, `setDetectedAgent` | Usage stats + security |
|
|
186
|
+
| `sanitize` | `sanitizeMetadata`, `stripTerminalEscapes` | Output sanitization |
|
|
187
|
+
| `detect-agent` | `detectAgent`, `getAgentName`, `getAgentType`, `isRunningInAgent` | Agent environment detection |
|
|
188
|
+
| `providers/wellknown` | `wellKnownProvider`, `WellKnownProvider` | WellKnown host: parse index + pull SKILL.md |
|
|
189
|
+
| `providers/registry` | `findProvider`, `registerProvider`, `getProviders`, `registry` | Provider registry + HostProvider interface |
|
|
190
|
+
| `sources` | `registerSource`, `listSources`, `findSource`, `findSourcesByCategory`, `listAllEntries`, `createWellKnownSource`, `createLocalPluginSource` | PluginSource registry (voting 0044) |
|
|
102
191
|
| `frontmatter` | `parseFrontmatter` | YAML frontmatter parser |
|
|
103
|
-
| `
|
|
192
|
+
| `constants` | `AGENTS_DIR`, `SKILLS_SUBDIR`, `UNIVERSAL_SKILLS_DIR` | Convention directory constants |
|
|
193
|
+
| `utils/ansi` | `BOLD`, `DIM`, `RESET`, `TEXT`, `CYAN` etc. | ANSI terminal helpers |
|
|
194
|
+
|
|
195
|
+
## Supported Agent List (Complete)
|
|
196
|
+
|
|
197
|
+
The `AgentType` union in `types.ts` contains 70+ agent types, including:
|
|
104
198
|
|
|
105
|
-
|
|
199
|
+
`easbot`, `claude-code`, `cursor`, `codex`, `eve`, `opencode`, `aider-desk`, `amp`, `antigravity`, `astrbot`, `augment`, `autohand-code`, `bob`, `openClaw`, `cline`, `codearts-agent`, `codebuddy`, `codemaker`, `codestudio`, `command-code`, `continue`, `cortex`, `crush`, `deepagents`, `devin`, `depto`, `droid`, `firebender`, `forgecode`, `gemini-cli`, `github-copilot`, `goose`, `hermes-agent`, `inference-sh`, `iflow-cli`, `jazz`, `junie`, `kilo`, `kimi-code-cli`, `kiro-cli`, `kode`, `lingma`, `loaf`, `mcpjam`, `mistral-vibe`, `moxby`, `mux`, `neovate`, `openhands`, `om`, `pi`, `qoder`, `qoder-cn`, `qwen-code`, `replit`, `reasonix`, `roo`, `roodev`, `tabnine-cli`, `terramind`, `tinycloud`, `trae`, `trae-cn`, `warp`, `windsurf`, `zed`, `zencoder`, `zenflow`, `pochi`, `promptscript`, `adal`, `antigravity-cli`, `mistral`, plus the virtual type `universal`.
|
|
106
200
|
|
|
107
|
-
|
|
201
|
+
All agent configurations (displayName, skillsDir, globalSkillsDir, universal flag, install detection functions) are defined in `src/agents.ts`.
|
|
202
|
+
|
|
203
|
+
## Global Path Dependency Injection
|
|
204
|
+
|
|
205
|
+
To avoid conflicting with the host (agent/gateway) over XDG / home, `@easbot/skills` resolves paths through dependency injection by default:
|
|
108
206
|
|
|
109
207
|
```typescript
|
|
110
208
|
import {
|
|
111
209
|
setGlobalAdapter, // inject IGlobal.Path
|
|
112
210
|
setInstanceAdapter, // inject IInstance.directory / worktree
|
|
113
|
-
setAgentAdapter, // inject
|
|
211
|
+
setAgentAdapter, // inject SkillsAgentAdapter (subAgentRunner / localAgentRunner / triggerEvent)
|
|
114
212
|
getHomeDir,
|
|
115
213
|
getXdgConfig,
|
|
116
214
|
getXdgData,
|
|
@@ -121,8 +219,8 @@ setGlobalAdapter({
|
|
|
121
219
|
Path: {
|
|
122
220
|
home: '/Users/me',
|
|
123
221
|
data: '/Users/me/.local/share/easbot',
|
|
124
|
-
config: '
|
|
125
|
-
state: '
|
|
222
|
+
config: '...',
|
|
223
|
+
state: '...',
|
|
126
224
|
cache: '/Users/me/.cache/easbot',
|
|
127
225
|
log: '/Users/me/.local/state/easbot/log',
|
|
128
226
|
bin: '/Users/me/.local/bin',
|
|
@@ -135,20 +233,29 @@ setInstanceAdapter({
|
|
|
135
233
|
});
|
|
136
234
|
```
|
|
137
235
|
|
|
138
|
-
When no adapter is set, `@easbot/
|
|
236
|
+
When no adapter is set, `@easbot/schools` falls back to `xdg-basedir` + `homedir()`, keeping full backward compatibility with the v1 standalone CLI.
|
|
139
237
|
|
|
140
238
|
## Data Layout
|
|
141
239
|
|
|
142
240
|
| Path | Purpose |
|
|
143
241
|
|---|---|
|
|
144
|
-
| `${Global.Path.data}/skills/` |
|
|
145
|
-
| `${Global.Path.data}/
|
|
146
|
-
|
|
|
242
|
+
| `${Global.Path.data}/skills/` | Skills dir loaded by the agent at runtime |
|
|
243
|
+
| `${Global.Path.data}/skills/.skill-lock.json` | Global install lockfile (same root as store) |
|
|
244
|
+
| `${Global.Path.data}/skills/store/<sourceKey>/` | **Store physical dir** (sourceKey-hashed normalized source; written once by `add`, reused by `update`) |
|
|
245
|
+
| `${Global.Path.data}/skills/store/index.json` | **Store defs index** (key = skillName; records registryKey / type / url / skillPath / computedHash) |
|
|
246
|
+
| `${Global.Path.cache}/skills/cache/<owner>/<repo>/` | **Cache physical** (remote source download/materialize cache; local source = same as user directory) |
|
|
247
|
+
| `<cwd>/.agents/skills/` or `<cwd>/skills/` | Project-level skill directories |
|
|
147
248
|
| `<cwd>/skills-lock.json` | Project-level lockfile |
|
|
148
249
|
| `<home>/.config/easbot/skills/` | XDG config fallback |
|
|
149
250
|
|
|
150
251
|
> When delegated from `@easbot/agent`, everything lands under `${Global.Path.data}` — sibling to Gateway / MCP / Session / Contact modules.
|
|
151
252
|
|
|
253
|
+
## External Audit Hooks (skills.sh)
|
|
254
|
+
|
|
255
|
+
`telemetry.ts` sends telemetry/audit data back to skills.sh (configurable via `SKILLS_API_URL`) for:
|
|
256
|
+
- Skill audit (`fetchAuditData` returns per-skill `PartnerAudit` information)
|
|
257
|
+
- Security gate check (skipped with `--dangerously-accept-openclaw-risks` flag)
|
|
258
|
+
|
|
152
259
|
## Development
|
|
153
260
|
|
|
154
261
|
```bash
|
|
@@ -161,7 +268,7 @@ pnpm build
|
|
|
161
268
|
# Watch build
|
|
162
269
|
pnpm dev
|
|
163
270
|
|
|
164
|
-
# Tests (vitest
|
|
271
|
+
# Tests (vitest)
|
|
165
272
|
pnpm test
|
|
166
273
|
pnpm test:run
|
|
167
274
|
|
|
@@ -180,11 +287,11 @@ pnpm clean
|
|
|
180
287
|
## Publishing
|
|
181
288
|
|
|
182
289
|
```bash
|
|
183
|
-
# Linux /
|
|
184
|
-
|
|
290
|
+
# Linux /macOS
|
|
291
|
+
bash scripts/publish.sh
|
|
185
292
|
|
|
186
293
|
# Windows PowerShell
|
|
187
|
-
|
|
294
|
+
powershell -ExecutionPolicy Bypass -File scripts/publish.ps1
|
|
188
295
|
|
|
189
296
|
# Equivalent manual flow
|
|
190
297
|
pnpm build
|
|
@@ -193,8 +300,8 @@ pnpm publish --access public --git-checks false --registry https://registry.npmj
|
|
|
193
300
|
|
|
194
301
|
## Runtime Notes
|
|
195
302
|
|
|
196
|
-
- Uses Node built-ins (`fs/promises`, `
|
|
197
|
-
-
|
|
303
|
+
- Uses Node built-ins (`fs/promises`, `NODE:OS`, `node:path`, `node:child_process`); **not** browser-compatible.
|
|
304
|
+
- Dependencies: `simple-git`, `@vercel/detect-agent`, `@clack/prompts`, `picocolors`, `xd-basedir`, `zod`, `yaml`.
|
|
198
305
|
- `engines.node >= 22.22.3` — Node 22 LTS recommended.
|
|
199
306
|
|
|
200
307
|
## License
|