@elizaos/skills 2.0.0-alpha.98 → 2.0.3-beta.2
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 +41 -12
- package/dist/formatter.d.ts +1 -20
- package/dist/formatter.d.ts.map +1 -1
- package/dist/formatter.js +13 -67
- package/dist/frontmatter.d.ts +11 -28
- package/dist/frontmatter.d.ts.map +1 -1
- package/dist/frontmatter.js +78 -57
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -6
- package/dist/loader.d.ts +1 -1
- package/dist/loader.d.ts.map +1 -1
- package/dist/loader.js +16 -90
- package/dist/resolver.d.ts +16 -3
- package/dist/resolver.d.ts.map +1 -1
- package/dist/resolver.js +54 -23
- package/dist/types.d.ts +15 -99
- package/dist/types.d.ts.map +1 -1
- package/package.json +75 -53
- package/skills/apple-reminders/SKILL.md +1 -1
- package/skills/build-monetized-app/SKILL.md +144 -0
- package/skills/build-monetized-app/references/failure-modes.md +71 -0
- package/skills/build-monetized-app/references/sdk-flow.md +189 -0
- package/skills/build-monetized-app/references/survival-economics.md +64 -0
- package/skills/canvas/SKILL.md +2 -2
- package/skills/coding-agent/SKILL.md +20 -10
- package/skills/eliza/SKILL.md +43 -0
- package/skills/eliza/references/agent-orchestration.md +98 -0
- package/skills/eliza/references/capability-map.md +68 -0
- package/skills/eliza/references/plugin-and-skill-lifecycle.md +69 -0
- package/skills/eliza-app-development/SKILL.md +62 -0
- package/skills/eliza-app-development/references/plugin-and-app-build.md +81 -0
- package/skills/eliza-app-development/references/repo-map.md +70 -0
- package/skills/eliza-app-development/references/runtime-and-cloud.md +61 -0
- package/skills/eliza-cloud/SKILL.md +163 -0
- package/skills/eliza-cloud/references/apps-and-containers.md +73 -0
- package/skills/eliza-cloud/references/cloud-backend-and-monetization.md +145 -0
- package/skills/eliza-cloud/references/payments-and-promotion.md +610 -0
- package/skills/eliza-cloud-buy-domain/SKILL.md +104 -0
- package/skills/eliza-cloud-buy-domain/references/api-shape.md +77 -0
- package/skills/eliza-cloud-buy-domain/references/dns-and-ssl.md +25 -0
- package/skills/eliza-cloud-buy-domain/references/failure-modes.md +17 -0
- package/skills/eliza-cloud-manage-domain/SKILL.md +104 -0
- package/skills/eliza-cloud-manage-domain/references/api-shape.md +73 -0
- package/skills/eliza-cloud-manage-domain/references/dns-records.md +26 -0
- package/skills/eliza-cloud-manage-domain/references/failure-modes.md +14 -0
- package/skills/elizaos/SKILL.md +27 -0
- package/skills/elizaos/references/core-abstractions.md +101 -0
- package/skills/elizaos/references/plugin-development.md +74 -0
- package/skills/ordercli/SKILL.md +2 -8
- package/skills/skill-creator/SKILL.md +4 -4
- package/skills/skill-creator/scripts/init_skill.py +11 -11
- package/skills/skill-creator/scripts/package_skill.py +1 -8
- package/skills/skill-creator/scripts/quick_validate.py +1 -3
- package/skills/spotify-player/SKILL.md +2 -2
- package/skills/task-agent-eliza-bridge/SKILL.md +34 -0
- package/skills/tmux/SKILL.md +1 -1
- package/skills/weather/SKILL.md +2 -2
- package/skills/bear-notes/SKILL.md +0 -107
- package/skills/bird/SKILL.md +0 -224
- package/skills/blogwatcher/SKILL.md +0 -69
- package/skills/clawhub/SKILL.md +0 -77
- package/skills/crow/SKILL.md +0 -261
- package/skills/crow/references/api-reference.md +0 -370
- package/skills/crow/references/card-payments.md +0 -124
- package/skills/crow/references/error-handling.md +0 -154
- package/skills/crow/references/x402-flow.md +0 -170
- package/skills/eightctl/SKILL.md +0 -50
- package/skills/food-order/SKILL.md +0 -48
- package/skills/gemini/SKILL.md +0 -43
- package/skills/gifgrep/SKILL.md +0 -79
- package/skills/gog/SKILL.md +0 -116
- package/skills/goplaces/SKILL.md +0 -52
- package/skills/himalaya/SKILL.md +0 -257
- package/skills/himalaya/references/configuration.md +0 -184
- package/skills/himalaya/references/message-composition.md +0 -199
- package/skills/local-places/SERVER_README.md +0 -101
- package/skills/local-places/SKILL.md +0 -102
- package/skills/local-places/pyproject.toml +0 -21
- package/skills/local-places/src/local_places/__init__.py +0 -2
- package/skills/local-places/src/local_places/google_places.py +0 -314
- package/skills/local-places/src/local_places/main.py +0 -65
- package/skills/local-places/src/local_places/schemas.py +0 -107
- package/skills/mcporter/SKILL.md +0 -61
- package/skills/model-usage/SKILL.md +0 -69
- package/skills/model-usage/references/codexbar-cli.md +0 -33
- package/skills/model-usage/scripts/model_usage.py +0 -310
- package/skills/nightmarket/SKILL.md +0 -145
- package/skills/nightmarket/references/api.md +0 -176
- package/skills/nightmarket/references/crow-payments.md +0 -67
- package/skills/nightmarket/references/mcp.md +0 -53
- package/skills/openai-image-gen/SKILL.md +0 -89
- package/skills/openai-image-gen/scripts/gen.py +0 -240
- package/skills/openai-whisper/SKILL.md +0 -38
- package/skills/openai-whisper-api/SKILL.md +0 -52
- package/skills/openai-whisper-api/scripts/transcribe.sh +0 -85
- package/skills/openhue/SKILL.md +0 -51
- package/skills/oracle/SKILL.md +0 -125
- package/skills/peekaboo/SKILL.md +0 -190
- package/skills/sag/SKILL.md +0 -87
- package/skills/security-ask-questions-if-underspecified/SKILL.md +0 -61
- package/skills/security-audit-context-building/SKILL.md +0 -88
- package/skills/security-building-secure-contracts/SKILL.md +0 -75
- package/skills/security-burpsuite-project-parser/SKILL.md +0 -98
- package/skills/security-claude-in-chrome-troubleshooting/SKILL.md +0 -85
- package/skills/security-constant-time-analysis/SKILL.md +0 -116
- package/skills/security-culture-index/SKILL.md +0 -77
- package/skills/security-differential-review/SKILL.md +0 -94
- package/skills/security-dwarf-expert/SKILL.md +0 -73
- package/skills/security-entry-point-analyzer/SKILL.md +0 -78
- package/skills/security-firebase-apk-scanner/SKILL.md +0 -99
- package/skills/security-fix-review/SKILL.md +0 -73
- package/skills/security-insecure-defaults/SKILL.md +0 -73
- package/skills/security-modern-python/SKILL.md +0 -114
- package/skills/security-property-based-testing/SKILL.md +0 -122
- package/skills/semgrep-rule-creator/SKILL.md +0 -108
- package/skills/semgrep-rule-variant-creator/SKILL.md +0 -122
- package/skills/session-logs/SKILL.md +0 -115
- package/skills/sharp-edges/.claude-plugin/plugin.json +0 -10
- package/skills/sharp-edges/README.md +0 -47
- package/skills/sharp-edges/SKILL.md +0 -292
- package/skills/sharp-edges/skills/sharp-edges/SKILL.md +0 -292
- package/skills/sharp-edges/skills/sharp-edges/references/auth-patterns.md +0 -252
- package/skills/sharp-edges/skills/sharp-edges/references/case-studies.md +0 -274
- package/skills/sharp-edges/skills/sharp-edges/references/config-patterns.md +0 -333
- package/skills/sharp-edges/skills/sharp-edges/references/crypto-apis.md +0 -190
- package/skills/sharp-edges/skills/sharp-edges/references/lang-c.md +0 -205
- package/skills/sharp-edges/skills/sharp-edges/references/lang-csharp.md +0 -285
- package/skills/sharp-edges/skills/sharp-edges/references/lang-go.md +0 -270
- package/skills/sharp-edges/skills/sharp-edges/references/lang-java.md +0 -263
- package/skills/sharp-edges/skills/sharp-edges/references/lang-javascript.md +0 -269
- package/skills/sharp-edges/skills/sharp-edges/references/lang-kotlin.md +0 -265
- package/skills/sharp-edges/skills/sharp-edges/references/lang-php.md +0 -245
- package/skills/sharp-edges/skills/sharp-edges/references/lang-python.md +0 -274
- package/skills/sharp-edges/skills/sharp-edges/references/lang-ruby.md +0 -273
- package/skills/sharp-edges/skills/sharp-edges/references/lang-rust.md +0 -272
- package/skills/sharp-edges/skills/sharp-edges/references/lang-swift.md +0 -287
- package/skills/sharp-edges/skills/sharp-edges/references/language-specific.md +0 -588
- package/skills/sherpa-onnx-tts/SKILL.md +0 -103
- package/skills/sherpa-onnx-tts/bin/sherpa-onnx-tts +0 -178
- package/skills/songsee/SKILL.md +0 -49
- package/skills/sonoscli/SKILL.md +0 -46
- package/skills/spec-to-code-compliance/.claude-plugin/plugin.json +0 -10
- package/skills/spec-to-code-compliance/README.md +0 -67
- package/skills/spec-to-code-compliance/SKILL.md +0 -349
- package/skills/spec-to-code-compliance/commands/spec-compliance.md +0 -22
- package/skills/spec-to-code-compliance/skills/spec-to-code-compliance/SKILL.md +0 -349
- package/skills/spec-to-code-compliance/skills/spec-to-code-compliance/resources/COMPLETENESS_CHECKLIST.md +0 -69
- package/skills/spec-to-code-compliance/skills/spec-to-code-compliance/resources/IR_EXAMPLES.md +0 -417
- package/skills/spec-to-code-compliance/skills/spec-to-code-compliance/resources/OUTPUT_REQUIREMENTS.md +0 -105
- package/skills/static-analysis/.claude-plugin/plugin.json +0 -8
- package/skills/static-analysis/README.md +0 -59
- package/skills/static-analysis/SKILL.md +0 -89
- package/skills/static-analysis/skills/codeql/SKILL.md +0 -315
- package/skills/static-analysis/skills/sarif-parsing/SKILL.md +0 -479
- package/skills/static-analysis/skills/sarif-parsing/resources/jq-queries.md +0 -162
- package/skills/static-analysis/skills/sarif-parsing/resources/sarif_helpers.py +0 -331
- package/skills/static-analysis/skills/semgrep/SKILL.md +0 -337
- package/skills/summarize/SKILL.md +0 -87
- package/skills/testing-handbook-skills/.claude-plugin/plugin.json +0 -8
- package/skills/testing-handbook-skills/README.md +0 -241
- package/skills/testing-handbook-skills/SKILL.md +0 -104
- package/skills/testing-handbook-skills/scripts/pyproject.toml +0 -8
- package/skills/testing-handbook-skills/scripts/validate-skills.py +0 -657
- package/skills/testing-handbook-skills/skills/address-sanitizer/SKILL.md +0 -341
- package/skills/testing-handbook-skills/skills/aflpp/SKILL.md +0 -640
- package/skills/testing-handbook-skills/skills/atheris/SKILL.md +0 -522
- package/skills/testing-handbook-skills/skills/cargo-fuzz/SKILL.md +0 -460
- package/skills/testing-handbook-skills/skills/codeql/SKILL.md +0 -552
- package/skills/testing-handbook-skills/skills/constant-time-testing/SKILL.md +0 -512
- package/skills/testing-handbook-skills/skills/coverage-analysis/SKILL.md +0 -612
- package/skills/testing-handbook-skills/skills/fuzzing-dictionary/SKILL.md +0 -303
- package/skills/testing-handbook-skills/skills/fuzzing-obstacles/SKILL.md +0 -433
- package/skills/testing-handbook-skills/skills/harness-writing/SKILL.md +0 -621
- package/skills/testing-handbook-skills/skills/libafl/SKILL.md +0 -632
- package/skills/testing-handbook-skills/skills/libfuzzer/SKILL.md +0 -795
- package/skills/testing-handbook-skills/skills/ossfuzz/SKILL.md +0 -434
- package/skills/testing-handbook-skills/skills/ruzzy/SKILL.md +0 -443
- package/skills/testing-handbook-skills/skills/semgrep/SKILL.md +0 -605
- package/skills/testing-handbook-skills/skills/testing-handbook-generator/SKILL.md +0 -372
- package/skills/testing-handbook-skills/skills/testing-handbook-generator/agent-prompt.md +0 -280
- package/skills/testing-handbook-skills/skills/testing-handbook-generator/discovery.md +0 -452
- package/skills/testing-handbook-skills/skills/testing-handbook-generator/templates/domain-skill.md +0 -504
- package/skills/testing-handbook-skills/skills/testing-handbook-generator/templates/fuzzer-skill.md +0 -454
- package/skills/testing-handbook-skills/skills/testing-handbook-generator/templates/technique-skill.md +0 -527
- package/skills/testing-handbook-skills/skills/testing-handbook-generator/templates/tool-skill.md +0 -366
- package/skills/testing-handbook-skills/skills/testing-handbook-generator/testing.md +0 -482
- package/skills/testing-handbook-skills/skills/wycheproof/SKILL.md +0 -539
- package/skills/variant-analysis/SKILL.md +0 -89
- package/skills/video-frames/SKILL.md +0 -46
- package/skills/video-frames/scripts/frame.sh +0 -81
- package/skills/voice-call/SKILL.md +0 -45
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ Skills are markdown files that provide specialized instructions for AI agents to
|
|
|
14
14
|
```bash
|
|
15
15
|
npm install @elizaos/skills
|
|
16
16
|
# or
|
|
17
|
-
|
|
17
|
+
bun add @elizaos/skills
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
## Usage
|
|
@@ -49,7 +49,7 @@ const result = loadSkillsFromDir({
|
|
|
49
49
|
import { formatSkillsForPrompt } from "@elizaos/skills";
|
|
50
50
|
|
|
51
51
|
const prompt = formatSkillsForPrompt(skills);
|
|
52
|
-
// Returns
|
|
52
|
+
// Returns a compact structured skills section for system prompt
|
|
53
53
|
```
|
|
54
54
|
|
|
55
55
|
### Build Command Specs
|
|
@@ -62,14 +62,19 @@ const commands = buildSkillCommandSpecs(entries);
|
|
|
62
62
|
// Returns array of command specs for chat interfaces
|
|
63
63
|
```
|
|
64
64
|
|
|
65
|
+
## Bundled documentation skills
|
|
66
|
+
|
|
67
|
+
Alongside community-oriented skills, this package ships **`elizaos`**, **`eliza-cloud`**, and **`eliza-app-development`** — concise references for elizaOS runtime concepts, Eliza Cloud as a backend, and building elizaOS-based applications (including the Eliza app repository layout).
|
|
68
|
+
|
|
65
69
|
## Skill Discovery
|
|
66
70
|
|
|
67
71
|
Skills are loaded from multiple locations in precedence order (later overrides earlier):
|
|
68
72
|
|
|
69
73
|
1. **Bundled skills** - Included in this package (`skills/`)
|
|
70
|
-
2. **Managed skills** - User-installed skills (
|
|
71
|
-
3. **
|
|
72
|
-
4. **
|
|
74
|
+
2. **Managed skills** - User-installed skills (`<stateDir>/skills/`)
|
|
75
|
+
3. **Curated/active** - Human- or agent-promoted skills (`<stateDir>/skills/curated/active/`)
|
|
76
|
+
4. **Project skills** - Project-local skills (`<cwd>/.elizaos/skills/`)
|
|
77
|
+
5. **Explicit paths** - Via `skillPaths` option
|
|
73
78
|
|
|
74
79
|
## Skill Format
|
|
75
80
|
|
|
@@ -94,7 +99,7 @@ Detailed instructions for the AI agent...
|
|
|
94
99
|
|
|
95
100
|
| Field | Type | Description |
|
|
96
101
|
|-------|------|-------------|
|
|
97
|
-
| `name` | string | Skill name (
|
|
102
|
+
| `name` | string | Skill name (must match directory name) |
|
|
98
103
|
| `description` | string | Human-readable description (required) |
|
|
99
104
|
| `disable-model-invocation` | boolean | If true, skill won't appear in prompts |
|
|
100
105
|
| `user-invocable` | boolean | If false, can't be invoked via commands |
|
|
@@ -102,6 +107,8 @@ Detailed instructions for the AI agent...
|
|
|
102
107
|
| `required-os` | string[] | Required operating systems |
|
|
103
108
|
| `required-bins` | string[] | Required binaries in PATH |
|
|
104
109
|
| `required-env` | string[] | Required environment variables |
|
|
110
|
+
| `command-dispatch` | string | Set to `tool` to enable tool-dispatch in `buildSkillCommandSpecs` |
|
|
111
|
+
| `command-tool` | string | Tool name used when `command-dispatch: tool` |
|
|
105
112
|
|
|
106
113
|
## API Reference
|
|
107
114
|
|
|
@@ -110,17 +117,39 @@ Detailed instructions for the AI agent...
|
|
|
110
117
|
- `Skill` - Loaded skill with metadata
|
|
111
118
|
- `SkillFrontmatter` - Parsed frontmatter
|
|
112
119
|
- `SkillEntry` - Full skill entry with all metadata
|
|
120
|
+
- `SkillMetadata` - Resolved metadata (env, bins, os)
|
|
121
|
+
- `SkillInvocationPolicy` - Resolved invocation flags
|
|
122
|
+
- `SkillCommandSpec` - Command spec for chat interfaces
|
|
123
|
+
- `SkillProvenance` - Provenance tracking for the learning loop
|
|
113
124
|
- `LoadSkillsResult` - Result from loading skills
|
|
114
125
|
|
|
115
|
-
###
|
|
126
|
+
### Discovery / Resolution
|
|
116
127
|
|
|
117
128
|
- `getSkillsDir()` - Get bundled skills path
|
|
129
|
+
- `clearSkillsDirCache()` - Reset bundled-dir resolution cache
|
|
130
|
+
- `getCuratedActiveDir()` - `<stateDir>/skills/curated/active/`
|
|
131
|
+
- `getProposedSkillsDir()` - `<stateDir>/skills/curated/proposed/`
|
|
132
|
+
- `promoteSkill(name)` - Move a proposed skill to active atomically
|
|
133
|
+
|
|
134
|
+
### Loading
|
|
135
|
+
|
|
118
136
|
- `loadSkills(options?)` - Load from all locations
|
|
119
137
|
- `loadSkillsFromDir(options)` - Load from single directory
|
|
120
|
-
- `loadSkillEntries(options?)` - Load with full metadata
|
|
121
|
-
|
|
122
|
-
|
|
138
|
+
- `loadSkillEntries(options?)` - Load with full metadata parsed into `SkillEntry[]`
|
|
139
|
+
|
|
140
|
+
### Formatting
|
|
141
|
+
|
|
142
|
+
- `formatSkillsForPrompt(skills)` - Format `Skill[]` for system prompt
|
|
143
|
+
- `formatSkillEntriesForPrompt(entries)` - Same but from `SkillEntry[]` (respects invocation policy)
|
|
144
|
+
- `formatSkillSummary(skill)` - Single `"name: description"` string
|
|
145
|
+
- `formatSkillsList(skills)` - Newline-joined list
|
|
146
|
+
- `buildSkillCommandSpecs(entries, reservedNames?)` - Build command specs
|
|
123
147
|
|
|
124
|
-
|
|
148
|
+
### Frontmatter
|
|
125
149
|
|
|
126
|
-
|
|
150
|
+
- `parseFrontmatter(content)` - Parse YAML frontmatter from markdown string
|
|
151
|
+
- `stripFrontmatter(content)` - Return body without frontmatter
|
|
152
|
+
- `serializeSkillFile(frontmatter, body)` - Re-serialize frontmatter + body (learning loop)
|
|
153
|
+
- `resolveSkillMetadata(frontmatter)` - Resolve `SkillMetadata` from frontmatter
|
|
154
|
+
- `resolveSkillInvocationPolicy(frontmatter)` - Resolve `SkillInvocationPolicy`
|
|
155
|
+
- `resolveSkillProvenance(frontmatter)` - Resolve `SkillProvenance` (returns `undefined` if missing/malformed)
|
package/dist/formatter.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { Skill, SkillCommandSpec, SkillEntry } from "./types.js";
|
|
2
2
|
/**
|
|
3
3
|
* Format skills for inclusion in a system prompt.
|
|
4
|
-
* Uses
|
|
5
|
-
* See: https://agentskills.io/integrate-skills
|
|
4
|
+
* Uses compact structured text.
|
|
6
5
|
*
|
|
7
6
|
* Skills with disableModelInvocation=true are excluded from the prompt
|
|
8
7
|
* (they can only be invoked explicitly via /skill:name commands).
|
|
@@ -11,12 +10,6 @@ import type { Skill, SkillCommandSpec, SkillEntry } from "./types.js";
|
|
|
11
10
|
* @returns Formatted skills prompt section
|
|
12
11
|
*/
|
|
13
12
|
export declare function formatSkillsForPrompt(skills: Skill[]): string;
|
|
14
|
-
/**
|
|
15
|
-
* Format skill entries for prompt (filters by invocation policy)
|
|
16
|
-
*
|
|
17
|
-
* @param entries - Skill entries to format
|
|
18
|
-
* @returns Formatted skills prompt section
|
|
19
|
-
*/
|
|
20
13
|
export declare function formatSkillEntriesForPrompt(entries: SkillEntry[]): string;
|
|
21
14
|
/**
|
|
22
15
|
* Build command specifications from skill entries.
|
|
@@ -27,18 +20,6 @@ export declare function formatSkillEntriesForPrompt(entries: SkillEntry[]): stri
|
|
|
27
20
|
* @returns Array of skill command specifications
|
|
28
21
|
*/
|
|
29
22
|
export declare function buildSkillCommandSpecs(entries: SkillEntry[], reservedNames?: Set<string>): SkillCommandSpec[];
|
|
30
|
-
/**
|
|
31
|
-
* Format a single skill for display (minimal format)
|
|
32
|
-
*
|
|
33
|
-
* @param skill - Skill to format
|
|
34
|
-
* @returns Formatted skill string
|
|
35
|
-
*/
|
|
36
23
|
export declare function formatSkillSummary(skill: Skill): string;
|
|
37
|
-
/**
|
|
38
|
-
* Format skills as a simple list
|
|
39
|
-
*
|
|
40
|
-
* @param skills - Skills to format
|
|
41
|
-
* @returns Newline-separated list of skills
|
|
42
|
-
*/
|
|
43
24
|
export declare function formatSkillsList(skills: Skill[]): string;
|
|
44
25
|
//# sourceMappingURL=formatter.d.ts.map
|
package/dist/formatter.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatter.d.ts","sourceRoot":"","sources":["../src/formatter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"formatter.d.ts","sourceRoot":"","sources":["../src/formatter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAMtE;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,CAwB7D;AAED,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,UAAU,EAAE,GAAG,MAAM,CAMzE;AAsCD;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,UAAU,EAAE,EACrB,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,GAC1B,gBAAgB,EAAE,CA8DpB;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,CAEvD;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,CAExD"}
|
package/dist/formatter.js
CHANGED
|
@@ -1,21 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
* @param str - String to escape
|
|
5
|
-
* @returns XML-escaped string
|
|
6
|
-
*/
|
|
7
|
-
function escapeXml(str) {
|
|
8
|
-
return str
|
|
9
|
-
.replace(/&/g, "&")
|
|
10
|
-
.replace(/</g, "<")
|
|
11
|
-
.replace(/>/g, ">")
|
|
12
|
-
.replace(/"/g, """)
|
|
13
|
-
.replace(/'/g, "'");
|
|
1
|
+
function compactPromptField(str) {
|
|
2
|
+
return str.replace(/\s+/g, " ").trim();
|
|
14
3
|
}
|
|
15
4
|
/**
|
|
16
5
|
* Format skills for inclusion in a system prompt.
|
|
17
|
-
* Uses
|
|
18
|
-
* See: https://agentskills.io/integrate-skills
|
|
6
|
+
* Uses compact structured text.
|
|
19
7
|
*
|
|
20
8
|
* Skills with disableModelInvocation=true are excluded from the prompt
|
|
21
9
|
* (they can only be invoked explicitly via /skill:name commands).
|
|
@@ -33,47 +21,29 @@ export function formatSkillsForPrompt(skills) {
|
|
|
33
21
|
"Use the read tool to load a skill's file when the task matches its description.",
|
|
34
22
|
"When a skill file references a relative path, resolve it against the skill directory (parent of SKILL.md / dirname of the path) and use that absolute path in tool commands.",
|
|
35
23
|
"",
|
|
36
|
-
"
|
|
24
|
+
"available_skills:",
|
|
37
25
|
];
|
|
38
26
|
for (const skill of visibleSkills) {
|
|
39
|
-
lines.push(
|
|
40
|
-
lines.push(`
|
|
41
|
-
lines.push(` <description>${escapeXml(skill.description)}</description>`);
|
|
27
|
+
lines.push(`- name: ${compactPromptField(skill.name)}`);
|
|
28
|
+
lines.push(` description: ${compactPromptField(skill.description)}`);
|
|
42
29
|
if (skill.filePath) {
|
|
43
|
-
lines.push(`
|
|
30
|
+
lines.push(` location: ${compactPromptField(skill.filePath)}`);
|
|
44
31
|
}
|
|
45
|
-
lines.push(" </skill>");
|
|
46
32
|
}
|
|
47
|
-
lines.push("</available_skills>");
|
|
48
33
|
return lines.join("\n");
|
|
49
34
|
}
|
|
50
|
-
/**
|
|
51
|
-
* Format skill entries for prompt (filters by invocation policy)
|
|
52
|
-
*
|
|
53
|
-
* @param entries - Skill entries to format
|
|
54
|
-
* @returns Formatted skills prompt section
|
|
55
|
-
*/
|
|
56
35
|
export function formatSkillEntriesForPrompt(entries) {
|
|
57
36
|
const visibleSkills = entries
|
|
58
37
|
.filter((entry) => entry.invocation?.disableModelInvocation !== true)
|
|
59
38
|
.map((entry) => entry.skill);
|
|
60
39
|
return formatSkillsForPrompt(visibleSkills);
|
|
61
40
|
}
|
|
62
|
-
/** Maximum length for skill command names */
|
|
63
41
|
const SKILL_COMMAND_MAX_LENGTH = 32;
|
|
64
|
-
/** Fallback command name if sanitization produces empty string */
|
|
65
42
|
const SKILL_COMMAND_FALLBACK = "skill";
|
|
66
|
-
/** Maximum length for command descriptions (Discord limit) */
|
|
67
43
|
const SKILL_COMMAND_DESCRIPTION_MAX_LENGTH = 100;
|
|
68
|
-
/**
|
|
69
|
-
* Sanitize a skill name for use as a command name.
|
|
70
|
-
* Converts to lowercase, replaces invalid characters with underscores.
|
|
71
|
-
*
|
|
72
|
-
* @param raw - Raw skill name
|
|
73
|
-
* @returns Sanitized command name
|
|
74
|
-
*/
|
|
75
44
|
function sanitizeSkillCommandName(raw) {
|
|
76
|
-
const
|
|
45
|
+
const clamped = raw.length > 1024 ? raw.slice(0, 1024) : raw;
|
|
46
|
+
const normalized = clamped
|
|
77
47
|
.toLowerCase()
|
|
78
48
|
.replace(/[^a-z0-9_]+/g, "_")
|
|
79
49
|
.replace(/_+/g, "_")
|
|
@@ -81,19 +51,11 @@ function sanitizeSkillCommandName(raw) {
|
|
|
81
51
|
const trimmed = normalized.slice(0, SKILL_COMMAND_MAX_LENGTH);
|
|
82
52
|
return trimmed || SKILL_COMMAND_FALLBACK;
|
|
83
53
|
}
|
|
84
|
-
/**
|
|
85
|
-
* Resolve a unique command name by appending a numeric suffix if needed.
|
|
86
|
-
*
|
|
87
|
-
* @param base - Base command name
|
|
88
|
-
* @param used - Set of already-used command names (lowercase)
|
|
89
|
-
* @returns Unique command name
|
|
90
|
-
*/
|
|
91
54
|
function resolveUniqueSkillCommandName(base, used) {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
for (let index = 2; index < 1000; index += 1) {
|
|
55
|
+
for (let index = 1;; index += 1) {
|
|
56
|
+
if (index === 1 && !used.has(base.toLowerCase())) {
|
|
57
|
+
return base;
|
|
58
|
+
}
|
|
97
59
|
const suffix = `_${index}`;
|
|
98
60
|
const maxBaseLength = Math.max(1, SKILL_COMMAND_MAX_LENGTH - suffix.length);
|
|
99
61
|
const trimmedBase = base.slice(0, maxBaseLength);
|
|
@@ -103,8 +65,6 @@ function resolveUniqueSkillCommandName(base, used) {
|
|
|
103
65
|
return candidate;
|
|
104
66
|
}
|
|
105
67
|
}
|
|
106
|
-
const fallback = `${base.slice(0, Math.max(1, SKILL_COMMAND_MAX_LENGTH - 2))}_x`;
|
|
107
|
-
return fallback;
|
|
108
68
|
}
|
|
109
69
|
/**
|
|
110
70
|
* Build command specifications from skill entries.
|
|
@@ -115,7 +75,6 @@ function resolveUniqueSkillCommandName(base, used) {
|
|
|
115
75
|
* @returns Array of skill command specifications
|
|
116
76
|
*/
|
|
117
77
|
export function buildSkillCommandSpecs(entries, reservedNames) {
|
|
118
|
-
// Filter to user-invocable skills
|
|
119
78
|
const userInvocable = entries.filter((entry) => entry.invocation?.userInvocable !== false);
|
|
120
79
|
const used = new Set();
|
|
121
80
|
for (const reserved of reservedNames ?? []) {
|
|
@@ -131,7 +90,6 @@ export function buildSkillCommandSpecs(entries, reservedNames) {
|
|
|
131
90
|
const description = rawDescription.length > SKILL_COMMAND_DESCRIPTION_MAX_LENGTH
|
|
132
91
|
? `${rawDescription.slice(0, SKILL_COMMAND_DESCRIPTION_MAX_LENGTH - 1)}…`
|
|
133
92
|
: rawDescription;
|
|
134
|
-
// Parse dispatch configuration from frontmatter
|
|
135
93
|
const dispatch = (() => {
|
|
136
94
|
const kindRaw = (entry.frontmatter?.["command-dispatch"] ??
|
|
137
95
|
entry.frontmatter?.command_dispatch ??
|
|
@@ -161,21 +119,9 @@ export function buildSkillCommandSpecs(entries, reservedNames) {
|
|
|
161
119
|
}
|
|
162
120
|
return specs;
|
|
163
121
|
}
|
|
164
|
-
/**
|
|
165
|
-
* Format a single skill for display (minimal format)
|
|
166
|
-
*
|
|
167
|
-
* @param skill - Skill to format
|
|
168
|
-
* @returns Formatted skill string
|
|
169
|
-
*/
|
|
170
122
|
export function formatSkillSummary(skill) {
|
|
171
123
|
return `${skill.name}: ${skill.description}`;
|
|
172
124
|
}
|
|
173
|
-
/**
|
|
174
|
-
* Format skills as a simple list
|
|
175
|
-
*
|
|
176
|
-
* @param skills - Skills to format
|
|
177
|
-
* @returns Newline-separated list of skills
|
|
178
|
-
*/
|
|
179
125
|
export function formatSkillsList(skills) {
|
|
180
126
|
return skills.map(formatSkillSummary).join("\n");
|
|
181
127
|
}
|
package/dist/frontmatter.d.ts
CHANGED
|
@@ -1,39 +1,22 @@
|
|
|
1
|
-
import type { SkillFrontmatter, SkillInvocationPolicy, SkillMetadata } from "./types.js";
|
|
2
|
-
/**
|
|
3
|
-
* Result of parsing frontmatter from a file
|
|
4
|
-
*/
|
|
1
|
+
import type { SkillFrontmatter, SkillInvocationPolicy, SkillMetadata, SkillProvenance } from "./types.js";
|
|
5
2
|
export interface ParsedFrontmatter<T extends Record<string, unknown>> {
|
|
6
|
-
/** Parsed frontmatter object */
|
|
7
3
|
frontmatter: T;
|
|
8
|
-
/** Remaining body content after frontmatter */
|
|
9
4
|
body: string;
|
|
10
5
|
}
|
|
11
|
-
/**
|
|
12
|
-
* Parse YAML frontmatter from markdown content
|
|
13
|
-
*
|
|
14
|
-
* @param content - Raw file content with optional YAML frontmatter
|
|
15
|
-
* @returns Parsed frontmatter object and remaining body
|
|
16
|
-
*/
|
|
17
6
|
export declare function parseFrontmatter<T extends Record<string, unknown> = Record<string, unknown>>(content: string): ParsedFrontmatter<T>;
|
|
18
|
-
/**
|
|
19
|
-
* Strip frontmatter from content and return only the body
|
|
20
|
-
*
|
|
21
|
-
* @param content - Raw file content with optional YAML frontmatter
|
|
22
|
-
* @returns Content without frontmatter
|
|
23
|
-
*/
|
|
24
7
|
export declare function stripFrontmatter(content: string): string;
|
|
8
|
+
export declare function resolveSkillMetadata(frontmatter: SkillFrontmatter): SkillMetadata;
|
|
9
|
+
export declare function resolveSkillInvocationPolicy(frontmatter: SkillFrontmatter): SkillInvocationPolicy;
|
|
25
10
|
/**
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
* @returns Normalized metadata object
|
|
11
|
+
* Best-effort provenance parsing from a frontmatter block. Returns `undefined`
|
|
12
|
+
* when the block is missing or malformed (we do not fail loading on bad
|
|
13
|
+
* provenance — it is informational metadata).
|
|
30
14
|
*/
|
|
31
|
-
export declare function
|
|
15
|
+
export declare function resolveSkillProvenance(frontmatter: SkillFrontmatter): SkillProvenance | undefined;
|
|
32
16
|
/**
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
* @returns Invocation policy
|
|
17
|
+
* Serialize a SKILL.md file with updated frontmatter, preserving body content.
|
|
18
|
+
* Used by the closed learning loop to rewrite provenance after refinement and
|
|
19
|
+
* scoring.
|
|
37
20
|
*/
|
|
38
|
-
export declare function
|
|
21
|
+
export declare function serializeSkillFile(frontmatter: SkillFrontmatter, body: string): string;
|
|
39
22
|
//# sourceMappingURL=frontmatter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"frontmatter.d.ts","sourceRoot":"","sources":["../src/frontmatter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,gBAAgB,EAChB,qBAAqB,EACrB,aAAa,
|
|
1
|
+
{"version":3,"file":"frontmatter.d.ts","sourceRoot":"","sources":["../src/frontmatter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,gBAAgB,EAChB,qBAAqB,EACrB,aAAa,EACb,eAAe,EAChB,MAAM,YAAY,CAAC;AAEpB,MAAM,WAAW,iBAAiB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAClE,WAAW,EAAE,CAAC,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd;AAkDD,wBAAgB,gBAAgB,CAC9B,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC3D,OAAO,EAAE,MAAM,GAAG,iBAAiB,CAAC,CAAC,CAAC,CAOvC;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAExD;AAED,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,gBAAgB,GAC5B,aAAa,CAqCf;AAED,wBAAgB,4BAA4B,CAC1C,WAAW,EAAE,gBAAgB,GAC5B,qBAAqB,CAsBvB;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,WAAW,EAAE,gBAAgB,GAC5B,eAAe,GAAG,SAAS,CAuC7B;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,WAAW,EAAE,gBAAgB,EAC7B,IAAI,EAAE,MAAM,GACX,MAAM,CAIR"}
|
package/dist/frontmatter.js
CHANGED
|
@@ -1,14 +1,23 @@
|
|
|
1
|
-
import { parse } from "yaml";
|
|
2
|
-
/**
|
|
3
|
-
* Normalize line endings to Unix-style LF
|
|
4
|
-
*/
|
|
1
|
+
import { parse, stringify } from "yaml";
|
|
5
2
|
function normalizeNewlines(value) {
|
|
6
3
|
return value.replace(/\r\n/g, "\n").replace(/\r/g, "\n");
|
|
7
4
|
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
function isRecord(value) {
|
|
6
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
7
|
+
}
|
|
8
|
+
function frontmatterValue(frontmatter, kebabKey, snakeKey) {
|
|
9
|
+
return frontmatter[kebabKey] ?? frontmatter[snakeKey];
|
|
10
|
+
}
|
|
11
|
+
function stringList(value, transform) {
|
|
12
|
+
if (!Array.isArray(value)) {
|
|
13
|
+
return undefined;
|
|
14
|
+
}
|
|
15
|
+
const out = value
|
|
16
|
+
.filter((item) => typeof item === "string")
|
|
17
|
+
.map(transform)
|
|
18
|
+
.filter((item) => item.length > 0);
|
|
19
|
+
return out.length > 0 ? out : undefined;
|
|
20
|
+
}
|
|
12
21
|
function extractFrontmatter(content) {
|
|
13
22
|
const normalized = normalizeNewlines(content);
|
|
14
23
|
if (!normalized.startsWith("---")) {
|
|
@@ -23,12 +32,6 @@ function extractFrontmatter(content) {
|
|
|
23
32
|
body: normalized.slice(endIndex + 4).trim(),
|
|
24
33
|
};
|
|
25
34
|
}
|
|
26
|
-
/**
|
|
27
|
-
* Parse YAML frontmatter from markdown content
|
|
28
|
-
*
|
|
29
|
-
* @param content - Raw file content with optional YAML frontmatter
|
|
30
|
-
* @returns Parsed frontmatter object and remaining body
|
|
31
|
-
*/
|
|
32
35
|
export function parseFrontmatter(content) {
|
|
33
36
|
const { yamlString, body } = extractFrontmatter(content);
|
|
34
37
|
if (!yamlString) {
|
|
@@ -37,69 +40,87 @@ export function parseFrontmatter(content) {
|
|
|
37
40
|
const parsed = parse(yamlString);
|
|
38
41
|
return { frontmatter: (parsed ?? {}), body };
|
|
39
42
|
}
|
|
40
|
-
/**
|
|
41
|
-
* Strip frontmatter from content and return only the body
|
|
42
|
-
*
|
|
43
|
-
* @param content - Raw file content with optional YAML frontmatter
|
|
44
|
-
* @returns Content without frontmatter
|
|
45
|
-
*/
|
|
46
43
|
export function stripFrontmatter(content) {
|
|
47
44
|
return parseFrontmatter(content).body;
|
|
48
45
|
}
|
|
49
|
-
/**
|
|
50
|
-
* Resolve Otto-specific metadata from skill frontmatter
|
|
51
|
-
*
|
|
52
|
-
* @param frontmatter - Parsed skill frontmatter
|
|
53
|
-
* @returns Normalized metadata object
|
|
54
|
-
*/
|
|
55
46
|
export function resolveSkillMetadata(frontmatter) {
|
|
56
47
|
const metadata = {};
|
|
57
|
-
|
|
58
|
-
const primaryEnv = frontmatter["primary-env"] ?? frontmatter.primary_env;
|
|
48
|
+
const primaryEnv = frontmatterValue(frontmatter, "primary-env", "primary_env");
|
|
59
49
|
if (typeof primaryEnv === "string" && primaryEnv.trim()) {
|
|
60
50
|
metadata.primaryEnv = primaryEnv.trim();
|
|
61
51
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
metadata.requiredOs = requiredOs
|
|
66
|
-
.filter((os) => typeof os === "string")
|
|
67
|
-
.map((os) => os.trim().toLowerCase());
|
|
52
|
+
const requiredOs = stringList(frontmatterValue(frontmatter, "required-os", "required_os"), (os) => os.trim().toLowerCase());
|
|
53
|
+
if (requiredOs) {
|
|
54
|
+
metadata.requiredOs = requiredOs;
|
|
68
55
|
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
metadata.requiredBins = requiredBins
|
|
73
|
-
.filter((bin) => typeof bin === "string")
|
|
74
|
-
.map((bin) => bin.trim());
|
|
56
|
+
const requiredBins = stringList(frontmatterValue(frontmatter, "required-bins", "required_bins"), (bin) => bin.trim());
|
|
57
|
+
if (requiredBins) {
|
|
58
|
+
metadata.requiredBins = requiredBins;
|
|
75
59
|
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
metadata.requiredEnv = requiredEnv
|
|
80
|
-
.filter((env) => typeof env === "string")
|
|
81
|
-
.map((env) => env.trim());
|
|
60
|
+
const requiredEnv = stringList(frontmatterValue(frontmatter, "required-env", "required_env"), (env) => env.trim());
|
|
61
|
+
if (requiredEnv) {
|
|
62
|
+
metadata.requiredEnv = requiredEnv;
|
|
82
63
|
}
|
|
83
64
|
return metadata;
|
|
84
65
|
}
|
|
85
|
-
/**
|
|
86
|
-
* Resolve skill invocation policy from frontmatter
|
|
87
|
-
*
|
|
88
|
-
* @param frontmatter - Parsed skill frontmatter
|
|
89
|
-
* @returns Invocation policy
|
|
90
|
-
*/
|
|
91
66
|
export function resolveSkillInvocationPolicy(frontmatter) {
|
|
92
67
|
const policy = {};
|
|
93
|
-
|
|
94
|
-
const disableModelInvocation = frontmatter["disable-model-invocation"] ??
|
|
95
|
-
frontmatter.disable_model_invocation;
|
|
68
|
+
const disableModelInvocation = frontmatterValue(frontmatter, "disable-model-invocation", "disable_model_invocation");
|
|
96
69
|
if (disableModelInvocation === true) {
|
|
97
70
|
policy.disableModelInvocation = true;
|
|
98
71
|
}
|
|
99
|
-
|
|
100
|
-
const userInvocable = frontmatter["user-invocable"] ?? frontmatter.user_invocable;
|
|
72
|
+
const userInvocable = frontmatterValue(frontmatter, "user-invocable", "user_invocable");
|
|
101
73
|
if (userInvocable === false) {
|
|
102
74
|
policy.userInvocable = false;
|
|
103
75
|
}
|
|
104
76
|
return policy;
|
|
105
77
|
}
|
|
78
|
+
/**
|
|
79
|
+
* Best-effort provenance parsing from a frontmatter block. Returns `undefined`
|
|
80
|
+
* when the block is missing or malformed (we do not fail loading on bad
|
|
81
|
+
* provenance — it is informational metadata).
|
|
82
|
+
*/
|
|
83
|
+
export function resolveSkillProvenance(frontmatter) {
|
|
84
|
+
const raw = frontmatter.provenance;
|
|
85
|
+
if (!isRecord(raw)) {
|
|
86
|
+
return undefined;
|
|
87
|
+
}
|
|
88
|
+
const source = raw.source;
|
|
89
|
+
if (source !== "human" &&
|
|
90
|
+
source !== "agent-generated" &&
|
|
91
|
+
source !== "agent-refined") {
|
|
92
|
+
return undefined;
|
|
93
|
+
}
|
|
94
|
+
const createdAt = typeof raw.createdAt === "string" ? raw.createdAt : undefined;
|
|
95
|
+
if (!createdAt) {
|
|
96
|
+
return undefined;
|
|
97
|
+
}
|
|
98
|
+
const refinedCountRaw = raw.refinedCount;
|
|
99
|
+
const refinedCount = typeof refinedCountRaw === "number" && Number.isFinite(refinedCountRaw)
|
|
100
|
+
? Math.max(0, Math.floor(refinedCountRaw))
|
|
101
|
+
: 0;
|
|
102
|
+
const provenance = {
|
|
103
|
+
source,
|
|
104
|
+
createdAt,
|
|
105
|
+
refinedCount,
|
|
106
|
+
};
|
|
107
|
+
if (typeof raw.derivedFromTrajectory === "string") {
|
|
108
|
+
provenance.derivedFromTrajectory = raw.derivedFromTrajectory;
|
|
109
|
+
}
|
|
110
|
+
if (typeof raw.lastEvalScore === "number" &&
|
|
111
|
+
Number.isFinite(raw.lastEvalScore)) {
|
|
112
|
+
const score = raw.lastEvalScore;
|
|
113
|
+
provenance.lastEvalScore = Math.max(0, Math.min(1, score));
|
|
114
|
+
}
|
|
115
|
+
return provenance;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Serialize a SKILL.md file with updated frontmatter, preserving body content.
|
|
119
|
+
* Used by the closed learning loop to rewrite provenance after refinement and
|
|
120
|
+
* scoring.
|
|
121
|
+
*/
|
|
122
|
+
export function serializeSkillFile(frontmatter, body) {
|
|
123
|
+
const yaml = stringify(frontmatter).trimEnd();
|
|
124
|
+
const trimmedBody = body.replace(/^\n+/, "");
|
|
125
|
+
return `---\n${yaml}\n---\n\n${trimmedBody}`;
|
|
126
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
* ```
|
|
23
23
|
*/
|
|
24
24
|
export { buildSkillCommandSpecs, formatSkillEntriesForPrompt, formatSkillSummary, formatSkillsForPrompt, formatSkillsList, } from "./formatter.js";
|
|
25
|
-
export { type ParsedFrontmatter, parseFrontmatter, resolveSkillInvocationPolicy, resolveSkillMetadata, stripFrontmatter, } from "./frontmatter.js";
|
|
25
|
+
export { type ParsedFrontmatter, parseFrontmatter, resolveSkillInvocationPolicy, resolveSkillMetadata, resolveSkillProvenance, serializeSkillFile, stripFrontmatter, } from "./frontmatter.js";
|
|
26
26
|
export { loadSkillEntries, loadSkills, loadSkillsFromDir } from "./loader.js";
|
|
27
|
-
export { clearSkillsDirCache, getSkillsDir } from "./resolver.js";
|
|
28
|
-
export type { LoadSkillsFromDirOptions, LoadSkillsOptions, LoadSkillsResult, Skill, SkillActionDefinition, SkillCommandSpec, SkillDiagnostic, SkillEntry, SkillFrontmatter, SkillInvocationPolicy, SkillMetadata, SkillProviderDefinition, SkillToolDefinition, } from "./types.js";
|
|
27
|
+
export { clearSkillsDirCache, getCuratedActiveDir, getProposedSkillsDir, getSkillsDir, promoteSkill, } from "./resolver.js";
|
|
28
|
+
export type { LoadSkillsFromDirOptions, LoadSkillsOptions, LoadSkillsResult, Skill, SkillActionDefinition, SkillCommandSpec, SkillDiagnostic, SkillEntry, SkillFrontmatter, SkillInvocationPolicy, SkillMetadata, SkillProvenance, SkillProviderDefinition, SkillToolDefinition, } from "./types.js";
|
|
29
29
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EACL,sBAAsB,EACtB,2BAA2B,EAC3B,kBAAkB,EAClB,qBAAqB,EACrB,gBAAgB,GACjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,KAAK,iBAAiB,EACtB,gBAAgB,EAChB,4BAA4B,EAC5B,oBAAoB,EACpB,sBAAsB,EACtB,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAC9E,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACpB,YAAY,EACZ,YAAY,GACb,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,wBAAwB,EACxB,iBAAiB,EACjB,gBAAgB,EAChB,KAAK,EACL,qBAAqB,EACrB,gBAAgB,EAChB,eAAe,EACf,UAAU,EACV,gBAAgB,EAChB,qBAAqB,EACrB,aAAa,EACb,eAAe,EACf,uBAAuB,EACvB,mBAAmB,GACpB,MAAM,YAAY,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -21,11 +21,7 @@
|
|
|
21
21
|
* const prompt = formatSkillsForPrompt(skills);
|
|
22
22
|
* ```
|
|
23
23
|
*/
|
|
24
|
-
// Prompt formatting
|
|
25
24
|
export { buildSkillCommandSpecs, formatSkillEntriesForPrompt, formatSkillSummary, formatSkillsForPrompt, formatSkillsList, } from "./formatter.js";
|
|
26
|
-
|
|
27
|
-
export { parseFrontmatter, resolveSkillInvocationPolicy, resolveSkillMetadata, stripFrontmatter, } from "./frontmatter.js";
|
|
28
|
-
// Skill loading
|
|
25
|
+
export { parseFrontmatter, resolveSkillInvocationPolicy, resolveSkillMetadata, resolveSkillProvenance, serializeSkillFile, stripFrontmatter, } from "./frontmatter.js";
|
|
29
26
|
export { loadSkillEntries, loadSkills, loadSkillsFromDir } from "./loader.js";
|
|
30
|
-
|
|
31
|
-
export { clearSkillsDirCache, getSkillsDir } from "./resolver.js";
|
|
27
|
+
export { clearSkillsDirCache, getCuratedActiveDir, getProposedSkillsDir, getSkillsDir, promoteSkill, } from "./resolver.js";
|
package/dist/loader.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export declare function loadSkillsFromDir(options: LoadSkillsFromDirOptions): Lo
|
|
|
15
15
|
*
|
|
16
16
|
* Sources are loaded in precedence order (later sources override earlier):
|
|
17
17
|
* 1. Bundled skills (from this package)
|
|
18
|
-
* 2. User/managed skills (
|
|
18
|
+
* 2. User/managed skills (<stateDir>/skills)
|
|
19
19
|
* 3. Project skills (<cwd>/.elizaos/skills)
|
|
20
20
|
* 4. Explicit skill paths
|
|
21
21
|
*
|
package/dist/loader.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../src/loader.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../src/loader.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EACV,wBAAwB,EACxB,iBAAiB,EACjB,gBAAgB,EAGhB,UAAU,EAEX,MAAM,YAAY,CAAC;AA0JpB;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,wBAAwB,GAChC,gBAAgB,CAGlB;AA0BD;;;;;;;;;;;GAWG;AACH,wBAAgB,UAAU,CAAC,OAAO,GAAE,iBAAsB,GAAG,gBAAgB,CAkH5E;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,GAAE,iBAAsB,GAC9B,UAAU,EAAE,CAkBd"}
|