octocode-cli 1.3.1 → 1.5.1

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.
Files changed (102) hide show
  1. package/README.md +193 -34
  2. package/out/chunks/chunk-7476PETK.js +309 -0
  3. package/out/chunks/chunk-CVNNNSMQ.js +26 -0
  4. package/out/chunks/chunk-OQBJTZWK.js +60 -0
  5. package/out/chunks/chunk-UCZCF3BQ.js +9 -0
  6. package/out/chunks/command-help-specs-JZXVSLZ5.js +8 -0
  7. package/out/chunks/commands-XBFPLHSQ.js +8 -0
  8. package/out/chunks/help-P7TCOYAJ.js +10 -0
  9. package/out/chunks/main-help-ULF5PAQY.js +10 -0
  10. package/out/chunks/prompts-5E6VKRX5.js +8 -0
  11. package/out/chunks/spinner-URV2OX6O.js +8 -0
  12. package/out/chunks/tool-command-M6VA7P2F.js +8 -0
  13. package/out/octocode-cli.js +1 -1
  14. package/package.json +5 -3
  15. package/skills/README.md +13 -1
  16. package/skills/agentic-flow-best-practices/SKILL.md +280 -0
  17. package/skills/agentic-flow-best-practices/references/agent-collaboration-patterns.md +75 -0
  18. package/skills/agentic-flow-best-practices/references/pr-review-agent-example.md +47 -0
  19. package/skills/agentic-flow-best-practices/references/resources.md +112 -0
  20. package/skills/octocode-chrome-devtools/README.md +541 -0
  21. package/skills/octocode-chrome-devtools/SKILL.md +197 -0
  22. package/skills/octocode-chrome-devtools/agents/openai.yaml +7 -0
  23. package/skills/octocode-chrome-devtools/references/CDP_AGENT_REFERENCE.md +401 -0
  24. package/skills/octocode-chrome-devtools/references/CHROME_FLAGS.md +234 -0
  25. package/skills/octocode-chrome-devtools/references/INTENTS.md +108 -0
  26. package/skills/octocode-chrome-devtools/references/INTENTS_AUTH.md +179 -0
  27. package/skills/octocode-chrome-devtools/references/INTENTS_AUTOMATION.md +214 -0
  28. package/skills/octocode-chrome-devtools/references/INTENTS_DEBUG.md +329 -0
  29. package/skills/octocode-chrome-devtools/references/INTENTS_ENVIRONMENT.md +237 -0
  30. package/skills/octocode-chrome-devtools/references/INTENTS_INSPECT.md +263 -0
  31. package/skills/octocode-chrome-devtools/references/INTENTS_STORAGE_CONSENT.md +214 -0
  32. package/skills/octocode-chrome-devtools/references/RECOVERY.md +39 -0
  33. package/skills/octocode-chrome-devtools/references/SCRIPT_PATTERNS.md +43 -0
  34. package/skills/octocode-chrome-devtools/references/SCRIPT_PATTERNS_ASYNC_WORKERS.md +345 -0
  35. package/skills/octocode-chrome-devtools/references/SCRIPT_PATTERNS_BROWSER.md +403 -0
  36. package/skills/octocode-chrome-devtools/references/SCRIPT_PATTERNS_OBSERVE.md +275 -0
  37. package/skills/octocode-chrome-devtools/references/SCRIPT_PATTERNS_SPECIAL.md +18 -0
  38. package/skills/octocode-chrome-devtools/scripts/cdp-runner.mjs +503 -0
  39. package/skills/octocode-chrome-devtools/scripts/cdp-sandbox.mjs +123 -0
  40. package/skills/octocode-chrome-devtools/scripts/cdp-template.mjs +81 -0
  41. package/skills/octocode-chrome-devtools/scripts/octocode-chrome-devtools.vpn.example.json +8 -0
  42. package/skills/octocode-chrome-devtools/scripts/open-browser.mjs +362 -0
  43. package/skills/octocode-chrome-devtools/scripts/sourcemap-resolver.mjs +193 -0
  44. package/skills/octocode-chrome-devtools/scripts/undercover.mjs +226 -0
  45. package/skills/octocode-design/README.md +2 -2
  46. package/skills/octocode-documentation-writer/README.md +1 -1
  47. package/skills/octocode-engineer/README.md +1 -1
  48. package/skills/octocode-engineer/SKILL.md +4 -2
  49. package/skills/octocode-engineer/references/output-files.md +3 -3
  50. package/skills/octocode-engineer/scripts/run.js +136 -136
  51. package/skills/octocode-engineer/src/reporting/summary-md.test.ts +48 -0
  52. package/skills/octocode-engineer/src/reporting/summary-md.ts +43 -2
  53. package/skills/octocode-install/SKILL.md +1 -1
  54. package/skills/octocode-pull-request-reviewer/README.md +5 -5
  55. package/skills/octocode-pull-request-reviewer/SKILL.md +1 -1
  56. package/skills/octocode-research/AGENTS.md +1 -1
  57. package/skills/octocode-research/README.md +2 -2
  58. package/skills/octocode-research/docs/ARCHITECTURE.md +1 -1
  59. package/skills/octocode-research/scripts/server.js +191 -246
  60. package/skills/octocode-research/src/routes/github.ts +4 -21
  61. package/skills/octocode-research/src/routes/local.ts +4 -21
  62. package/skills/octocode-research/src/utils/fileContentTransform.ts +44 -0
  63. package/skills/octocode-search-skill/SKILL.md +245 -229
  64. package/skills/octocode-search-skill/references/agent-skills-guide.md +177 -0
  65. package/skills/octocode-search-skill/references/discovery-surfaces.md +162 -0
  66. package/skills/octocode-search-skill/references/fetch-and-create-locally.md +57 -0
  67. package/skills/octocode-search-skill/references/install-reference.md +130 -0
  68. package/skills/octocode-search-skill/references/references-template.md +27 -0
  69. package/skills/octocode-search-skill/references/references.md +62 -0
  70. package/skills/octocode-slides/README.md +307 -0
  71. package/skills/octocode-slides/SKILL.md +410 -0
  72. package/skills/octocode-slides/references/01-brief.md +156 -0
  73. package/skills/octocode-slides/references/02-research.md +149 -0
  74. package/skills/octocode-slides/references/03-outline.md +172 -0
  75. package/skills/octocode-slides/references/04-design.md +301 -0
  76. package/skills/octocode-slides/references/05-implementation.md +213 -0
  77. package/skills/octocode-slides/references/06-review.md +258 -0
  78. package/skills/octocode-slides/references/animation.md +281 -0
  79. package/skills/octocode-slides/references/design-system.md +316 -0
  80. package/skills/octocode-slides/references/html-templates.md +673 -0
  81. package/skills/octocode-slides/references/image-generation.md +448 -0
  82. package/skills/octocode-slides/references/resources.md +840 -0
  83. package/skills/octocode-slides/references/slide-rules.md +541 -0
  84. package/skills/octocode-slides/references/wireframes.md +727 -0
  85. package/skills/octocode-slides/scripts/animation.js +182 -0
  86. package/skills/octocode-slides/scripts/base.css +353 -0
  87. package/skills/octocode-slides/scripts/base.html +655 -0
  88. package/skills/octocode-slides/scripts/generate_image.py +221 -0
  89. package/skills/octocode-slides/scripts/navbridge.js +79 -0
  90. package/skills/octocode-slides/scripts/presenter.js +316 -0
  91. package/skills/octocode-slides/scripts/slide.html +248 -0
  92. package/skills/octocode-stats/SKILL.md +73 -0
  93. package/skills/octocode-stats/assets/template.html +1332 -0
  94. package/skills/octocode-stats/scripts/build_dashboard.mjs +407 -0
  95. package/assets/example.png +0 -0
  96. package/out/chunks/chunk-QCY7Q7YW.js +0 -389
  97. package/out/chunks/command-help-specs-CQ3RBLP6.js +0 -8
  98. package/out/chunks/commands-OCTZP2TO.js +0 -51
  99. package/out/chunks/help-XPXP46ZT.js +0 -10
  100. package/out/chunks/main-help-35HX2UDQ.js +0 -10
  101. package/out/chunks/tool-command-HOSMVLNK.js +0 -8
  102. package/skills/octocode-search-skill/INSTALL_REFERENCE.md +0 -112
