← 返回
未分类

Log Current Conversation

Use when the user wants the current thread logged into a project-local Markdown file, one file per conversation, with timestamps, verbatim user prompts, and one-sentence assistant reply summaries.
Use when the user wants the current thread logged into a project-local Markdown file, one file per conversation, with timestamps, verbatim user prompts, and one-sentence assistant reply summaries.
user_a0bf454f
未分类 community v1.0.3 4 版本 100000 Key: 无需
★ 0
Stars
📥 85
下载
💾 0
安装
4
版本
#latest

概述

Log Current Conversation

node "${CLAUDE_SKILL_DIR}/scripts/activate-persistent-log.mjs" "${CLAUDE_SESSION_ID}"

Create and maintain a Markdown conversation log for the current thread only.

Goal

Keep a project-local Markdown file up to date for this conversation. Each completed logged turn should append:

  • the timestamp for the user message
  • the user's prompt text
  • a one-sentence summary of the assistant reply

Scope

  • This skill only tracks the current conversation.
  • Start a new Markdown file for each new conversation that explicitly enables this skill.
  • Do not backfill older threads unless the user explicitly asks.
  • Do not log hidden system prompts, developer prompts, tool schemas, or chain-of-thought.

Runtime Model

This skill is designed to use a Stop hook plus local scripts.

  • On invocation, the setup script activates logging for the current session and tries to install a project-local persistent Stop hook in .claude/settings.local.json.
  • The hook runs at assistant stop points after the skill has been invoked.
  • The script reads the current session transcript to recover the latest user message.
  • The script stores per-session state in a hidden project-local sidecar directory so it can avoid duplicate appends.
  • The visible user-facing artifact remains a single Markdown log file in the project root.

Compatibility

  • Preferred mode: install a persistent project-local Stop hook in .claude/settings.local.json.
  • Fallback mode: if the runtime does not support project-local hook persistence, keep session-local logging enabled and continue using explicit in-conversation fallback behavior when needed.

File Rules

  1. Use the current project directory as the log location unless the user explicitly overrides it.
  2. Create a new file named YYYY-MM-DD-HHMMSS-conversation.md.
  3. Prefer the local system timezone when formatting timestamps.
  4. Remember the absolute path to the log file for the rest of the current conversation.
  5. Store hook bookkeeping in .claude/log-current-conversation/ inside the project.
  6. Try to install the persistent project-local hook in .claude/settings.local.json so logging survives runtime reloads for this project.

Logged Format

The script should write this header exactly once:

# Conversation Log

- Session started: YYYY-MM-DD HH:MM:SS
- Project: /absolute/path/to/project

Each appended entry should use this format:

## YYYY-MM-DD HH:MM:SS
**User Prompt**
<verbatim user prompt>

**Assistant Reply Summary**
<one-sentence summary>

Writing Rules

  • Keep the user prompt verbatim when practical.
  • If the user message contains non-text attachments, mention them briefly in the prompt block only if needed for context.
  • The summary must stay to one sentence, plain and factual.
  • Summarize the reply that the user actually receives, not the hidden tool work.
  • If the assistant sends multiple paragraphs, still reduce the reply to one sentence.
  • Append only once per completed logged turn.

Recovery Rules

  • If the log file is missing but its intended path is known, recreate it at the same path and continue.
  • If the conversation resumes after compaction, continue appending to the same file if the path is still known.
  • If the path is no longer recoverable, create a new timestamped file in the current project directory and continue.

Stop Conditions

  • Stop appending when the user asks to stop logging.
  • Stop if the user switches to a different logging format and explicitly replaces this workflow.
  • If hook execution is unavailable in the current runtime, fall back to explicit in-conversation file appends.

版本历史

共 4 个版本

  • v1.0.3 同时支持两种 transcript 结构 当前
    2026-05-24 22:25 安全 安全
  • v1.0.2 Initial release
    2026-05-24 14:22 安全 安全
  • v1.0.1 兼容两种运行模式: - 持久模式:在支持项目级 hook 配置的运行时中,自动安装 Stop hook,支持更稳定的持续记录 - 降级模式:如果运行时不支持持久 hook,则保留会话级记录能力,避免 Skill 直接失效
    2026-05-23 23:12 安全 安全
  • v1.0.0 Initial release
    2026-05-22 23:01 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-agent

self-improving agent

pskoett
记录自身发现以实现自我改进的技能
★ 4,124 📥 878,274
ai-agent

Agent Browser

rez0
用于 AI 代理的浏览器自动化 CLI。当用户需要与网站交互(包括浏览页面、填写表单、点击按钮、截图等)时使用。
★ 845 📥 327,674
ai-agent

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,413 📥 325,633