Skip to content
zhimeng-agent 自动化任务技能 logo

zhimeng-agent 自动化任务技能

> 个人自动化任务集合,通过 macOS launchd 定时调度,自动执行日常任务并同步到多个平台。

muzhicaomingwang/ai-ideas0installs3stars

SKILL.md

Full skill instructions

zhimeng-agent 自动化任务技能

个人自动化任务集合,通过 macOS launchd 定时调度,自动执行日常任务并同步到多个平台。

概览

zhimeng-agent/
├── tasks/
│   ├── config.py              # 统一配置
│   ├── sync_utils.py          # 多平台同步工具
│   ├── daily_report/          # 日报生成(0:00)
│   ├── email_organizer/       # 邮箱整理(2:00)
│   ├── desktop_organizer/     # 桌面整理(4:00)
│   ├── tech_news/             # 科技新闻(7:00)
│   └── launchd/               # macOS 定时任务配置
├── logs/                      # 运行日志
└── SKILL.md                   # 本文档

任务列表

任务调度时间功能输出目标
daily-report每天 00:00生成每日工作报告Git, Notion, Feishu, Obsidian
email-organizer每天 02:00自动归档邮件Obsidian
desktop-organizer每天 04:00整理桌面和下载目录Obsidian
tech-news每天 07:00聚合科技新闻Obsidian, Feishu

1. 日报生成 (daily-report)

功能

  • 从 Git 仓库提取当日提交记录
  • 整合 Claude Code 会话摘要
  • 生成结构化的工作日报

数据源

  • Git commits(指定仓库目录)
  • Claude Code sessions(~/​.claude/​projects/)

输出

# 2026-01-07 工作日报

## 代码提交
- feat(plan): 实现方案生成核心流程

## Claude Code 会话
- 4 个会话,总交互 23 轮

## 统计
- 提交数: 5
- 会话数: 4

手动运行

cd /​Users/​qitmac001395/​workspace/​QAL/​ideas/​apps/​zhimeng-agent
poetry run python -m tasks.daily_report.main --dry-run  # 仅生成不同步
poetry run python -m tasks.daily_report.main            # 生成并同步

2. 邮箱整理 (email-organizer)

功能

  • 使用 himalaya CLI 连接 Gmail
  • 自动归档通知类邮件
  • 按发件人分类统计

归档规则

优先归档以下类型:

  • 社交平台通知(LinkedIn, Twitter, Reddit 等)
  • 技术平台通知(GitHub, Stack Overflow 等)
  • 新闻简报(newsletter, digest 等)
  • 自动邮件(noreply, mailer 等)

前置条件

  1. 安装 himalaya CLI:brew install himalaya
  2. 配置 Gmail App Password
  3. 创建配置文件 ~/​.himalaya-config/​himalaya/​config.toml

手动运行

poetry run python -m tasks.email_organizer.main --dry-run  # 仅分析
poetry run python -m tasks.email_organizer.main            # 执行归档

3. 桌面整理 (desktop-organizer)

功能

  • 扫描桌面和下载目录
  • 按文件类型分类移动
  • 清理超过30天的旧文件

整理规则

文件类型目标目录
图片 (.png, .jpg, .gif)~/​Pictures/​Desktop-Archive/
文档 (.pdf, .doc, .md)~/​Documents/​Desktop-Archive/
压缩包 (.zip, .tar)~/​Downloads/​Archives/
代码 (.py, .js, .java)~/​Documents/​Code-Archive/
其他~/​Documents/​Desktop-Other/

安全特性

  • 不删除任何文件,仅移动
  • 保留最近7天的文件在原位
  • 生成详细的移动日志

手动运行

poetry run python -m tasks.desktop_organizer.main --dry-run  # 仅预览
poetry run python -m tasks.desktop_organizer.main            # 执行整理

4. 科技新闻 (tech-news)

功能

  • 抓取 Hacker News 热门文章
  • 获取 GitHub 24小时热门仓库
  • 生成每日科技早报

数据源

  • Hacker News Top Stories(默认15条)
  • GitHub Trending(默认10个仓库)

输出格式

# 2026-01-07 (周二) 科技早报

## Hacker News 热门
1. [Article Title](url) (320分, 45评论)

