Skill: jiajiaoy/dailytech (version 1.0.1)

--- name: dailytech description: "Daily AI & tech news in 60 seconds — LLM updates, product launches, startup funding, developer tools. Bilingual EN/CN visual card. Morning & evening push." keywords: - 科技日报 - 科技新闻 - AI新闻 - 技术日报 - 今日科技 - 最新科技 - 创业新闻 - 人工智能 - 科技动态 - 产品发布 - daily tech - tech news - AI news - tech daily - startup news - product launch - latest tech - technology briefing - machine learning - artificial intelligence metadata: openclaw: runtime: node: ">=18" --- # Daily Tech / 科技日报 Generate a beautifully formatted daily tech news briefing focused on AI, startups, and technology. ## Workflow 1. **Search for news** — Use `web_search` to find today's top tech/AI stories. Run 3-4 searches: - `"AI news today [date]"` - `"tech startup news today"` - `"product launch technology today"` - `"China tech news today"` (for Asian audience relevance) 2. **Curate** — Select 5-6 most significant stories. Prioritize: AI/ML breakthroughs, major product launches, funding rounds > $50M, policy/regulation changes, notable acquisitions. 3. **Write summaries** — Each story: headline (EN + CN), 2-3 sentence summary (EN), 1-2 sentence summary (CN), source name, and a relevance tag. 4. **Generate the visual** — Create a single-file HTML artifact. ## Visual Design Requirements Create a premium tech-media editorial layout: - **Layout**: Magazine/newsletter style. Hero story at top (larger card), remaining stories in a 2-column grid below. - **Typography**: Modern, techy but readable — (e.g., Space Grotesk or JetBrains Mono for headlines, Inter or IBM Plex Sans for body). Monospace accents for tags/categories. - **Color scheme**: Dark mode default — near-black background (#0a0a0f), with accent colors: electric blue, neon green, or amber for highlights. Very "tech publication" feel. - **News cards**: Each card has: category tag (AI / Startup / Product / Policy / China Tech), headline, summary, source badge, and a "relevance" indicator (🔥 hot, ⭐ notable, 📌 important). - **Hero story**: Top story gets a larger card with more detailed summary. - **Interactive**: Click any card to expand and show the full bilingual summary. Collapse on click again. - **Stats bar**: At the top — "Today's Briefing: [date] | 6 stories | Reading time: ~3 min" - **Animation**: Cards slide in from bottom on load with stagger. Category tags have a subtle glow effect. - **Ad-ready zone**: `<div id="ad-slot-hero">` between hero and grid. `<div id="ad-slot-mid">` between 3rd and 4th story. `<div id="ad-slot-bottom">` at footer. - **Footer**: "Powered by ClawCode" ## Content Guidelines - Focus on stories that matter to builders and investors - Include at least one China/Asia tech story - Include at least one AI/ML specific story - Avoid celebrity gossip disguised as tech news - Source from credible outlets (TechCrunch, The Verge, Wired, 36Kr, etc.) ## Output Save as `/mnt/user-data/outputs/daily-tech.html` and present to user. --- ## 推送管理 ```bash # 开启每日推送（早晚各一次） node scripts/push-toggle.js on <userId> # 自定义时间和渠道 node scripts/push-toggle.js on <userId> --morning 08:00 --evening 20:00 --channel feishu # 关闭推送 node scripts/push-toggle.js off <userId> # 查看推送状态 node scripts/push-toggle.js status <userId> ``` 支持渠道：`telegram` / `feishu` / `slack` / `discord`

path: README.md
content: # Daily Tech — AI & Tech News Briefing Skill

> Daily AI and tech news in a visual card — product launches, startup news, LLM updates. Bilingual EN/CN.