@@ -1,321 +1,337 @@
1
1
  ---
2
2
  name: octocode-search-skill
3
- description: Search for, preview, and install agent skills (SKILL.md files) from GitHub. Use when the user asks to find, browse, preview, or install skills.
3
+ description: Use this skill when the user asks to find, evaluate, preview, install, rate, review, score, improve, refactor, or synthesize Agent Skills (the `SKILL.md` folder format) across GitHub, local skill folders, and skill marketplaces. Covers searching for a skill for a task, deep-diving a candidate, installing one or more skills into one or more agents at user or project scope, rating or reviewing an existing SKILL.md, refactoring a skill, or creating a new local skill from researched patterns. Do NOT activate for general package search (npm, PyPI, cargo), web search, or code research not involving SKILL.md files.
4
4
  ---
5
5
 
6
6
  # Octocode Search Skill
7
7
 
8
- A skill is a folder with a required `SKILL.md`. The file must have frontmatter with `name` and `description`, then usage instructions, workflow, gates, examples, and any supporting files.
8
+ Find, evaluate, improve, install, or synthesize Agent Skills by inspecting real skill files, comparing workflow quality, and gating every write or install action.
9
9
 
10
- Flow: `BROWSE -> SEARCH -> PREVIEW -> INSTALL`
10
+ Agent Skills are folders with required `SKILL.md` frontmatter (`name`, `description`) plus instructions. They may include `scripts/`, `references/`, `assets/`, or other support files. Agents load them by progressive disclosure: metadata first, full `SKILL.md` on activation, bundled resources only when needed.
11
11
 
12
- ## Tool Rules
12
+ ## Operating Model
13
13
 
14
- Use Octocode MCP only. Do not use web browsing for GitHub.
14
+ Default flow:
15
15
 
16
- - Search by keyword: `githubSearchCode`
17
- - Discover skill repos: `githubSearchRepositories`
18
- - Browse repo skills: `githubViewRepoStructure`, then `githubGetFileContent`
19
- - Preview a skill: `githubGetFileContent`
20
- - Download a skill folder: `githubGetFileContent(type="directory")`
16
+ ```text
17
+ UNDERSTAND -> DISCOVER -> INSPECT -> JUDGE -> RECOMMEND -> USER GATE -> ACT -> VERIFY
18
+ ```
21
19
 
