Weekly Claude Analytics
by msbaek
|
Skill Details
Repository Files
1 file in this skill directory
name: weekly-claude-analytics description: | 주간 Claude Code 사용 분석 리포트 생성. 이번 주 모든 세션 로그를 분석하여 프로젝트별 시간 분포, 작업 유형, Jira 이슈 진행 현황 제공. "주간 분석", "Claude 사용 통계", "weekly analytics" 등의 요청 시 자동 적용.
Weekly Claude Analytics Skill
개요
주간(월~금) Claude Code 세션 로그를 분석하여 사용 통계 및 작업 패턴 리포트를 생성하는 skill.
실행 시점
- 실행: 매주 금요일 오후 또는 필요 시
- 대상: 이번 주 월요일~현재까지 세션 로그
- 출력:
analytics/claude-weekly/YYYY-WXX.md
경로 정보
| 항목 | 경로 |
|---|---|
| vault | ~/DocumentsLocal/msbaek_vault/ |
| 세션 로그 | ~/.claude/projects/[encoded-path]/*.jsonl |
| 출력 | ~/DocumentsLocal/msbaek_vault/analytics/claude-weekly/ |
실행 단계
Step 1: 이번 주 시작일 계산
# 이번 주 월요일 구하기
WEEK_START=$(date -v-$(($(date +%u) - 1))d +%Y-%m-%d)
WEEK_NUM=$(date +%Y-W%V)
echo "분석 기간: $WEEK_START ~ $(date +%Y-%m-%d)"
echo "주차: $WEEK_NUM"
Step 2: 이번 주 세션 로그 수집
# 이번 주 수정된 세션 로그 찾기
WEEK_START=$(date -v-$(($(date +%u) - 1))d +%Y-%m-%d)
find ~/.claude/projects -name "*.jsonl" -newermt "$WEEK_START"
Step 3: 세션 로그 파싱
각 JSONL 파일에서 다음 정보를 추출:
| 항목 | 추출 방법 |
|---|---|
| 프로젝트명 | 디렉토리 경로 URL 디코딩 |
| 세션 시작 시간 | 첫 번째 user 레코드 timestamp |
| 세션 종료 시간 | 마지막 레코드 timestamp |
| 작업 시간 | 종료 - 시작 |
| 수정된 파일 수 | Edit/Write tool_use 개수 |
| Jira 이슈 | [A-Z]{2,10}-\d+ 패턴 매칭 |
| 작업 유형 | 키워드 및 도구 패턴 분석 |
파싱 스크립트:
# 세션 시간 계산 (첫 번째와 마지막 timestamp)
jq -s '
[.[0], .[-1]] |
map(select(.timestamp) | .timestamp) |
{start: .[0], end: .[1]}
' session.jsonl
# 수정된 파일 수
cat session.jsonl | jq -r '
select(.type == "assistant") |
.message.content[]? |
select(.type == "tool_use" and (.name == "Edit" or .name == "Write")) |
.input.file_path
' | wc -l
Step 4: 통계 집계
집계 항목:
- 총 세션 수
- 총 작업 시간 (시간:분)
- 프로젝트별 세션 수 및 시간
- 작업 유형별 분포
- Jira 이슈별 세션 수
Step 5: 리포트 생성
출력 파일: analytics/claude-weekly/YYYY-WXX.md
---
created: YYYY-MM-DD
type: claude-analytics
period: weekly
week: YYYY-WXX
tags:
- analytics/claude
- analytics/weekly
---
# Claude Code 주간 분석 - YYYY년 WXX주차
> 분석 기간: YYYY-MM-DD (월) ~ YYYY-MM-DD (금)
## 요약 통계
| 항목 | 이번 주 | 지난 주 | 변화 |
|-----|--------|--------|-----|
| 총 세션 수 | N | M | +X% |
| 총 작업 시간 | Xh Ym | ... | ... |
| 수정된 파일 수 | K | ... | ... |
## 프로젝트별 시간 분포
| 프로젝트 | 세션 수 | 작업 시간 | 비율 |
|---------|--------|----------|-----|
| project-a | 5 | 3h 20m | 40% |
| project-b | 3 | 2h 10m | 25% |
## 작업 유형 분석
| 유형 | 세션 수 | 비율 |
|-----|--------|-----|
| 기능 개발 | N | X% |
| 버그 수정 | M | Y% |
| 리팩토링 | K | Z% |
## Jira 이슈 진행 현황
| 이슈 | 프로젝트 | 세션 수 | 총 시간 |
|-----|---------|--------|--------|
| [[ABC-123]] | project-a | 3 | 1h 30m |
| [[DEF-456]] | project-b | 2 | 1h 00m |
## 일별 활동
| 날짜 | 세션 수 | 작업 시간 |
|-----|--------|----------|
| 월 | N | Xh |
| 화 | M | Yh |
| ... | ... | ... |
---
*Generated by weekly-claude-analytics skill*
작업 유형 분류 기준
| 유형 | 키워드 | 도구 패턴 |
|---|---|---|
| 기능 개발 | feature, 기능, 추가, 구현 | Write (신규 파일) |
| 버그 수정 | fix, bug, error, 오류 | Edit (기존 파일) |
| 리팩토링 | refactor, 정리, cleanup | Edit (다수 파일) |
| 문서화 | doc, 문서, README | Write (.md 파일) |
| 테스트 | test, 테스트, TDD | Edit (Test., Spec.) |
| 탐색/분석 | 분석, 찾아, 확인 | Read, Grep, Glob 위주 |
지난 주 비교
지난 주 리포트가 있는 경우 자동으로 비교:
# 지난 주 리포트 찾기
LAST_WEEK=$(date -v-7d +%Y-W%V)
ls ~/DocumentsLocal/msbaek_vault/analytics/claude-weekly/${LAST_WEEK}.md 2>/dev/null
자주 사용하는 명령어
# 이번 주 시작일 (월요일)
date -v-$(($(date +%u) - 1))d +%Y-%m-%d
# 이번 주차
date +%Y-W%V
# 이번 주 세션 로그 수
find ~/.claude/projects -name "*.jsonl" -newermt "$(date -v-$(($(date +%u) - 1))d +%Y-%m-%d)" | wc -l
# 출력 디렉토리 생성
mkdir -p ~/DocumentsLocal/msbaek_vault/analytics/claude-weekly
흐름 예시
금요일 오후 실행 시:
├── 분석 기간: 월요일 ~ 금요일
├── 세션 로그 수집:
│ ├── ~/.claude/projects/-Users-msbaek-projectA/*.jsonl
│ └── ~/.claude/projects/-Users-msbaek-projectB/*.jsonl
├── 파싱 및 집계:
│ ├── 총 세션 15개
│ ├── 총 시간 8h 30m
│ └── 프로젝트 3개
├── 지난 주 비교 (있는 경우)
└── 출력: analytics/claude-weekly/2026-W03.md
관련 Skill
daily-work-logger: 일일 작업 로그 (이 skill의 입력)weekly-newsletter: 주간 뉴스레터 생성obsidian-vault: vault 작업 기본 가이드
Related Skills
Attack Tree Construction
Build comprehensive attack trees to visualize threat paths. Use when mapping attack scenarios, identifying defense gaps, or communicating security risks to stakeholders.
Grafana Dashboards
Create and manage production Grafana dashboards for real-time visualization of system and application metrics. Use when building monitoring dashboards, visualizing metrics, or creating operational observability interfaces.
Matplotlib
Foundational plotting library. Create line plots, scatter, bar, histograms, heatmaps, 3D, subplots, export PNG/PDF/SVG, for scientific visualization and publication figures.
Scientific Visualization
Create publication figures with matplotlib/seaborn/plotly. Multi-panel layouts, error bars, significance markers, colorblind-safe, export PDF/EPS/TIFF, for journal-ready scientific plots.
Seaborn
Statistical visualization. Scatter, box, violin, heatmaps, pair plots, regression, correlation matrices, KDE, faceted plots, for exploratory analysis and publication figures.
Shap
Model interpretability and explainability using SHAP (SHapley Additive exPlanations). Use this skill when explaining machine learning model predictions, computing feature importance, generating SHAP plots (waterfall, beeswarm, bar, scatter, force, heatmap), debugging models, analyzing model bias or fairness, comparing models, or implementing explainable AI. Works with tree-based models (XGBoost, LightGBM, Random Forest), deep learning (TensorFlow, PyTorch), linear models, and any black-box model
Pydeseq2
Differential gene expression analysis (Python DESeq2). Identify DE genes from bulk RNA-seq counts, Wald tests, FDR correction, volcano/MA plots, for RNA-seq analysis.
Query Writing
For writing and executing SQL queries - from simple single-table queries to complex multi-table JOINs and aggregations
Pydeseq2
Differential gene expression analysis (Python DESeq2). Identify DE genes from bulk RNA-seq counts, Wald tests, FDR correction, volcano/MA plots, for RNA-seq analysis.
Scientific Visualization
Meta-skill for publication-ready figures. Use when creating journal submission figures requiring multi-panel layouts, significance annotations, error bars, colorblind-safe palettes, and specific journal formatting (Nature, Science, Cell). Orchestrates matplotlib/seaborn/plotly with publication styles. For quick exploration use seaborn or plotly directly.
