skilld 0.11.0 β†’ 0.11.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 CHANGED
@@ -30,7 +30,7 @@ Skilld generates [agent skills](https://agentskills.io/home) from the docs maint
30
30
  - 🌍 **Any Source: Opt-in** - Any NPM dependency or GitHub source, docs auto-resolved
31
31
  - πŸ“¦ **Bleeding Edge Context** - Latest issues, discussions, and releases synced on
32
32
  every update. Always use the latest best practices and avoid deprecated patterns.
33
- - πŸ“š **Opt-in LLM Sections** - Enhance skills with LLM-generated `Best practices`, `API Changes`, `Doc Map`, or your own prompts
33
+ - πŸ“š **Opt-in LLM Sections** - Enhance skills with LLM-generated `Best Practices`, `API Changes`, or your own custom prompts
34
34
  - πŸ” **Semantic Search** - Query indexed docs across all skills via [retriv](https://github.com/harlan-zw/retriv) embeddings
35
35
  - 🎯 **Safe & Versioned** - Prompt injection sanitization, version-aware caching, auto-updates on new releases
36
36
  - 🀝 **Ecosystem** - Compatible with [`npx skills`](https://skills.sh/) and [skills-npm](https://github.com/antfu/skills-npm)
@@ -612,15 +612,17 @@ function apiChangesSection({ packageName, version, hasReleases, hasChangelog, ha
612
612
  useFor: "Skip unless searching a specific removed API"
613
613
  });
614
614
  const releaseGuidance = hasReleases ? `\n\n**Scan release history:** Read \`./.skilld/releases/_INDEX.md\` for a timeline. Focus on [MAJOR] and [MINOR] releases β€” these contain breaking changes and renamed/deprecated APIs that LLMs trained on older data will get wrong.` : "";
615
- const versionGuidance = major && minor ? `\n\n**Item scoring** β€” include only items scoring β‰₯ 3:
615
+ const versionGuidance = major && minor ? `\n\n**Item scoring** β€” include only items scoring β‰₯ 3. Items scoring 0 MUST be excluded:
616
616
 
617
- | Change type | v${major}.x | v${Number(major) - 1}.x | Older |
617
+ | Change type | v${major}.x | v${Number(major) - 1}.x β†’ v${major}.x migration | Older |
618
618
  |-------------|:---:|:---:|:---:|
619
- | Silent breakage (compiles, wrong result) | 5 | 4 | 2 |
619
+ | Silent breakage (compiles, wrong result) | 5 | 4 | 0 |
620
620
  | Removed/breaking API | 5 | 3 | 0 |
621
621
  | New API unknown to LLMs | 4 | 1 | 0 |
622
622
  | Deprecated (still works) | 3 | 1 | 0 |
623
- | Renamed/moved | 3 | 1 | 0 |` : "";
623
+ | Renamed/moved | 3 | 1 | 0 |
624
+
625
+ The "Older" column means ≀ v${Number(major) - 2}.x β€” these changes are NOT useful because anyone on v${major}.x already migrated past them.` : "";
624
626
  return {
625
627
  referenceWeights,
626
628
  task: `**Find new, deprecated, and renamed APIs from version history.** Focus exclusively on APIs that changed between versions β€” LLMs trained on older data will use the wrong names, wrong signatures, or non-existent functions.
@@ -646,9 +648,10 @@ This section documents version-specific API changes β€” prioritize recent major/
646
648
  Each item: BREAKING/DEPRECATED/NEW label + API name + what changed + source link. All source links MUST use \`./.skilld/\` prefix (e.g., \`[source](./.skilld/releases/v2.0.0.md)\`). Do NOT use emoji β€” use plain text markers only.`,
647
649
  rules: [
648
650
  `- **API Changes:** ${maxItems(6, 12, enabledSectionCount)} items from version history, MAX ${maxLines(50, 80, enabledSectionCount)} lines`,
649
- "- Prioritize recent major/minor releases over old patch versions",
651
+ "- **Recency:** Only include changes from the current major version and the previous→current migration. Exclude changes from older major versions entirely — users already migrated past them",
650
652
  "- Focus on APIs that CHANGED, not general conventions or gotchas",
651
653
  "- New APIs get NEW: prefix, deprecated/breaking get BREAKING: or DEPRECATED: prefix",
654
+ "- **Experimental APIs:** Append `(experimental)` to any API behind an experimental/unstable import path or flag. MAX 2 experimental items",
652
655
  hasReleases ? "- Start with `./.skilld/releases/_INDEX.md` to identify recent major/minor releases, then read specific release files" : "",
653
656
  hasChangelog ? "- Scan CHANGELOG.md for version headings, focus on Features/Breaking Changes sections" : ""
654
657
  ].filter(Boolean)
@@ -721,7 +724,7 @@ Each item: markdown list item (-) + ${packageName}-specific pattern + why it's p
721
724
  `- **MAX ${maxLines(80, 150, enabledSectionCount)} lines** for best practices section`,
722
725
  "- **Verify before including:** Confirm file paths exist via Glob/Read before linking. Confirm functions/composables are real exports in `./.skilld/pkg/` `.d.ts` files before documenting",
723
726
  "- **Diversity:** Cover at least 3 distinct areas of the library. No single feature should have more than 40% of items",
724
- "- **Experimental APIs:** Mark unstable/experimental features with `(experimental)` in the description. Prioritize stable patterns"
727
+ "- **Experimental APIs:** Mark unstable/experimental features with `(experimental)` in the description. **MAX 1 experimental item** β€” prioritize stable, production-ready patterns that most users need"
725
728
  ]
726
729
  };
727
730
  }
@@ -737,85 +740,14 @@ Content addressing the user's instructions above, using concise examples and sou
737
740
  rules: [`- **Custom section "${heading}":** MAX ${maxLines(50, 80, enabledSectionCount)} lines, use \`## ${heading}\` heading`]
738
741
  };