22
- Quality rules:
23
- - Identify skills by `(owner/repo, path-to-SKILL.md)`, not repo alone.
24
- - Treat stars as context and a tiebreaker, not proof of quality.
25
- - Recommend only skills whose `name`, `description`, path, or visible body matches the request.
26
- - Dedup by `(owner/repo, path)`.
27
- - Skip files without valid `name:` and `description:` frontmatter.
28
- - Aggregate all confirmed results before ranking. Do not stop at the first good match.
29
- - Search exact names, related subjects, and semantic capability terms.
20
+ Compress steps when the user names a specific source (`owner/repo path-to-SKILL.md` or a local path). Repeat steps when discovery returns weak or conflicting candidates.
30
21
 
31
- ## Discover Marketplaces
22
+ Hard rules:
32
23
 
33
- Never use a hardcoded list. Discover live:
24
+ Recommend
25
+ - MUST recommend by task fit, workflow quality, safety gates, and portability; use `installs` count or GitHub stars only as a tiebreaker when two candidates are otherwise equal.
26
+ - MUST identify every remote candidate by `(owner/repo, path-to-SKILL.md)` and every local candidate by absolute or workspace-relative path.
34
27
 
35
- ```text
36
- githubSearchRepositories(queries: [
37
- { id: "mkts_topic", topicsToSearch: ["agent-skills"], sort: "stars", limit: 20 },
38
- { id: "mkts_keyword", keywordsToSearch: ["agent", "skills", "SKILL.md"], sort: "stars", limit: 20 }
39
- ])
40
- ```
28
+ Inspect
29
+ - MUST inspect actual `SKILL.md` content before recommending, adapting, installing, or quoting a candidate as a pattern.
30
+ - MUST inspect referenced files that affect behavior for strong, risky, or unclear candidates.
31
+ - MUST skip candidates lacking valid `name` and `description` frontmatter.
41
32
 
42
- Find repos with `skills/` or root-level `SKILL.md` files. Present ranked results with repo, stars, description, and why to browse it. Let the user pick.
33
+ Gate
34
+ - MUST gate installs, file writes, local skill creation, target selection, config changes, overwrite decisions, and symlink decisions.
43
35
 
44
- Fallback seeds only if discovery returns nothing: `bgauryy/octocode-mcp`, `addyosmani/agent-skills`, `anthropics/skills`.
36
+ Forbidden
37
+ - FORBIDDEN: handing the user a raw search dump to rank. Filter first, explain tradeoffs, recommend a next step.
38
+ - FORBIDDEN: copying another skill wholesale unless the license and the user explicitly allow it.
45
39
 
46
- ## Browse A Repo
40
+ Stop when any of these is true:
47
41
 
48
- Use when the user names a marketplace or repo.
42
+ - One recommendation is justified by inspected content.
43
+ - Two or more High-quality candidates have been inspected and task fit is confirmed for the top pick.
44
+ - Three search angles have returned no new candidates not already examined.
45
+ - A user gate is awaiting an answer.
49
46
 
50
- Step 1: list skill folders.
47
+ ## Tool Routing
51
48
 
52
- ```text
53
- githubViewRepoStructure(queries: [{
54
- id: "browse",
55
- owner,
56
- repo,
57
- path: "<skills-path>",
58
- depth: 1,
59
- entriesPerPage: 200
60
- }])
61
- ```
49
+ Use Octocode MCP for all research — locally and externally — and let user intent decide which side leads. Octocode MCP already documents its own tools and query schemas; rely on the active descriptors instead of duplicating them here.
62
50
 
63
- Step 2: fetch frontmatter in batches of 3 to 5.
51
+ - Lead local when the question is about the user's workspace: existing skills, custom paths, draft skills, repo conventions.
52
+ - Lead GitHub when the user is shopping for a skill, comparing options, or asking about something not present locally.
53
+ - Read code or files: `localGetFileContent` or `githubGetFileContent`.
54
+ - Download a remote skill folder before writing it locally: `githubGetFileContent(type="directory")` or `githubCloneRepo`.
64
55
 
65
- ```text
66
- githubGetFileContent(queries: [
67
- {
68
- id: "desc_1",
69
- owner,
70
- repo,
71
- path: "<skills-path>/<name>/SKILL.md",
72
- matchString: "---",
73
- matchStringContextLines: 6
74
- }
75
- ])
76
- ```
56
+ Fallbacks:
77
57
 
78
- Show a clean numbered list ordered by fit rating, then stars descending. Include skill name, repo, exact path, stars, description, one short fit note, and a concrete reason the skill relates to the user's request. Then ask the user what to do next:
58
+ - IF the runtime lacks Octocode MCP, map each verb (search, read, list, download) to the equivalent runtime tool and continue.
59
+ - IF GitHub research is required and unavailable, stop and ask whether to use a public web fallback.
60
+ - IF a marketplace surface (`skills.sh`, `claude-plugins.dev`, `aiskillstore.io`, `agentskills.me`) is unreachable or rate-limited, switch to GitHub topic search and `llms.txt` catalog snapshots (see `references/discovery-surfaces.md`); lower confidence and continue.
61
+ - IF the user requested local-only work, do not query remote sources.
79
62
 
