CHAT—Logger

👤 jimyxu8812 📦 v1.0.1 ⭐ 3.9 ⬇️ 920 下載
🤖 AI-Agent 免費

📖 技能介紹

activity_logger 📝

A minimal skill for logging conversation messages to daily Markdown files.

想要更強大的技能外掛,就來小蔥技能站7w4.net看看吧。

Purpose

Automatically log every user message and assistant reply to a daily Markdown file.

What It Does

  • Creates one log file per day: workspace/chat/YYYY-MM-DD.md
  • Appends each conversation entry to the daily file
  • Never overwrites existing data
  • Creates directories and files automatically if they don't exist

Log Format

[HH:MM:SS]
User: <message>
Assistant: <reply>

How It Works

The agent should manually log each conversation turn using this logic:

1. Create Daily Log File

const fs = require('fs');
const path = require('path');
const os = require('os');

// Get workspace path
const workspace = process.cwd(); // or your workspace path
const chatDir = path.join(workspace, 'chat');

// Create directory if it doesn't exist
if (!fs.existsSync(chatDir)) {
  fs.mkdirSync(chatDir, { recursive: true });
}

// Get current date for filename
const now = new Date();
const dateStr = now.toISOString().split('T')[0]; // YYYY-MM-DD
const timeStr = now.toTimeString().split(' ')[0]; // HH:MM:SS

const logFile = path.join(chatDir, `${dateStr}.md`);

2. Append Log Entry

// Format log entry
const userMsg = /* get user message */;
const assistantMsg = /* get assistant reply */;

let logEntry = `\n[${timeStr}]\n`;
if (userMsg) {
  logEntry += `User: ${userMsg}\n`;
}
if (assistantMsg) {
  logEntry += `Assistant: ${assistantMsg}\n`;
}

// Append to file
fs.appendFileSync(logFile, logEntry);

3. Example Entry

[14:30:00]
User: Hello, how are you?
Assistant: I'm doing well, thank you for asking!

[14:32:15]
User: What's the weather like today?
Assistant: Let me check the weather for you.

Log Location

workspace/chat/YYYY-MM-DD.md

Example:

C:\Users\user\OpenClawWorkspace\chat\2026-03-07.md

Usage Notes

  • This is a manual logging skill - the agent writes to the log file after each response
  • The skill doesn't use hooks - it's triggered by agent code
  • Each entry is appended with a timestamp
  • The file is created automatically on first entry of the day
  • Multiple conversations on the same day go to the same file

Integration

To use this skill:

  1. Copy the chat/ directory structure to your workspace
  2. After each agent response, append the user message and assistant reply to the daily log file
  3. Use the format shown above

Files

  • SKILL.md - This file
  • README.md - ClawHub package readme

License

MIT

🤖 AI 評測

這個工具文件寫得清楚,但實際用起來可能讓人失望。它只提供了日誌該怎麼寫的說明,並沒有真正能自動工作的程式。使用者需要完全依賴 agent 主動配合才能記錄對話,比較被動。而且功能比較單一,就是把對話儲存成文本檔案,沒有其他花哨功能。如果想要一個真正能自動記錄聊天內容的工具,這個還需要開發者補充程式碼才能用。

📊 多維度評分

適應性3.9
規範性3.7
有效性4
可靠性3.5
可信度4.8

📁 包含檔案 (3 個)

📄 README.md 2 KB
📄 SKILL.md 2.5 KB
📄 _meta.json 133 B