@booklib/skills 1.7.0 → 1.8.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/bin/skills.js +87 -5
- package/package.json +1 -1
package/bin/skills.js
CHANGED
|
@@ -13,6 +13,55 @@ const skillsRoot = path.join(__dirname, '..', 'skills');
|
|
|
13
13
|
const commandsRoot = path.join(__dirname, '..', 'commands');
|
|
14
14
|
const agentsRoot = path.join(__dirname, '..', 'agents');
|
|
15
15
|
|
|
16
|
+
// ─── Installation profiles ────────────────────────────────────────────────────
|
|
17
|
+
const PROFILES = {
|
|
18
|
+
core: {
|
|
19
|
+
description: 'Routing + general code quality — a good starting point for any project',
|
|
20
|
+
skills: ['skill-router', 'clean-code-reviewer'],
|
|
21
|
+
agents: ['booklib-reviewer'],
|
|
22
|
+
},
|
|
23
|
+
python: {
|
|
24
|
+
description: 'Python best practices, async patterns, and web scraping',
|
|
25
|
+
skills: ['effective-python', 'using-asyncio-python', 'web-scraping-python'],
|
|
26
|
+
agents: ['python-reviewer'],
|
|
27
|
+
},
|
|
28
|
+
jvm: {
|
|
29
|
+
description: 'Java, Kotlin, and Spring Boot best practices',
|
|
30
|
+
skills: ['effective-java', 'effective-kotlin', 'kotlin-in-action', 'spring-boot-in-action'],
|
|
31
|
+
agents: ['jvm-reviewer'],
|
|
32
|
+
},
|
|
33
|
+
rust: {
|
|
34
|
+
description: 'Rust ownership, systems programming, and idiomatic patterns',
|
|
35
|
+
skills: ['programming-with-rust', 'rust-in-action'],
|
|
36
|
+
agents: ['rust-reviewer'],
|
|
37
|
+
},
|
|
38
|
+
ts: {
|
|
39
|
+
description: 'TypeScript type system and clean code for JS/TS projects',
|
|
40
|
+
skills: ['effective-typescript', 'clean-code-reviewer'],
|
|
41
|
+
agents: ['ts-reviewer'],
|
|
42
|
+
},
|
|
43
|
+
architecture: {
|
|
44
|
+
description: 'DDD, microservices, system design, and data-intensive patterns',
|
|
45
|
+
skills: ['domain-driven-design', 'microservices-patterns', 'system-design-interview', 'data-intensive-patterns'],
|
|
46
|
+
agents: ['architecture-reviewer'],
|
|
47
|
+
},
|
|
48
|
+
data: {
|
|
49
|
+
description: 'Data pipelines, ETL, and storage system patterns',
|
|
50
|
+
skills: ['data-intensive-patterns', 'data-pipelines'],
|
|
51
|
+
agents: ['data-reviewer'],
|
|
52
|
+
},
|
|
53
|
+
ui: {
|
|
54
|
+
description: 'UI design, data visualization, and web animations',
|
|
55
|
+
skills: ['refactoring-ui', 'storytelling-with-data', 'animation-at-work'],
|
|
56
|
+
agents: ['ui-reviewer'],
|
|
57
|
+
},
|
|
58
|
+
lean: {
|
|
59
|
+
description: 'Lean Startup methodology for product and feature decisions',
|
|
60
|
+
skills: ['lean-startup'],
|
|
61
|
+
agents: [],
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
|
|
16
65
|
// ─── ANSI helpers ─────────────────────────────────────────────────────────────
|
|
17
66
|
const c = {
|
|
18
67
|
bold: s => `\x1b[1m${s}\x1b[0m`,
|
|
@@ -726,9 +775,23 @@ async function main() {
|
|
|
726
775
|
const noCommands = args.includes('--no-commands');
|
|
727
776
|
const noAgents = args.includes('--no-agents');
|
|
728
777
|
const agentArg = args.find(a => a.startsWith('--agent='))?.split('=')[1];
|
|
778
|
+
const profileArg = args.find(a => a.startsWith('--profile='))?.split('=')[1];
|
|
729
779
|
const skillName = args.find(a => !a.startsWith('--') && a !== 'add');
|
|
730
780
|
|
|
731
|
-
if (
|
|
781
|
+
if (profileArg) {
|
|
782
|
+
const profile = PROFILES[profileArg];
|
|
783
|
+
if (!profile) {
|
|
784
|
+
console.error(c.red(`✗ Profile "${profileArg}" not found.`) + ' Run ' + c.cyan('skills profiles') + ' to see available profiles.');
|
|
785
|
+
process.exit(1);
|
|
786
|
+
}
|
|
787
|
+
profile.skills.forEach(s => copySkill(s, targetDir));
|
|
788
|
+
if (!noCommands) profile.skills.forEach(s => copyCommand(s));
|
|
789
|
+
if (!noAgents) profile.agents.forEach(a => copyAgent(a));
|
|
790
|
+
const agentStr = profile.agents.length
|
|
791
|
+
? `, ${profile.agents.length} agent${profile.agents.length > 1 ? 's' : ''}`
|
|
792
|
+
: '';
|
|
793
|
+
console.log(c.dim(`\nInstalled profile "${profileArg}": ${profile.skills.length} skills${agentStr}`));
|
|
794
|
+
} else if (agentArg) {
|
|
732
795
|
// explicit: skills add --agent=booklib-reviewer
|
|
733
796
|
const agents = getAvailableAgents();
|
|
734
797
|
if (!agents.includes(agentArg)) {
|
|
@@ -853,20 +916,39 @@ async function main() {
|
|
|
853
916
|
break;
|
|
854
917
|
}
|
|
855
918
|
|
|
919
|
+
case 'profiles': {
|
|
920
|
+
const nameW = Math.max(...Object.keys(PROFILES).map(k => k.length)) + 2;
|
|
921
|
+
console.log('');
|
|
922
|
+
console.log(c.bold(' Installation profiles'));
|
|
923
|
+
console.log(' ' + c.line(60));
|
|
924
|
+
for (const [name, profile] of Object.entries(PROFILES)) {
|
|
925
|
+
const skillCount = `${profile.skills.length} skill${profile.skills.length !== 1 ? 's' : ''}`;
|
|
926
|
+
const agentPart = profile.agents.length ? ` + ${profile.agents.length} agent` : '';
|
|
927
|
+
console.log(` ${c.cyan(name.padEnd(nameW))}${c.dim(skillCount + agentPart)}`);
|
|
928
|
+
console.log(` ${' '.repeat(nameW)}${profile.description}`);
|
|
929
|
+
console.log('');
|
|
930
|
+
}
|
|
931
|
+
console.log(c.dim(` Install: ${c.cyan('skills add --profile=<name>')}`));
|
|
932
|
+
console.log('');
|
|
933
|
+
break;
|
|
934
|
+
}
|
|
935
|
+
|
|
856
936
|
default:
|
|
857
937
|
console.log(`
|
|
858
938
|
${c.bold(' @booklib/skills')} — book knowledge distilled into AI agent skills
|
|
859
939
|
|
|
860
940
|
${c.bold(' Usage:')}
|
|
861
941
|
${c.cyan('skills list')} list all available skills
|
|
942
|
+
${c.cyan('skills profiles')} list available profiles
|
|
862
943
|
${c.cyan('skills info')} ${c.dim('<name>')} full description of a skill
|
|
863
944
|
${c.cyan('skills demo')} ${c.dim('<name>')} before/after example
|
|
864
|
-
${c.cyan('skills add')} ${c.dim('
|
|
865
|
-
${c.cyan('skills add
|
|
945
|
+
${c.cyan('skills add')} ${c.dim('--profile=<name>')} install a profile (skills + commands + agent)
|
|
946
|
+
${c.cyan('skills add')} ${c.dim('<name>')} install a single skill + /command
|
|
947
|
+
${c.cyan('skills add --all')} install everything (skills + commands + agents)
|
|
866
948
|
${c.cyan('skills add')} ${c.dim('<name> --global')} install globally (~/.claude/)
|
|
867
|
-
${c.cyan('skills add')} ${c.dim('<name> --no-commands')} install skill only, skip command
|
|
868
949
|
${c.cyan('skills add')} ${c.dim('--agent=<name>')} install a single agent to .claude/agents/
|
|
869
|
-
${c.cyan('skills add
|
|
950
|
+
${c.cyan('skills add')} ${c.dim('--no-commands')} skip /command installation
|
|
951
|
+
${c.cyan('skills add')} ${c.dim('--no-agents')} skip agent installation
|
|
870
952
|
${c.cyan('skills check')} ${c.dim('<name>')} quality check (Bronze/Silver/Gold/Platinum)
|
|
871
953
|
${c.cyan('skills check --all')} quality summary for all skills
|
|
872
954
|
${c.cyan('skills update-readme')} refresh README quality table from results.json files
|