log
npx machina-cli add skill lemon-etvibe/prompt-vault/log --openclawRecord completed work from the current conversation session as a phase log.
Procedure
-
Verify
.local/logs/directory exists (create if missing) -
Determine next phase number from existing
phase-*.mdfile count (3-digit zero-padded) -
Write
phase-NNN.mdin the following format:# Phase NNN: $ARGUMENTS (or auto-inferred title) - **Date**: YYYY-MM-DD - **Session**: (session ID or timestamp) ## User Prompt > Record the user's original request as close to verbatim as possible ## Actions - List major actions performed by Claude in chronological order - Include tools used, files read, files created/modified ## Results - Summary of deliverables (generated file paths, key findings) - Key data or metrics ## Decisions - Decisions made and their rationale ## Next - Next steps or open items -
Update
.local/logs/_index.md: add/update the phase row| NNN | Title | done | YYYY-MM-DD | One-line summary | -
Update auto-log state file (
.local/logs/last-log-state.json) to prevent auto-logger duplication:- Compute transcript hash via Bash:
Prefix withshasum -a 256 ~/.claude/projects/.../SESSION_ID.jsonl | cut -d' ' -f1sha256:to form"sha256:<hex>" - Write state:
{ "lastLogTimestamp": <current_timestamp_ms>, "lastTranscriptHash": "sha256:<hash>", "lastLogTurnCount": <total_turn_count>, "lastPhaseNumber": "<NNN>", "lastTrigger": "manual" } - This ensures the auto-logger (Stop/PreCompact hooks) won't re-log the same content
- Compute transcript hash via Bash:
-
Output completion message
Source
git clone https://github.com/lemon-etvibe/prompt-vault/blob/main/skills/log/SKILL.mdView on GitHub Overview
This skill creates a structured phase log whenever a phase completes. It writes phase-NNN.md with date, session, user prompt, actions, results, decisions, and next steps, then updates the index and a state file to avoid duplicate auto-logging.
How This Skill Works
It verifies the local logs directory exists, counts the phase-*.md files to determine the next phase number, and writes phase-NNN.md in a standard format. It also updates the _index.md and last-log-state.json to support auditing and deduplication.
When to Use It
- After finishing a phase's dialogue and deliverables, to archive the work
- When a phase concludes and requires a traceable record for audit or handoff
- Before concluding a session to provide a persistent summary for review
- When a multi-step task spans phases and you need phase-level separation
- To prepare a handoff packet with the next steps and decisions
Quick Start
- Step 1: Ensure the .local/logs/ directory exists (create if missing)
- Step 2: Count phase-*.md to compute the next NNN (zero-padded to 3 digits)
- Step 3: Write phase-NNN.md with the required sections, then update _index.md and last-log-state.json
Best Practices
- Always ensure the .local/logs directory exists before writing
- Include the user's original request verbatim in the User Prompt section
- Number phases with 3-digit NNN (phase-001, phase-002, ...)
- List major actions and tools used in chronological order
- Keep the log file content readable and consistent for audits
Example Use Cases
- Phase 001: Onboarding request captured with date, session, and user prompt
- Phase 002: Data extraction and transformation with tools listed
- Phase 003: Report generation and file paths documented
- Phase 004: Tool orchestration and file reads/writes recorded
- Phase 005: Final review and handoff prepared