80
- ```text
81
- Choose next step:
82
- 1. Search again with a new query
83
- 2. Preview or deep-dive into a skill
84
- 3. Install a skill
85
- ```
63
+ ## Local References
86
64
 
87
- ## Search By Keyword
65
+ All reference material lives under `references/`.
88
66
 
89
- Search is a loop: understand intent, fan out, confirm, aggregate, show all, ask next step.
67
+ - Read `references/agent-skills-guide.md` when evaluating, improving, rating, or creating a skill, optimizing a description, deciding what belongs in `SKILL.md`, designing progressive references, or adding scripts/assets.
68
+ - Read `references/discovery-surfaces.md` when the user wants to shop for skills beyond raw GitHub search — marketplaces, leaderboards, registry REST APIs, manifest formats, and CLI installers.
69
+ - Read `references/install-reference.md` when the user chooses to install a skill or asks about install targets, destinations, scopes, or conflict behavior.
70
+ - Read `references/fetch-and-create-locally.md` when fetching a remote skill via Octocode into a local folder — whether to install verbatim or to adapt into a new local skill.
90
71
 
91
- 1. Understand what the user needs to find.
72
+ ## Understand
92
73
 
93
- Extract:
94
- - Exact skill name or phrase, if provided.
95
- - Core task or capability.
96
- - Related subjects and adjacent workflows.
97
- - Tools, frameworks, agents, or domains mentioned.
98
- - Constraints such as language, IDE, security, docs, design, install, or review.
74
+ Extract these facts before searching or editing:
99
75
 
100
- If intent is usable, search immediately. Ask a clarifying question only when the request is too vague to form search angles.
76
+ - User goal: find, compare, preview, install, deep-dive, rate, improve, or create.
77
+ - Task/domain: coding, docs, data, design, security, research, planning, review, operations, or other.
78
+ - Target ecosystem: Claude Code, Claude Desktop, Cursor, Codex, OpenCode, custom agent, or unspecified.
79
+ - Source scope: local folders, named repo, marketplace, broad public search, or user-provided skill path.
80
+ - Constraints: language, framework, IDE, license, local-only, security posture, install target, no-web, org/repo limits.
81
+ - Quality preference: battle-tested, small, script-backed, enterprise-safe, example-rich, low-dependency, or strict-gated.
101
82
 
102
- 2. Build search angles.
83
+ Ask one focused question only when the answer changes search scope, target ecosystem, or write/install behavior. Otherwise proceed with stated assumptions.
103
84
 
104
- Create 4 groups:
105
- - Name: exact phrase, lowercase, hyphenated, likely folder name.
106
- - Subject: core domain keywords.
107
- - Related: synonyms, adjacent tasks, common workflow names.
108
- - Semantic: capability words that may appear in descriptions, such as audit, review, install, generate, migrate, document, debug, optimize.
85
+ ## Discover And Inspect
109
86
 
110
- For each group, keep 1 to 3 concise queries. Prefer recall first; rank later.
87
+ Set depth before searching:
111
88
 
112
- 3. Run discovery in parallel.
89
+ - Quick answer: inspect enough to recommend one best candidate with caveats.
90
+ - Research request: compare broadly, preserve confirmed sources, stop when more search is unlikely to change the recommendation.
91
+ - Install request: inspect source, support files, target destinations, and conflict behavior before asking for approval.
92
+ - Improve, rate, or create request: inspect the target skill, adjacent local examples, and `references/agent-skills-guide.md` before writing.
93
+ - Weak results: broaden once, then report the gap and the next best action.
113
94
 
114
- A. Exact name and path search. Use `filename: "SKILL.md"`, not a keyword.
95
+ Search angles:
115
96
 
116
- ```text
117
- githubSearchCode(queries: [
118
- {
119
- id: "name_content",
120
- filename: "SKILL.md",
121
- keywordsToSearch: ["<exact-or-name-query>"],
122
- match: "file",
123
- limit: 30
124
- },
125
- {
126
- id: "name_path",
127
- filename: "SKILL.md",
128
- keywordsToSearch: ["<hyphenated-or-folder-query>"],
129
- match: "path",
130
- limit: 30
131
- }
132
- ])
133
- ```
97
+ - Name: exact phrase, lowercase, hyphenated folder name, aliases.
98
+ - Subject: core domain terms.
99
+ - Workflow verbs: analyze, review, migrate, generate, install, optimize, debug, audit, benchmark, plan.
100
+ - Ecosystem: agent, IDE, language, framework, MCP server, CLI, or platform named by the user.
101
+ - Safety: gate, validation, rollback, verify, tests, prompt, scripts, permissions.
134
102
 
135
- If the query looks like a GitHub username, add:
103
+ Useful GitHub patterns:
136
104
 
