- Home
- Skills
- Tyrchen
- Claude Skills
- Chat History
chat-history_skill
- TypeScript
31
GitHub Stars
2
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill tyrchen/claude-skills --skill chat-history- extract-chats.sh3.5 KB
- SKILL.md5.0 KB
Overview
This skill extracts user inputs from Claude Code session history and organizes them into a project's .chats directory as daily markdown files. It helps document conversations, export instruction logs, and maintain a searchable changelog of interactions with Claude. The output is grouped by date and formatted for easy review and version control.
How this skill works
The skill locates Claude Code session files stored under ~/.claude/projects/{encoded-project-path}/, reads .jsonl session files, and filters records for user messages (type == "user" and userType == "external"). It removes system commands, continuation markers, tool outputs, and other noise, then writes the meaningful user inputs into .chats/{YYYYMMDD}.md files with a consistent heading structure. The process can create the .chats directory and optionally stage commits for version control.
When to use it
- You want to export and archive conversation instructions from Claude sessions by date.
- You need a readable changelog of requests and tasks given to Claude for audits or handoffs.
- You are documenting decisions and task specs that originated in chat sessions.
- You want to migrate or back up user inputs from Claude Code into your repository.
- You need daily grouping of interactions for tracking progress or reviews.
Best practices
- Run the extractor from your project root so the encoded project path matches the session directory.
- Review extracted content before committing to avoid including partial or irrelevant lines.
- Group related messages under a single heading to keep instructions concise and actionable.
- Exclude agent-*.jsonl files (sub-agents) because they rarely contain direct external user input.
- Preserve code blocks and formatting in user inputs to retain runnable examples and snippets.
Example use cases
- Create .chats entries after a day of debugging sessions to record discovered steps and commands.
- Export inputs used to drive a long-running feature design conversation for inclusion in docs.
- Collect user questions and task specs from multiple sessions into a single dated file for reviews.
- Maintain a project-level log of all instructions given to Claude for onboarding or compliance.
- Periodically snapshot session inputs before cleaning local Claude data or migrating machines.
FAQ
The current working directory path is transformed by replacing / with - and prefixing with -, matching the folder names under ~/.claude/projects/.
Which messages are excluded from extraction?
System commands, session continuation messages, tool results, hook notifications, caveats, and empty lines are filtered out to keep only direct user instructions.