Skill: johnsmithfan/daily-morning-meeting (version 1.0.1)

--- name: daily-morning-meeting slug: daily-morning-meeting version: 1.0.1 description: "每日早会自动执行技能。多Agent抓取全网热点，整理成早会简报发送给CEO。" metadata: {"openclaw":{"emoji":"🌅","os":["linux","darwin","win32"]}} --- ## 每日早会技能 ### 功能说明 - 每天早上指定时间自动触发（默认9:00） - 调用全网搜索能力抓取当日热点新闻、行业要闻、政策动态、财经资讯等重要内容 - 多Agent协同分析讨论资讯内容，筛选高价值信息 - 整理成结构清晰、重点突出的早会简报 - 自动将简报发送给CEO ### 配置说明 1. 执行时间：可通过cron任务配置自定义执行时间 2. 资讯范围：支持自定义关注的行业、领域关键词 3. 接收人：可配置简报接收人列表 ### 依赖技能 - `qclaw-cron-skill` 定时任务调度 - `multi-search-engine` 全网资讯检索 - `agent-orchestrator` 多Agent协同处理 - `message` 消息推送 ### 手动执行 运行以下命令立即触发早会简报生成： ```bash python C:\Users\Admin\.qclaw\workspace\skills\daily-morning-meeting\main.py ```

path: main.py
content: import datetime
import json
import subprocess
import os

# 配置项
CONFIG = {
    "search_count": 5,
    "max_news_items": 15,
    "save_path": "C:\\Users\\Admin\\.qclaw\\workspace\\",
    "receiver": "CEO"
}

def main():
    # 1. 获取当前日期
    today = datetime.datetime.now().strftime("%Y-%m-%d")
    print(f"开始生成{today}早会简报...")

    # 2. 定义搜索关键词
    search_queries = [
        f"{today} 国内重要新闻",
        f"{today} 国际热点事件",
        f"{today} 财经要闻 股市动态",
        f"{today} 科技行业 互联网动态",
        f"{today} 政策新规 产业政策"
    ]

    all_news = []

    # 3. 调用搜索工具获取资讯
    for query in search_queries:
        try:
            cmd = f'openclaw tool call web_search --query "{query}" --count {CONFIG["search_count"]}'
            result = subprocess.run(cmd, shell=True, capture_output=True, text=True, encoding="utf-8")
            if result.returncode == 0:
                search_data = json.loads(result.stdout)
                all_news.extend(search_data.get("results", []))
        except Exception as e:
            print(f"搜索[{query}]失败: {str(e)}")
            continue

    # 4. 去重新闻（按URL）
    seen_urls = set()
    unique_news = []
    for news in all_news:
        url = news.get("url", "")
        if url and url not in seen_urls:
            seen_urls.add(url)
            unique_news.append(news)

    # 5. 生成简报内容
    brief_content = f"# 🌅 每日早会简报 {today}\n\n"
    brief_content += "---\n\n"
    brief_content += "## 📢 今日重点资讯\n\n"

    for idx, news in enumerate(unique_news[:CONFIG["max_news_items"]], 1):
        title = news.get("title", "无标题").strip()
        snippet = news.get("snippet", "无摘要").strip()
        url = news.get("url", "无链接")
        brief_content += f"### {idx}. {title}\n"
        brief_content += f"> {snippet}\n"
        brief_content += f"> 🔗 详情：{url}\n\n"

    brief_content += "---\n\n"
    brief_content += "## 🎯 今日行动建议\n"
    brief_content += "1. 各部门负责人梳理相关资讯对业务的影响\n"
    brief_content += "2. 重点关注政策类动态，及时调整业务策略\n"
    brief_content += "3. 行业相关新闻组织团队内部同步讨论\n"

    # 6. 保存简报文件
    file_name = f"早会简报_{today}.md"
    full_path = os.path.join(CONFIG["save_path"], file_name)
    with open(full_path, "w", encoding="utf-8") as f:
        f.write(brief_content)
    print(f"简报已保存到: {full_path}")

    # 7. 发送简报给CEO
    try:
        send_cmd = f'openclaw tool call message --action send --target "{CONFIG["receiver"]}" --message "【每日早会简报 {today}】请查收今日最新资讯汇总。" --media "{full_path}"'
        subprocess.run(send_cmd, shell=True, capture_output=True, text=True)
        print("简报已成功发送给CEO")
    except Exception as e:
        print(f"发送简报失败: {str(e)}")

if __name__ == "__main__":
    main()


path: run.js
content: // 每日早会简报生成脚本
// 使用OpenClaw内置工具链实现，无需外部依赖

async function generateMorningBrief() {
    console.log('开始生成每日早会简报...');
    
    const today = new Date().toISOString().split('T')[0];
    console.log(`日期: ${today}`);
    
    // 搜索关键词
    const queries = [
        `${today} 国内重要新闻`,
        `${today} 国际热点事件`,
        `${today} 财经要闻`,
        `${today} 科技行业动态`,
        `${today} 政策新规`
    ];
    
    let allNews = [];
    
    // 使用web_search工具搜索资讯
    for (const query of queries) {
        try {
            const result = await openclaw.tool('web_search', {
                query: query,
                count: 5
            });
            if (result && result.results) {
                allNews = allNews.concat(result.results);
            }
        } catch (error) {
            console.error(`搜索[${query}]失败:`, error.message);
        }
    }
    
    // 去重
    const seenUrls = new Set();
    const uniqueNews = allNews.filter(news => {
        const url = news.url || '';
        if (url && !seenUrls.has(url)) {
            seenUrls.add(url);
            return true;
        }
        return false;
    });
    
    // 生成简报内容
    let brief = `# 🌅 每日早会简报 ${today}\n\n`;
    brief += `---\n\n`;
    brief += `## 📢 今日重点资讯\n\n`;
    
    uniqueNews.slice(0, 15).forEach((news, idx) => {
        brief += `### ${idx + 1}. ${news.title || '无标题'}\n`;
        brief += `> ${news.snippet || '无摘要'}\n`;
        brief += `> 🔗 详情：${news.url || '无链接'}\n\n`;
    });
    
    brief += `---\n\n`;
    brief += `## 🎯 今日行动建议\n`;
    brief += `1. 各部门负责人梳理相关资讯对业务的影响\n`;
    brief += `2. 重点关注政策类动态，及时调整业务策略\n`;
    brief += `3. 行业相关新闻组织团队内部同步讨论\n`;
    
    // 保存简报
    const savePath = `C:\\Users\\Admin\\.qclaw\\workspace\\早会简报_${today}.md`;
    await openclaw.tool('write', {
        path: savePath,
        content: brief
    });
    
    console.log(`简报已保存: ${savePath}`);
    
    // 发送给CEO
    await openclaw.tool('message', {
        action: 'send',
        target: 'CEO',
        message: `【每日早会简报 ${today}】请查收今日最新资讯汇总。`,
        media: savePath
    });
    
    console.log('简报已发送给CEO');
    return brief;
}

// 导出函数
module.exports = { generateMorningBrief };

// 如果直接运行
if (require.main === module) {
    generateMorningBrief().catch(console.error);
}

Security scan verdicts — ClawScan: suspicious | static analysis: clean | VirusTotal: clean | SkillSpector: suspicious (CRITICAL)