octocode-cli 1.3.0 → 1.5.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 +129 -28
- package/out/chunks/chunk-7476PETK.js +309 -0
- package/out/chunks/chunk-CVNNNSMQ.js +26 -0
- package/out/chunks/chunk-OQBJTZWK.js +60 -0
- package/out/chunks/chunk-UCZCF3BQ.js +9 -0
- package/out/chunks/command-help-specs-JZXVSLZ5.js +8 -0
- package/out/chunks/commands-XBFPLHSQ.js +8 -0
- package/out/chunks/help-P7TCOYAJ.js +10 -0
- package/out/chunks/main-help-ULF5PAQY.js +10 -0
- package/out/chunks/prompts-5E6VKRX5.js +8 -0
- package/out/chunks/spinner-URV2OX6O.js +8 -0
- package/out/chunks/tool-command-M6VA7P2F.js +8 -0
- package/out/octocode-cli.js +1 -1
- package/package.json +5 -3
- package/skills/README.md +60 -58
- package/skills/agentic-flow-best-practices/SKILL.md +280 -0
- package/skills/agentic-flow-best-practices/references/agent-collaboration-patterns.md +75 -0
- package/skills/agentic-flow-best-practices/references/pr-review-agent-example.md +47 -0
- package/skills/agentic-flow-best-practices/references/resources.md +112 -0
- package/skills/octocode-brainstorming/.env.example +11 -0
- package/skills/octocode-brainstorming/SKILL.md +262 -0
- package/skills/octocode-brainstorming/scripts/tavily-search.mjs +138 -0
- package/skills/octocode-chrome-devtools/README.md +541 -0
- package/skills/octocode-chrome-devtools/SKILL.md +197 -0
- package/skills/octocode-chrome-devtools/agents/openai.yaml +7 -0
- package/skills/octocode-chrome-devtools/references/CDP_AGENT_REFERENCE.md +401 -0
- package/skills/octocode-chrome-devtools/references/CHROME_FLAGS.md +234 -0
- package/skills/octocode-chrome-devtools/references/INTENTS.md +108 -0
- package/skills/octocode-chrome-devtools/references/INTENTS_AUTH.md +179 -0
- package/skills/octocode-chrome-devtools/references/INTENTS_AUTOMATION.md +214 -0
- package/skills/octocode-chrome-devtools/references/INTENTS_DEBUG.md +329 -0
- package/skills/octocode-chrome-devtools/references/INTENTS_ENVIRONMENT.md +237 -0
- package/skills/octocode-chrome-devtools/references/INTENTS_INSPECT.md +263 -0
- package/skills/octocode-chrome-devtools/references/INTENTS_STORAGE_CONSENT.md +214 -0
- package/skills/octocode-chrome-devtools/references/RECOVERY.md +39 -0
- package/skills/octocode-chrome-devtools/references/SCRIPT_PATTERNS.md +43 -0
- package/skills/octocode-chrome-devtools/references/SCRIPT_PATTERNS_ASYNC_WORKERS.md +345 -0
- package/skills/octocode-chrome-devtools/references/SCRIPT_PATTERNS_BROWSER.md +403 -0
- package/skills/octocode-chrome-devtools/references/SCRIPT_PATTERNS_OBSERVE.md +275 -0
- package/skills/octocode-chrome-devtools/references/SCRIPT_PATTERNS_SPECIAL.md +18 -0
- package/skills/octocode-chrome-devtools/scripts/cdp-runner.mjs +503 -0
- package/skills/octocode-chrome-devtools/scripts/cdp-sandbox.mjs +123 -0
- package/skills/octocode-chrome-devtools/scripts/cdp-template.mjs +81 -0
- package/skills/octocode-chrome-devtools/scripts/octocode-chrome-devtools.vpn.example.json +8 -0
- package/skills/octocode-chrome-devtools/scripts/open-browser.mjs +362 -0
- package/skills/octocode-chrome-devtools/scripts/sourcemap-resolver.mjs +193 -0
- package/skills/octocode-chrome-devtools/scripts/undercover.mjs +226 -0
- package/skills/octocode-design/README.md +2 -2
- package/skills/octocode-documentation-writer/README.md +1 -1
- package/skills/octocode-engineer/README.md +1 -1
- package/skills/octocode-engineer/SKILL.md +137 -306
- package/skills/octocode-engineer/references/cli-reference.md +13 -0
- package/skills/octocode-engineer/references/output-files.md +3 -3
- package/skills/octocode-engineer/scripts/run.js +146 -146
- package/skills/octocode-engineer/src/pipeline/main.ts +1 -17
- package/skills/octocode-engineer/src/pipeline/progress.ts +4 -0
- package/skills/octocode-engineer/src/reporting/summary-md.test.ts +48 -0
- package/skills/octocode-engineer/src/reporting/summary-md.ts +43 -2
- package/skills/octocode-install/SKILL.md +1 -1
- package/skills/octocode-pull-request-reviewer/README.md +5 -5
- package/skills/octocode-pull-request-reviewer/SKILL.md +1 -1
- package/skills/octocode-research/AGENTS.md +1 -1
- package/skills/octocode-research/README.md +2 -2
- package/skills/octocode-research/docs/ARCHITECTURE.md +1 -1
- package/skills/octocode-research/scripts/server.js +184 -239
- package/skills/octocode-research/src/routes/github.ts +4 -21
- package/skills/octocode-research/src/routes/local.ts +4 -21
- package/skills/octocode-research/src/utils/fileContentTransform.ts +44 -0
- package/skills/octocode-search-skill/SKILL.md +337 -0
- package/skills/octocode-search-skill/references/agent-skills-guide.md +177 -0
- package/skills/octocode-search-skill/references/discovery-surfaces.md +162 -0
- package/skills/octocode-search-skill/references/fetch-and-create-locally.md +57 -0
- package/skills/octocode-search-skill/references/install-reference.md +130 -0
- package/skills/octocode-search-skill/references/references-template.md +27 -0
- package/skills/octocode-search-skill/references/references.md +62 -0
- package/skills/octocode-slides/README.md +307 -0
- package/skills/octocode-slides/SKILL.md +410 -0
- package/skills/octocode-slides/references/01-brief.md +156 -0
- package/skills/octocode-slides/references/02-research.md +149 -0
- package/skills/octocode-slides/references/03-outline.md +172 -0
- package/skills/octocode-slides/references/04-design.md +301 -0
- package/skills/octocode-slides/references/05-implementation.md +213 -0
- package/skills/octocode-slides/references/06-review.md +258 -0
- package/skills/octocode-slides/references/animation.md +281 -0
- package/skills/octocode-slides/references/design-system.md +316 -0
- package/skills/octocode-slides/references/html-templates.md +673 -0
- package/skills/octocode-slides/references/image-generation.md +448 -0
- package/skills/octocode-slides/references/resources.md +840 -0
- package/skills/octocode-slides/references/slide-rules.md +541 -0
- package/skills/octocode-slides/references/wireframes.md +727 -0
- package/skills/octocode-slides/scripts/animation.js +182 -0
- package/skills/octocode-slides/scripts/base.css +353 -0
- package/skills/octocode-slides/scripts/base.html +655 -0
- package/skills/octocode-slides/scripts/generate_image.py +221 -0
- package/skills/octocode-slides/scripts/navbridge.js +79 -0
- package/skills/octocode-slides/scripts/presenter.js +316 -0
- package/skills/octocode-slides/scripts/slide.html +248 -0
- package/skills/octocode-stats/SKILL.md +73 -0
- package/skills/octocode-stats/assets/template.html +1332 -0
- package/skills/octocode-stats/scripts/build_dashboard.mjs +407 -0
- package/out/chunks/chunk-LH4AZJPA.js +0 -389
- package/out/chunks/command-help-specs-CQ3RBLP6.js +0 -8
- package/out/chunks/commands-M3QTWKWE.js +0 -51
- package/out/chunks/help-XPXP46ZT.js +0 -10
- package/out/chunks/main-help-HXFAFHPG.js +0 -10
- package/out/chunks/tool-command-VHFLPIHY.js +0 -8
|
@@ -19,16 +19,17 @@ import {
|
|
|
19
19
|
githubStructureSchema,
|
|
20
20
|
githubPRsSchema,
|
|
21
21
|
} from '../validation/index.js';
|
|
22
|
-
import { ResearchResponse, QuickResult
|
|
22
|
+
import { ResearchResponse, QuickResult } from '../utils/responseBuilder.js';
|
|
23
23
|
import { withGitHubResilience } from '../utils/resilience.js';
|
|
24
24
|
import { createRouteHandler } from '../utils/routeFactory.js';
|
|
25
|
+
import { transformFileContentResponse } from '../utils/fileContentTransform.js';
|
|
25
26
|
import {
|
|
26
27
|
safeString,
|
|
27
28
|
safeNumber,
|
|
28
29
|
safeArray,
|
|
29
30
|
transformPagination,
|
|
30
31
|
} from '../utils/responseFactory.js';
|
|
31
|
-
import { isObject, hasProperty, hasNumberProperty
|
|
32
|
+
import { isObject, hasProperty, hasNumberProperty } from '../types/guards.js';
|
|
32
33
|
|
|
33
34
|
export const githubRoutes = Router();
|
|
34
35
|
|
|
@@ -75,25 +76,7 @@ githubRoutes.get(
|
|
|
75
76
|
toolFn: githubGetFileContent,
|
|
76
77
|
toolName: 'githubGetFileContent',
|
|
77
78
|
resilience: withGitHubResilience,
|
|
78
|
-
transform:
|
|
79
|
-
const { data, hints, research } = parsed;
|
|
80
|
-
|
|
81
|
-
return ResearchResponse.fileContent({
|
|
82
|
-
path: safeString(data, 'path', queries[0]?.path || 'unknown'),
|
|
83
|
-
content: safeString(data, 'content'),
|
|
84
|
-
lines: hasNumberProperty(data, 'startLine')
|
|
85
|
-
? {
|
|
86
|
-
start: data.startLine,
|
|
87
|
-
end: hasNumberProperty(data, 'endLine') ? data.endLine : data.startLine,
|
|
88
|
-
}
|
|
89
|
-
: undefined,
|
|
90
|
-
language: detectLanguageFromPath(queries[0]?.path || ''),
|
|
91
|
-
totalLines: hasNumberProperty(data, 'totalLines') ? data.totalLines : undefined,
|
|
92
|
-
isPartial: hasBooleanProperty(data, 'isPartial') ? data.isPartial : undefined,
|
|
93
|
-
mcpHints: hints,
|
|
94
|
-
research,
|
|
95
|
-
});
|
|
96
|
-
},
|
|
79
|
+
transform: transformFileContentResponse,
|
|
97
80
|
})
|
|
98
81
|
);
|
|
99
82
|
|
|
@@ -17,9 +17,10 @@ import {
|
|
|
17
17
|
localFindSchema,
|
|
18
18
|
localStructureSchema,
|
|
19
19
|
} from '../validation/index.js';
|
|
20
|
-
import { ResearchResponse
|
|
20
|
+
import { ResearchResponse } from '../utils/responseBuilder.js';
|
|
21
21
|
import { withLocalResilience } from '../utils/resilience.js';
|
|
22
22
|
import { createRouteHandler } from '../utils/routeFactory.js';
|
|
23
|
+
import { transformFileContentResponse } from '../utils/fileContentTransform.js';
|
|
23
24
|
import {
|
|
24
25
|
safeString,
|
|
25
26
|
safeNumber,
|
|
@@ -27,7 +28,7 @@ import {
|
|
|
27
28
|
extractMatchLocations,
|
|
28
29
|
transformPagination,
|
|
29
30
|
} from '../utils/responseFactory.js';
|
|
30
|
-
import { isObject, hasNumberProperty
|
|
31
|
+
import { isObject, hasNumberProperty } from '../types/guards.js';
|
|
31
32
|
|
|
32
33
|
export const localRoutes = Router();
|
|
33
34
|
|
|
@@ -74,25 +75,7 @@ localRoutes.get(
|
|
|
74
75
|
toolFn: localGetFileContent,
|
|
75
76
|
toolName: 'localGetFileContent',
|
|
76
77
|
resilience: withLocalResilience,
|
|
77
|
-
transform:
|
|
78
|
-
const { data, hints, research } = parsed;
|
|
79
|
-
|
|
80
|
-
return ResearchResponse.fileContent({
|
|
81
|
-
path: safeString(data, 'path', queries[0]?.path || 'unknown'),
|
|
82
|
-
content: safeString(data, 'content'),
|
|
83
|
-
lines: hasNumberProperty(data, 'startLine')
|
|
84
|
-
? {
|
|
85
|
-
start: data.startLine,
|
|
86
|
-
end: hasNumberProperty(data, 'endLine') ? data.endLine : data.startLine,
|
|
87
|
-
}
|
|
88
|
-
: undefined,
|
|
89
|
-
language: detectLanguageFromPath(queries[0]?.path || ''),
|
|
90
|
-
totalLines: hasNumberProperty(data, 'totalLines') ? data.totalLines : undefined,
|
|
91
|
-
isPartial: hasBooleanProperty(data, 'isPartial') ? data.isPartial : undefined,
|
|
92
|
-
mcpHints: hints,
|
|
93
|
-
research,
|
|
94
|
-
});
|
|
95
|
-
},
|
|
78
|
+
transform: transformFileContentResponse,
|
|
96
79
|
})
|
|
97
80
|
);
|
|
98
81
|
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { ParsedResponse } from './responseParser.js';
|
|
2
|
+
import {
|
|
3
|
+
ResearchResponse,
|
|
4
|
+
detectLanguageFromPath,
|
|
5
|
+
} from './responseBuilder.js';
|
|
6
|
+
import { safeString } from './responseFactory.js';
|
|
7
|
+
import {
|
|
8
|
+
hasBooleanProperty,
|
|
9
|
+
hasNumberProperty,
|
|
10
|
+
} from '../types/guards.js';
|
|
11
|
+
|
|
12
|
+
type FileContentQuery = {
|
|
13
|
+
path?: string;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export function transformFileContentResponse(
|
|
17
|
+
parsed: ParsedResponse,
|
|
18
|
+
queries: FileContentQuery[]
|
|
19
|
+
): ReturnType<typeof ResearchResponse.fileContent> {
|
|
20
|
+
const { data, hints, research } = parsed;
|
|
21
|
+
const path = queries[0]?.path || '';
|
|
22
|
+
|
|
23
|
+
return ResearchResponse.fileContent({
|
|
24
|
+
path: safeString(data, 'path', path || 'unknown'),
|
|
25
|
+
content: safeString(data, 'content'),
|
|
26
|
+
lines: hasNumberProperty(data, 'startLine')
|
|
27
|
+
? {
|
|
28
|
+
start: data.startLine,
|
|
29
|
+
end: hasNumberProperty(data, 'endLine')
|
|
30
|
+
? data.endLine
|
|
31
|
+
: data.startLine,
|
|
32
|
+
}
|
|
33
|
+
: undefined,
|
|
34
|
+
language: detectLanguageFromPath(path),
|
|
35
|
+
totalLines: hasNumberProperty(data, 'totalLines')
|
|
36
|
+
? data.totalLines
|
|
37
|
+
: undefined,
|
|
38
|
+
isPartial: hasBooleanProperty(data, 'isPartial')
|
|
39
|
+
? data.isPartial
|
|
40
|
+
: undefined,
|
|
41
|
+
mcpHints: hints,
|
|
42
|
+
research,
|
|
43
|
+
});
|
|
44
|
+
}
|
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: octocode-search-skill
|
|
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
|
+
---
|
|
5
|
+
|
|
6
|
+
# Octocode Search Skill
|
|
7
|
+
|
|
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
|
+
|
|
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
|
+
|
|
12
|
+
## Operating Model
|
|
13
|
+
|
|
14
|
+
Default flow:
|
|
15
|
+
|
|
16
|
+
```text
|
|
17
|
+
UNDERSTAND -> DISCOVER -> INSPECT -> JUDGE -> RECOMMEND -> USER GATE -> ACT -> VERIFY
|
|
18
|
+
```
|
|
19
|
+
|
|
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.
|
|
21
|
+
|
|
22
|
+
Hard rules:
|
|
23
|
+
|
|
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.
|
|
27
|
+
|
|
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.
|
|
32
|
+
|
|
33
|
+
Gate
|
|
34
|
+
- MUST gate installs, file writes, local skill creation, target selection, config changes, overwrite decisions, and symlink decisions.
|
|
35
|
+
|
|
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.
|
|
39
|
+
|
|
40
|
+
Stop when any of these is true:
|
|
41
|
+
|
|
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.
|
|
46
|
+
|
|
47
|
+
## Tool Routing
|
|
48
|
+
|
|
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.
|
|
50
|
+
|
|
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`.
|
|
55
|
+
|
|
56
|
+
Fallbacks:
|
|
57
|
+
|
|
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.
|
|
62
|
+
|
|
63
|
+
## Local References
|
|
64
|
+
|
|
65
|
+
All reference material lives under `references/`.
|
|
66
|
+
|
|
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.
|
|
71
|
+
|
|
72
|
+
## Understand
|
|
73
|
+
|
|
74
|
+
Extract these facts before searching or editing:
|
|
75
|
+
|
|
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.
|
|
82
|
+
|
|
83
|
+
Ask one focused question only when the answer changes search scope, target ecosystem, or write/install behavior. Otherwise proceed with stated assumptions.
|
|
84
|
+
|
|
85
|
+
## Discover And Inspect
|
|
86
|
+
|
|
87
|
+
Set depth before searching:
|
|
88
|
+
|
|
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.
|
|
94
|
+
|
|
95
|
+
Search angles:
|
|
96
|
+
|
|
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.
|
|
102
|
+
|
|
103
|
+
Useful GitHub patterns:
|
|
104
|
+
|
|
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.
|
|
112
|
+
|
|
113
|
+
### Skills.sh Registry API
|
|
114
|
+
|
|
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'
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Response shape: `{"skills": [{"id": string, "skillId": string, "name": string, "installs": number, "source": "owner/repo"}, ...], "count": number}`
|
|
124
|
+
|
|
125
|
+
Popularity workflow — MUST follow this order:
|
|
126
|
+
|
|
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.
|
|
132
|
+
|
|
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.
|
|
134
|
+
|
|
135
|
+
Marketplace and registry surfaces (see `references/discovery-surfaces.md` for the full list and APIs):
|
|
136
|
+
|
|
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.
|
|
146
|
+
|
|
147
|
+
Evaluate:
|
|
148
|
+
|
|
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.
|
|
157
|
+
|
|
158
|
+
Quality labels:
|
|
159
|
+
|
|
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.
|
|
163
|
+
|
|
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.
|
|
165
|
+
|
|
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:
|
|
171
|
+
|
|
172
|
+
```text
|
|
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.
|
|
178
|
+
```
|
|
179
|
+
|
|
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.
|
|
183
|
+
|
|
184
|
+
Flow:
|
|
185
|
+
|
|
186
|
+
```text
|
|
187
|
+
READ -> MAP INTENT -> RATE ISSUES -> [REWRITE -> VALIDATE] -> REPORT
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
Read:
|
|
191
|
+
|
|
192
|
+
- Read the full target `SKILL.md` and all referenced files that affect behavior.
|
|
193
|
+
- Note purpose, line count, resources, gates, and output format.
|
|
194
|
+
|
|
195
|
+
Map intent:
|
|
196
|
+
|
|
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.
|
|
199
|
+
|
|
200
|
+
Rate issues:
|
|
201
|
+
|
|
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`).
|
|
205
|
+
|
|
206
|
+
Rewrite (skip in Rate-only mode):
|
|
207
|
+
|
|
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.
|
|
212
|
+
|
|
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.
|
|
220
|
+
|
|
221
|
+
Report — required output shape for `Rate-only`:
|
|
222
|
+
|
|
223
|
+
```text
|
|
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".
|
|
231
|
+
```
|
|
232
|
+
|
|
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):
|
|
248
|
+
|
|
249
|
+
```text
|
|
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">
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
Keep prose short. Do not paste raw search dumps or large excerpts.
|
|
260
|
+
|
|
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.
|
|
262
|
+
|
|
263
|
+
Gate example:
|
|
264
|
+
|
|
265
|
+
```text
|
|
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.
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
## Deep-Dive
|
|
279
|
+
|
|
280
|
+
When the user picks a skill:
|
|
281
|
+
|
|
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.
|
|
286
|
+
|
|
287
|
+
## Create A Local Skill From Research
|
|
288
|
+
|
|
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.
|
|
323
|
+
|
|
324
|
+
For remote sources, follow the fetch-and-write workflow in `references/fetch-and-create-locally.md`.
|
|
325
|
+
|
|
326
|
+
## Recovery
|
|
327
|
+
|
|
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.
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
# Agent Skills Guide
|
|
2
|
+
|
|
3
|
+
Use this reference when evaluating, improving, or creating Agent Skills. Keep `SKILL.md` focused on activation-critical instructions and load this file only when the task is about skill quality, structure, descriptions, scripts, or progressive disclosure.
|
|
4
|
+
|
|
5
|
+
## What Agent Skills Are
|
|
6
|
+
|
|
7
|
+
Agent Skills are a lightweight, open folder format for extending AI agents with specialized knowledge and workflows.
|
|
8
|
+
|
|
9
|
+
At minimum, a skill is a folder containing `SKILL.md`. That file includes frontmatter metadata (`name` and `description`) plus instructions for a specific class of tasks. Skills may also bundle scripts, reference materials, templates, and other resources.
|
|
10
|
+
|
|
11
|
+
```text
|
|
12
|
+
my-skill/
|
|
13
|
+
|-- SKILL.md # Required: metadata + instructions
|
|
14
|
+
|-- scripts/ # Optional: executable code
|
|
15
|
+
|-- references/ # Optional: documentation
|
|
16
|
+
|-- assets/ # Optional: templates, resources
|
|
17
|
+
`-- ... # Optional additional files or directories
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Why Skills Help Agents
|
|
21
|
+
|
|
22
|
+
Skills package procedural knowledge and team-, company-, user-, or domain-specific context into portable, version-controlled folders that agents load on demand.
|
|
23
|
+
|
|
24
|
+
High-value skills provide:
|
|
25
|
+
|
|
26
|
+
- Domain expertise: specialized knowledge the model would not reliably know by default.
|
|
27
|
+
- Repeatable workflows: multi-step procedures with consistent, auditable execution.
|
|
28
|
+
- Cross-product reuse: one skill can work across skills-compatible agents.
|
|
29
|
+
|
|
30
|
+
## Progressive Disclosure
|
|
31
|
+
|
|
32
|
+
Agents load skills in three stages:
|
|
33
|
+
|
|
34
|
+
1. Discovery: at startup, the agent sees only each skill's `name` and `description`.
|
|
35
|
+
2. Activation: when the user task matches the description, the agent reads full `SKILL.md`.
|
|
36
|
+
3. Execution: the agent follows `SKILL.md`, loading bundled resources or running scripts only when needed.
|
|
37
|
+
|
|
38
|
+
Design implication: every token in `SKILL.md` competes with conversation and system context. Put always-needed instructions in `SKILL.md`; move conditional details to `references/`, `scripts/`, or `assets/` and state when to load them.
|
|
39
|
+
|
|
40
|
+
## Source Material For Good Skills
|
|
41
|
+
|
|
42
|
+
Start from real expertise, not generic best practices.
|
|
43
|
+
|
|
44
|
+
Strong sources:
|
|
45
|
+
|
|
46
|
+
- Real completed tasks and the sequence that worked.
|
|
47
|
+
- User corrections and preferences from hands-on runs.
|
|
48
|
+
- Input/output examples and expected formats.
|
|
49
|
+
- Internal docs, runbooks, style guides, schemas, API specs, and configuration files.
|
|
50
|
+
- Code review comments, issue trackers, incident reports, and fixes from version control history.
|
|
51
|
+
- Real-world failure cases and their resolutions.
|
|
52
|
+
|
|
53
|
+
Avoid skills that only say vague things like "handle errors appropriately" or "follow auth best practices." Replace generic advice with concrete tools, commands, edge cases, and recovery procedures.
|
|
54
|
+
|
|
55
|
+
## Context Discipline
|
|
56
|
+
|
|
57
|
+
Add what the agent lacks; omit what the agent already knows.
|
|
58
|
+
|
|
59
|
+
Ask for each instruction: "Would the agent likely get this wrong without the skill?" If not, cut it. If unsure, test it. If the agent already performs the task well without the skill, the skill may not add value.
|
|
60
|
+
|
|
61
|
+
Good skills are coherent units of work. Avoid scopes that are too narrow and force many skills to load, or too broad and trigger imprecisely.
|
|
62
|
+
|
|
63
|
+
Aim for moderate detail: concise, stepwise guidance with a working example usually beats exhaustive documentation. Keep `SKILL.md` under 500 lines and 5,000 tokens; for most skills, prefer under 300 lines when practical.
|
|
64
|
+
|
|
65
|
+
## Progressive Reference Files
|
|
66
|
+
|
|
67
|
+
Move long or conditional material into `references/` when it is not needed on every activation.
|
|
68
|
+
|
|
69
|
+
Every reference link in `SKILL.md` must say when to load it, for example:
|
|
70
|
+
|
|
71
|
+
```text
|
|
72
|
+
Read `references/api-errors.md` if the API returns a non-200 response.
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
A generic "see references/" is too weak because the agent may not know which file matters.
|
|
76
|
+
|
|
77
|
+
Keep non-obvious gotchas in `SKILL.md` if the agent must know them before it can recognize the trigger. Otherwise put them in a reference file with an explicit load condition.
|
|
78
|
+
|
|
79
|
+
## Calibrating Control
|
|
80
|
+
|
|
81
|
+
Match specificity to task fragility.
|
|
82
|
+
|
|
83
|
+
Use flexible guidance when several approaches are valid and the task tolerates variation. Explain why the rule exists so the agent can adapt.
|
|
84
|
+
|
|
85
|
+
Use prescriptive instructions when operations are fragile, safety-sensitive, destructive, or order-dependent. For fragile operations, provide exact commands and say not to modify them.
|
|
86
|
+
|
|
87
|
+
Provide defaults, not menus. Pick the default tool or approach, then mention alternatives only as escape hatches.
|
|
88
|
+
|
|
89
|
+
Favor reusable procedures over one-off answers. A skill should teach an approach for a class of tasks, while still including concrete formats, constraints, and tool rules where they matter.
|
|
90
|
+
|
|
91
|
+
## Effective Instruction Patterns
|
|
92
|
+
|
|
93
|
+
Use gotchas for environment-specific facts that correct likely agent mistakes:
|
|
94
|
+
|
|
95
|
+
- Naming differences that refer to the same object.
|
|
96
|
+
- Health checks that give misleading success.
|
|
97
|
+
- Soft-delete filters or required query conditions.
|
|
98
|
+
- Tool behavior that violates common assumptions.
|
|
99
|
+
|
|
100
|
+
Use templates when output shape matters. Short templates can live in `SKILL.md`; long or conditional templates belong in `assets/` with explicit load instructions.
|
|
101
|
+
|
|
102
|
+
Use checklists for dependent multi-step workflows. Include validation gates so the agent can track progress and avoid skipping steps.
|
|
103
|
+
|
|
104
|
+
Use validation loops:
|
|
105
|
+
|
|
106
|
+
1. Do the work.
|
|
107
|
+
2. Run a validator, script, reference checklist, or self-check.
|
|
108
|
+
3. Fix issues if validation fails.
|
|
109
|
+
4. Repeat until validation passes.
|
|
110
|
+
5. Proceed only after validation passes.
|
|
111
|
+
|
|
112
|
+
Use plan-validate-execute for batch, stateful, or destructive operations. The plan must be checked against a source of truth before execution.
|
|
113
|
+
|
|
114
|
+
## Bundling Scripts
|
|
115
|
+
|
|
116
|
+
Use one-off commands when an existing tool already does the job and the command is simple. Pin versions when reproducibility matters, and state prerequisites.
|
|
117
|
+
|
|
118
|
+
Move complex or repeatedly reinvented logic into `scripts/`. A good script for agents:
|
|
119
|
+
|
|
120
|
+
- Accepts input via flags, environment variables, files, or stdin.
|
|
121
|
+
- Never requires interactive prompts.
|
|
122
|
+
- Provides concise `--help` output with examples.
|
|
123
|
+
- Emits helpful errors that say what was wrong, what was expected, and what to try.
|
|
124
|
+
- Sends structured data to stdout and diagnostics to stderr.
|
|
125
|
+
- Is idempotent or safe to retry.
|
|
126
|
+
- Rejects ambiguous input instead of guessing.
|
|
127
|
+
- Supports `--dry-run` for destructive or stateful operations.
|
|
128
|
+
- Uses meaningful exit codes when useful.
|
|
129
|
+
- Keeps output bounded or supports pagination/output-file flags.
|
|
130
|
+
|
|
131
|
+
Reference scripts from `SKILL.md` with paths relative to the skill root, for example `scripts/validate.sh`.
|
|
132
|
+
|
|
133
|
+
## Description Optimization
|
|
134
|
+
|
|
135
|
+
The `description` field is the primary trigger. At startup, agents see only `name` and `description`, so the description must tell the agent when to load the skill.
|
|
136
|
+
|
|
137
|
+
Good descriptions:
|
|
138
|
+
|
|
139
|
+
- Use imperative phrasing: "Use this skill when..."
|
|
140
|
+
- Focus on user intent, not implementation internals.
|
|
141
|
+
- Include non-obvious trigger situations where the user may not name the domain directly.
|
|
142
|
+
- Stay concise and under the 1024-character limit.
|
|
143
|
+
- Avoid being so broad that near-miss prompts trigger the skill.
|
|
144
|
+
|
|
145
|
+
Test descriptions with realistic eval queries:
|
|
146
|
+
|
|
147
|
+
- Should-trigger prompts: vary phrasing, typos, explicitness, detail, and task complexity.
|
|
148
|
+
- Should-not-trigger prompts: include near-misses that share keywords but need a different skill.
|
|
149
|
+
- Use train/validation splits so edits do not overfit to the test prompts.
|
|
150
|
+
- Run multiple times when behavior is nondeterministic and compare trigger rates.
|
|
151
|
+
|
|
152
|
+
Optimization loop:
|
|
153
|
+
|
|
154
|
+
1. Evaluate current description on train and validation sets.
|
|
155
|
+
2. Identify train failures: missed triggers and false triggers.
|
|
156
|
+
3. Revise for the general category of failure, not exact query keywords.
|
|
157
|
+
4. Keep the description under 1024 characters.
|
|
158
|
+
5. Select the best iteration by validation pass rate.
|
|
159
|
+
6. Sanity-check with fresh queries that were not used during optimization.
|
|
160
|
+
|
|
161
|
+
## Quality Signals Beyond Stars
|
|
162
|
+
|
|
163
|
+
When ranking candidates, prefer evidence-based signals over raw star count:
|
|
164
|
+
|
|
165
|
+
- **Install count via search API** — query `https://www.skills.sh/api/search?q=<topic>&limit=100` (see `discovery-surfaces.md` for the full curl command), sort results by `installs` descending. High install count with modest GitHub stars is usually a stronger battle-tested signal than the reverse.
|
|
166
|
+
- **Per-skill index page** — check `https://www.skills.sh/<owner>/<repo>/<skill-name>` (or `https://www.skills.sh/<org>/skills/<skill-name>` when the repo is named `skills`) for install count, install command, audit badge, and related skills.
|
|
167
|
+
- **Leaderboard** — `https://www.skills.sh` shows install-count ranked skills across all agents; useful for spotting dominant skills in a domain without knowing names in advance.
|
|
168
|
+
- **Recency** — `pushed:>YYYY-MM-DD` on GitHub. Skip skills with no commits in the last 12 months unless the user wants archival.
|
|
169
|
+
- **Audit badges** — skills.sh exposes Gen Agent Trust Hub pass/fail; Microsoft uses the Sensei rubric (triggers + anti-triggers + compatibility scored Low/Medium/High).
|
|
170
|
+
- **Registry-side fields** — `aiskillstore.io` exposes `match_reasons`, `downloads_7d`, `days_since_update`, and a `/similar` endpoint for overlap-ranked alternatives.
|
|
171
|
+
- **Demand signal** — `aiskillstore.io/v1/demand/most-wanted` shows what users searched for and did not find; useful when deciding whether to adapt vs create.
|
|
172
|
+
|
|
173
|
+
For full registry details, manifest formats, and CLI installers, load `discovery-surfaces.md`.
|
|
174
|
+
|
|
175
|
+
## External Documentation Index
|
|
176
|
+
|
|
177
|
+
The full documentation index is available at `https://agentskills.io/llms.txt`. Use that index only when external web access is allowed and current upstream details matter.
|