관리자 – Claude Code 세션을 일반 마크다운 형식으로 자동 요약

hackernews | | 📦 오픈소스
#claude #하드웨어/반도체
원문 출처: hackernews · Genesis Park에서 요약 및 분석

요약

'Clerk'는 Claude Code 세션을 자동으로 요약하고 인덱싱하여 마크다운 파일로 저장하는 도구입니다. `clerk report` 명령어를 사용해 지난 7일간의 활동을 프로젝트별 또는 날짜별로 구조화된 보고서로 출력할 수 있습니다. 기본값은 당일 기준이며, `--active` 옵션을 추가하면 아직 종료되지 않은 세션도 포함하여 정리가 가능합니다.

본문

______ __ ______ ______ __ __ /\ ___\ /\ \ /\ ___\ /\ == \ /\ \/ / \ \ \____ \ \ \____ \ \ __\ \ \ __|hook| B[clerk punch] C[Session End] -->|hook| D[clerk feed] end subgraph Your Files E[sessions/] F[summary/] G[index/] end B --> E D --> F D --> G subgraph User Commands H["/clerk-resume"] -->|MCP| F I["/clerk-search"] -->|MCP| G J["clerk report"] --> F end sequenceDiagram actor You participant CC as Claude Code participant clerk participant Files as Your Files Note over You,Files: Daily work (automatic) You->>CC: Start coding session CC->>clerk: SessionStart hook clerk->>Files: Record session ID You->>CC: Work, debug, discuss... You->>CC: Close session CC->>clerk: SessionEnd hook clerk->>Files: Generate summary + index Note over You,Files: Repeat across days and projects... Note over You,Files: Friday afternoon You->>clerk: clerk report --days 7 clerk->>Files: Read all summaries clerk->>CC: Send summaries for report generation CC-->>clerk: Structured report clerk->>You: Weekly report | Event | What happens | |---|---| | Session starts | clerk punch records session ID + transcript path | | Session ends | clerk feed generates summary, builds index entries | | You need context | /clerk-resume reads past summaries and transcripts | | You search | /clerk-search uses semantic matching on index terms | | You need a report | clerk report --days 7 generates a structured report | ~/.clerk/ ├── summary/YYYYMMDD/slug.md ← daily summaries per project ├── index/term.md ← inverted index (tags, dates, projects, keywords) ├── sessions/slug.md ← session ID history ├── cursor/ ← incremental processing state ├── running/ ← active feed process state └── log/ ← daily logs Each summary has YAML frontmatter with all related terms: --- tags: - go - auth - jwt - 20260418 - my-api-server --- Each index file contains markdown links to matching summaries: - [my-api-server+20260418](../summary/20260418/my-api-server.md) - [my-api-server+20260419](../summary/20260419/my-api-server.md) Terms naturally overlap — if "api" is both a word from the project slug and an AI-extracted tag, they point to the same file, creating connections across projects and topics. Friday afternoon, one command: clerk report --days 7 clerk reads all summaries from the past 7 days, sends them to Claude, and outputs a structured report with three views: - Summary — high-level overview of the entire period, organized by project - By Date — what was done each day, broken down by project - By Project — what was done on each project, broken down by date Output goes to stdout. Save it, paste it, or pipe it wherever you need: clerk report --days 7 -o weekly-report.md Default is --days 1 (today only) — useful as a daily standup summary. Want to include sessions that haven't ended yet? Add --active : clerk report --days 7 --active Note: --active processes active session transcripts on the spot, which uses additional Claude API calls. Without this flag, only completed sessions are included. Example output: ### Summary (2026-04-14 ~ 2026-04-18) #### my-api-server Implemented user authentication with JWT, added rate limiting middleware, and fixed connection pool leak under high concurrency. #### frontend-app Migrated from Vue 2 to Vue 3, replaced Vuex with Pinia, updated all unit tests. --- ### By Date #### 2026-04-14 - **my-api-server**: Set up JWT auth with refresh token rotation - **frontend-app**: Started Vue 3 migration, updated build config #### 2026-04-16 - **my-api-server**: Added rate limiting middleware, fixed connection pool leak - **frontend-app**: Replaced Vuex with Pinia, migrated 12 store modules --- ### By Project #### my-api-server - **2026-04-14**: JWT auth with refresh token rotation - **2026-04-16**: Rate limiting middleware, connection pool leak fix #### frontend-app - **2026-04-14**: Vue 3 migration kickoff, build config update - **2026-04-16**: Vuex → Pinia migration, 12 store modules converted macOS / Linux / Git Bash: curl -fsSL https://raw.githubusercontent.com/vulcanshen/clerk/main/install.sh | sh Windows (PowerShell): irm https://raw.githubusercontent.com/vulcanshen/clerk/main/install.ps1 | iex Then set up the hooks, MCP server, and skills: clerk install | Platform | Command | |---|---| | Homebrew (macOS / Linux) | brew install vulcanshen/tap/clerk | | Scoop (Windows) | scoop bucket add vulcanshen https://github.com/vulcanshen/scoop-bucket && scoop install clerk | | Debian / Ubuntu | sudo dpkg -i clerk__linux_amd64.deb | | RHEL / Fedora | sudo rpm -i clerk__linux_amd64.rpm | go install github.com/vulcanshen/clerk@latest | Command | Description | |---|---| install | Install all components (hook + mcp + skills), use --force to reinstall | install hook | Install SessionStart/SessionEnd hooks only | install mcp | Register MCP server only | install skills | Install slash command skills only | uninstall | Remove all components | config | Show current configuration (alias for config show ) | config show | Show merged configuration and file paths | config set | Set project-level config value | config set -g | Set global config value | status | Show active feed processes and interrupted sessions | status --watch | Live-refresh status every second | status retry | Retry a specific interrupted session | status retry --all | Retry all interrupted sessions | status kill | Kill a specific active feed process | status kill --all | Kill all active feed processes | report | Generate a report from recent summaries (default: today) | report --days 7 | Weekly report across all projects | diagnosis | Check environment and auto-fix issues | diagnosis error | Show error logs for troubleshooting (--mask to redact personal info) | diagnosis log | Show all logs for troubleshooting (--mask to redact personal info) | data moveto | Move clerk data to a new directory and update config | data purge | Delete all clerk data (-y to skip confirmation) | version | Show current version and check for updates | Internal commands (called by hooks, not by users): | Command | Description | |---|---| feed | Process session transcript and generate summary | punch | Record session ID on session start | mcp | Start MCP stdio server | - Global: ~/.config/clerk/.clerk.json - Project: .clerk.json in the current or any parent directory (nearest match wins) { "output": { "dir": "~/.clerk/", "language": "en" }, "summary": { "model": "", "timeout": "5m" }, "log": { "retention_days": 30 }, "feed": { "enabled": true } } | Key | Default | Description | |---|---|---| output.dir | ~/.clerk/ | Root directory for summaries | output.language | en | Summary output language | summary.model | "" (claude default) | Model to use for claude -p | summary.timeout | 5m | Timeout for claude -p calls (e.g. 5m, 2m30s, 1h) | log.retention_days | 30 | Days to keep log and cursor files | feed.enabled | true | Enable/disable feed for this project | # Disable feed for a specific project cd /path/to/unimportant-project clerk config set feed.enabled false # Use a cheaper model globally clerk config set -g summary.model haiku # Change output language globally clerk config set -g output.language en Available when MCP server is installed (clerk install mcp ). These are called by Claude Code through skills — you don't need to invoke them directly. | Tool | Description | |---|---| clerk-resume | Returns summary + transcript file paths for context recovery | clerk-index-list | List all available index terms (tags, dates, projects, keywords) | clerk-index-read | Read the content of one or more index terms | Available when skills are installed (clerk install skills ): | Skill | Description | |---|---| /clerk-resume | Recover context from previous sessions — calls MCP tool, reads files, rebuilds context | /clerk-search | Search past sessions by keyword — calls MCP tool, reads matching files | If something isn't working, run diagnosis first — it checks your environment and auto-fixes common issues: clerk diagnosis If the problem persists, export error logs and open an issue: clerk diagnosis error --mask --days 7 The --mask flag redacts personal information (usernames, paths) so the output is safe to paste in a GitHub issue. # Zsh mkdir -p ~/.zsh/completions clerk completion zsh > ~/.zsh/completions/_clerk echo 'fpath=(~/.zsh/completions $fpath)' >> ~/.zshrc echo 'autoload -Uz compinit && compinit' >> ~/.zshrc source ~/.zshrc # Bash clerk completion bash > /etc/bash_completion.d/clerk # Fish clerk completion fish > ~/.config/fish/completions/clerk.fish # PowerShell New-Item -ItemType Directory -Path (Split-Path $PROFILE) -Force clerk completion powershell | Set-Content $PROFILE

Genesis Park 편집팀이 AI를 활용하여 작성한 분석입니다. 원문은 출처 링크를 통해 확인할 수 있습니다.

공유

관련 저널 읽기

전체 보기 →