@trendai-crem/claude-skills 0.1.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 +62 -0
- package/cli.js +46 -0
- package/package.json +24 -0
package/README.md
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# @trendai-crem/claude-skills
|
|
2
|
+
|
|
3
|
+
One-command Claude Code skill installer for the team. Installs curated AI agent skills in a single line.
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npx @trendai-crem/claude-skills
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
That's it. The command installs:
|
|
12
|
+
|
|
13
|
+
1. **External skills** — [superpowers](https://github.com/obra/superpowers), [codex](https://github.com/oil-oil/codex)
|
|
14
|
+
2. **Team skills** — custom skills maintained in this repo (override same-named externals)
|
|
15
|
+
|
|
16
|
+
## Update
|
|
17
|
+
|
|
18
|
+
Re-run the same command to update all skills to the latest version:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npx @trendai-crem/claude-skills
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Team Skills
|
|
25
|
+
|
|
26
|
+
| Skill | Description |
|
|
27
|
+
|-------|-------------|
|
|
28
|
+
| _(coming soon)_ | Add your team skills to `skills/` |
|
|
29
|
+
|
|
30
|
+
## For Maintainers
|
|
31
|
+
|
|
32
|
+
### Adding a team skill
|
|
33
|
+
|
|
34
|
+
1. Create `skills/<skill-name>/SKILL.md` with frontmatter:
|
|
35
|
+
```markdown
|
|
36
|
+
---
|
|
37
|
+
name: skill-name
|
|
38
|
+
description: One-line trigger description for Claude
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
# Skill content here
|
|
42
|
+
```
|
|
43
|
+
2. Commit and push
|
|
44
|
+
3. Bump the npm version: `npm version patch && npm publish`
|
|
45
|
+
|
|
46
|
+
### Updating the package version
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
npm version patch # bug fixes
|
|
50
|
+
npm version minor # new skills added
|
|
51
|
+
npm version major # breaking changes
|
|
52
|
+
npm publish
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### External skill sources
|
|
56
|
+
|
|
57
|
+
Configured in `cli.js` under `EXTERNAL_SOURCES`. To add or remove external sources, edit that array and publish a new version.
|
|
58
|
+
|
|
59
|
+
## Requirements
|
|
60
|
+
|
|
61
|
+
- Node.js >= 20
|
|
62
|
+
- npm / npx
|
package/cli.js
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { execFileSync } from 'child_process';
|
|
4
|
+
import { fileURLToPath } from 'url';
|
|
5
|
+
import { dirname } from 'path';
|
|
6
|
+
|
|
7
|
+
const __dir = dirname(fileURLToPath(import.meta.url));
|
|
8
|
+
|
|
9
|
+
const EXTERNAL_SOURCES = [
|
|
10
|
+
{ repo: 'obra/superpowers', flags: ['--all'], label: 'superpowers' },
|
|
11
|
+
];
|
|
12
|
+
|
|
13
|
+
const run = (args, label) => {
|
|
14
|
+
try {
|
|
15
|
+
execFileSync('npx', args, { stdio: 'inherit' });
|
|
16
|
+
return true;
|
|
17
|
+
} catch (error) {
|
|
18
|
+
console.error(`\nFailed: ${label} (exit ${error.status})`);
|
|
19
|
+
return false;
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
console.log('Installing team skills...\n');
|
|
24
|
+
|
|
25
|
+
// 1. External skills — failures are non-fatal
|
|
26
|
+
const externalResults = EXTERNAL_SOURCES.map(({ repo, flags, label }) =>
|
|
27
|
+
({ label, ok: run(['skills', 'add', repo, ...flags, '-g', '-y'], label) })
|
|
28
|
+
);
|
|
29
|
+
|
|
30
|
+
// 2. Team skills — required, overrides same-named externals
|
|
31
|
+
const teamOk = run(['skills', 'add', __dir, '--all', '-g', '-y'], 'team skills');
|
|
32
|
+
|
|
33
|
+
// Summary
|
|
34
|
+
console.log('\nResults:');
|
|
35
|
+
[...externalResults, { label: 'team skills', ok: teamOk }]
|
|
36
|
+
.forEach(({ label, ok }) => console.log(` ${ok ? '✓' : '✗'} ${label}`));
|
|
37
|
+
|
|
38
|
+
if (!teamOk) {
|
|
39
|
+
console.error('\nFATAL: Team skills installation failed.');
|
|
40
|
+
process.exit(1);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const externalFailed = externalResults.filter(r => !r.ok);
|
|
44
|
+
if (externalFailed.length > 0) {
|
|
45
|
+
console.warn(`\nWARN: ${externalFailed.length} external source(s) failed — team skills installed successfully.`);
|
|
46
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@trendai-crem/claude-skills",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Claude Code skills installer for the trendai-crem team",
|
|
5
|
+
"license": "UNLICENSED",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/daniel-tian_tmemu/claude-skills.git"
|
|
9
|
+
},
|
|
10
|
+
"bin": {
|
|
11
|
+
"claude-skills": "cli.js"
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"cli.js",
|
|
15
|
+
"skills/"
|
|
16
|
+
],
|
|
17
|
+
"type": "module",
|
|
18
|
+
"engines": {
|
|
19
|
+
"node": ">=20"
|
|
20
|
+
},
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"skills": "1.4.5"
|
|
23
|
+
}
|
|
24
|
+
}
|