claudient 0.4.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 +2 -2
- package/package.json +1 -1
- package/scripts/cli.js +99 -42
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
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']
|
|
@@ -335,62 +336,118 @@ function updateCommand() {
|
|
|
335
336
|
}
|
|
336
337
|
}
|
|
337
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
|
+
|
|
338
349
|
function listCommand(type) {
|
|
339
|
-
const
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
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`)
|
|
347
368
|
}
|
|
348
|
-
}
|
|
349
369
|
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
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
|
+
}
|
|
358
383
|
}
|
|
359
|
-
}
|
|
360
384
|
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
console.log(
|
|
368
|
-
for (const
|
|
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
|
+
}
|
|
369
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
|
|
370
429
|
}
|
|
371
430
|
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
for (const cat of
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
431
|
+
// Fallback: filesystem scan (repo dev context without index.json)
|
|
432
|
+
const listSkillsFs = () => {
|
|
433
|
+
console.log('Skills:\n')
|
|
434
|
+
for (const cat of SKILL_CATEGORIES) {
|
|
435
|
+
const catDir = path.join(REPO_ROOT, 'skills', cat)
|
|
436
|
+
if (!fs.existsSync(catDir)) continue
|
|
437
|
+
const files = getFiles(catDir).filter(f => !SUPPORTED_LANGS.some(l => f.includes(`/${l}/`)))
|
|
438
|
+
console.log(` ${cat}/ (${files.length})`)
|
|
379
439
|
for (const f of files) console.log(` ${f}`)
|
|
380
440
|
}
|
|
381
441
|
}
|
|
382
442
|
|
|
383
443
|
switch (type) {
|
|
384
|
-
case 'agents':
|
|
385
|
-
case 'hooks':
|
|
386
|
-
case 'rules':
|
|
387
|
-
|
|
444
|
+
case 'agents':
|
|
445
|
+
case 'hooks':
|
|
446
|
+
case 'rules':
|
|
447
|
+
console.log('(index.json not found — run: npm run build-index)')
|
|
448
|
+
break
|
|
388
449
|
default:
|
|
389
|
-
|
|
390
|
-
listSkills(); console.log(); listAgents(); console.log(); listRules(); console.log(); listHooks()
|
|
391
|
-
} else {
|
|
392
|
-
listSkills()
|
|
393
|
-
}
|
|
450
|
+
listSkillsFs()
|
|
394
451
|
}
|
|
395
452
|
}
|
|
396
453
|
|