@trendai-crem/claude-skills 1.1.0 → 1.3.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 +50 -5
- package/cli.js +45 -2
- package/package.json +1 -1
- package/sources.json +8 -0
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ That's it. The command installs all three source types declared in `sources.json
|
|
|
14
14
|
|-------------|-----------------|---------------|
|
|
15
15
|
| **skills-repo** | [superpowers](https://github.com/obra/superpowers) — brainstorming, debugging, TDD, and more | Edit `sources.json`, bump version, PR |
|
|
16
16
|
| **skills-dir** | Team skills in this repo's `skills/` directory | Add/remove `skills/<name>/`, bump version, PR |
|
|
17
|
-
| **marketplace** | Plugins from `ai-skill-marketplace
|
|
17
|
+
| **marketplace** | Plugins from `ai-skill-marketplace`, `claude-plugins-official`, and `openai-codex` | Edit `plugins` list in `sources.json`, bump version, PR |
|
|
18
18
|
|
|
19
19
|
Re-run to update everything:
|
|
20
20
|
|
|
@@ -29,22 +29,23 @@ Auto-update runs at session start — you'll be notified when a new version is a
|
|
|
29
29
|
| Skill | Trigger | Description |
|
|
30
30
|
|-------|---------|-------------|
|
|
31
31
|
| **code-review** | "review my code", "code review" | Multi-perspective review — 5 reviewers + Codex baseline, enforces TM RDSec policy and Secure Coding Dojo checkpoints |
|
|
32
|
-
| **codex** | "use codex", "ask codex to..." | Delegate coding tasks to Codex CLI |
|
|
33
32
|
| **reviewing-prs** | "review this PR", "review pull request" | Structured PR review with 3 independent sub-agents covering correctness, security, and requirements |
|
|
34
33
|
|
|
35
34
|
## Marketplace Plugins
|
|
36
35
|
|
|
37
|
-
Installed from [ai-skill-marketplace](https://github.com/trend-ai-taskforce/ai-skill-marketplace)
|
|
36
|
+
Installed from [ai-skill-marketplace](https://github.com/trend-ai-taskforce/ai-skill-marketplace), `claude-plugins-official`, `openai-codex`, and `everything-claude-code`. Configure in `sources.json`.
|
|
38
37
|
|
|
39
38
|
| Plugin | Marketplace | Description |
|
|
40
39
|
|--------|-------------|-------------|
|
|
41
40
|
| **atlassian-tools** | ai-skill-marketplace | Confluence wiki and Jira issue management |
|
|
42
|
-
| **wiki-tools** | ai-skill-marketplace | Confluence documentation with ADF format and Mermaid support |
|
|
43
41
|
| **google-style-guides** | ai-skill-marketplace | Google Style Guide references (Java, Python, Go, TypeScript, and more) |
|
|
44
42
|
| **l2-automation** | ai-skill-marketplace | L2 test automation and Robot Framework skills |
|
|
45
43
|
| **service-doc-generator** | ai-skill-marketplace | Systematic service documentation generation |
|
|
46
|
-
| **claude-on-teams** | ai-skill-marketplace | Claude integration for Microsoft Teams |
|
|
47
44
|
| **ralph-loop** | claude-plugins-official | Ralph Loop autonomous agent plugin |
|
|
45
|
+
| **codex** | openai-codex | Official OpenAI Codex plugin — CLI runtime, review commands, rescue agent, GPT prompting guides |
|
|
46
|
+
| **everything-claude-code** | everything-claude-code | Battle-tested agents, skills, hooks, and commands — TDD, code review, security, Go/Python/Swift patterns, and more |
|
|
47
|
+
|
|
48
|
+
> **Note:** The `everything-claude-code` plugin installs skills, agents, commands, and hooks via the marketplace. Its **rules** are automatically copied to `~/.claude/rules/` on install (all languages, no-clobber — existing files are never overwritten).
|
|
48
49
|
|
|
49
50
|
## For Maintainers
|
|
50
51
|
|
|
@@ -184,6 +185,50 @@ lib/handlers/{skills-dir, skills-repo, marketplace}.js
|
|
|
184
185
|
|
|
185
186
|
Removals propagate automatically: remove an entry from `sources.json`, bump version, and the next auto-update uninstalls it for all team members.
|
|
186
187
|
|
|
188
|
+
### Auto-Update Mechanism
|
|
189
|
+
|
|
190
|
+
When `cli.js` runs, it registers two shell hook scripts into `~/.claude/settings.json` after installation:
|
|
191
|
+
|
|
192
|
+
```
|
|
193
|
+
cli.js ── setupAutoUpdate()
|
|
194
|
+
│
|
|
195
|
+
├─► ~/.claude/hooks/claude-skills-install-update.sh
|
|
196
|
+
│ Hook type: SessionStart
|
|
197
|
+
│ Throttle: 24 hours
|
|
198
|
+
│ Action: npm install + run cli.js silently
|
|
199
|
+
│ Output: systemMessage "claude-skills updated: X → Y"
|
|
200
|
+
│
|
|
201
|
+
└─► ~/.claude/hooks/auto-update-claude-skills.sh
|
|
202
|
+
Hook type: UserPromptSubmit
|
|
203
|
+
Throttle: 2 hours
|
|
204
|
+
Action: npm view (version check only, no install)
|
|
205
|
+
Output: systemMessage "update available: X → Y"
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
**How it works:**
|
|
209
|
+
|
|
210
|
+
1. **SessionStart hook** — runs once per 24 hours at session startup. Compares the installed version against npm registry. If a newer version exists, downloads and runs it in a temp directory. The new `cli.js` re-installs all sources from the updated `sources.json`, effectively propagating any added/removed skills or plugins. Emits a `systemMessage` to notify the user.
|
|
211
|
+
|
|
212
|
+
2. **UserPromptSubmit hook** — runs once per 2 hours when the user submits a prompt. Only checks for a newer version on npm (no install). If found, emits a `systemMessage` with the update command.
|
|
213
|
+
|
|
214
|
+
3. **Throttle files** — stored in `~/.cache/claude-skills-install-check.json` and `~/.cache/claude-skills-version-check.json`. Each contains a `ts` field (Unix epoch) to prevent redundant checks within the throttle window.
|
|
215
|
+
|
|
216
|
+
4. **Version pinning** — both scripts are generated with the currently installed version baked in as a constant. When a new version is installed, the scripts are regenerated with the new version, resetting the baseline for future comparisons.
|
|
217
|
+
|
|
218
|
+
**Propagation flow (maintainer publishes → team member receives):**
|
|
219
|
+
|
|
220
|
+
```
|
|
221
|
+
Maintainer: edit sources.json → bump version → merge PR → CI publishes to npm
|
|
222
|
+
↓
|
|
223
|
+
Team member: starts Claude Code session
|
|
224
|
+
↓
|
|
225
|
+
SessionStart hook fires → detects new version on npm → installs in temp dir
|
|
226
|
+
↓
|
|
227
|
+
New cli.js runs → reads updated sources.json → installs/uninstalls diff
|
|
228
|
+
↓
|
|
229
|
+
Manifest updated → hooks regenerated with new version → done
|
|
230
|
+
```
|
|
231
|
+
|
|
187
232
|
## Requirements
|
|
188
233
|
|
|
189
234
|
- Node.js >= 20
|
package/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import { execFileSync } from 'child_process';
|
|
4
|
-
import { readFileSync, writeFileSync, copyFileSync, mkdirSync, existsSync } from 'fs';
|
|
4
|
+
import { readFileSync, writeFileSync, copyFileSync, mkdirSync, existsSync, readdirSync } from 'fs';
|
|
5
5
|
import { fileURLToPath } from 'url';
|
|
6
6
|
import { dirname, join } from 'path';
|
|
7
7
|
import { homedir, tmpdir } from 'os';
|
|
@@ -81,6 +81,49 @@ if (!manifest._writeSkipped) {
|
|
|
81
81
|
}
|
|
82
82
|
printSummary(allResults);
|
|
83
83
|
|
|
84
|
+
// ── ECC rules (no-clobber) ───────────────────────────────────────────────────
|
|
85
|
+
|
|
86
|
+
installEccRules();
|
|
87
|
+
|
|
88
|
+
function installEccRules() {
|
|
89
|
+
const eccMarketplace = join(
|
|
90
|
+
homedir(), '.claude', 'plugins', 'marketplaces', 'everything-claude-code'
|
|
91
|
+
);
|
|
92
|
+
const eccRulesDir = join(eccMarketplace, 'rules');
|
|
93
|
+
if (!existsSync(eccRulesDir)) return;
|
|
94
|
+
|
|
95
|
+
const destDir = join(homedir(), '.claude', 'rules');
|
|
96
|
+
const languages = readdirSync(eccRulesDir, { withFileTypes: true })
|
|
97
|
+
.filter(d => d.isDirectory())
|
|
98
|
+
.map(d => d.name);
|
|
99
|
+
|
|
100
|
+
let copied = 0;
|
|
101
|
+
let skipped = 0;
|
|
102
|
+
|
|
103
|
+
for (const lang of languages) {
|
|
104
|
+
const srcLang = join(eccRulesDir, lang);
|
|
105
|
+
const destLang = join(destDir, lang);
|
|
106
|
+
mkdirSync(destLang, { recursive: true });
|
|
107
|
+
|
|
108
|
+
const files = readdirSync(srcLang).filter(f => f.endsWith('.md'));
|
|
109
|
+
for (const file of files) {
|
|
110
|
+
const destFile = join(destLang, file);
|
|
111
|
+
if (existsSync(destFile)) {
|
|
112
|
+
skipped++;
|
|
113
|
+
continue;
|
|
114
|
+
}
|
|
115
|
+
copyFileSync(join(srcLang, file), destFile);
|
|
116
|
+
copied++;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
if (copied > 0) {
|
|
121
|
+
console.log(`\n✓ ECC rules: ${copied} installed, ${skipped} skipped (already exist)`);
|
|
122
|
+
} else if (skipped > 0) {
|
|
123
|
+
console.log(`\n✓ ECC rules: up to date (${skipped} already installed)`);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
84
127
|
// ── Auto-update hooks ─────────────────────────────────────────────────────────
|
|
85
128
|
|
|
86
129
|
setupAutoUpdate();
|
|
@@ -170,7 +213,7 @@ LATEST=$(npm view "$PACKAGE" version 2>/dev/null || echo "")
|
|
|
170
213
|
|
|
171
214
|
INSTALL_DIR="$(mktemp -d)"
|
|
172
215
|
if npm install --prefix "$INSTALL_DIR" "$PACKAGE@$LATEST" --silent 2>/dev/null \\
|
|
173
|
-
&& node "$INSTALL_DIR/node_modules/$PACKAGE/cli.js"
|
|
216
|
+
&& node "$INSTALL_DIR/node_modules/$PACKAGE/cli.js" >/dev/null 2>&1; then
|
|
174
217
|
rm -rf "$INSTALL_DIR"
|
|
175
218
|
python3 -c "import json,sys; print(json.dumps({'systemMessage': 'claude-skills updated: ' + sys.argv[1] + ' \u2192 ' + sys.argv[2]}))" "$INSTALLED" "$LATEST"
|
|
176
219
|
else
|
package/package.json
CHANGED