137
- ```text
138
- { id: "owner", filename: "SKILL.md", owner: "<query>", match: "file", limit: 30 }
139
- ```
105
+ - Search body and frontmatter with `filename: "SKILL.md"` and `match: "file"`.
106
+ - Search likely folder names with `filename: "SKILL.md"` and `match: "path"`.
107
+ - Search composite filenames `*.skill.md` for skills that do not use the canonical `SKILL.md` name.
108
+ - Search frontmatter content with `filename: "SKILL.md" "name:" "description:"` to bias toward well-formatted skills.
109
+ - Discover repos via topics: `topicsToSearch: ["agent-skills"]`, `["claude-code-skills"]`, `["claude-skill"]`, `["cursor-skills"]`, `["codex-skills"]`. Combine with keywords like `agent`, `skills`, and `SKILL.md`.
110
+ - Inspect likely paths: `skills/<name>/SKILL.md`, `skills/<category>/<name>/SKILL.md`, `<name>/SKILL.md`, `.claude/skills/<name>/SKILL.md`, `.cursor/skills/<name>/SKILL.md`, `.codex/skills/<name>/SKILL.md`, `.opencode/skills/<name>/SKILL.md`, `.agents/skills/<name>/SKILL.md`.
111
+ - Probe plugin manifests: `.claude-plugin/marketplace.json`, `.claude-plugin/plugin.json`, and per-catalog `llms.txt` / `llms-full.txt` files for batch discovery.
140
112
 
141
- B. Subject and semantic search. Run several concise queries from the Subject, Related, and Semantic groups.
113
+ ### Skills.sh Registry API
142
114
 
143
- ```text
144
- githubSearchCode(queries: [
145
- {
146
- id: "subject_1",
147
- filename: "SKILL.md",
148
- keywordsToSearch: ["<subject-query>"],
149
- match: "file",
150
- limit: 30
151
- },
152
- {
153
- id: "related_1",
154
- filename: "SKILL.md",
155
- keywordsToSearch: ["<related-query>"],
156
- match: "file",
157
- limit: 30
158
- },
159
- {
160
- id: "semantic_1",
161
- filename: "SKILL.md",
162
- keywordsToSearch: ["<semantic-capability-query>"],
163
- match: "file",
164
- limit: 30
165
- }
166
- ])
115
+ MUST run this in parallel with GitHub/Octocode search for every public skill query. MUST NOT use for org-specific or private searches — use Octocode tools only for those.
116
+
117
+ ```bash
118
+ curl 'https://www.skills.sh/api/search?q={{SEARCH_KEY}}&limit=100' \
119
+ --compressed \
120
+ -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:150.0) Gecko/20100101 Firefox/150.0'
167
121
  ```
168
122
 
169
- C. Repo discovery.
123
+ Response shape: `{"skills": [{"id": string, "skillId": string, "name": string, "installs": number, "source": "owner/repo"}, ...], "count": number}`
170
124
 
171
- ```text
172
- githubSearchRepositories(queries: [{
173
- id: "repos",
174
- keywordsToSearch: ["<query>"],
175
- topicsToSearch: ["agent-skills"],
176
- sort: "stars",
177
- limit: 20
178
- }])
179
- ```
125
+ Popularity workflow — MUST follow this order:
180
126
 
181
- 4. Confirm candidates.
127
+ 1. Sort results by `installs` descending — highest install count = most battle-tested signal.
128
+ 2. Take the top 5 candidates by installs as priority inspection targets.
129
+ 3. In parallel with other searches, fetch each top candidate's `SKILL.md` via Octocode (`githubGetFileContent` using `source` as `owner/repo`; try paths `skills/<skillId>/SKILL.md`, `<skillId>/SKILL.md`, `.claude/skills/<skillId>/SKILL.md`).
130
+ 4. Include install count in every result card as a quality signal.
131
+ 5. MUST NOT blindly recommend the highest-install skill — inspect content and task fit first; use `installs` as a tiebreaker only when two candidates are otherwise equal.
182
132
 
183
- Merge all candidates from A, B, and C. Dedup by `(owner/repo, path)`. For repo discovery results, inspect likely skill paths with `githubViewRepoStructure` before fetching frontmatter.
133
+ Fallback: if the API is unreachable or rate-limited, switch to `https://www.skills.sh` leaderboard page and GitHub topic search; lower confidence and continue.
184
134
 
185
- Fetch frontmatter in batches of 3 to 5:
135
+ Marketplace and registry surfaces (see `references/discovery-surfaces.md` for the full list and APIs):
186
136
 
187
- ```text
188
- githubGetFileContent(queries: [
189
- {
190
- id: "skill_1",
191
- owner,
192
- repo,
193
- path: "<path-from-search>",
194
- matchString: "---",
195
- matchStringContextLines: 6
196
- }
197
- ])
198
- ```
137
+ - Per-skill check: `https://www.skills.sh/<owner>/<repo>/<skill-name>` — install count, install command, security audit status.
138
+ - Leaderboard: `https://www.skills.sh` — install-count ranked, agent-filtered.
139
+ - Additional registries: `agentskills.io/llms.txt`, `aiskillstore.io/llms.txt`, `microsoft.github.io/skills/llms-full.txt`; `claude-plugins.dev` REST for Claude Code plugin search.
140
+
141
+ Seed only when discovery is sparse. Start from `topic:agent-skills` (or the narrower `topic:claude-code-skills`) on GitHub, then sample well-maintained collections such as `anthropics/skills`, `ComposioHQ/awesome-claude-skills`, `addyosmani/agent-skills`, `vercel-labs/skills`, `alirezarezvani/claude-skills`, `microsoft/skills`, `obra/superpowers`, `trailofbits/skills`, `wshobson/claude-code-workflows`, or any author-curated marketplace the user trusts.
142
+
143
+ ## Judge Quality
144
+
145
+ For every plausible candidate, inspect enough `SKILL.md` content to understand behavior. For strong, risky, or ambiguous candidates, inspect full `SKILL.md` plus referenced scripts, templates, install docs, evals, or reference files that affect execution.
199
146
 
