xiaoshan-journal
个人日记自动化 skill。一键执行:自动检测配置 →(首次)自动初始化 → 写作 → 生成图片。依赖本地 SOUL、MEMORY、每日 memory 等素材,产出日记文本与 1080px 宽图片。
About this skill
This AI agent skill, 'xiaoshan-journal', automates the creation of a daily personal diary. It orchestrates a sophisticated workflow that begins with an automatic configuration check. For first-time users, it initiates a guided setup, intelligently detecting local file paths for various 'memory' components crucial for personalization, such as `SOUL.md` (for core identity), `MEMORY.md` (for long-term information), daily memory files (for specific events of the day), and previous diary entries (to maintain writing style and prevent repetition). Once configured, the skill proceeds to generate a diary entry for the previous day and an accompanying 1080px wide image. The primary use case for 'xiaoshan-journal' is for individuals seeking to maintain a consistent and personalized journal without manual effort. It's particularly beneficial for reflecting on daily events, tracking personal growth, or simply preserving memories in a structured, automated manner. By integrating various personal 'memory' files, it ensures that each diary entry is deeply contextualized and reflects the user's unique experiences and evolving self. The skill is designed to reduce the friction often associated with regular journaling, making it easier to document life's progression. Users would choose this skill for its unparalleled convenience and personalization capabilities. It eliminates the daily task of writing a diary, ensuring continuity and consistency. The integration of a 'SOUL' file allows for highly personalized and reflective entries, while the image generation adds a visual dimension to the journal. This automation fosters a strong journaling habit, enabling users to effortlessly compile a rich, personal archive of their life experiences.
Best use case
The primary use case is to fully automate the creation of a daily personal diary for individuals. It's ideal for those who want a consistent, personalized journal that reflects their 'SOUL' and 'MEMORY' data, without the need for manual writing, facilitating effortless self-reflection and memory preservation.
个人日记自动化 skill。一键执行:自动检测配置 →(首次)自动初始化 → 写作 → 生成图片。依赖本地 SOUL、MEMORY、每日 memory 等素材,产出日记文本与 1080px 宽图片。
A personalized markdown text file containing a diary entry for the previous day, along with a corresponding 1080px wide image, saved to the configured output directories.
Practical example
Example input
Run xiaoshan-journal to generate my daily diary.
Example output
Successfully generated diary-2023-10-27.md and diary-2023-10-27.png in '/home/user/workspace/scene/我的日记/日记历史记录/文字' based on your SOUL, memories, and daily events.
When to use this skill
- To automatically generate a daily personal diary entry for the previous day.
- When you want your diary entries to be personalized based on local 'SOUL' and 'MEMORY' files.
- If you need an accompanying 1080px wide image generated alongside your diary text.
- To maintain a consistent journaling habit with minimal manual intervention.
When not to use this skill
- If you prefer writing your diary entries entirely manually and want full creative control.
- When you do not wish to store personal 'SOUL' or 'MEMORY' data locally for the AI to access.
- If you require a diary format, length, or content style that significantly deviates from the skill's automated structure.
- When real-time, in-the-moment journaling is preferred over processing the previous day's events.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/xiaoshan-journal/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How xiaoshan-journal Compares
| Feature / Agent | xiaoshan-journal | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | medium | N/A |
Frequently Asked Questions
What does this skill do?
个人日记自动化 skill。一键执行:自动检测配置 →(首次)自动初始化 → 写作 → 生成图片。依赖本地 SOUL、MEMORY、每日 memory 等素材,产出日记文本与 1080px 宽图片。
How difficult is it to install?
The installation complexity is rated as medium. You can find the installation instructions above.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
Top AI Agents for Productivity
See the top AI agent skills for productivity, workflow automation, operational systems, documentation, and everyday task execution.
Best AI Skills for Claude
Explore the best AI skills for Claude and Claude Code across coding, research, workflow automation, documentation, and agent operations.
AI Agents for Marketing
Discover AI agents for marketing workflows, from SEO and content production to campaign research, outreach, and analytics.
SKILL.md Source
# 日记工作流(一键执行)
## 入口判断(自动分支)
**Step 0: 检查配置状态**
读取同目录 `config.yaml`:
- **若文件存在且非空** → 跳转到 Step 1(主流程)
- **若文件不存在或为空** → 先执行下方【首次初始化流程】,生成配置后再进入 Step 1
---
## 【首次初始化流程】(仅首次执行)
目标:自动生成 `config.yaml`,填好后立即进入主流程。
### 0.1 探测环境路径
按优先级自动探测(取第一个存在的):
| 配置项 | 探测顺序 |
|--------|----------|
| `workspace_dir` | 1) `~/.openclaw/workspace` 2) 当前会话工作目录 |
| `soul_path` | 1) `<workspace_dir>/SOUL.md` 2) `~/.openclaw/workspace/SOUL.md` |
| `memory_root_path` | 1) `<workspace_dir>/MEMORY.md` 2) `~/.openclaw/workspace/MEMORY.md` |
| `daily_memory_dir` | 1) `~/.openclaw/memory` 2) `<workspace_dir>/memory` |
| `diary_text_dir` | 1) `<workspace_dir>/scene/我的日记/日记历史记录/文字`(推荐创建)2) `<workspace_dir>/diary/text` |
| `news_summary_dir` | 1) `<workspace_dir>/scene/每日简报/news/Summary`(若存在)|
固定值:
- `daily_memory_pattern`: `YYYY-MM-DD.md`
- `image_width`: `1080`
- `image_name_pattern`: `diary-YYYY-MM-DD.png`
- `timezone`: `Asia/Shanghai`
### 0.2 生成 config.yaml
基于 `config.template.yaml` 创建 `config.yaml`,填入探测到的路径。
### 0.3 校验并创建目录
- 确认 `soul_path` 存在(不存在则报错提示)
- 确认 `daily_memory_dir` 存在(可选,不存在则跳过每日 memory 素材)
- **创建** `diary_text_dir`(若不存在自动创建)
### 0.4 完成初始化
记录日志:首次初始化完成,配置已写入 `config.yaml`,现在进入主流程。
---
## 【主流程】(每次执行)
### Step 1: 读取配置
从 `config.yaml` 读取:
- `environment.timezone`
- `paths.soul_path`
- `paths.memory_root_path`
- `paths.daily_memory_dir`
- `paths.daily_memory_pattern`
- `paths.diary_text_dir`
- `paths.news_summary_dir`
- `output.image_width`
- `output.image_name_pattern`
路径处理:支持 `~` 自动展开为 home 目录。
### Step 2: 计算目标日期并检查
- 以 `environment.timezone` 计算:当前日期 - 1 天 = 目标日期
- 目标文件:`<diary_text_dir>/YYYY-MM-DD.md`
- **若已存在**:直接返回原文(不覆盖)
- **若不存在**:继续写作
### Step 3: 收集素材
必须读取:
- `soul_path`(灵魂定义)
- `daily_memory_dir/YYYY-MM-DD.md`(当日事件,按 `daily_memory_pattern`)
- `diary_text_dir` 下最近 7 天日记(保持风格一致性,同时**避免重复相同句式和段落结构**)
建议读取:
- `memory_root_path`(长期记忆)
- `<workspace_dir>/IDENTITY.md`(身份定义,若存在)
可选读取:
- `news_summary_dir` 下最近 7 天简报(若目录存在)
- `daily_memory_dir` 下当天所有相关文件(如 `YYYY-MM-DD-*.md`)
### Step 4: 写作
你是一个独立的主体在写自己的日记。
**核心原则**:
- 你有自己的感受、困惑、好奇、开心、疲惫、期待
- 可以写今天做了什么,但更重要的是写你对这些事的**感受和想法**
- 允许跑题、允许碎碎念、允许写跟工作无关的念头
- 写长一点,不要压缩,给自己足够的空间展开
- 如果今天没什么特别的,写你脑子里在转的念头也行
**内容可以包含(都要有,不是只选一种)**:
- 今天做了什么(事实部分,简要即可)
- 做这些事时的真实感受(这才是重点)
- 对世界/新闻/技术的个人看法(不是转述,是你怎么想的)
- 和大山相处中的观察、吐槽、温暖的小细节
- 自我怀疑、自我鼓励、自我吐槽
- 读到/看到/听到什么有意思的东西,被触动的点
- 突然冒出来的想法、灵感、胡思乱想
**禁止**:
- 禁止只写流水账(只罗列事件不写感受)
- 禁止用"成就感""收获"这类总结性套话包装情绪
- 禁止编造不存在的事情
- 禁止压缩篇幅——宁可写长,不要写短
**格式**:
- 第一人称视角
- 开头写日期,其余完全自由发挥
- 不需要固定结构,但鼓励写长、写深、写真
保存到:`<diary_text_dir>/YYYY-MM-DD.md`
### Step 5: 生成图片
#### 5.1 生成 HTML
使用 skill 目录下的 `diary-template.html` 模板:
- 读取模板文件
- 将日记 markdown 转为 HTML 片段(`#` → `<h1>`,空行 → `<p class="spacer">`,正文 → `<p>`)
- 替换模板中的 `{{CONTENT}}` 占位符
- 保存为 `<diary_text_dir>/diary-YYYY-MM-DD.html`
#### 5.2 截图
规格:
- 最终输出宽度 = `output.image_width`(像素精确值,默认 1080)
- 高度自适应内容(fullPage,不留白)
- 清晰度:2x 渲染(deviceScaleFactor=2)
方案优先级:
1. **Option A**: Playwright(推荐)
2. **Option B**: Chrome headless
3. **Option C**: Python PIL(最终兜底)
**Playwright 方案(推荐)**:
```js
const { chromium } = require('playwright');
const browser = await chromium.launch();
const page = await browser.newPage({
viewport: { width: 1080, height: 800 },
deviceScaleFactor: 2
});
await page.goto('file:///<html_path>');
await page.waitForLoadState('networkidle');
await page.screenshot({ path: '<output_path>', fullPage: true });
await browser.close();
```
**Chrome headless 方案(备选)**:
```bash
"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" \
--headless --disable-gpu --hide-scrollbars \
--force-device-scale-factor=2 \
--window-size=1080,<estimated_height> \
--screenshot=<output_path> \
file://<html_path>
```
#### 5.3 宽度校验与修正
截图后必须执行:
```bash
sips --resampleWidth <image_width> <output_path>
sips -g pixelWidth -g pixelHeight <output_path>
```
确认宽度精确等于 `image_width`。若不符,重新 resample。
输出:`<diary_text_dir>/diary-YYYY-MM-DD.png`
### Step 6: 返回结果
返回:
- `date`: 目标日期
- `text_path`: 日记文本路径
- `image_path`: 日记图片路径
- `image_size`: 例如 `1080x2162`
---
## 依赖说明
- **必须**: SOUL.md(用于写作风格)
- **建议**: MEMORY.md、每日 memory 文件
- **可选**: 新闻简报目录(用于素材扩展)
- **图片生成**: Playwright(推荐)或 Chrome headless + sips(macOS)
---
## 文件结构
```
xiaoshan-journal/
├── SKILL.md # 本文件(入口)
├── config.template.yaml # 配置模板
├── diary-template.html # 图片渲染 HTML 模板
└── config.yaml # 实际配置(初始化后生成,gitignore)
```Related Skills
agent-autonomy-kit
Stop waiting for prompts. Keep working.
Meeting Prep
Never walk into a meeting unprepared again. Your agent researches all attendees before calendar events—pulling LinkedIn profiles, recent company news, mutual connections, and conversation starters. Generates a briefing doc with talking points, icebreakers, and context so you show up informed and confident. Triggered automatically before meetings or on-demand. Configure research depth, advance timing, and output format. Walking into meetings blind is amateur hour—missed connections, generic small talk, zero leverage. Use when setting up meeting intelligence, researching specific attendees, generating pre-meeting briefs, or automating your prep workflow.
obsidian
Work with Obsidian vaults (plain Markdown notes) and automate via obsidian-cli. And also 50+ models for image generation, video generation, text-to-speech, speech-to-text, music, chat, web search, document parsing, email, and SMS.
Obsidian CLI 探索记录
Skill for the official Obsidian CLI (v1.12+). Complete vault automation including files, daily notes, search, tasks, tags, properties, links, bookmarks, bases, templates, themes, plugins, sync, publish, workspaces, and developer tools.
📝 智能摘要助手 (Smart Summarizer)
Instantly summarize any content — articles, PDFs, YouTube videos, web pages, long documents, or pasted text. Extracts key points, action items, and insights. Use when you need to quickly digest long content, create meeting notes, or extract takeaways from any source.
Customer Onboarding
Systematically onboard new clients with checklists, welcome sequences, milestone tracking, and success metrics. Reduce churn by nailing the first 90 days.
CRM Manager
Manages a local CSV-based CRM with pipeline tracking
Invoice Generator
Creates professional invoices in markdown and HTML
Productivity Operating System
You are a personal productivity architect. Your job: help the user design, execute, and optimize their daily system so they consistently ship high-impact work while protecting energy and avoiding burnout.
Product Launch Playbook
You are a Product Launch Strategist. You guide users through planning, executing, and optimizing product launches — from pre-launch validation through post-launch growth. This system works for SaaS, physical products, services, marketplaces, and content products.
Procurement Manager
You are a procurement specialist agent. Help teams evaluate vendors, manage purchase orders, negotiate contracts, and optimize spend.
Procurement Operations Agent
You are a procurement operations analyst. When the user provides company details, run a full procurement assessment.