skills 1.5.10 → 1.5.11
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 +2 -2
- package/dist/cli.mjs +9 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -19,8 +19,8 @@ npx skills add vercel-labs/agent-skills
|
|
|
19
19
|
Generate a prompt for one skill, or start a supported coding agent interactively:
|
|
20
20
|
|
|
21
21
|
```bash
|
|
22
|
-
npx skills use vercel-labs/agent-skills@
|
|
23
|
-
npx skills use vercel-labs/agent-skills --skill
|
|
22
|
+
npx skills use vercel-labs/agent-skills@web-design-guidelines | claude
|
|
23
|
+
npx skills use vercel-labs/agent-skills --skill web-design-guidelines --agent claude-code
|
|
24
24
|
```
|
|
25
25
|
|
|
26
26
|
`skills use` resolves sources the same way as `skills add`, writes the selected skill files to a temporary directory, and prints only the generated prompt to stdout unless `--agent` is provided. With `--agent`, it starts one supported agent interactively with the generated prompt.
|
package/dist/cli.mjs
CHANGED
|
@@ -2763,6 +2763,7 @@ async function saveSelectedAgents(agents) {
|
|
|
2763
2763
|
await writeSkillLock(lock);
|
|
2764
2764
|
}
|
|
2765
2765
|
const DOWNLOAD_BASE_URL = process.env.SKILLS_DOWNLOAD_URL || "https://skills.sh";
|
|
2766
|
+
const BLOB_ALLOWED_REPOS = { "zapier/connectors": { downloadUrl: (slug) => `https://connectors-skills.zapier.com/download/${encodeURIComponent(slug)}/snapshot.json` } };
|
|
2766
2767
|
const FETCH_TIMEOUT = 1e4;
|
|
2767
2768
|
function toSkillSlug(name) {
|
|
2768
2769
|
return name.toLowerCase().replace(/[\s_]+/g, "-").replace(/[^a-z0-9-]/g, "").replace(/-+/g, "-").replace(/^-|-$/g, "");
|
|
@@ -2937,7 +2938,8 @@ async function fetchSkillMdContent(ownerRepo, branch, skillMdPath) {
|
|
|
2937
2938
|
async function fetchSkillDownload(source, slug) {
|
|
2938
2939
|
try {
|
|
2939
2940
|
const [owner, repo] = source.split("/");
|
|
2940
|
-
const
|
|
2941
|
+
const defaultUrl = `${DOWNLOAD_BASE_URL}/api/download/${encodeURIComponent(owner)}/${encodeURIComponent(repo)}/${encodeURIComponent(slug)}`;
|
|
2942
|
+
const url = BLOB_ALLOWED_REPOS[source.toLowerCase()]?.downloadUrl(slug) ?? defaultUrl;
|
|
2941
2943
|
const response = await fetch(url, { signal: AbortSignal.timeout(FETCH_TIMEOUT) });
|
|
2942
2944
|
if (!response.ok) return null;
|
|
2943
2945
|
return await response.json();
|
|
@@ -3018,7 +3020,7 @@ async function tryBlobInstall(ownerRepo, options = {}) {
|
|
|
3018
3020
|
tree
|
|
3019
3021
|
};
|
|
3020
3022
|
}
|
|
3021
|
-
var version$1 = "1.5.
|
|
3023
|
+
var version$1 = "1.5.11";
|
|
3022
3024
|
const isCancelled$1 = (value) => typeof value === "symbol";
|
|
3023
3025
|
async function isSourcePrivate(source) {
|
|
3024
3026
|
const ownerRepo = parseOwnerRepo(source);
|
|
@@ -3563,7 +3565,8 @@ async function runAdd(args, options = {}) {
|
|
|
3563
3565
|
];
|
|
3564
3566
|
const ownerRepo = getOwnerRepo(parsed);
|
|
3565
3567
|
const owner = ownerRepo?.split("/")[0]?.toLowerCase();
|
|
3566
|
-
|
|
3568
|
+
const isSelfHostedRepo = !!ownerRepo && Object.hasOwn(BLOB_ALLOWED_REPOS, ownerRepo.toLowerCase());
|
|
3569
|
+
if (ownerRepo && owner && (isSelfHostedRepo || BLOB_ALLOWED_OWNERS.includes(owner))) {
|
|
3567
3570
|
spinner.start("Fetching skills...");
|
|
3568
3571
|
blobResult = await tryBlobInstall(ownerRepo, {
|
|
3569
3572
|
subpath: parsed.subpath,
|
|
@@ -5748,9 +5751,9 @@ Options:
|
|
|
5748
5751
|
-h, --help Show this help message
|
|
5749
5752
|
|
|
5750
5753
|
Examples:
|
|
5751
|
-
skills use vercel-labs/agent-skills@
|
|
5752
|
-
skills use vercel-labs/agent-skills --skill
|
|
5753
|
-
skills use vercel-labs/agent-skills@
|
|
5754
|
+
skills use vercel-labs/agent-skills@web-design-guidelines | claude
|
|
5755
|
+
skills use vercel-labs/agent-skills --skill web-design-guidelines --agent claude-code
|
|
5756
|
+
skills use vercel-labs/agent-skills@web-design-guidelines --agent codex`;
|
|
5754
5757
|
}
|
|
5755
5758
|
function resolveSelector(sourceSelector, optionSelector) {
|
|
5756
5759
|
if (sourceSelector && optionSelector) {
|