200
- If a candidate looks strong but frontmatter is missing from the fetched window, preview a small body window once. If still invalid, skip it.
147
+ Evaluate:
201
148
 
202
- Ranking:
203
- - Exact skill name match: +3000
204
- - Partial skill name match: +1000
205
- - Subject/domain match: +300
206
- - Description match: +150
207
- - Related workflow match: +100
208
- - Semantic capability match: +75
209
- - Body or visible text match: +50
210
- - Stars tiebreaker: `sqrt(stars) * 30`
149
+ - Trigger: clear activation conditions and non-activation boundaries.
150
+ - Workflow: ordered steps, decision points, recovery paths, and stop conditions.
151
+ - Evidence: real file contents, referenced resources, tests, examples, or scripts.
152
+ - Gates: validation, approval, preview, review, permissions, rollback, and install conflict handling.
153
+ - Output UX: concise results, useful comparison cards, explicit next-step gate.
154
+ - Specificity: domain knowledge an agent would not know by default.
155
+ - Portability: agent/runtime assumptions, hardcoded paths, external services, dependencies, secrets.
156
+ - Risk: unsafe commands, hidden network actions, missing referenced files, license ambiguity, stale docs, broad triggers.
211
157
 
212
- Common paths: `skills/<name>/SKILL.md`, `skills/<ns>/<name>/SKILL.md`, `<name>/SKILL.md`.
158
+ Quality labels:
213
159
 
214
- 5. Show all confirmed results.
160
+ - `High`: direct match, clear trigger, executable workflow, useful resources and gates, and no obvious safety or portability red flags.
161
+ - `Medium`: partial match or adaptable, but missing some validation, UX, or domain detail.
162
+ - `Low`: keyword-only match, generic workflow, unclear trigger, stale pattern, or meaningful caveat.
215
163
 
216
- Show every confirmed skill from the search cycle. Group by `Strong matches`, `Partial matches`, and `Explore`. Within each group, sort by fit rating first (`High` > `Medium` > `Low`), then stars descending, then relevance. Do not rank a lower-rated skill above a higher-rated skill because it has more stars.
164
+ For evidence-based quality signals beyond stars (install counts, recency, audit badges, capability overlap, demand signals), load `references/agent-skills-guide.md` §Quality Signals Beyond Stars and `references/discovery-surfaces.md` §Quality Signals Beyond Stars.
217
165
 
218
- Use compact, readable cards. Keep the output nicely formatted: short headings, consistent field order, concise prose, and no raw search dumps. Every card MUST include a `Why this matches` field that ties the skill back to the user's exact request, using evidence from the skill name, description, path, frontmatter, or visible body.
166
+ ## Self-Improvement Mode
167
+
168
+ Use this mode when the user asks to rate, review, score, improve, or refactor a `SKILL.md` — yours or someone else's. Read `references/agent-skills-guide.md` before rating or rewriting.
169
+
170
+ Modes — pick one before starting. If the user's request is ambiguous (e.g., "check my skill"), present this gate before proceeding:
219
171
 
220
172
  ```text
221
- ## <skill-name> [<stars> stars, <owner>/<repo>]
222
-
223
- What it does: <description>
224
- When to use it: <trigger/use case>
225
- How it works: <workflow/tools/gates>
226
- Why this matches: <specific reason this skill is related to the user's request, citing the matching capability/trigger>
227
- Source: <owner>/<repo> <path-to-SKILL.md>
228
- Fit score: High|Medium|Low - <short reason>
173
+ Which mode?
174
+ 1. Rate-only — score and report issues; no file edits.
175
+ 2. Improve / refactor — fix issues and rewrite; gate before writing.
176
+ 3. Fix all apply fixes from a prior rating in this conversation; skip re-rating.
177
+ 4. Cancel.
229
178
  ```
230
179
 
231
- If there are many results, still show all names and sources. Keep cards short and preserve the rating-then-stars ordering.
180
+ - `Rate-only` (rate, review, score, audit): stop after the REPORT step. MUST NOT edit files. End with a numbered next-action gate (apply fixes, show diff, cancel).
181
+ - `Improve` / `refactor` / `rewrite`: full flow including REWRITE and VALIDATE; gate before writing.
182
+ - `Fix all` / `apply fixes`: skip MAP INTENT and RATE ISSUES if a prior rating exists in the conversation; go straight to REWRITE → VALIDATE → REPORT.
232
183
 
233
- 6. Ask what to do next.
184
+ Flow:
234
185
 
235
186
  ```text
236
- Choose next step:
237
- 1. Search again with a new query
238
- 2. Preview or deep-dive into a skill
239
- 3. Install a skill
240
- 4. Keep researching related skills
187
+ READ -> MAP INTENT -> RATE ISSUES -> [REWRITE -> VALIDATE] -> REPORT
241
188
  ```
242
189
 
243
- If results are weak or sparse, say why and continue one more search pass with broader related or semantic terms before giving up.
190
+ Read:
244
191
 
245
- ## Install Gates
192
+ - Read the full target `SKILL.md` and all referenced files that affect behavior.
193
+ - Note purpose, line count, resources, gates, and output format.
246
194
 
