claudient 0.3.0 → 0.5.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 +2 -0
- package/index.json +58 -2
- package/package.json +1 -1
- package/scripts/cli.js +229 -39
package/README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
> The definitive knowledge system for Claude Code — skills, agents, hooks, rules, workflows, and prompts that multiply what you can build.
|
|
4
4
|
|
|
5
|
+

|
|
6
|
+
|
|
5
7
|
[](https://www.npmjs.com/package/claudient)
|
|
6
8
|
[](LICENSE)
|
|
7
9
|
[](#translations)
|
package/index.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.
|
|
3
|
-
"generated": "2026-05-16T17:
|
|
2
|
+
"version": "0.5.0",
|
|
3
|
+
"generated": "2026-05-16T17:33:40.657Z",
|
|
4
4
|
"skills": [
|
|
5
5
|
{
|
|
6
6
|
"id": "backend/dotnet/csharp",
|
|
@@ -72,6 +72,34 @@
|
|
|
72
72
|
"title": "Go Skill",
|
|
73
73
|
"file": "skills/backend/go/nl/go.md"
|
|
74
74
|
},
|
|
75
|
+
{
|
|
76
|
+
"id": "backend/java/spring-boot",
|
|
77
|
+
"category": "backend",
|
|
78
|
+
"lang": "de",
|
|
79
|
+
"title": "Spring Boot Skill",
|
|
80
|
+
"file": "skills/backend/java/de/spring-boot.md"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"id": "backend/java/spring-boot",
|
|
84
|
+
"category": "backend",
|
|
85
|
+
"lang": "es",
|
|
86
|
+
"title": "Skill Spring Boot",
|
|
87
|
+
"file": "skills/backend/java/es/spring-boot.md"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"id": "backend/java/spring-boot",
|
|
91
|
+
"category": "backend",
|
|
92
|
+
"lang": "fr",
|
|
93
|
+
"title": "Skill Spring Boot",
|
|
94
|
+
"file": "skills/backend/java/fr/spring-boot.md"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"id": "backend/java/spring-boot",
|
|
98
|
+
"category": "backend",
|
|
99
|
+
"lang": "nl",
|
|
100
|
+
"title": "Spring Boot Skill",
|
|
101
|
+
"file": "skills/backend/java/nl/spring-boot.md"
|
|
102
|
+
},
|
|
75
103
|
{
|
|
76
104
|
"id": "backend/java/spring-boot",
|
|
77
105
|
"category": "backend",
|
|
@@ -610,6 +638,34 @@
|
|
|
610
638
|
"lang": "en",
|
|
611
639
|
"title": "Caveman Mode Skill",
|
|
612
640
|
"file": "skills/productivity/caveman.md"
|
|
641
|
+
},
|
|
642
|
+
{
|
|
643
|
+
"id": "productivity/caveman",
|
|
644
|
+
"category": "productivity",
|
|
645
|
+
"lang": "de",
|
|
646
|
+
"title": "Caveman Mode Skill",
|
|
647
|
+
"file": "skills/productivity/de/caveman.md"
|
|
648
|
+
},
|
|
649
|
+
{
|
|
650
|
+
"id": "productivity/caveman",
|
|
651
|
+
"category": "productivity",
|
|
652
|
+
"lang": "es",
|
|
653
|
+
"title": "Skill Modo Caveman",
|
|
654
|
+
"file": "skills/productivity/es/caveman.md"
|
|
655
|
+
},
|
|
656
|
+
{
|
|
657
|
+
"id": "productivity/caveman",
|
|
658
|
+
"category": "productivity",
|
|
659
|
+
"lang": "fr",
|
|
660
|
+
"title": "Skill Mode Caveman",
|
|
661
|
+
"file": "skills/productivity/fr/caveman.md"
|
|
662
|
+
},
|
|
663
|
+
{
|
|
664
|
+
"id": "productivity/caveman",
|
|
665
|
+
"category": "productivity",
|
|
666
|
+
"lang": "nl",
|
|
667
|
+
"title": "Caveman Mode Skill",
|
|
668
|
+
"file": "skills/productivity/nl/caveman.md"
|
|
613
669
|
}
|
|
614
670
|
],
|
|
615
671
|
"agents": [
|
package/package.json
CHANGED
package/scripts/cli.js
CHANGED
|
@@ -19,6 +19,7 @@ const SKILL_CATEGORIES = [
|
|
|
19
19
|
'database',
|
|
20
20
|
'finance-payments',
|
|
21
21
|
'ai-engineering',
|
|
22
|
+
'productivity',
|
|
22
23
|
]
|
|
23
24
|
|
|
24
25
|
const SUPPORTED_LANGS = ['en', 'fr', 'de', 'nl', 'es']
|
|
@@ -28,9 +29,10 @@ function usage() {
|
|
|
28
29
|
claudient — Claude Code knowledge system
|
|
29
30
|
|
|
30
31
|
Usage:
|
|
32
|
+
npx claudient init Interactive first-run setup
|
|
31
33
|
npx claudient add skills [category] [--lang <lang>]
|
|
32
34
|
npx claudient add agents
|
|
33
|
-
npx claudient add rules
|
|
35
|
+
npx claudient add rules [--write]
|
|
34
36
|
npx claudient add hooks
|
|
35
37
|
npx claudient add all [--lang <lang>]
|
|
36
38
|
npx claudient remove skills [category]
|
|
@@ -334,8 +336,100 @@ function updateCommand() {
|
|
|
334
336
|
}
|
|
335
337
|
}
|
|
336
338
|
|
|
339
|
+
function loadIndex() {
|
|
340
|
+
// Try index.json next to package.json first (installed package),
|
|
341
|
+
// then fall back to filesystem scan (dev/repo context)
|
|
342
|
+
const indexPath = path.join(REPO_ROOT, 'index.json')
|
|
343
|
+
if (fs.existsSync(indexPath)) {
|
|
344
|
+
try { return JSON.parse(fs.readFileSync(indexPath, 'utf-8')) } catch {}
|
|
345
|
+
}
|
|
346
|
+
return null
|
|
347
|
+
}
|
|
348
|
+
|
|
337
349
|
function listCommand(type) {
|
|
338
|
-
const
|
|
350
|
+
const index = loadIndex()
|
|
351
|
+
|
|
352
|
+
if (index) {
|
|
353
|
+
// Fast path: use pre-built index.json
|
|
354
|
+
const enOnly = (arr) => arr.filter(i => !i.lang || i.lang === 'en')
|
|
355
|
+
|
|
356
|
+
const listSkills = () => {
|
|
357
|
+
const byCategory = {}
|
|
358
|
+
for (const s of enOnly(index.skills)) {
|
|
359
|
+
if (!byCategory[s.category]) byCategory[s.category] = []
|
|
360
|
+
byCategory[s.category].push(s)
|
|
361
|
+
}
|
|
362
|
+
console.log('Skills:\n')
|
|
363
|
+
for (const [cat, items] of Object.entries(byCategory)) {
|
|
364
|
+
console.log(` ${cat}/ (${items.length})`)
|
|
365
|
+
for (const s of items) console.log(` ${s.id.split('/').slice(1).join('/')}.md`)
|
|
366
|
+
}
|
|
367
|
+
console.log(`\n Total: ${enOnly(index.skills).length} skills in ${Object.keys(byCategory).length} categories`)
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
const listAgents = () => {
|
|
371
|
+
const agents = enOnly(index.agents)
|
|
372
|
+
const byCategory = {}
|
|
373
|
+
for (const a of agents) {
|
|
374
|
+
const cat = a.id.split('/')[0]
|
|
375
|
+
if (!byCategory[cat]) byCategory[cat] = []
|
|
376
|
+
byCategory[cat].push(a)
|
|
377
|
+
}
|
|
378
|
+
console.log('Agents:\n')
|
|
379
|
+
for (const [cat, items] of Object.entries(byCategory)) {
|
|
380
|
+
console.log(` ${cat}/ (${items.length})`)
|
|
381
|
+
for (const a of items) console.log(` ${a.title}`)
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
const listHooks = () => {
|
|
386
|
+
const byCategory = {}
|
|
387
|
+
for (const h of index.hooks) {
|
|
388
|
+
if (!byCategory[h.category]) byCategory[h.category] = []
|
|
389
|
+
byCategory[h.category].push(h)
|
|
390
|
+
}
|
|
391
|
+
console.log('Hooks:\n')
|
|
392
|
+
for (const [cat, items] of Object.entries(byCategory)) {
|
|
393
|
+
console.log(` ${cat}/ (${items.length})`)
|
|
394
|
+
for (const h of items) console.log(` ${h.id.split('/')[1]}.sh`)
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
const listRules = () => {
|
|
399
|
+
const rules = enOnly(index.rules)
|
|
400
|
+
const byCategory = {}
|
|
401
|
+
for (const r of rules) {
|
|
402
|
+
if (!byCategory[r.category]) byCategory[r.category] = []
|
|
403
|
+
byCategory[r.category].push(r)
|
|
404
|
+
}
|
|
405
|
+
console.log('Rules:\n')
|
|
406
|
+
for (const [cat, items] of Object.entries(byCategory)) {
|
|
407
|
+
console.log(` ${cat}/ (${items.length})`)
|
|
408
|
+
for (const r of items) console.log(` ${r.slug}.md`)
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
const listAll = () => {
|
|
413
|
+
listSkills(); console.log()
|
|
414
|
+
listAgents(); console.log()
|
|
415
|
+
listRules(); console.log()
|
|
416
|
+
listHooks(); console.log()
|
|
417
|
+
console.log(`Generated: ${index.generated}`)
|
|
418
|
+
console.log(`Version: claudient@${index.version}`)
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
switch (type) {
|
|
422
|
+
case 'agents': listAgents(); break
|
|
423
|
+
case 'hooks': listHooks(); break
|
|
424
|
+
case 'rules': listRules(); break
|
|
425
|
+
case 'skills': listSkills(); break
|
|
426
|
+
default: if (!type) listAll(); else listSkills()
|
|
427
|
+
}
|
|
428
|
+
return
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
// Fallback: filesystem scan (repo dev context without index.json)
|
|
432
|
+
const listSkillsFs = () => {
|
|
339
433
|
console.log('Skills:\n')
|
|
340
434
|
for (const cat of SKILL_CATEGORIES) {
|
|
341
435
|
const catDir = path.join(REPO_ROOT, 'skills', cat)
|
|
@@ -346,51 +440,144 @@ function listCommand(type) {
|
|
|
346
440
|
}
|
|
347
441
|
}
|
|
348
442
|
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
}
|
|
443
|
+
switch (type) {
|
|
444
|
+
case 'agents':
|
|
445
|
+
case 'hooks':
|
|
446
|
+
case 'rules':
|
|
447
|
+
console.log('(index.json not found — run: npm run build-index)')
|
|
448
|
+
break
|
|
449
|
+
default:
|
|
450
|
+
listSkillsFs()
|
|
358
451
|
}
|
|
452
|
+
}
|
|
359
453
|
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
454
|
+
// ── Init (interactive first-run setup) ───────────────────────────────────────
|
|
455
|
+
|
|
456
|
+
async function initCommand() {
|
|
457
|
+
const readline = require('readline')
|
|
458
|
+
|
|
459
|
+
const rl = readline.createInterface({ input: process.stdin, output: process.stdout })
|
|
460
|
+
const ask = (q) => new Promise(resolve => rl.question(q, resolve))
|
|
461
|
+
|
|
462
|
+
const BOLD = '\x1b[1m'
|
|
463
|
+
const ORANGE = '\x1b[33m'
|
|
464
|
+
const GREEN = '\x1b[32m'
|
|
465
|
+
const DIM = '\x1b[2m'
|
|
466
|
+
const RESET = '\x1b[0m'
|
|
467
|
+
|
|
468
|
+
console.log(`
|
|
469
|
+
${BOLD}╔══════════════════════════════════════════════╗
|
|
470
|
+
║ CLAUDIENT SETUP ║
|
|
471
|
+
║ The Claude Code Knowledge System ║
|
|
472
|
+
╚══════════════════════════════════════════════╝${RESET}
|
|
473
|
+
`)
|
|
474
|
+
|
|
475
|
+
// Check Claude Code installed
|
|
476
|
+
if (!fs.existsSync(CLAUDE_DIR)) {
|
|
477
|
+
console.error(`${ORANGE}⚠ ~/.claude not found.${RESET}`)
|
|
478
|
+
console.error(` Claude Code must be installed first: https://claude.ai/code\n`)
|
|
479
|
+
rl.close()
|
|
480
|
+
process.exit(1)
|
|
481
|
+
}
|
|
482
|
+
console.log(`${GREEN}✓ Claude Code detected at ${CLAUDE_DIR}${RESET}\n`)
|
|
483
|
+
|
|
484
|
+
const summary = { skills: [], agents: false, hooks: false, rules: false, lang: 'en' }
|
|
485
|
+
|
|
486
|
+
// 1. Language
|
|
487
|
+
console.log(`${BOLD}Step 1/5 — Language${RESET}`)
|
|
488
|
+
console.log(' Available: en, fr, de, nl, es')
|
|
489
|
+
const langInput = (await ask(' Which language? [en] ')).trim().toLowerCase() || 'en'
|
|
490
|
+
summary.lang = SUPPORTED_LANGS.includes(langInput) ? langInput : 'en'
|
|
491
|
+
console.log(` → ${summary.lang}\n`)
|
|
492
|
+
|
|
493
|
+
// 2. Skill categories
|
|
494
|
+
console.log(`${BOLD}Step 2/5 — Skills${RESET}`)
|
|
495
|
+
SKILL_CATEGORIES.forEach((cat, i) => console.log(` ${i + 1}. ${cat}`))
|
|
496
|
+
console.log(' a. All categories')
|
|
497
|
+
console.log(' 0. Skip skills')
|
|
498
|
+
const catInput = (await ask(' Select categories (comma-separated numbers, or a/0): ')).trim()
|
|
499
|
+
|
|
500
|
+
if (catInput === '0') {
|
|
501
|
+
console.log(' → Skipping skills\n')
|
|
502
|
+
} else if (catInput === 'a' || catInput === '') {
|
|
503
|
+
summary.skills = [...SKILL_CATEGORIES]
|
|
504
|
+
console.log(` → All categories selected\n`)
|
|
505
|
+
} else {
|
|
506
|
+
const nums = catInput.split(',').map(n => parseInt(n.trim(), 10)).filter(n => n >= 1 && n <= SKILL_CATEGORIES.length)
|
|
507
|
+
summary.skills = nums.map(n => SKILL_CATEGORIES[n - 1])
|
|
508
|
+
console.log(` → Selected: ${summary.skills.join(', ')}\n`)
|
|
369
509
|
}
|
|
370
510
|
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
511
|
+
// 3. Agents
|
|
512
|
+
console.log(`${BOLD}Step 3/5 — Agents${RESET}`)
|
|
513
|
+
console.log(' 6 subagent definitions: Planner, Architect, Code Reviewer, Security, Build Resolvers')
|
|
514
|
+
const agentsInput = (await ask(' Install agents? [Y/n] ')).trim().toLowerCase()
|
|
515
|
+
summary.agents = agentsInput !== 'n'
|
|
516
|
+
console.log(` → ${summary.agents ? 'Yes' : 'No'}\n`)
|
|
517
|
+
|
|
518
|
+
// 4. Hooks
|
|
519
|
+
console.log(`${BOLD}Step 4/5 — Hooks${RESET}`)
|
|
520
|
+
console.log(' 7 shell scripts: safety guards, auto-formatter, audit log, cost tracker, session helpers')
|
|
521
|
+
const hooksInput = (await ask(' Install hooks? [Y/n] ')).trim().toLowerCase()
|
|
522
|
+
summary.hooks = hooksInput !== 'n'
|
|
523
|
+
console.log(` → ${summary.hooks ? 'Yes' : 'No'}\n`)
|
|
524
|
+
|
|
525
|
+
// 5. Rules
|
|
526
|
+
console.log(`${BOLD}Step 5/5 — Rules${RESET}`)
|
|
527
|
+
console.log(' 8 rule sets: coding style, git, security, testing, performance, Python, TypeScript, Go')
|
|
528
|
+
const rulesInput = (await ask(' Add rules to ./CLAUDE.md? [Y/n] ')).trim().toLowerCase()
|
|
529
|
+
summary.rules = rulesInput !== 'n'
|
|
530
|
+
console.log(` → ${summary.rules ? 'Yes' : 'No'}\n`)
|
|
531
|
+
|
|
532
|
+
rl.close()
|
|
533
|
+
|
|
534
|
+
// Confirm
|
|
535
|
+
console.log(`${BOLD}Summary${RESET}`)
|
|
536
|
+
console.log(` Language : ${summary.lang}`)
|
|
537
|
+
console.log(` Skills : ${summary.skills.length ? summary.skills.join(', ') : 'none'}`)
|
|
538
|
+
console.log(` Agents : ${summary.agents ? 'yes' : 'no'}`)
|
|
539
|
+
console.log(` Hooks : ${summary.hooks ? 'yes' : 'no'}`)
|
|
540
|
+
console.log(` Rules : ${summary.rules ? 'append to ./CLAUDE.md' : 'no'}`)
|
|
541
|
+
console.log()
|
|
542
|
+
|
|
543
|
+
// Execute
|
|
544
|
+
if (summary.skills.length) {
|
|
545
|
+
for (const cat of summary.skills) {
|
|
546
|
+
console.log(`Installing ${cat} skills...`)
|
|
547
|
+
addSkills(cat, summary.lang === 'en' ? null : summary.lang)
|
|
379
548
|
}
|
|
549
|
+
console.log()
|
|
380
550
|
}
|
|
381
551
|
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
case 'skills':
|
|
387
|
-
default:
|
|
388
|
-
if (!type) {
|
|
389
|
-
listSkills(); console.log(); listAgents(); console.log(); listRules(); console.log(); listHooks()
|
|
390
|
-
} else {
|
|
391
|
-
listSkills()
|
|
392
|
-
}
|
|
552
|
+
if (summary.agents) {
|
|
553
|
+
console.log('Installing agents...')
|
|
554
|
+
addAgents()
|
|
555
|
+
console.log()
|
|
393
556
|
}
|
|
557
|
+
|
|
558
|
+
if (summary.hooks) {
|
|
559
|
+
console.log('Installing hooks...')
|
|
560
|
+
addHooks()
|
|
561
|
+
console.log()
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
if (summary.rules) {
|
|
565
|
+
console.log('Adding rules to ./CLAUDE.md...')
|
|
566
|
+
addRulesWrite()
|
|
567
|
+
console.log()
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
console.log(`${GREEN}${BOLD}✓ Claudient setup complete!${RESET}`)
|
|
571
|
+
console.log()
|
|
572
|
+
console.log('Next steps:')
|
|
573
|
+
if (summary.hooks) {
|
|
574
|
+
console.log(` 1. Add hook entries to .claude/settings.json`)
|
|
575
|
+
console.log(` See: https://github.com/Claudient/Claudient/tree/main/hooks`)
|
|
576
|
+
}
|
|
577
|
+
console.log(` 2. Restart Claude Code to activate all installed content`)
|
|
578
|
+
console.log(` 3. Try a skill — type /fastapi or /kubernetes in Claude Code`)
|
|
579
|
+
console.log()
|
|
580
|
+
console.log(` Full docs: https://github.com/Claudient/Claudient`)
|
|
394
581
|
}
|
|
395
582
|
|
|
396
583
|
function getFiles(dir, prefix = '') {
|
|
@@ -460,6 +647,9 @@ switch (command) {
|
|
|
460
647
|
case 'list':
|
|
461
648
|
listCommand(positional[0])
|
|
462
649
|
break
|
|
650
|
+
case 'init':
|
|
651
|
+
initCommand().catch(err => { console.error(err); process.exit(1) })
|
|
652
|
+
break
|
|
463
653
|
case 'help':
|
|
464
654
|
case '--help':
|
|
465
655
|
case '-h':
|