## GitHub 热门仓库
- **[owner/​repo](url)** ⭐ 1234 `Python` `AI`
  > Repository description

手动运行

poetry run python -m tasks.tech_news.main --dry-run           # 仅生成
poetry run python -m tasks.tech_news.main --hn-count 20       # 自定义数量
poetry run python -m tasks.tech_news.main                     # 生成并同步

安装与管理

安装定时任务

cd /​Users/​qitmac001395/​workspace/​QAL/​ideas/​apps/​zhimeng-agent/​tasks/​launchd
./​install.sh install

查看任务状态

./​install.sh status

立即执行任务

./​install.sh run daily-report
./​install.sh run tech-news

卸载定时任务

./​install.sh uninstall

查看运行日志

# 标准输出
tail -f logs/​daily-report.log
tail -f logs/​tech-news.log

# 错误日志
tail -f logs/​daily-report.error.log

配置

环境变量

在 .env 文件中配置:

# 飞书配置
FEISHU_APP_ID=your_app_id
FEISHU_APP_SECRET=your_app_secret

# OpenAI(用于摘要生成,可选)
OPENAI_API_KEY=your_api_key

# Notion(可选)
NOTION_TOKEN=your_token

核心配置文件

tasks/​config.py 包含所有可调整参数:

@dataclass
class TaskConfig:
    # 调度时间(小时)
    DAILY_REPORT_HOUR: int = 0
    EMAIL_ORGANIZE_HOUR: int = 2
    DESKTOP_ORGANIZE_HOUR: int = 4
    TECH_NEWS_HOUR: int = 7

    # 路径配置
    IDEAS_ROOT: Path = Path("/​Users/​qitmac001395/​workspace/​QAL/​ideas")
    OBSIDIAN_VAULT: Path = Path("/​Users/​qitmac001395/​Documents/​Obsidian Vault")

    # 飞书接收者
    FEISHU_RECIPIENT_OPEN_ID: str = "ou_18b8063b232cbdec73ea1541dfb74890"

同步平台

Obsidian

  • 直接写入 Markdown 文件到 Obsidian Vault
  • 按任务类型分目录:Journal/, News/, Reports/

飞书

  • 通过飞书 API 发送消息
  • 支持富文本和 Markdown 格式

Notion

  • 通过 Notion API 创建页面
  • 支持父页面指定

Git

  • 自动提交日报到指定仓库
  • Commit message 包含日期和摘要

故障排查

任务未执行

# 检查任务是否加载
launchctl list | grep zhimeng

# 手动触发测试
launchctl start com.zhimeng.tech-news

# 查看系统日志
log show --predicate 'subsystem == "com.apple.launchd"' --last 1h | grep zhimeng

Python 环境问题

# 确认 Poetry virtualenv 路径正确
poetry env info --path

# 测试模块导入
poetry run python -c "from tasks.config import config; print(config)"

权限问题

# 确保脚本可执行
chmod +x tasks/​launchd/​install.sh

# 确保 Python 可执行
ls -la /​Users/​qitmac001395/​Library/​Caches/​pypoetry/​virtualenvs/​zhimeng-agent-ORFMGT-6-py3.12/​bin/​python

开发指南

添加新任务

  1. 创建任务目录:
mkdir -p tasks/​new_task
touch tasks/​new_task/​__init__.py
touch tasks/​new_task/​main.py
  1. 实现主逻辑(参考现有任务结构):
# tasks/​new_task/​main.py
from tasks.config import config
from tasks.sync_utils import create_syncer

class NewTaskRunner:
    def run(self):
        # 执行任务逻辑
        content = self.generate_content()

        # 同步到平台
        syncer = create_syncer()
        syncer.sync_content(
            title="report-title",
            content=content,
            targets=["obsidian", "feishu"],
        )

def main():
    runner = NewTaskRunner()
    runner.run()

if __name__ == "__main__":
    main()
  1. 创建 launchd plist 文件并安装

测试同步

from tasks.sync_utils import create_syncer

syncer = create_syncer()
syncer.sync_content(
    title="test-sync",
    content="# Test\nThis is a test.",
    targets=["obsidian"],
    obsidian_folder="Test",
)

