Skip to main content

archive-logs

Archive Claude Code conversation logs into the current project as JSONL and readable Markdown

소스 정보

저장소
AMindToThink/claude-code-settings
최근 소스 활동
2026년 2월 25일 15:16
감지된 SKILL.md 언어
영어
스타
4
포크
0

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
archive-logs
description
Archive Claude Code conversation logs into the current project as JSONL and readable Markdown
disable-model-invocation
true
Archive the Claude Code conversation logs from this project into the project itself, for auditability and transparency. ## Workflow 1. **Find logs**: Look in `~/.claude/projects/<encoded-path>/` where the encoded path replaces `/` with `-` in the current working directory path. List `*.jsonl` files (top-level only, not subdirectories). 2. **Identify sessions**: For each JSONL, extract the first user message to understand the session topic. Skip files with 0 user messages. Assign descriptive numbered names (e.g. `01_initial_setup.jsonl`, `02_feature_work.jsonl`). 3. **Check for duplicates**: If `logs/conversation/` already exists, compare against existing files to avoid re-archiving. 4. **Copy JSONL files** into `logs/conversation/` in the project. 5. **Create a converter script** at `scripts/jsonl_to_markdown.py` that converts JSONL to readable Markdown. The JSONL format: - Each line is a JSON object with a `type` field - Types `user` and `assistant` contain `message.content` (string or array of content blocks) - Content block types: `text` (render), `tool_use` (show tool name + concise input), `tool_result` (abbreviate), `thinking` (omit) - Filter out `<system-reminder>` tags from user messages - Skip tool_result-only user messages 6. **Run the converter** to generate `.md` files alongside the `.jsonl` files. 7. **Scan for secrets**: Install `detect-secrets` (`uv add --dev detect-secrets` or ensure it's available), then run `detect-secrets scan logs/conversation/` on all archived files (both `.jsonl` and `.md`). If any secrets are detected: - Print a clear warning listing each file and the line number(s) flagged. - Do NOT commit the files. Instead, ask the user how to proceed (redact, skip the file, or abort). - Secrets often appear in bash tool stdout/stderr in the JSONL. Common sources: `echo $API_KEY`, env variable dumps, credential outputs. 8. **Write `logs/conversation/README.md`** listing each session. 9. **Report** what was archived (and whether the secret scan passed cleanly).
GitHub에서 보기