@vocdoni/skills 0.5.2 → 0.5.3
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/.claude-plugin/marketplace.json +2 -2
- package/CHANGELOG.md +10 -0
- package/README.md +1 -1
- package/bin/install.js +22 -5
- package/package.json +2 -1
- package/plugins/claude-pi-subagent/plugins/pi-subagent/package-lock.json +6 -6
- package/plugins/vocdoni-contributing/.claude-plugin/plugin.json +2 -2
- package/plugins/vocdoni-contributing/hooks/hooks.json +1 -1
- package/plugins/vocdoni-contributing/skills/contributing/SKILL.md +18 -1
|
@@ -69,8 +69,8 @@
|
|
|
69
69
|
{
|
|
70
70
|
"name": "vocdoni-contributing",
|
|
71
71
|
"source": "./plugins/vocdoni-contributing",
|
|
72
|
-
"description": "Rules for what the agent posts on the git host: self-introduction, issue tracking, stacked PRs for epics, length and structure for PR/MR descriptions, issues and reviews,
|
|
73
|
-
"version": "0.
|
|
72
|
+
"description": "Rules for what the agent posts on the git host: self-introduction, issue tracking, stacked PRs for epics, length and structure for PR/MR descriptions, issues and reviews, posting reviews as reviews, and resolving the review threads it addresses. A SessionStart hook applies them in every session, even as one step of a larger task.",
|
|
73
|
+
"version": "0.4.0",
|
|
74
74
|
"category": "engineering",
|
|
75
75
|
"tags": ["vocdoni", "pull-request", "merge-request", "code-review", "issues", "commits", "git-host"],
|
|
76
76
|
"license": "AGPL-3.0-or-later",
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @vocdoni/skills
|
|
2
2
|
|
|
3
|
+
## 0.5.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#69](https://github.com/vocdoni/skills/pull/69) [`fb3c5a7`](https://github.com/vocdoni/skills/commit/fb3c5a7a8bac06eda893b8d87c75d8d57210ec04) Thanks [@elboletaire](https://github.com/elboletaire)! - `vocdoni-contributing` 0.4.0: when the agent answers review comments on its own PR, it replies in each thread and resolves it through the API (GitHub GraphQL `resolveReviewThread`, GitLab discussions), whether it made the fix or explained why it won't.
|
|
8
|
+
|
|
9
|
+
- [#72](https://github.com/vocdoni/skills/pull/72) [`62f928e`](https://github.com/vocdoni/skills/commit/62f928ee5a67d43dd1e065bca6aff7ec50f01054) Thanks [@elboletaire](https://github.com/elboletaire)! - `bin/install.js` now exports its helpers for tests and only runs the CLI when executed directly, reads CRLF SKILL.md frontmatter, and no longer scans a plugin's subdirectories for skills when its root has no SKILL.md. New `node:test` suite (`npm test`) and PR CI cover the installer and the pi-subagent server.
|
|
10
|
+
|
|
11
|
+
- [#72](https://github.com/vocdoni/skills/pull/72) [`62f928e`](https://github.com/vocdoni/skills/commit/62f928ee5a67d43dd1e065bca6aff7ec50f01054) Thanks [@elboletaire](https://github.com/elboletaire)! - Bump transitive `hono` and `@hono/node-server` in pi-subagent's lockfile to patched versions.
|
|
12
|
+
|
|
3
13
|
## 0.5.2
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -110,7 +110,7 @@ The plugin also installs a **SessionStart hook** so the model loads the skill on
|
|
|
110
110
|
|
|
111
111
|
| Skill | What it covers |
|
|
112
112
|
| -------------- | -------------- |
|
|
113
|
-
| `contributing` | The rules for everything the agent writes on GitHub or GitLab: an opening line naming the model and the user it acts for, no `Co-authored-by` trailer, every PR linked to an issue (found, or opened before the PR), an epic's PRs stacked on each other with `gh stack` and merged in one go, length limits and structure for PR/MR descriptions and issues, findings of about three sentences in reviews (nits marked "Nit:"), and reviews posted as reviews marked "Approve" or "Request changes". |
|
|
113
|
+
| `contributing` | The rules for everything the agent writes on GitHub or GitLab: an opening line naming the model and the user it acts for, no `Co-authored-by` trailer, every PR linked to an issue (found, or opened before the PR), an epic's PRs stacked on each other with `gh stack` and merged in one go, length limits and structure for PR/MR descriptions and issues, findings of about three sentences in reviews (nits marked "Nit:"), review threads it addresses answered and resolved, and reviews posted as reviews marked "Approve" or "Request changes". |
|
|
114
114
|
|
|
115
115
|
The plugin also installs a **SessionStart hook** that injects the same `contributing` body into every Claude Code session, so the rules hold even when a PR is one step of a larger task and the skill's description never matches. The hook reads `skills/contributing/SKILL.md` directly, so the skill is the only place to edit. The hook is Claude Code-only; an npx install gets the skill, which still triggers from its description.
|
|
116
116
|
|
package/bin/install.js
CHANGED
|
@@ -110,9 +110,9 @@ function readSkillMeta(skillDir) {
|
|
|
110
110
|
const meta = { name: '', description: '' };
|
|
111
111
|
try {
|
|
112
112
|
const src = fs.readFileSync(path.join(skillDir, 'SKILL.md'), 'utf8');
|
|
113
|
-
const m = src.match(/^---\s*\n([\s\S]*?)\n---/);
|
|
113
|
+
const m = src.match(/^---\s*\r?\n([\s\S]*?)\r?\n---/);
|
|
114
114
|
if (!m) return meta;
|
|
115
|
-
for (const line of m[1].split(
|
|
115
|
+
for (const line of m[1].split(/\r?\n/)) {
|
|
116
116
|
const kv = line.match(/^(name|description):\s*(.*)$/);
|
|
117
117
|
if (kv) meta[kv[1]] = kv[2].replace(/^['"]|['"]$/g, '');
|
|
118
118
|
}
|
|
@@ -185,8 +185,11 @@ function skillsFromManifest(manifest, rootDir) {
|
|
|
185
185
|
}
|
|
186
186
|
} else {
|
|
187
187
|
add(collectSkillsAtPath(path.join(rootDir, 'skills')));
|
|
188
|
-
// Plugin with a single SKILL.md at its root and no skills/ directory.
|
|
189
|
-
|
|
188
|
+
// Plugin with a single SKILL.md at its root and no skills/ directory. Only
|
|
189
|
+
// the root file counts: scanning the root would also pick up subdirectories.
|
|
190
|
+
if (skills.length === 0 && fs.existsSync(path.join(rootDir, 'SKILL.md'))) {
|
|
191
|
+
add(collectSkillsAtPath(rootDir, manifest.name));
|
|
192
|
+
}
|
|
190
193
|
}
|
|
191
194
|
|
|
192
195
|
skills.sort((a, b) => a.name.localeCompare(b.name));
|
|
@@ -503,4 +506,18 @@ function main(argv) {
|
|
|
503
506
|
}
|
|
504
507
|
}
|
|
505
508
|
|
|
506
|
-
|
|
509
|
+
if (require.main === module) {
|
|
510
|
+
process.exit(main(process.argv.slice(2)));
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
module.exports = {
|
|
514
|
+
parseArgs,
|
|
515
|
+
readSkillMeta,
|
|
516
|
+
collectSkillsAtPath,
|
|
517
|
+
skillsFromManifest,
|
|
518
|
+
resolveRemoteSource,
|
|
519
|
+
isRemoteSource,
|
|
520
|
+
resolvePluginName,
|
|
521
|
+
discoverPlugins,
|
|
522
|
+
main,
|
|
523
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vocdoni/skills",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.3",
|
|
4
4
|
"description": "Vocdoni's curated skills for AI coding assistants (Claude Code, Cursor, Cline, and other Anthropic-skill-compatible clients).",
|
|
5
5
|
"bin": {
|
|
6
6
|
"vocdoni-skills": "bin/install.js"
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
],
|
|
16
16
|
"scripts": {
|
|
17
17
|
"lint": "node bin/install.js list",
|
|
18
|
+
"test": "node --test test/*.test.js",
|
|
18
19
|
"changeset": "changeset",
|
|
19
20
|
"version-packages": "changeset version && npm install --package-lock-only",
|
|
20
21
|
"release": "node .github/scripts/check-release.mjs && changeset publish"
|
|
@@ -465,9 +465,9 @@
|
|
|
465
465
|
}
|
|
466
466
|
},
|
|
467
467
|
"node_modules/@hono/node-server": {
|
|
468
|
-
"version": "2.1.
|
|
469
|
-
"resolved": "https://registry.npmjs.org/@hono/node-server/-/node-server-2.1.
|
|
470
|
-
"integrity": "sha512-
|
|
468
|
+
"version": "2.1.11",
|
|
469
|
+
"resolved": "https://registry.npmjs.org/@hono/node-server/-/node-server-2.1.11.tgz",
|
|
470
|
+
"integrity": "sha512-KzKz9vl4vvr1vgLHamj+g5uonbrj5NwAdO3yzOS6cd2HjALVeOgTgeZOyAzNxejbkfOOPIcvuf/Tg8l1pEFLog==",
|
|
471
471
|
"license": "MIT",
|
|
472
472
|
"engines": {
|
|
473
473
|
"node": ">=20"
|
|
@@ -1982,9 +1982,9 @@
|
|
|
1982
1982
|
}
|
|
1983
1983
|
},
|
|
1984
1984
|
"node_modules/hono": {
|
|
1985
|
-
"version": "4.13.
|
|
1986
|
-
"resolved": "https://registry.npmjs.org/hono/-/hono-4.13.
|
|
1987
|
-
"integrity": "sha512-
|
|
1985
|
+
"version": "4.13.21",
|
|
1986
|
+
"resolved": "https://registry.npmjs.org/hono/-/hono-4.13.21.tgz",
|
|
1987
|
+
"integrity": "sha512-h9UsguqfVk4kjUwLvQpHOmOaJpW10jz9lp8bvKUUa04wJG/fabKFBqXZ06D6LFaeKQZtUZRVeg0gfkTTEsX7Mw==",
|
|
1988
1988
|
"license": "MIT",
|
|
1989
1989
|
"engines": {
|
|
1990
1990
|
"node": ">=16.9.0"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vocdoni-contributing",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Vocdoni's rules for what the agent writes on the git host: tying each change to an issue (found, or opened before the PR), stacking an epic's PRs with gh stack, who it introduces itself as, length and structure for PR/MR descriptions, issues, reviews and commits,
|
|
3
|
+
"version": "0.4.0",
|
|
4
|
+
"description": "Vocdoni's rules for what the agent writes on the git host: tying each change to an issue (found, or opened before the PR), stacking an epic's PRs with gh stack, who it introduces itself as, length and structure for PR/MR descriptions, issues, reviews and commits, how to post a review as a review, and how to reply to and resolve the review threads it addresses. A SessionStart hook injects the same rules into every Claude Code session, so they apply even when a PR is one step of a larger task.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Vocdoni",
|
|
7
7
|
"url": "https://vocdoni.io"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"description": "Injects the vocdoni-contributing rules (issue tracking, stacked PRs for epics, PR/MR descriptions, issues, reviews, commits) into every session by reading the skill body from SKILL.md",
|
|
2
|
+
"description": "Injects the vocdoni-contributing rules (issue tracking, stacked PRs for epics, PR/MR descriptions, issues, reviews, review threads, commits) into every session by reading the skill body from SKILL.md",
|
|
3
3
|
"hooks": {
|
|
4
4
|
"SessionStart": [
|
|
5
5
|
{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: contributing
|
|
3
|
-
description: Use whenever starting work on a change in a repository, or writing or posting a pull request or merge request description, an issue, a code review, a review comment or a commit message, on GitHub, GitLab or any other git host, through gh, glab or the web, including as one step of a larger task, and when an epic issue needs several pull requests. Sets how to tie the work to an issue (find one, or open one before the PR), how to stack an epic's PRs on each other with gh stack instead of opening them all against the base branch, how to introduce yourself as the agent acting for the user, length limits and structure for PRs, issues and reviews,
|
|
3
|
+
description: Use whenever starting work on a change in a repository, or writing or posting a pull request or merge request description, an issue, a code review, a review comment or a commit message, or answering review comments on a pull request, on GitHub, GitLab or any other git host, through gh, glab or the web, including as one step of a larger task, and when an epic issue needs several pull requests. Sets how to tie the work to an issue (find one, or open one before the PR), how to stack an epic's PRs on each other with gh stack instead of opening them all against the base branch, how to introduce yourself as the agent acting for the user, length limits and structure for PRs, issues and reviews, how to post a review, and how to reply to and resolve the review threads you address.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Contributing
|
|
@@ -48,3 +48,20 @@ Keep issues under ~15 lines of markdown too, code blocks included. Open with the
|
|
|
48
48
|
Each finding takes about three sentences: what's wrong, what it breaks, and the fix. Don't walk through every step of the reasoning or restate what the diff shows. Mark nits with "Nit:" and keep them shorter still. The review's summary body follows the same rule.
|
|
49
49
|
|
|
50
50
|
Post a review you were asked to publish as a review, not as a plain comment, and mark it "Approve" or "Request changes" depending on its outcome (on GitLab: approve, or leave the blocking threads unresolved). Write a bare `@name` only for a real login you mean to notify.
|
|
51
|
+
|
|
52
|
+
When you answer review comments on your own PR, close each thread you handled: reply in it with the fix (the commit, or one line on what changed) or with why you are not making the change, then resolve it. Resolve it either way, so the user doesn't have to resolve every thread by hand. Leave threads you didn't handle open, and never resolve threads on a PR you are reviewing. These thread replies skip the introduction line. On GitHub, resolving takes the GraphQL API:
|
|
53
|
+
|
|
54
|
+
```sh
|
|
55
|
+
# unresolved threads on PR N, with their IDs
|
|
56
|
+
gh api graphql -F owner='{owner}' -F repo='{repo}' -F pr=N -f query='
|
|
57
|
+
query($owner:String!,$repo:String!,$pr:Int!){repository(owner:$owner,name:$repo){pullRequest(number:$pr){
|
|
58
|
+
reviewThreads(first:100){nodes{id isResolved path line comments(first:1){nodes{body}}}}}}}' \
|
|
59
|
+
--jq '.data.repository.pullRequest.reviewThreads.nodes[] | select(.isResolved | not)'
|
|
60
|
+
# reply in a thread, then resolve it
|
|
61
|
+
gh api graphql -F id=PRRT_xxx -f body='Fixed in abc1234.' -f query='
|
|
62
|
+
mutation($id:ID!,$body:String!){addPullRequestReviewThreadReply(input:{pullRequestReviewThreadId:$id,body:$body}){comment{id}}}'
|
|
63
|
+
gh api graphql -F id=PRRT_xxx -f query='
|
|
64
|
+
mutation($id:ID!){resolveReviewThread(input:{threadId:$id}){thread{isResolved}}}'
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
On GitLab, reply with `glab api -X POST "projects/:id/merge_requests/N/discussions/<discussion_id>/notes" -f body='...'`, then resolve with `glab api -X PUT "projects/:id/merge_requests/N/discussions/<discussion_id>?resolved=true"`.
|