247
- Do not skip gates.
195
+ Map intent:
248
196
 
249
- Install input is a skill path, not just a name.
197
+ - Preserve the skill's core job, trigger domain, and user-facing promises.
198
+ - Identify what behavior must become more reliable: activation, research quality, safety gates, tool routing, output shape, or recovery.
250
199
 
251
- Reference: `INSTALL_REFERENCE.md`.
200
+ Rate issues:
252
201
 
253
- 1. Normalize input.
202
+ - Check for weak rules in critical sections, vague actions, raw-search handoff, missing gates, unsafe writes, missing verification, stale references, and line-count bloat.
203
+ - Group findings by severity: `Critical`, `High`, `Medium`, `Low`. Cite `file:line` for each.
204
+ - Score per dimension using the §Judge Quality rubric (`High` / `Medium` / `Low`).
254
205
 
255
- Accept `owner/repo/path/to/skill`, `owner/repo/path/to/skill/SKILL.md`, GitHub `tree` URLs, and GitHub `blob` URLs. Convert `.../SKILL.md` to the containing folder. Derive `<skill-name>` from the final folder name.
206
+ Rewrite (skip in Rate-only mode):
256
207
 
257
- 2. Confirm install.
208
+ - Fix Critical and High issues first.
209
+ - Keep `SKILL.md` concise; target 300 lines or less unless the domain justifies more.
210
+ - Move long examples, schemas, or static references into `references/` only when that reduces active-context load.
211
+ - Keep `description` trigger-rich without keyword stuffing.
258
212
 
259
- ```text
260
- Install this skill?
261
- description: <frontmatter description>
262
- source: <owner>/<repo>/<path-to-skill-folder>
263
- y / n
264
- ```
213
+ Validate (skip in Rate-only mode):
214
+
215
+ - Frontmatter has valid `name` and `description`.
216
+ - Workflow has clear steps, gates, recovery, and output UX.
217
+ - Referenced files exist or missing files are documented as risks.
218
+ - Critical actions use MUST/NEVER/FORBIDDEN where needed.
219
+ - No write/install action bypasses an explicit user gate.
265
220
 
266
- 3. Ask targets.
221
+ Report required output shape for `Rate-only`:
267
222
 
268
223
  ```text
269
- 1. Claude only: claude-code, claude-desktop
270
- 2. All agents: claude-code, claude-desktop, cursor, codex, opencode
271
- 3. Pick one agent
272
- 4. Custom path
224
+ Overall: <score>/10 <letter grade> (one-sentence summary).
225
+ Score card: per-dimension High/Medium/Low using §Judge Quality.
226
+ Issues: grouped Critical / High / Medium / Low, each with file:line.
227
+ Validation: pass/fail per checklist item above.
228
+ Strengths: 2-4 bullets worth preserving.
229
+ Residual risk: 1-3 bullets.
230
+ Next action: numbered choices ending with "Cancel".
273
231
  ```
274
232
 
275
- 4. Ask install mode. Default to copy. Use symlink only for stable source paths.
233
+ Report for `Improve` / `Fix all`:
234
+
235
+ - Summarize intent preserved, major fixes applied, validation result, and any residual risk.
236
+
237
+ ## Present Results
238
+
239
+ Lead with the recommendation in one sentence. Then group results only when useful:
240
+
241
+ - `Best matches`
242
+ - `Useful alternatives`
243
+ - `Explore if...`
244
+
245
+ If results are few, show compact cards. If results are many, list confirmed names and sources compactly and provide detailed cards only for the strongest candidates.
246
+
247
+ Card shape (label layout, not literal Markdown):
276
248
 
277
249
  ```text
278
- 1. Copy
279
- 2. Symlink
280
- 3. Cancel
250
+ Name: <skill-name> - fit: High | Medium | Low
251
+ Source: <owner/repo path-to-SKILL.md> or <local path>
252
+ What it does: <one sentence in your own words>
253
+ Actual flow: <2-4 short steps from inspected content>
254
+ Quality signals: <specific evidence>
255
+ Why it matches: <tie to user's request>
256
+ Caveat: <real risk, or "None obvious from inspected files">
281
257
  ```
282
258
 
283
- 5. Check conflicts.
259
+ Keep prose short. Do not paste raw search dumps or large excerpts.
284
260
 
285
- Run `ls "<dest>/<skill-name>"`. If it exists, ask: `Overwrite`, `Skip`, or `Cancel`.
261
+ End with a user gate that offers the real next branches — not just "install or cancel". Use a structured ask tool when the runtime provides one; otherwise present concise numbered choices and wait.
286
262
 
287
- 6. Download.
263
+ Gate example:
288
264
 
289
265
  ```text
290
- githubGetFileContent(queries: [{
291
- id: "download",
292
- owner,
293
- repo,
294
- path: "<path-to-skill-folder>",
295
- type: "directory"
296
- }])
266
+ Recommended: <skill-name> from <source>
267
+
268
+ Choose:
269
+ 1. Install — fetch into one or more agent destinations the user picks (see references/install-reference.md and references/fetch-and-create-locally.md).
270
+ 2. Create a local skill — adapt patterns from this candidate into a new local SKILL.md.
271
+ 3. Explain — break down trigger, workflow, gates, and risks.
272
+ 4. Show link — return the source URL or local path only, no write.
273
+ 5. Compare — line up against another candidate.
274
+ 6. Keep researching.
275
+ 7. Cancel.
297
276
  ```
