claude-roi 0.8.5 → 0.8.6
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/package.json +1 -1
- package/src/cache.js +1 -1
- package/src/claude-parser.js +55 -0
- package/src/dashboard.html +28 -7
- package/src/metrics.js +63 -23
- package/.agents/skills/frontend-design/LICENSE.txt +0 -177
- package/.agents/skills/frontend-design/SKILL.md +0 -42
package/package.json
CHANGED
package/src/cache.js
CHANGED
|
@@ -4,7 +4,7 @@ import os from 'node:os';
|
|
|
4
4
|
|
|
5
5
|
const CACHE_DIR = path.join(os.homedir(), '.cache', 'agent-analytics');
|
|
6
6
|
const CACHE_FILE = path.join(CACHE_DIR, 'parsed-sessions.json');
|
|
7
|
-
const CACHE_VERSION =
|
|
7
|
+
const CACHE_VERSION = 3;
|
|
8
8
|
|
|
9
9
|
export function loadCache() {
|
|
10
10
|
if (!existsSync(CACHE_FILE)) {
|
package/src/claude-parser.js
CHANGED
|
@@ -249,6 +249,8 @@ async function parseSessionFile(filePath) {
|
|
|
249
249
|
const session = createEmptySession(sessionId);
|
|
250
250
|
const seenRequestIds = new Set();
|
|
251
251
|
const modelTokens = {}; // model -> { input, output, cacheRead, cacheCreate }
|
|
252
|
+
const dailyModelTokens = {}; // dateStr -> model -> { input, output, cacheRead, cacheCreate }
|
|
253
|
+
let lastSeenTimestamp = null;
|
|
252
254
|
|
|
253
255
|
const rl = createInterface({
|
|
254
256
|
input: createReadStream(filePath),
|
|
@@ -279,6 +281,7 @@ async function parseSessionFile(filePath) {
|
|
|
279
281
|
|
|
280
282
|
// Track timestamps
|
|
281
283
|
if (obj.timestamp) {
|
|
284
|
+
lastSeenTimestamp = obj.timestamp;
|
|
282
285
|
if (!session.startTime || obj.timestamp < session.startTime) {
|
|
283
286
|
session.startTime = obj.timestamp;
|
|
284
287
|
}
|
|
@@ -308,6 +311,7 @@ async function parseSessionFile(filePath) {
|
|
|
308
311
|
|
|
309
312
|
// Track timestamps
|
|
310
313
|
if (obj.timestamp) {
|
|
314
|
+
lastSeenTimestamp = obj.timestamp;
|
|
311
315
|
if (!session.startTime || obj.timestamp < session.startTime) {
|
|
312
316
|
session.startTime = obj.timestamp;
|
|
313
317
|
}
|
|
@@ -344,6 +348,21 @@ async function parseSessionFile(filePath) {
|
|
|
344
348
|
modelTokens[model].output += output;
|
|
345
349
|
modelTokens[model].cacheRead += cacheRead;
|
|
346
350
|
modelTokens[model].cacheCreate += cacheCreate;
|
|
351
|
+
|
|
352
|
+
// Track per-day per-model tokens for daily usage attribution
|
|
353
|
+
const msgTs = obj.timestamp || lastSeenTimestamp;
|
|
354
|
+
if (msgTs) {
|
|
355
|
+
const dt = new Date(msgTs);
|
|
356
|
+
const dateStr = `${dt.getFullYear()}-${String(dt.getMonth() + 1).padStart(2, '0')}-${String(dt.getDate()).padStart(2, '0')}`;
|
|
357
|
+
if (!dailyModelTokens[dateStr]) dailyModelTokens[dateStr] = {};
|
|
358
|
+
if (!dailyModelTokens[dateStr][model]) {
|
|
359
|
+
dailyModelTokens[dateStr][model] = { input: 0, output: 0, cacheRead: 0, cacheCreate: 0 };
|
|
360
|
+
}
|
|
361
|
+
dailyModelTokens[dateStr][model].input += input;
|
|
362
|
+
dailyModelTokens[dateStr][model].output += output;
|
|
363
|
+
dailyModelTokens[dateStr][model].cacheRead += cacheRead;
|
|
364
|
+
dailyModelTokens[dateStr][model].cacheCreate += cacheCreate;
|
|
365
|
+
}
|
|
347
366
|
}
|
|
348
367
|
|
|
349
368
|
session.assistantMessageCount++;
|
|
@@ -398,6 +417,27 @@ async function parseSessionFile(filePath) {
|
|
|
398
417
|
session.cost = { inputCost, outputCost, cacheReadCost, cacheCreationCost, totalCost };
|
|
399
418
|
}
|
|
400
419
|
|
|
420
|
+
// Compute per-day usage with accurate per-model cost
|
|
421
|
+
session.dailyUsage = {};
|
|
422
|
+
for (const [dateStr, models] of Object.entries(dailyModelTokens)) {
|
|
423
|
+
let dayCost = 0;
|
|
424
|
+
let dayInput = 0, dayOutput = 0, dayCacheRead = 0, dayCacheCreate = 0;
|
|
425
|
+
for (const [model, tokens] of Object.entries(models)) {
|
|
426
|
+
dayCost += calculateCost(tokens.input, tokens.output, tokens.cacheRead, tokens.cacheCreate, model);
|
|
427
|
+
dayInput += tokens.input;
|
|
428
|
+
dayOutput += tokens.output;
|
|
429
|
+
dayCacheRead += tokens.cacheRead;
|
|
430
|
+
dayCacheCreate += tokens.cacheCreate;
|
|
431
|
+
}
|
|
432
|
+
session.dailyUsage[dateStr] = {
|
|
433
|
+
inputTokens: dayInput,
|
|
434
|
+
outputTokens: dayOutput,
|
|
435
|
+
cacheReadTokens: dayCacheRead,
|
|
436
|
+
cacheCreationTokens: dayCacheCreate,
|
|
437
|
+
cost: dayCost,
|
|
438
|
+
};
|
|
439
|
+
}
|
|
440
|
+
|
|
401
441
|
// Calculate duration
|
|
402
442
|
if (session.startTime && session.endTime) {
|
|
403
443
|
const start = new Date(session.startTime).getTime();
|
|
@@ -481,6 +521,21 @@ function mergeSubagentIntoSession(parent, sub) {
|
|
|
481
521
|
parent.verificationBashCalls += sub.verificationBashCalls;
|
|
482
522
|
parent.bashCommands.push(...sub.bashCommands);
|
|
483
523
|
|
|
524
|
+
// Merge daily usage
|
|
525
|
+
if (sub.dailyUsage) {
|
|
526
|
+
if (!parent.dailyUsage) parent.dailyUsage = {};
|
|
527
|
+
for (const [dateStr, dayData] of Object.entries(sub.dailyUsage)) {
|
|
528
|
+
if (!parent.dailyUsage[dateStr]) {
|
|
529
|
+
parent.dailyUsage[dateStr] = { inputTokens: 0, outputTokens: 0, cacheReadTokens: 0, cacheCreationTokens: 0, cost: 0 };
|
|
530
|
+
}
|
|
531
|
+
parent.dailyUsage[dateStr].inputTokens += dayData.inputTokens;
|
|
532
|
+
parent.dailyUsage[dateStr].outputTokens += dayData.outputTokens;
|
|
533
|
+
parent.dailyUsage[dateStr].cacheReadTokens += dayData.cacheReadTokens;
|
|
534
|
+
parent.dailyUsage[dateStr].cacheCreationTokens += dayData.cacheCreationTokens;
|
|
535
|
+
parent.dailyUsage[dateStr].cost += dayData.cost;
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
|
|
484
539
|
// Merge files
|
|
485
540
|
for (const f of sub.filesWritten) {
|
|
486
541
|
if (!parent.filesWritten.includes(f)) parent.filesWritten.push(f);
|
package/src/dashboard.html
CHANGED
|
@@ -649,6 +649,11 @@
|
|
|
649
649
|
bottom: auto;
|
|
650
650
|
top: calc(100% + 8px);
|
|
651
651
|
}
|
|
652
|
+
/* First column tooltip: anchor left so it doesn't clip outside the table */
|
|
653
|
+
thead th:first-child .info-tip:hover::after {
|
|
654
|
+
right: auto;
|
|
655
|
+
left: -12px;
|
|
656
|
+
}
|
|
652
657
|
/* Make table header tooltip icons more visible */
|
|
653
658
|
thead .info-tip {
|
|
654
659
|
background: var(--glass-border-hover);
|
|
@@ -743,9 +748,9 @@
|
|
|
743
748
|
table-layout: fixed;
|
|
744
749
|
}
|
|
745
750
|
/* Column widths: Date | Project | Model | Msgs | Autopilot | Cost | Commits | Lines | Grade */
|
|
746
|
-
table col:nth-child(1) { width:
|
|
747
|
-
table col:nth-child(2) { width:
|
|
748
|
-
table col:nth-child(3) { width:
|
|
751
|
+
table col:nth-child(1) { width: 15%; }
|
|
752
|
+
table col:nth-child(2) { width: 13%; }
|
|
753
|
+
table col:nth-child(3) { width: 17%; }
|
|
749
754
|
table col:nth-child(4) { width: 7%; }
|
|
750
755
|
table col:nth-child(5) { width: 10%; }
|
|
751
756
|
table col:nth-child(6) { width: 8%; }
|
|
@@ -1855,6 +1860,7 @@
|
|
|
1855
1860
|
<p class="tagline">Correlates your AI coding agent's token spend with actual git output — see what shipped, what churned, and what it cost.</p>
|
|
1856
1861
|
<div class="meta-info">
|
|
1857
1862
|
<span class="badge" id="date-range"></span>
|
|
1863
|
+
<span class="badge" id="timezone-badge"></span>
|
|
1858
1864
|
<span class="badge">All data stays local</span>
|
|
1859
1865
|
<span class="badge">No tracking, no telemetry</span>
|
|
1860
1866
|
</div>
|
|
@@ -2282,6 +2288,9 @@ function render() {
|
|
|
2282
2288
|
? `${fmtDate(d.meta.startDate)} – ${fmtDate(d.meta.endDate)}`
|
|
2283
2289
|
: `Last ${d.meta.daysAnalyzed} days`;
|
|
2284
2290
|
document.getElementById('date-range').textContent = dateLabel;
|
|
2291
|
+
const tz = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
2292
|
+
const tzShort = new Date().toLocaleTimeString(undefined, { timeZoneName: 'short' }).split(' ').pop();
|
|
2293
|
+
document.getElementById('timezone-badge').textContent = `${tzShort} (${tz})`;
|
|
2285
2294
|
const summary = d.summary;
|
|
2286
2295
|
const t = d.tokenAnalytics;
|
|
2287
2296
|
|
|
@@ -2765,7 +2774,7 @@ function renderSessionsTable(sessions) {
|
|
|
2765
2774
|
<colgroup><col><col><col><col><col><col><col><col><col></colgroup>
|
|
2766
2775
|
<thead>
|
|
2767
2776
|
<tr>
|
|
2768
|
-
<th onclick="sortTable('startTime')" class="${sortCol === 'startTime' ? 'sorted' : ''}">Date${thArrow('startTime')}</th>
|
|
2777
|
+
<th onclick="sortTable('startTime')" class="${sortCol === 'startTime' ? 'sorted' : ''}">Date${thArrow('startTime')} <i class="info-tip" data-tip="Session start time in your local timezone. Multi-day sessions show an arrow (↳) with the end date below.">i</i></th>
|
|
2769
2778
|
<th onclick="sortTable('projectName')" class="${sortCol === 'projectName' ? 'sorted' : ''}">Project${thArrow('projectName')}</th>
|
|
2770
2779
|
<th onclick="sortTable('model')" class="${sortCol === 'model' ? 'sorted' : ''}">Model${thArrow('model')} <i class="info-tip" data-tip="Primary model used in the session. Models marked (sub) are subagents spawned for background tasks like code search and exploration.">i</i></th>
|
|
2771
2780
|
<th onclick="sortTable('msgCount')" class="${sortCol === 'msgCount' ? 'sorted' : ''}">Msgs${thArrow('msgCount')} <i class="info-tip" data-tip="Total messages in the session (your messages + Claude's responses).">i</i></th>
|
|
@@ -2792,7 +2801,7 @@ function renderSessionsTable(sessions) {
|
|
|
2792
2801
|
const rowClass = s.isOrphaned ? 'orphaned' : '';
|
|
2793
2802
|
return `
|
|
2794
2803
|
<tr class="${rowClass}" style="cursor:pointer;" onclick="toggleExpand(${idx}, this)">
|
|
2795
|
-
<td><span class="expand-chevron">▶</span>${
|
|
2804
|
+
<td><span class="expand-chevron">▶</span>${formatDateRange(s.startTime, s.endTime)}</td>
|
|
2796
2805
|
<td>${s.projectName || '—'}</td>
|
|
2797
2806
|
<td>${modelDisplay}</td>
|
|
2798
2807
|
<td>${s.userMessageCount + s.assistantMessageCount}</td>
|
|
@@ -2852,6 +2861,18 @@ function formatDate(iso) {
|
|
|
2852
2861
|
return d.toLocaleString(undefined, { month: 'short', day: 'numeric', hour: '2-digit', minute: '2-digit', hour12: true });
|
|
2853
2862
|
}
|
|
2854
2863
|
|
|
2864
|
+
function formatDateRange(startIso, endIso) {
|
|
2865
|
+
if (!startIso) return '—';
|
|
2866
|
+
const start = new Date(startIso);
|
|
2867
|
+
const end = endIso ? new Date(endIso) : null;
|
|
2868
|
+
const startStr = formatDate(startIso);
|
|
2869
|
+
if (!end) return startStr;
|
|
2870
|
+
const sameDay = start.getFullYear() === end.getFullYear() && start.getMonth() === end.getMonth() && start.getDate() === end.getDate();
|
|
2871
|
+
if (sameDay) return startStr;
|
|
2872
|
+
const endDateStr = end.toLocaleString(undefined, { month: 'short', day: 'numeric', hour: '2-digit', minute: '2-digit', hour12: true });
|
|
2873
|
+
return `<div style="line-height:1.3;">${startStr}<br><span style="color:var(--accent-blue);font-size:0.7rem;opacity:0.8;">↳ ${endDateStr}</span></div>`;
|
|
2874
|
+
}
|
|
2875
|
+
|
|
2855
2876
|
function initCharts() {
|
|
2856
2877
|
const isLight = getTheme() === 'light';
|
|
2857
2878
|
Chart.defaults.color = isLight ? '#475569' : '#94a3b8';
|
|
@@ -2873,7 +2894,7 @@ function initCharts() {
|
|
|
2873
2894
|
new Chart(document.getElementById('chart-token-burn'), {
|
|
2874
2895
|
type: 'bar',
|
|
2875
2896
|
data: {
|
|
2876
|
-
labels: dailyTokens.map(d => d.date),
|
|
2897
|
+
labels: dailyTokens.map(d => new Date(d.date + 'T12:00:00').toLocaleDateString(undefined, { month: 'short', day: 'numeric' })),
|
|
2877
2898
|
datasets: [
|
|
2878
2899
|
{
|
|
2879
2900
|
label: 'Input',
|
|
@@ -2947,7 +2968,7 @@ function initCharts() {
|
|
|
2947
2968
|
timelineChart = new Chart(document.getElementById('chart-timeline'), {
|
|
2948
2969
|
type: 'line',
|
|
2949
2970
|
data: {
|
|
2950
|
-
labels: daily.map(d => d.date),
|
|
2971
|
+
labels: daily.map(d => new Date(d.date + 'T12:00:00').toLocaleDateString(undefined, { month: 'short', day: 'numeric' })),
|
|
2951
2972
|
datasets: [
|
|
2952
2973
|
{
|
|
2953
2974
|
label: 'Cost ($)',
|
package/src/metrics.js
CHANGED
|
@@ -555,23 +555,44 @@ export function computeMetrics(correlatedSessions, organicCommits, commitsByRepo
|
|
|
555
555
|
|
|
556
556
|
// ---- Daily timeline ----
|
|
557
557
|
const dailyMap = new Map();
|
|
558
|
-
|
|
559
|
-
const d = new Date(session.startTime);
|
|
560
|
-
const date = `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, '0')}-${String(d.getDate()).padStart(2, '0')}`;
|
|
558
|
+
const ensureDay = (date) => {
|
|
561
559
|
if (!dailyMap.has(date)) {
|
|
562
560
|
dailyMap.set(date, { date, cost: 0, sessions: 0, commits: 0, linesAdded: 0, linesDeleted: 0, netLines: 0, inputTokens: 0, outputTokens: 0, cacheReadTokens: 0, totalTokens: 0 });
|
|
563
561
|
}
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
562
|
+
return dailyMap.get(date);
|
|
563
|
+
};
|
|
564
|
+
const toDateStr = (ts) => {
|
|
565
|
+
const d = new Date(ts);
|
|
566
|
+
return `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, '0')}-${String(d.getDate()).padStart(2, '0')}`;
|
|
567
|
+
};
|
|
568
|
+
for (const session of correlatedSessions) {
|
|
569
|
+
const startDate = toDateStr(session.startTime);
|
|
570
|
+
|
|
571
|
+
// Distribute cost and tokens across actual usage days via dailyUsage
|
|
572
|
+
const usage = session.dailyUsage && Object.keys(session.dailyUsage).length > 0
|
|
573
|
+
? session.dailyUsage
|
|
574
|
+
: { [startDate]: { inputTokens: session.totalInputTokens, outputTokens: session.totalOutputTokens, cacheReadTokens: session.cacheReadTokens, cacheCreationTokens: session.cacheCreationTokens, cost: session.cost.totalCost } };
|
|
575
|
+
for (const [date, dayData] of Object.entries(usage)) {
|
|
576
|
+
const day = ensureDay(date);
|
|
577
|
+
day.cost += dayData.cost;
|
|
578
|
+
day.inputTokens += dayData.inputTokens;
|
|
579
|
+
day.outputTokens += dayData.outputTokens;
|
|
580
|
+
day.cacheReadTokens += dayData.cacheReadTokens;
|
|
581
|
+
day.totalTokens += dayData.inputTokens + dayData.outputTokens + dayData.cacheReadTokens + (dayData.cacheCreationTokens || 0);
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
// Session count attributed to start date
|
|
585
|
+
ensureDay(startDate).sessions++;
|
|
586
|
+
|
|
587
|
+
// Commits attributed to their own timestamps
|
|
588
|
+
for (const commit of session.commits) {
|
|
589
|
+
const commitDate = toDateStr(commit.timestamp);
|
|
590
|
+
const cDay = ensureDay(commitDate);
|
|
591
|
+
cDay.commits++;
|
|
592
|
+
cDay.linesAdded += commit.totalAdded || 0;
|
|
593
|
+
cDay.linesDeleted += commit.totalDeleted || 0;
|
|
594
|
+
cDay.netLines += (commit.totalAdded || 0) - (commit.totalDeleted || 0);
|
|
595
|
+
}
|
|
575
596
|
}
|
|
576
597
|
const daily = [...dailyMap.values()].sort((a, b) => a.date.localeCompare(b.date));
|
|
577
598
|
|
|
@@ -660,9 +681,14 @@ export function computeMetrics(correlatedSessions, organicCommits, commitsByRepo
|
|
|
660
681
|
const hour = d.getHours();
|
|
661
682
|
heatmap[dayOfWeek][hour]++;
|
|
662
683
|
}
|
|
663
|
-
//
|
|
664
|
-
const
|
|
665
|
-
|
|
684
|
+
// Distribute cost across actual usage days via dailyUsage
|
|
685
|
+
const usage = session.dailyUsage && Object.keys(session.dailyUsage).length > 0
|
|
686
|
+
? session.dailyUsage
|
|
687
|
+
: { [toDateStr(session.startTime)]: { cost: session.cost.totalCost } };
|
|
688
|
+
for (const [dateStr, dayData] of Object.entries(usage)) {
|
|
689
|
+
const dd = new Date(dateStr + 'T12:00:00'); // noon local to get correct day-of-week
|
|
690
|
+
heatmapCost[dd.getDay()][12] += dayData.cost;
|
|
691
|
+
}
|
|
666
692
|
}
|
|
667
693
|
|
|
668
694
|
// ---- Per-project breakdown ----
|
|
@@ -699,13 +725,27 @@ export function computeMetrics(correlatedSessions, organicCommits, commitsByRepo
|
|
|
699
725
|
const mkPeriod = () => ({ cost: 0, sessions: 0, commits: 0, tokens: 0 });
|
|
700
726
|
const costByPeriod = { today: mkPeriod(), week: mkPeriod(), month: mkPeriod(), allTime: mkPeriod() };
|
|
701
727
|
for (const session of correlatedSessions) {
|
|
728
|
+
const startDateStr = toDateStr(session.startTime);
|
|
729
|
+
|
|
730
|
+
// Distribute cost and tokens across actual usage days
|
|
731
|
+
const usage = session.dailyUsage && Object.keys(session.dailyUsage).length > 0
|
|
732
|
+
? session.dailyUsage
|
|
733
|
+
: { [startDateStr]: { inputTokens: session.totalInputTokens, outputTokens: session.totalOutputTokens, cacheReadTokens: session.cacheReadTokens, cacheCreationTokens: session.cacheCreationTokens, cost: session.cost.totalCost } };
|
|
734
|
+
for (const [dateStr, dayData] of Object.entries(usage)) {
|
|
735
|
+
const dDate = new Date(dateStr + 'T12:00:00');
|
|
736
|
+
const dTok = dayData.inputTokens + dayData.outputTokens + dayData.cacheReadTokens + (dayData.cacheCreationTokens || 0);
|
|
737
|
+
costByPeriod.allTime.cost += dayData.cost; costByPeriod.allTime.tokens += dTok;
|
|
738
|
+
if (dDate >= startOfMonth) { costByPeriod.month.cost += dayData.cost; costByPeriod.month.tokens += dTok; }
|
|
739
|
+
if (dDate >= startOfWeek) { costByPeriod.week.cost += dayData.cost; costByPeriod.week.tokens += dTok; }
|
|
740
|
+
if (dateStr === todayStr) { costByPeriod.today.cost += dayData.cost; costByPeriod.today.tokens += dTok; }
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
// Sessions count once (on start date), commits count on their own dates
|
|
744
|
+
costByPeriod.allTime.sessions++; costByPeriod.allTime.commits += session.commitCount;
|
|
702
745
|
const sDate = new Date(session.startTime);
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
if (sDate >= startOfMonth) { costByPeriod.month.cost += session.cost.totalCost; costByPeriod.month.sessions++; costByPeriod.month.commits += session.commitCount; costByPeriod.month.tokens += sTok; }
|
|
707
|
-
if (sDate >= startOfWeek) { costByPeriod.week.cost += session.cost.totalCost; costByPeriod.week.sessions++; costByPeriod.week.commits += session.commitCount; costByPeriod.week.tokens += sTok; }
|
|
708
|
-
if (sDateStr === todayStr) { costByPeriod.today.cost += session.cost.totalCost; costByPeriod.today.sessions++; costByPeriod.today.commits += session.commitCount; costByPeriod.today.tokens += sTok; }
|
|
746
|
+
if (sDate >= startOfMonth) { costByPeriod.month.sessions++; costByPeriod.month.commits += session.commitCount; }
|
|
747
|
+
if (sDate >= startOfWeek) { costByPeriod.week.sessions++; costByPeriod.week.commits += session.commitCount; }
|
|
748
|
+
if (startDateStr === todayStr) { costByPeriod.today.sessions++; costByPeriod.today.commits += session.commitCount; }
|
|
709
749
|
}
|
|
710
750
|
|
|
711
751
|
const summary = {
|
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
Apache License
|
|
3
|
-
Version 2.0, January 2004
|
|
4
|
-
http://www.apache.org/licenses/
|
|
5
|
-
|
|
6
|
-
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
-
|
|
8
|
-
1. Definitions.
|
|
9
|
-
|
|
10
|
-
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
-
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
-
|
|
13
|
-
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
-
the copyright owner that is granting the License.
|
|
15
|
-
|
|
16
|
-
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
-
other entities that control, are controlled by, or are under common
|
|
18
|
-
control with that entity. For the purposes of this definition,
|
|
19
|
-
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
-
direction or management of such entity, whether by contract or
|
|
21
|
-
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
-
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
-
|
|
24
|
-
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
-
exercising permissions granted by this License.
|
|
26
|
-
|
|
27
|
-
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
-
including but not limited to software source code, documentation
|
|
29
|
-
source, and configuration files.
|
|
30
|
-
|
|
31
|
-
"Object" form shall mean any form resulting from mechanical
|
|
32
|
-
transformation or translation of a Source form, including but
|
|
33
|
-
not limited to compiled object code, generated documentation,
|
|
34
|
-
and conversions to other media types.
|
|
35
|
-
|
|
36
|
-
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
-
Object form, made available under the License, as indicated by a
|
|
38
|
-
copyright notice that is included in or attached to the work
|
|
39
|
-
(an example is provided in the Appendix below).
|
|
40
|
-
|
|
41
|
-
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
-
form, that is based on (or derived from) the Work and for which the
|
|
43
|
-
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
-
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
-
of this License, Derivative Works shall not include works that remain
|
|
46
|
-
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
-
the Work and Derivative Works thereof.
|
|
48
|
-
|
|
49
|
-
"Contribution" shall mean any work of authorship, including
|
|
50
|
-
the original version of the Work and any modifications or additions
|
|
51
|
-
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
-
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
-
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
-
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
-
means any form of electronic, verbal, or written communication sent
|
|
56
|
-
to the Licensor or its representatives, including but not limited to
|
|
57
|
-
communication on electronic mailing lists, source code control systems,
|
|
58
|
-
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
-
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
-
excluding communication that is conspicuously marked or otherwise
|
|
61
|
-
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
-
|
|
63
|
-
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
-
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
-
subsequently incorporated within the Work.
|
|
66
|
-
|
|
67
|
-
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
-
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
-
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
-
Work and such Derivative Works in Source or Object form.
|
|
73
|
-
|
|
74
|
-
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
-
(except as stated in this section) patent license to make, have made,
|
|
78
|
-
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
-
where such license applies only to those patent claims licensable
|
|
80
|
-
by such Contributor that are necessarily infringed by their
|
|
81
|
-
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
-
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
-
institute patent litigation against any entity (including a
|
|
84
|
-
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
-
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
-
or contributory patent infringement, then any patent licenses
|
|
87
|
-
granted to You under this License for that Work shall terminate
|
|
88
|
-
as of the date such litigation is filed.
|
|
89
|
-
|
|
90
|
-
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
-
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
-
modifications, and in Source or Object form, provided that You
|
|
93
|
-
meet the following conditions:
|
|
94
|
-
|
|
95
|
-
(a) You must give any other recipients of the Work or
|
|
96
|
-
Derivative Works a copy of this License; and
|
|
97
|
-
|
|
98
|
-
(b) You must cause any modified files to carry prominent notices
|
|
99
|
-
stating that You changed the files; and
|
|
100
|
-
|
|
101
|
-
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
-
that You distribute, all copyright, patent, trademark, and
|
|
103
|
-
attribution notices from the Source form of the Work,
|
|
104
|
-
excluding those notices that do not pertain to any part of
|
|
105
|
-
the Derivative Works; and
|
|
106
|
-
|
|
107
|
-
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
-
distribution, then any Derivative Works that You distribute must
|
|
109
|
-
include a readable copy of the attribution notices contained
|
|
110
|
-
within such NOTICE file, excluding those notices that do not
|
|
111
|
-
pertain to any part of the Derivative Works, in at least one
|
|
112
|
-
of the following places: within a NOTICE text file distributed
|
|
113
|
-
as part of the Derivative Works; within the Source form or
|
|
114
|
-
documentation, if provided along with the Derivative Works; or,
|
|
115
|
-
within a display generated by the Derivative Works, if and
|
|
116
|
-
wherever such third-party notices normally appear. The contents
|
|
117
|
-
of the NOTICE file are for informational purposes only and
|
|
118
|
-
do not modify the License. You may add Your own attribution
|
|
119
|
-
notices within Derivative Works that You distribute, alongside
|
|
120
|
-
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
-
that such additional attribution notices cannot be construed
|
|
122
|
-
as modifying the License.
|
|
123
|
-
|
|
124
|
-
You may add Your own copyright statement to Your modifications and
|
|
125
|
-
may provide additional or different license terms and conditions
|
|
126
|
-
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
-
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
-
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
-
the conditions stated in this License.
|
|
130
|
-
|
|
131
|
-
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
-
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
-
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
-
this License, without any additional terms or conditions.
|
|
135
|
-
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
-
the terms of any separate license agreement you may have executed
|
|
137
|
-
with Licensor regarding such Contributions.
|
|
138
|
-
|
|
139
|
-
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
-
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
-
except as required for reasonable and customary use in describing the
|
|
142
|
-
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
-
|
|
144
|
-
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
-
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
-
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
-
implied, including, without limitation, any warranties or conditions
|
|
149
|
-
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
-
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
-
appropriateness of using or redistributing the Work and assume any
|
|
152
|
-
risks associated with Your exercise of permissions under this License.
|
|
153
|
-
|
|
154
|
-
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
-
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
-
unless required by applicable law (such as deliberate and grossly
|
|
157
|
-
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
-
liable to You for damages, including any direct, indirect, special,
|
|
159
|
-
incidental, or consequential damages of any character arising as a
|
|
160
|
-
result of this License or out of the use or inability to use the
|
|
161
|
-
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
-
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
-
other commercial damages or losses), even if such Contributor
|
|
164
|
-
has been advised of the possibility of such damages.
|
|
165
|
-
|
|
166
|
-
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
-
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
-
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
-
or other liability obligations and/or rights consistent with this
|
|
170
|
-
License. However, in accepting such obligations, You may act only
|
|
171
|
-
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
-
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
-
defend, and hold each Contributor harmless for any liability
|
|
174
|
-
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
-
of your accepting any such warranty or additional liability.
|
|
176
|
-
|
|
177
|
-
END OF TERMS AND CONDITIONS
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: frontend-design
|
|
3
|
-
description: Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.
|
|
4
|
-
license: Complete terms in LICENSE.txt
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
This skill guides creation of distinctive, production-grade frontend interfaces that avoid generic "AI slop" aesthetics. Implement real working code with exceptional attention to aesthetic details and creative choices.
|
|
8
|
-
|
|
9
|
-
The user provides frontend requirements: a component, page, application, or interface to build. They may include context about the purpose, audience, or technical constraints.
|
|
10
|
-
|
|
11
|
-
## Design Thinking
|
|
12
|
-
|
|
13
|
-
Before coding, understand the context and commit to a BOLD aesthetic direction:
|
|
14
|
-
- **Purpose**: What problem does this interface solve? Who uses it?
|
|
15
|
-
- **Tone**: Pick an extreme: brutally minimal, maximalist chaos, retro-futuristic, organic/natural, luxury/refined, playful/toy-like, editorial/magazine, brutalist/raw, art deco/geometric, soft/pastel, industrial/utilitarian, etc. There are so many flavors to choose from. Use these for inspiration but design one that is true to the aesthetic direction.
|
|
16
|
-
- **Constraints**: Technical requirements (framework, performance, accessibility).
|
|
17
|
-
- **Differentiation**: What makes this UNFORGETTABLE? What's the one thing someone will remember?
|
|
18
|
-
|
|
19
|
-
**CRITICAL**: Choose a clear conceptual direction and execute it with precision. Bold maximalism and refined minimalism both work - the key is intentionality, not intensity.
|
|
20
|
-
|
|
21
|
-
Then implement working code (HTML/CSS/JS, React, Vue, etc.) that is:
|
|
22
|
-
- Production-grade and functional
|
|
23
|
-
- Visually striking and memorable
|
|
24
|
-
- Cohesive with a clear aesthetic point-of-view
|
|
25
|
-
- Meticulously refined in every detail
|
|
26
|
-
|
|
27
|
-
## Frontend Aesthetics Guidelines
|
|
28
|
-
|
|
29
|
-
Focus on:
|
|
30
|
-
- **Typography**: Choose fonts that are beautiful, unique, and interesting. Avoid generic fonts like Arial and Inter; opt instead for distinctive choices that elevate the frontend's aesthetics; unexpected, characterful font choices. Pair a distinctive display font with a refined body font.
|
|
31
|
-
- **Color & Theme**: Commit to a cohesive aesthetic. Use CSS variables for consistency. Dominant colors with sharp accents outperform timid, evenly-distributed palettes.
|
|
32
|
-
- **Motion**: Use animations for effects and micro-interactions. Prioritize CSS-only solutions for HTML. Use Motion library for React when available. Focus on high-impact moments: one well-orchestrated page load with staggered reveals (animation-delay) creates more delight than scattered micro-interactions. Use scroll-triggering and hover states that surprise.
|
|
33
|
-
- **Spatial Composition**: Unexpected layouts. Asymmetry. Overlap. Diagonal flow. Grid-breaking elements. Generous negative space OR controlled density.
|
|
34
|
-
- **Backgrounds & Visual Details**: Create atmosphere and depth rather than defaulting to solid colors. Add contextual effects and textures that match the overall aesthetic. Apply creative forms like gradient meshes, noise textures, geometric patterns, layered transparencies, dramatic shadows, decorative borders, custom cursors, and grain overlays.
|
|
35
|
-
|
|
36
|
-
NEVER use generic AI-generated aesthetics like overused font families (Inter, Roboto, Arial, system fonts), cliched color schemes (particularly purple gradients on white backgrounds), predictable layouts and component patterns, and cookie-cutter design that lacks context-specific character.
|
|
37
|
-
|
|
38
|
-
Interpret creatively and make unexpected choices that feel genuinely designed for the context. No design should be the same. Vary between light and dark themes, different fonts, different aesthetics. NEVER converge on common choices (Space Grotesk, for example) across generations.
|
|
39
|
-
|
|
40
|
-
**IMPORTANT**: Match implementation complexity to the aesthetic vision. Maximalist designs need elaborate code with extensive animations and effects. Minimalist or refined designs need restraint, precision, and careful attention to spacing, typography, and subtle details. Elegance comes from executing the vision well.
|
|
41
|
-
|
|
42
|
-
Remember: Claude is capable of extraordinary creative work. Don't hold back, show what can truly be created when thinking outside the box and committing fully to a distinctive vision.
|