claude-cli-analytics 0.0.5 → 0.0.7
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/dist/client/index.html
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>claude-analytics</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-C91ygWO-.js"></script>
|
|
9
9
|
<link rel="stylesheet" crossorigin href="/assets/index-BkOIudNK.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
package/dist/server/analyzer.js
CHANGED
|
@@ -608,6 +608,9 @@ export function getSessionDetail(projectsDir, sessionId, projectPath) {
|
|
|
608
608
|
else if (nameLower === 'glob') {
|
|
609
609
|
detail = `${input.pattern || ''} in ${input.path || ''}`;
|
|
610
610
|
}
|
|
611
|
+
else if (nameLower === 'skill') {
|
|
612
|
+
detail = input.skill || '';
|
|
613
|
+
}
|
|
611
614
|
else if (nameLower === 'task') {
|
|
612
615
|
detail = input.description || '';
|
|
613
616
|
}
|
|
@@ -744,7 +747,44 @@ export function getSessionDetail(projectsDir, sessionId, projectPath) {
|
|
|
744
747
|
danger_level: dangerLevel,
|
|
745
748
|
total_context_tokens: totalContextSent,
|
|
746
749
|
files_read: [...new Set(filesRead)],
|
|
747
|
-
spec_files_read: [...new Set(specFilesRead)]
|
|
750
|
+
spec_files_read: [...new Set(specFilesRead)],
|
|
751
|
+
skills_loaded: (() => {
|
|
752
|
+
const skills = [];
|
|
753
|
+
const seen = new Set();
|
|
754
|
+
// Collect slash commands used and AI-invoked skills
|
|
755
|
+
for (const msg of messages) {
|
|
756
|
+
if (msg.skill_name && !seen.has(`cmd:${msg.skill_name}`)) {
|
|
757
|
+
seen.add(`cmd:${msg.skill_name}`);
|
|
758
|
+
skills.push({ name: msg.skill_name, type: 'command' });
|
|
759
|
+
}
|
|
760
|
+
for (const tu of msg.tool_uses) {
|
|
761
|
+
if (tu.name.toLowerCase() === 'skill' && tu.detail) {
|
|
762
|
+
if (!seen.has(`cmd:${tu.detail}`)) {
|
|
763
|
+
seen.add(`cmd:${tu.detail}`);
|
|
764
|
+
skills.push({ name: tu.detail, type: 'command' });
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
// Collect .claude/ spec files read (commands, settings, etc.)
|
|
770
|
+
for (const msg of messages) {
|
|
771
|
+
for (const tu of msg.tool_uses) {
|
|
772
|
+
if (tu.category === 'read_spec' && tu.detail) {
|
|
773
|
+
const p = tu.detail;
|
|
774
|
+
if (!seen.has(`file:${p}`)) {
|
|
775
|
+
seen.add(`file:${p}`);
|
|
776
|
+
// Extract a friendly name from the path
|
|
777
|
+
const match = p.match(/\.claude\/commands\/([^/]+?)(?:\.\w+)?$/) ||
|
|
778
|
+
p.match(/\.claude\/([^/]+?)(?:\.\w+)?$/) ||
|
|
779
|
+
p.match(/([^/]+?)(?:\.\w+)?$/);
|
|
780
|
+
const name = match ? match[1] : p;
|
|
781
|
+
skills.push({ name, type: 'spec_file', path: p });
|
|
782
|
+
}
|
|
783
|
+
}
|
|
784
|
+
}
|
|
785
|
+
}
|
|
786
|
+
return skills;
|
|
787
|
+
})()
|
|
748
788
|
},
|
|
749
789
|
quality: {
|
|
750
790
|
read_count: readCount,
|