skilld 0.8.2 → 0.9.0

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 CHANGED
@@ -159,6 +159,20 @@ skilld config
159
159
  | `skilld uninstall` | Remove all skilld data |
160
160
  | `skilld cache` | Cache management (clean expired LLM cache entries) |
161
161
 
162
+ ### Eject
163
+
164
+ Export a skill as a portable, self-contained directory with references copied as real files instead of symlinks. Useful for sharing skills via git repos.
165
+
166
+ ```bash
167
+ # Eject to the default skill directory
168
+ skilld add vue --eject
169
+
170
+ # Eject to a custom path
171
+ skilld add vue --eject ./skills/vue/
172
+ ```
173
+
174
+ The ejected skill contains `SKILL.md` plus a `references/` directory with docs, issues, and releases as real files. Share it via `skilld add owner/repo` — consumers get fully functional skills with no LLM cost.
175
+
162
176
  ### CLI Options
163
177
 
164
178
  | Option | Alias | Default | Description |
@@ -168,6 +182,7 @@ skilld config
168
182
  | `--yes` | `-y` | `false` | Skip prompts, use defaults |
169
183
  | `--force` | `-f` | `false` | Ignore all caches, re-fetch docs and regenerate |
170
184
  | `--model` | `-m` | config default | LLM model for skill generation (sonnet, haiku, opus, etc.) |
185
+ | `--eject` | `-e` | | Eject skill with references as real files (optional path override) |
171
186
  | `--debug` | | `false` | Save raw LLM output to logs/ for each section |
172
187
 
173
188
  ## The Landscape
@@ -997,7 +997,7 @@ function unlinkSkillFromAgents(skillName, cwd) {
997
997
  }
998
998
  function generateSkillMd(opts) {
999
999
  const header = generatePackageHeader(opts);
1000
- const search = opts.features?.search !== false ? generateSearchBlock(opts.name, opts.hasIssues, opts.hasReleases) : "";
1000
+ const search = !opts.eject && opts.features?.search !== false ? generateSearchBlock(opts.name, opts.hasIssues, opts.hasReleases) : "";
1001
1001
  const content = opts.body ? search ? `${header}\n\n${search}\n\n${opts.body}` : `${header}\n\n${opts.body}` : search ? `${header}\n\n${search}` : header;
1002
1002
  const footer = generateFooter(opts.relatedSkills);
1003
1003
  return sanitizeMarkdown(repairMarkdown(`${generateFrontmatter(opts)}${content}\n${footer}`));
@@ -1016,7 +1016,7 @@ function formatRelativeDate(isoDate) {
1016
1016
  const years = Math.floor(diffDays / 365);
1017
1017
  return `${years} year${years === 1 ? "" : "s"} ago`;
1018
1018
  }
1019
- function generatePackageHeader({ name, description, version, releasedAt, dependencies, distTags, repoUrl, hasIssues, hasDiscussions, hasReleases, pkgFiles, packages }) {
1019
+ function generatePackageHeader({ name, description, version, releasedAt, dependencies, distTags, repoUrl, hasIssues, hasDiscussions, hasReleases, pkgFiles, packages, eject }) {
1020
1020
  let title = `# ${name}`;
1021
1021
  if (repoUrl) {
1022
1022
  const url = repoUrl.startsWith("http") ? repoUrl : `https://github.com/${repoUrl}`;
@@ -1041,16 +1041,19 @@ function generatePackageHeader({ name, description, version, releasedAt, depende
1041
1041
  lines.push(`**Tags:** ${tags}`);
1042
1042
  }
1043
1043
  lines.push("");
1044
+ const refBase = eject ? "./references" : "./.skilld";
1044
1045
  const refs = [];
1045
- refs.push(`[package.json](./.skilld/pkg/package.json) — exports, entry points`);
1046
- if (packages && packages.length > 1) for (const pkg of packages) {
1047
- const shortName = pkg.name.split("/").pop().toLowerCase();
1048
- refs.push(`[pkg-${shortName}](./.skilld/pkg-${shortName}/package.json)`);
1046
+ if (!eject) {
1047
+ refs.push(`[package.json](${refBase}/pkg/package.json) exports, entry points`);
1048
+ if (packages && packages.length > 1) for (const pkg of packages) {
1049
+ const shortName = pkg.name.split("/").pop().toLowerCase();
1050
+ refs.push(`[pkg-${shortName}](${refBase}/pkg-${shortName}/package.json)`);
1051
+ }
1052
+ if (pkgFiles?.includes("README.md")) refs.push(`[README](${refBase}/pkg/README.md) — setup, basic usage`);
1049
1053
  }
1050
- if (pkgFiles?.includes("README.md")) refs.push(`[README](./.skilld/pkg/README.md) — setup, basic usage`);
1051
- if (hasIssues) refs.push(`[GitHub Issues](./.skilld/issues/_INDEX.md) — bugs, workarounds, edge cases`);
1052
- if (hasDiscussions) refs.push(`[GitHub Discussions](./.skilld/discussions/_INDEX.md) — Q&A, patterns, recipes`);
1053
- if (hasReleases) refs.push(`[Releases](./.skilld/releases/_INDEX.md) — changelog, breaking changes, new APIs`);
1054
+ if (hasIssues) refs.push(`[GitHub Issues](${refBase}/issues/_INDEX.md) — bugs, workarounds, edge cases`);
1055
+ if (hasDiscussions) refs.push(`[GitHub Discussions](${refBase}/discussions/_INDEX.md) — Q&A, patterns, recipes`);
1056
+ if (hasReleases) refs.push(`[Releases](${refBase}/releases/_INDEX.md) — changelog, breaking changes, new APIs`);
1054
1057
  if (refs.length > 0) lines.push(`**References:** ${refs.join(" • ")}`);
1055
1058
  return lines.join("\n");
1056
1059
  }