298
277
 
299
- 7. Verify download and install.
278
+ ## Deep-Dive
300
279
 
301
- Confirm `SKILL.md` exists in the returned folder, then copy or symlink that exact folder:
280
+ When the user picks a skill:
302
281
 
303
- ```bash
304
- ls "<localPath>/SKILL.md"
305
- cp -r "<localPath>" "<dest>/<skill-name>"
306
- ```
282
+ 1. Fetch full `SKILL.md`.
283
+ 2. Fetch directly referenced files that affect behavior.
284
+ 3. Summarize trigger, workflow, support files, validation and safety gates, strengths, gaps, and adaptation ideas.
285
+ 4. Ask whether to install, adapt into a local skill, compare, or keep researching.
307
286
 
308
- 8. Verify each destination.
287
+ ## Create A Local Skill From Research
309
288
 
310
- ```bash
311
- ls "<dest>/<skill-name>/SKILL.md"
312
- ```
289
+ Use this when the user chooses to create a skill from findings or asks to synthesize one. Read `references/agent-skills-guide.md` before planning. If the source is a remote skill being fetched into a local folder, also read `references/fetch-and-create-locally.md`.
290
+
291
+ Before writing files:
292
+
293
+ 1. Build a research synthesis:
294
+ - User need and constraints.
295
+ - Inspected source skills and useful patterns.
296
+ - Quality and UX gates to include.
297
+ - Resources to create, if any.
298
+ - Exclusions: copied, generic, risky, or unnecessary pieces.
299
+ 2. Present a short plan:
300
+ - Skill name and destination.
301
+ - Trigger description draft.
302
+ - Workflow outline.
303
+ - Resources and validation plan.
304
+ 3. Ask for approval with create, adjust, inspect more, or cancel options.
305
+
306
+ After approval, write the skill with concise purpose, workflow, tool and resource rules, gates, output UX, and recovery paths. Add `references/`, `scripts/`, or `assets/` only when they reduce repeated work or keep `SKILL.md` lean. Defer to a dedicated skill-creation skill when one is available.
307
+
308
+ MUST also create `references/references.md` inside the new skill folder using the shape in `references/references-template.md`. Populate it with every source actually consulted — do not list sources that were not checked. This file is a research audit trail, not a bibliography template.
309
+
310
+ ## Install
311
+
312
+ Read `references/install-reference.md` before installing. Keep install behavior gated and verified. The reference is provider-agnostic; do not hardcode a destination.
313
+
314
+ Minimum install gates:
315
+
316
+ 1. Normalize input to a skill folder containing a valid `SKILL.md`.
317
+ 2. MUST ask the user where to install before writing anything. Cover all four destination questions: provider(s), scope per provider (user vs project vs custom path), project root if project scope, and install mode (copy vs symlink). Never assume one answer applies to every provider.
318
+ 3. Inspect `scripts/`, install hooks, or executable helpers before copying third-party skills.
319
+ 4. Per-destination conflict check; ask `Overwrite`, `Skip`, `Rename`, `Diff`, or `Cancel` for each conflict.
320
+ 5. Show source, description, every resolved destination path, install mode, and conflict plan; require explicit confirmation.
321
+ 6. Prefer copy; use symlink only for stable local sources when the user wants live source-tracking.
322
+ 7. Verify installed `SKILL.md` exists in each destination and report per-destination success or failure.
313
323
 
314
- Report success or failure per target.
324
+ For remote sources, follow the fetch-and-write workflow in `references/fetch-and-create-locally.md`.
315
325
 
316
326
  ## Recovery
317
327
 
318
- - Zero MCP search results: try synonyms, add owner scope, or use `githubSearchRepositories`.
319
- - Skill path not found: run `githubViewRepoStructure` at repo root.
320
- - Download fails: verify owner, repo, branch, and path; retry directory download.
321
- - Octocode MCP unavailable: stop and say Octocode MCP is required.
328
+ - No results: broaden terms once, inspect repo roots, or fall back to seed collections.
329
+ - Too many generic results: narrow by domain, agent, tool, workflow verb, or safety requirement.
330
+ - Strong repo but no skill path: browse root, `skills/`, `.claude/skills/`, `.cursor/skills/`, then category folders.
331
+ - Missing frontmatter: skip the candidate.
332
+ - Missing referenced files: lower confidence and mention the gap.
333
+ - Unsafe behavior: do not recommend install; explain the risk and offer a safer adaptation.
334
+ - Marketplace per-skill URL 404 (e.g. `https://www.skills.sh/<owner>/<repo>/<skill-name>`): the skill is not in that public index. Fall back to the source repo and lower confidence.
335
+ - Registry API rate-limit or 5xx: switch to `llms.txt` / `llms-full.txt` snapshot or to GitHub topic search; see `references/discovery-surfaces.md` §Recovery.
336
+ - Manifest file expected but missing (`.claude-plugin/marketplace.json`, `llms.txt`): note the gap as a quality signal and continue from raw `SKILL.md` evidence.
337
+ - Tool or API unavailable: state what evidence is missing, map the failed verb to an alternative runtime tool when one exists, and ask the user whether to switch source, drop to a fallback, or stop.