版本历史

  • v1.0.0 (2026-01-07): 初始版本
    • 4个定时任务:日报、邮箱、桌面、新闻
    • 多平台同步支持
    • macOS launchd 调度

More skills from muzhicaomingwang

wechat-minware logo
muzhicaomingwang/ai-ideas

wechat-minware

Build, review, and refactor WeChat Mini Program (微信小程序) frontends. Use for tasks like WXML/WXSS/JS/TS structure, page routing, componentization, state management patterns, API requests, login/openid flows integration points, performance optimization (setData), security/privacy compliance, and rel...

3 0
View
feishu-messaging logo
muzhicaomingwang/ai-ideas

feishu-messaging

飞书消息发送与文档创建工作流。 触发场景:用户提到"发飞书消息"、"飞书文档"、"通知某人"、"发送到飞书"、"飞书通知"。 适用于:发送飞书消息、创建飞书文档、操作多维表格、管理知识库。

3 0
View
notion-docs-enhancer logo
muzhicaomingwang/ai-ideas

notion-docs-enhancer

使用 Playwright 浏览器自动化快速创建和完善 Notion 文档。 触发场景:用户提到"Notion"、"完善文档"、"创建页面"、"填充内容"、"notion文档"。 适用于:创建新页面、修改标题、粘贴 Markdown 内容、格式化文档。

3 0
View
hrbp logo
muzhicaomingwang/ai-ideas

hrbp

HRBP skill for organizational planning, hiring support, performance and talent reviews, employee relations, and people-process playbooks. Use for tasks like role design, competency models, interview rubrics, onboarding plans, performance cycles, and sensitive communication templates.

3 0
View
strategy logo
muzhicaomingwang/ai-ideas

strategy

Product strategy skill for defining positioning, ICP/JTBD, competitive analysis, moat hypotheses, pricing/packaging, GTM planning, and roadmap prioritization. Use for tasks like turning ideas into a strategy memo, writing OKRs, creating TAM/SAM/SOM, and making trade-off decisions.

3 0
View
nextjs logo
muzhicaomingwang/ai-ideas

nextjs

Build, review, and refactor Next.js (App Router) frontend projects with TypeScript. Use for tasks like creating pages/layouts, routing, server components vs client components, data fetching patterns, UI component structure, forms/validation, auth integration points, env vars, linting/testing, and...

3 0
View
teamventure-architecture-migration logo
muzhicaomingwang/ai-ideas

teamventure-architecture-migration

Use when refactoring TeamVenture domains/architecture; enforces migration order (Planning→Authorization→Identity→Infrastructure) and preferred steps (split classes before moving packages).

3 0
View
research-by-reddit logo
muzhicaomingwang/ai-ideas

research-by-reddit

基于 Reddit API 进行深度调研并生成研究报告。支持搜索、获取帖子、评论分析、情感分析等功能

3 0
View
java logo
muzhicaomingwang/ai-ideas

java

Build, review, and refactor Java backend services (Spring Boot). Use for tasks like REST API design, controllers/services/repositories, PostgreSQL persistence (JPA/MyBatis), migrations, configuration, security (Spring Security), observability, testing, performance tuning, and production hardening.

3 0
View
arch-ddd logo
muzhicaomingwang/ai-ideas

arch-ddd

Apply Domain-Driven Design (DDD) architecture to backend projects. Use for tasks like defining bounded contexts, aggregates and invariants, entities/value objects, domain services, repositories, domain events, application services, anti-corruption layers, and aligning code structure and APIs with...

3 0
View
miniapp-design logo
muzhicaomingwang/ai-ideas

miniapp-design

小程序页面设计与代码生成工作流。 触发场景:用户提到"修改页面"、"更新UI"、"添加组件"、"调整布局"、"生成代码"、"小程序设计"。 适用于:TeamVenture 小程序的页面设计迭代、UI 组件开发、样式调整。

3 0
View
mysql logo
muzhicaomingwang/ai-ideas

mysql

MySQL DBA skill for schema design review, indexing, query performance tuning (EXPLAIN), transaction/isolation issues, replication/high availability, backup/restore, and operational checklists. Use for tasks like diagnosing slow queries, designing keys/indexes, partitioning strategy, and safe onli...

3 0
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View