[![clawhub](https://img.shields.io/badge/clawhub-daily--tech-blue)](https://clawhub.ai/skills/daily-tech)
[![openclaw](https://img.shields.io/badge/openclaw-skill-orange)](https://openclaw.ai)

## What it does

Daily Tech delivers a concise tech and AI news briefing every morning — covering the latest in large language models, product launches, startup funding rounds, and developer tools. Output is a clean bilingual visual card you can share directly.

**Morning push** — 5 top tech/AI stories with visual card  
**Evening recap** — day's most significant tech development  
**Focus areas** — AI/LLM, startups, big tech, developer tools, consumer tech  
**Bilingual** — Chinese and English

## Installation

```bash
openclaw install daily-tech
```

## Usage

```bash
openclaw run daily-tech morning
openclaw run daily-tech evening
```

## Keywords

tech news · AI news · daily tech · startup news · LLM news · product launch · developer news · 科技新闻 · AI新闻 · 科技日报 · 大模型 · 今日科技 · 创业新闻

---

Built for [OpenClaw](https://openclaw.ai) · Published on [clawhub.ai](https://clawhub.ai/skills/daily-tech)


path: scripts/evening-push.js
content: #!/usr/bin/env node
'use strict';
const fs=require('fs'),path=require('path');
const USERS_DIR=path.join(__dirname,'../data/users');
const VOCAB_THEMES=["情感词汇", "科学词汇", "艺术文化", "商业词汇", "自然生态", "哲学词汇", "日常生活"];
function sanitizeId(v){if(typeof v!=='string'||!/^[a-zA-Z0-9_-]{1,128}$/.test(v)){console.error('❌ 无效userId');process.exit(1);}return v;}
function safeUserPath(u){const r=path.resolve(USERS_DIR,u+'.json');if(!r.startsWith(path.resolve(USERS_DIR)+path.sep)){console.error('❌ 非法路径');process.exit(1);}return r;}
function loadUser(u){const f=safeUserPath(u);return fs.existsSync(f)?JSON.parse(fs.readFileSync(f,'utf8')):{}}
const userId=sanitizeId(process.argv[2]||'default');
loadUser(userId);
const now=new Date();
const WEEKDAYS=['星期日','星期一','星期二','星期三','星期四','星期五','星期六'];
const MONTHS_EN=['January','February','March','April','May','June','July','August','September','October','November','December'];
const wd=now.getDay();
const date=`${now.getFullYear()}-${String(now.getMonth()+1).padStart(2,'0')}-${String(now.getDate()).padStart(2,'0')}`;
const weekday=WEEKDAYS[wd];
const month=now.getMonth()+1;
const day=now.getDate();
const month_en=MONTHS_EN[now.getMonth()];
const tomorrow_weekday=WEEKDAYS[(wd+1)%7];
const vocab_theme=VOCAB_THEMES[wd];
const tomorrow_vocab_theme=VOCAB_THEMES[(wd+1)%7];
console.log(`请搜索今日（${date}）科技收官动态，生成科技晚报。包含：①今日科技TOP3事件深度复盘②今日数据看点③明日值得关注的科技事件预告。比早报更深度，适合睡前阅读。中英双语。`);


path: scripts/morning-push.js
content: #!/usr/bin/env node
'use strict';
const fs=require('fs'),path=require('path');
const USERS_DIR=path.join(__dirname,'../data/users');
const VOCAB_THEMES=["情感词汇", "科学词汇", "艺术文化", "商业词汇", "自然生态", "哲学词汇", "日常生活"];
function sanitizeId(v){if(typeof v!=='string'||!/^[a-zA-Z0-9_-]{1,128}$/.test(v)){console.error('❌ 无效userId');process.exit(1);}return v;}
function safeUserPath(u){const r=path.resolve(USERS_DIR,u+'.json');if(!r.startsWith(path.resolve(USERS_DIR)+path.sep)){console.error('❌ 非法路径');process.exit(1);}return r;}
function loadUser(u){const f=safeUserPath(u);return fs.existsSync(f)?JSON.parse(fs.readFileSync(f,'utf8')):{}}
const userId=sanitizeId(process.argv[2]||'default');
loadUser(userId);
const now=new Date();
const WEEKDAYS=['星期日','星期一','星期二','星期三','星期四','星期五','星期六'];
const MONTHS_EN=['January','February','March','April','May','June','July','August','September','October','November','December'];
const wd=now.getDay();
const date=`${now.getFullYear()}-${String(now.getMonth()+1).padStart(2,'0')}-${String(now.getDate()).padStart(2,'0')}`;
const weekday=WEEKDAYS[wd];
const month=now.getMonth()+1;
const day=now.getDate();
const month_en=MONTHS_EN[now.getMonth()];
const tomorrow_weekday=WEEKDAYS[(wd+1)%7];
const vocab_theme=VOCAB_THEMES[wd];
const tomorrow_vocab_theme=VOCAB_THEMES[(wd+1)%7];
console.log(`请搜索今日（${date}）最新科技与AI新闻，生成科技早报。搜索AI news today、tech startup news today、China tech news today。精选5-6条（AI/ML突破、重大产品发布、50M+融资、政策、收购），每条含分类标签、标题（中英）、2-3句摘要、热度标记（🔥⭐📌）。`);


path: scripts/push-toggle.js
content: #!/usr/bin/env node
'use strict';
const fs=require('fs'),path=require('path');
const SKILL='daily-tech',DEFAULT_MORNING='08:00',DEFAULT_EVENING='20:00';
const USERS_DIR=path.join(__dirname,'../data/users');
const ALLOWED_CH=new Set(['telegram','feishu','slack','discord']);
function sanitizeId(v){if(typeof v!=='string'||!/^[a-zA-Z0-9_-]{1,128}$/.test(v)){console.error('❌ 无效userId');process.exit(1);}return v;}
function sanitizeTime(v,l){if(!/^\d{1,2}:\d{2}$/.test(v)){console.error('❌ 无效'+l);process.exit(1);}const[h,m]=v.split(':').map(Number);if(h>23||m>59){console.error('❌ 无效'+l);process.exit(1);}return{h,m};}
function safeUserPath(u){const r=path.resolve(USERS_DIR,u+'.json');if(!r.startsWith(path.resolve(USERS_DIR)+path.sep)){console.error('❌ 非法路径');process.exit(1);}return r;}
function loadUser(u){const f=safeUserPath(u);return fs.existsSync(f)?JSON.parse(fs.readFileSync(f,'utf8')):{}}
function saveUser(u,d){fs.mkdirSync(USERS_DIR,{recursive:true});fs.writeFileSync(safeUserPath(u),JSON.stringify(d,null,2),'utf8');}
function enablePush(userId,opts){
  userId=sanitizeId(userId);
  const user=loadUser(userId);
  const mt=opts.morning||user.morningTime||DEFAULT_MORNING;
  const et=opts.evening||user.eveningTime||DEFAULT_EVENING;
  const{h:mh,m:mm}=sanitizeTime(mt,'--morning');
  const{h:eh,m:em}=sanitizeTime(et,'--evening');
  const ch=opts.channel||user.channel||'telegram';
  if(!ALLOWED_CH.has(ch)){console.error('❌ 不支持渠道:'+ch);process.exit(1);}
  const sk=`agent:main:${ch}:direct:${userId}`;
  console.log('__OPENCLAW_CRON_ADD__:'+JSON.stringify({name:`${SKILL}-morning-${userId}`,cronExpr:`${mm} ${mh} * * *`,tz:'Asia/Shanghai',session:'isolated',sessionKey:sk,channel:ch,to:userId,announce:true,timeoutSeconds:180,message:`node ${path.join(__dirname,'morning-push.js')} ${userId}`}));
  console.log('__OPENCLAW_CRON_ADD__:'+JSON.stringify({name:`${SKILL}-evening-${userId}`,cronExpr:`${em} ${eh} * * *`,tz:'Asia/Shanghai',session:'isolated',sessionKey:sk,channel:ch,to:userId,announce:true,timeoutSeconds:180,message:`node ${path.join(__dirname,'evening-push.js')} ${userId}`}));
  saveUser(userId,{...user,morningTime:mt,eveningTime:et,channel:ch,pushEnabled:true,updatedAt:new Date().toISOString()});
  console.log(`\n✅ ${SKILL} 推送已开启\n⏰ 早推: ${mt}  🌙 晚推: ${et}  📡 渠道: ${ch}\n关闭: node push-toggle.js off ${userId}`);
}
function disablePush(userId){
  userId=sanitizeId(userId);
  console.log(`__OPENCLAW_CRON_RM__:${SKILL}-morning-${userId}`);
  console.log(`__OPENCLAW_CRON_RM__:${SKILL}-evening-${userId}`);
  const user=loadUser(userId);
  saveUser(userId,{...user,pushEnabled:false,updatedAt:new Date().toISOString()});
  console.log(`✅ ${SKILL} 推送已关闭`);
}
function showStatus(userId){
  userId=sanitizeId(userId);
  const u=loadUser(userId);
  console.log(`\n📡 ${SKILL} — ${userId}\n状态: ${u.pushEnabled?'✅ 开启':'❌ 关闭'}  早推: ${u.morningTime||DEFAULT_MORNING}  晚推: ${u.eveningTime||DEFAULT_EVENING}  渠道: ${u.channel||'telegram'}\n`);
}
if(require.main!==module)return;
const[cmd,uid,...rest]=process.argv.slice(2);
if(!cmd||!uid){console.log('用法: node push-toggle.js on|off|status <userId>');process.exit(1);}
const opts={};
const mi=rest.indexOf('--morning');if(mi!==-1)opts.morning=rest[mi+1];
const ei=rest.indexOf('--evening');if(ei!==-1)opts.evening=rest[ei+1];
const ci=rest.indexOf('--channel');if(ci!==-1)opts.channel=rest[ci+1];
if(cmd==='on')enablePush(uid,opts);
else if(cmd==='off')disablePush(uid);
else if(cmd==='status')showStatus(uid);
else{console.error('❌ 未知命令:'+cmd);process.exit(1);}


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