739
742
  }
740
- function apiSection({ hasReleases, hasChangelog, hasDocs, hasIssues, hasDiscussions, enabledSectionCount }) {
741
- const referenceWeights = [];
742
- if (hasDocs) referenceWeights.push({
743
- name: "Docs",
744
- path: "./.skilld/docs/",
745
- score: 10,
746
- useFor: "Primary source β€” scan all doc pages for export names"
747
- });
748
- if (hasReleases) referenceWeights.push({
749
- name: "Releases",
750
- path: "./.skilld/releases/_INDEX.md",
751
- score: 5,
752
- useFor: "New APIs added in recent versions"
753
- });
754
- if (hasChangelog) referenceWeights.push({
755
- name: "Changelog",
756
- path: `./.skilld/${hasChangelog}`,
757
- score: 5,
758
- useFor: "New APIs added in recent versions"
759
- });
760
- referenceWeights.push({
761
- name: "Package",
762
- path: "./.skilld/pkg/",
763
- score: 4,
764
- useFor: "Check exports field and entry points"
765
- });
766
- if (hasIssues) referenceWeights.push({
767
- name: "Issues",
768
- path: "./.skilld/issues/_INDEX.md",
769
- score: 1,
770
- useFor: "Skip"
771
- });
772
- if (hasDiscussions) referenceWeights.push({
773
- name: "Discussions",
774
- path: "./.skilld/discussions/_INDEX.md",
775
- score: 1,
776
- useFor: "Skip"
777
- });
778
- return {
779
- referenceWeights,
780
- task: `**Generate a doc map β€” a compact index of exports the LLM wouldn't already know, linked to source files.** Focus on APIs added in recent versions, non-obvious exports, and anything with surprising behavior that isn't covered in API Changes or Best Practices.
781
-
782
- Skip well-known, stable APIs the LLM was trained on. Skip self-explanatory utilities (\`isString\`, \`toArray\`). The value is navigational: function name β†’ which file to Read for details.`,
783
- format: `\`\`\`
784
- ## Doc Map
785
-
786
- ### [Queries](./.skilld/docs/queries.md)
787
-
788
- createQueryKeyStore, queryOptions, infiniteQueryOptions
789
-
790
- ### [Hooks](./.skilld/docs/hooks.md) *(v5.0+)*
791
-
792
- useSuspenseQuery, usePrefetchQuery, useQueries
793
-
794
- ### [Composables](./.skilld/docs/composables.md)
795
-
796
- useNuxtData, usePreviewMode, prerenderRoutes
797
- \`\`\`
798
-
799
- Comma-separated names per group. One line per doc page. Annotate version when APIs are recent additions. For single-doc packages, use a flat comma list.`,
800
- rules: [
801
- `- **Doc Map:** names only, grouped by doc page, MAX ${maxLines(15, 25, enabledSectionCount)} lines`,
802
- "- Skip entirely for packages with fewer than 5 exports or only 1 doc page",
803
- "- Prioritize new/recent exports over well-established APIs",
804
- "- No signatures, no descriptions β€” the linked doc IS the description",
805
- "- Do not list functions already in API Changes or Best Practices"
806
- ]
807
- };
808
- }
809
743
  const SECTION_OUTPUT_FILES = {
810
744
  "best-practices": "_BEST_PRACTICES.md",
811
745
  "api-changes": "_API_CHANGES.md",
812
- "api": "_DOC_MAP.md",
813
746
  "custom": "_CUSTOM.md"
814
747
  };
815
748
  const SECTION_MERGE_ORDER = [
816
749
  "api-changes",
817
750
  "best-practices",
818
- "api",
819
751
  "custom"
820
752
  ];
821
753
  function formatDocTree(files) {
@@ -882,7 +814,6 @@ function getSectionDef(section, ctx, customPrompt) {
882
814
  switch (section) {
883
815
  case "api-changes": return apiChangesSection(ctx);
884
816
  case "best-practices": return bestPracticesSection(ctx);
885
- case "api": return apiSection(ctx);
886
817
  case "custom": return customPrompt ? customSection(customPrompt, ctx.enabledSectionCount) : null;
887
818
  }
888
819
  }
@@ -1687,11 +1618,7 @@ async function optimizeDocs(opts) {
1687
1618
  customPrompt,
1688
1619
  features,
1689
1620
  pkgFiles,
1690
- sections: sections ?? [
1691
- "api-changes",
1692
- "best-practices",
1693
- "api"
1694
- ]
1621
+ sections: sections ?? ["api-changes", "best-practices"]
1695
1622
  });
1696
1623
  if (sectionPrompts.size === 0) return {
1697
1624
  optimized: "",
@@ -1885,7 +1812,6 @@ function shortenPath(p) {
1885
1812
  const SECTION_MAX_LINES = {
1886
1813
  "api-changes": 160,
1887
1814
  "best-practices": 300,
1888
- "api": 160,
1889
1815
  "custom": 160
1890
1816
  };
1891
1817
  function validateSectionOutput(content, section) {