Agent skill
weekly-claude-analytics
주간 Claude Code 사용 분석 리포트 생성. 이번 주 모든 세션 로그를 분석하여 프로젝트별 시간 분포, 작업 유형, Jira 이슈 진행 현황 제공. "주간 분석", "Claude 사용 통계", "weekly analytics" 등의 요청 시 자동 적용.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/weekly-claude-analytics
SKILL.md
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 작업 기본 가이드
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?