Skip to content

Commit 2a59544

Browse files
kherembourgclaude
andcommitted
docs(CLAUDE.md): document agentskill.sh + skills.sh refresh workflow
Adds two sections at the bottom of the project conventions: - **Publishing / refreshing on agentskill.sh** — the public submit endpoint (`POST https://agentskill.sh/api/skills/submit` with `{ "url": "<github-repo-url>" }`), the idempotent imported/updated semantics, when to re-run (rename, frontmatter edit, substantial body change), and the GitHub-webhook option for push-time sync. - **Publishing / refreshing on skills.sh** — no submission step (telemetry-driven leaderboard), and the local validation command `npx skills add . --list` to catch layout/frontmatter issues before pushing. Future me (and any agent reading CLAUDE.md) will know exactly which endpoint to hit and which payload shape works without re-probing the API. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 0db9d17 commit 2a59544

1 file changed

Lines changed: 67 additions & 0 deletions

File tree

CLAUDE.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,73 @@ The "wrapper" pattern (a single dedicated class that owns every call into the Pu
2828

2929
When in doubt, lean on the language: "recommended", "optional pattern", "consider", "best practice for testability and SDK isolation". Avoid: "rule", "must", "always", "required".
3030

31+
## Publishing / refreshing on agentskill.sh
32+
33+
The three skills are published on [agentskill.sh](https://agentskill.sh) as `@purchasely/purchasely-integrate`, `@purchasely/purchasely-review`, `@purchasely/purchasely-debug`.
34+
35+
**Force a re-scan** (after a push, a skill rename, or a description change) — agentskill.sh runs a daily background sync, but you can trigger it on demand by POSTing the GitHub repo URL to the public submit endpoint:
36+
37+
```bash
38+
ctx_execute(language: "javascript", code: `
39+
const r = await fetch("https://agentskill.sh/api/skills/submit", {
40+
method: "POST",
41+
headers: { "content-type": "application/json" },
42+
body: JSON.stringify({ url: "https://github.com/Purchasely/Purchasely-AI-Plugin" }),
43+
});
44+
console.log(JSON.stringify(await r.json(), null, 2));
45+
`)
46+
```
47+
48+
The call is idempotent: first import returns `status: imported`, subsequent calls return `status: updated`. Response shape:
49+
50+
```json
51+
{
52+
"success": true,
53+
"data": {
54+
"owner": "Purchasely",
55+
"repo": "Purchasely-AI-Plugin",
56+
"skills": [
57+
{ "slug": "purchasely/purchasely-debug", "status": "updated", "securityScore": 95 },
58+
{ "slug": "purchasely/purchasely-integrate", "status": "updated", "securityScore": 100 },
59+
{ "slug": "purchasely/purchasely-review", "status": "updated", "securityScore": 100 }
60+
],
61+
"summary": { "found": 3, "imported": 0, "updated": 3, "failed": 0 }
62+
}
63+
}
64+
```
65+
66+
The endpoint only accepts the key `url` — not `githubUrl`, `repo`, or `owner+repo`. Anything else returns 400 *"A URL is required"*.
67+
68+
**Don't rerun this for every commit.** Only call it when:
69+
- A skill is added, renamed, or removed (directory rename or new `SKILL.md`).
70+
- A `name:` or `description:` field changes in a `SKILL.md` frontmatter.
71+
- The body of a `SKILL.md` has a substantial update you want surfaced before the next daily sync (≤ 24h).
72+
73+
For push-time sync without manual calls, set up a GitHub webhook → `https://agentskill.sh/api/webhooks/github`, content type `application/json`, events `push` only (Settings → Webhooks → Add webhook on the GitHub repo).
74+
75+
**Public pages** — verify after a re-scan:
76+
- https://agentskill.sh/@purchasely/purchasely-integrate
77+
- https://agentskill.sh/@purchasely/purchasely-review
78+
- https://agentskill.sh/@purchasely/purchasely-debug
79+
80+
## Publishing / refreshing on skills.sh
81+
82+
The same three skills are also installable through the [`skills` CLI](https://www.skills.sh/docs):
83+
84+
```bash
85+
npx skills add Purchasely/Purchasely-AI-Plugin
86+
```
87+
88+
skills.sh has **no submission step** — the leaderboard is populated automatically from anonymous install telemetry collected by the CLI. The badge `https://skills.sh/b/Purchasely/Purchasely-AI-Plugin` increments on real installs only.
89+
90+
To **validate the repo layout** locally before pushing (catches frontmatter / directory-name mismatches the CLI would reject):
91+
92+
```bash
93+
npx --yes skills add . --list
94+
```
95+
96+
Should report `Found 3 skills` with names `purchasely-debug`, `purchasely-integrate`, `purchasely-review`. The CLI auto-discovers `skills/` and the `.claude-plugin/` manifests — no extra config needed.
97+
3198
# context-mode — MANDATORY routing rules
3299
33100
You have context-mode MCP tools available. These rules are NOT optional — they protect your context window from flooding. A single unrouted command can dump 56 KB into context and waste the entire session.

0 commit comments

Comments
 (0)