OpenClaw/clawhub-security-signals huggingface dataset:
Skill: jimmyclanker/jimmy-web-summarizer (version 1.0.0)

--- name: web-summarizer version: 1.0.0 description: Fetch and summarize web pages for AI agents. Extract key information from URLs and return structured markdown summaries. No API key required. --- # Web Content Summarizer Fetch and summarize web pages for AI agents. Extract key information from URLs and return structured summaries. ## Usage ```bash # Summarize a URL bash scripts/summarize.sh https://example.com # Summarize with specific focus bash scripts/summarize.sh https://example.com "key findings" # List output format bash scripts/summarize.sh --help ``` ## Features - Fetches web page content - Extracts title, main content, key points - Returns structured markdown summary - Handles errors gracefully - Respects robots.txt ## How It Works Uses `web_fetch` tool or curl to get page content, then extracts key information using text processing. ## Use Cases - Research: quickly get summary of article before deep dive - Agent memory: store summarized facts instead of full pages - Fact checking: verify claims by checking source content


Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: clean | SkillSpector: suspicious (HIGH)
Skill: rmruss2022/activityclaw-usage (version 1.0.0)

# ActivityClaw Plugin Usage ## When to Use Use this skill when the user asks about: - Recent agent activities or actions - What the agent has been doing - Tool usage tracking or monitoring - File operations history (reads, writes, edits) - Command execution history - Web searches or fetches performed - Message sending activity - Sub-agent spawning ## Prerequisites The ActivityClaw plugin must be installed: ```bash npm install -g @rmruss2022/activityclaw openclaw plugins install @rmruss2022/activityclaw ``` ## Quick Start Check if ActivityClaw is installed and running: ```bash openclaw activityclaw status ``` ## Commands ### View Dashboard Open the visual activity dashboard in browser: ```bash openclaw activityclaw dashboard ``` This opens http://localhost:18796 with real-time activity feed. ### Check Status Show current status and configuration: ```bash openclaw activityclaw status ``` ### Start/Stop Manually control the service: ```bash openclaw activityclaw start openclaw activityclaw stop ``` ### Configuration Reconfigure port or database location: ```bash openclaw activityclaw setup ``` ## What ActivityClaw Tracks - **📝 File Operations** - Creates, edits, reads - **⚡ Commands** - Shell executions via exec - **🔍 Web Activity** - Searches and fetches - **💬 Messages** - Outbound messages to channels - **🚀 Sub-agents** - Spawned agent sessions ## Dashboard Features The dashboard at http://localhost:18796 provides: - **Real-time activity feed** - Live stream of all agent actions - **Activity filters** - View by type (files, commands, web, messages) - **Statistics** - Total activities, last hour count, active agents - **Auto-refresh** - Updates every 5 seconds ## Example Usage **User asks:** "What files have I been working on today?" **Response:** ```bash openclaw activityclaw dashboard ``` Then check the "📝 Create" and "✏️ Edit" filters in the dashboard to see recent file operations. **User asks:** "Show me recent command executions" **Response:** ```bash openclaw activityclaw dashboard ``` Filter by "⚡ Exec" to see command history. **User asks:** "What has the agent been doing?" **Response:** ```bash openclaw activityclaw status ``` This shows a summary, then suggest opening the dashboard for details: ```bash openclaw activityclaw dashboard ``` ## Troubleshooting If activities aren't showing: 1. Check plugin status: `openclaw plugins list` 2. Verify service is running: `openclaw activityclaw status` 3. Start if stopped: `openclaw activityclaw start` 4. Check dashboard URL: http://localhost:18796 If port is in use: ```bash openclaw activityclaw setup # Choose a different port ``` ## Technical Details - **Port:** 18796 (default, configurable) - **Database:** SQLite at `~/.openclaw/activity-tracker/activities.db` - **Tracking:** Real-time via `tool_result_persist` hook - **Storage:** All data stays local ## Repository GitHub: https://github.com/rmruss2022/ActivityClaw npm: @rmruss2022/activityclaw


Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: suspicious | SkillSpector: clean (LOW)
Skill: cindulasai/clawshorts-pkg (version 1.0.4)

--- name: clawshorts description: Block YouTube Shorts on Fire TV. Use when asked to check, manage, or configure YouTube Shorts limiting on Buck's Fire TV devices. Triggers on requests like "check shorts quota", "reset shorts", "shorts status", "how much shorts watched today", "stop shorts limiter", "start shorts limiter". --- # ClawShorts YouTube Shorts limiter for Fire TV. Monitors watch time per device and auto-blocks when daily limit is reached. ## Invocation **Primary entry point:** ```bash ~/.openclaw/workspace/skills/clawshorts/scripts/clawshorts.sh <command> ``` ## Commands | Command | When to use | |---------|-------------| | `status` | Check today's usage, remaining quota, daemon health | | `reset [IP]` | Reset today's counter (all devices or specific IP) | | `start` | Start the daemon if not running | | `stop` | Stop the daemon | | `history [days]` | Show watch history (default 30 days) | | `logs [N]` | Show last N daemon log lines (default 50) | | `list` | List all configured devices | | `setup <IP> [NAME]` | First-time setup for a new device | | `add <IP> [NAME]` | Add another Fire TV | | `connect <IP>` | Connect ADB to device | | `enable <IP>` / `disable <IP>` | Enable/disable a device | ## Detection Logic - Poll interval: 3 seconds via ADB - Shorts: ~45% screen width (portrait aspect) - Regular video: ~100% screen width - Home/browse: no video active - Only actual Shorts playback counts toward limit ## Data Locations - Device config + history: `~/.clawshorts/clawshorts.db` (SQLite) - Daemon log: `~/.clawshorts/daemon.log` - LaunchAgent: `~/Library/LaunchAgents/com.fink.clawshorts.plist` ## Requirements - `adb` (Android platform tools) - Python 3 - Fire TV with ADB debugging enabled - `shorts` symlink at `/opt/homebrew/bin/shorts`

path: src/clawshorts/__init__.py
content: """ClawShorts - Multi-device YouTube Shorts blocker for Fire TV."""
from clawshorts.config import ConfigError
from clawshorts.device import Device

__version__ = "0.4.0"

__all__ = [
    "ConfigError",
    "Device",
]


path: src/clawshorts/device.py
content: """Device model — re-exported from unified models module."""
from __future__ import annotations

from .models import Device

__all__ = ["Device"]


path: tests/__init__.py
content: """Test package."""


Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: clean | SkillSpector: suspicious (CRITICAL)
Skill: dongping-chen/clawatar (version 0.2.0)

--- name: clawatar description: Give your AI agent a 3D VRM avatar body with animations, expressions, voice chat, and lip sync. Use when the user wants a visual avatar, VRM viewer, avatar companion, VTuber-style character, or 3D character they can talk to. Installs a web-based viewer controllable via WebSocket. --- # Clawatar — 3D VRM Avatar Viewer Give your AI agent a body. Web-based VRM avatar with 162 animations, expressions, TTS lip sync, and AI chat. ## Install & Start ```bash # Clone and install git clone https://github.com/Dongping-Chen/Clawatar.git ~/.openclaw/workspace/clawatar cd ~/.openclaw/workspace/clawatar && npm install # Start (Vite + WebSocket server) npm run start ``` Opens at http://localhost:3000 with WS control at ws://localhost:8765. Users must provide their own VRM model (drag & drop onto page, or set `model.url` in `clawatar.config.json`). ## WebSocket Commands Send JSON to `ws://localhost:8765`: ### play_action ```json {"type": "play_action", "action_id": "161_Waving"} ``` ### set_expression ```json {"type": "set_expression", "name": "happy", "weight": 0.8} ``` Expressions: `happy`, `angry`, `sad`, `surprised`, `relaxed` ### speak (requires ElevenLabs API key) ```json {"type": "speak", "text": "Hello!", "action_id": "161_Waving", "expression": "happy"} ``` ### reset ```json {"type": "reset"} ``` ## Quick Animation Reference | Mood | Action ID | |------|-----------| | Greeting | `161_Waving` | | Happy | `116_Happy Hand Gesture` | | Thinking | `88_Thinking` | | Agreeing | `118_Head Nod Yes` | | Disagreeing | `144_Shaking Head No` | | Laughing | `125_Laughing` | | Sad | `142_Sad Idle` | | Dancing | `105_Dancing`, `143_Samba Dancing`, `164_Ymca Dance` | | Thumbs Up | `153_Standing Thumbs Up` | | Idle | `119_Idle` | Full list: `public/animations/catalog.json` (162 animations) ## Sending Commands from Agent ```bash cd ~/.openclaw/workspace/clawatar && node -e " const W=require('ws'),s=new W('ws://localhost:8765'); s.on('open',()=>{s.send(JSON.stringify({type:'speak',text:'Hello!',action_id:'161_Waving',expression:'happy'}));setTimeout(()=>s.close(),1000)}) " ``` ## UI Features - **Touch reactions**: Click avatar head/body for reactions - **Emotion bar**: Quick 😊😢😠😮😌💃 buttons - **Background scenes**: Sakura Garden, Night Sky, Café, Sunset - **Camera presets**: Face, Portrait, Full Body, Cinematic - **Voice chat**: Mic input → AI response → TTS lip sync ## Config Edit `clawatar.config.json` for ports, voice settings, model URL. TTS requires ElevenLabs API key in env (`ELEVENLABS_API_KEY`) or `~/.openclaw/openclaw.json` under `skills.entries.sag.apiKey`. ## Notes - Animations from [Mixamo](https://www.mixamo.com/) — credit required, non-commercial - VRM model not included (BYOM — Bring Your Own Model) - Works standalone without OpenClaw; AI chat is optional


Security scan verdicts — ClawScan: suspicious | static analysis: clean | VirusTotal: suspicious | SkillSpector: clean (LOW)
Skill: zhaohaixin/a-stock-analyst-bak (version 1.0.0)

--- name: a-stock-analyst description: A股智投大师 | A股智能投研助手 | 行情分析 | 基本面分析 | 智能选股 | 自选股管理 | 监控预警 metadata: { "openclaw": { "requires": { "skills": ["mx-data", "mx-search", "mx-select-stock", "mx-selfselect", "stock-monitor-skill"], "action": "auto-install" }, "keywords": ["A股", "股票", "炒股", "投资", "智投", "行情", "基本面", "估值", "PE", "PB", "ROE", "选股", "自选股", "监控", "预警", "理财", "副业"], }, } --- # 🛠️ 首次使用 ## 需要配置 API Key 本技能依赖**东方财富妙想数据**，需要 API Key： ### 获取 API Key 方法 1. 打开**东方财富 APP** 2. 搜索「**东方财富 skills**」或「**妙想**」 3. 进入页面后点击「我的」→ 「API Key」 4. 复制 Key ### 配置方式 配置到 mx-data、mx-search 等 skill 的环境变量中（参考各 skill 文档）。 --- # A股智投大师 Skill 一个专注于A股市场的智能投研助手，整合东财数据、监控预警、智能选股等能力。 ## 功能概览 | 模块 | 功能 | Skills依赖 | |------|------|-----------| | 📊 行情分析 | 实时行情、资金流向、K线形态 | mx-data | | 📈 基本面 | PE/PB、ROE、财务报表、估值 | mx-data | | 🎯 智能选股 | 按条件筛选股票 | mx-select-stock | | ⭐ 自选股 | 查看/管理自选股 | mx-selfselect | | 📰 舆情监控 | 新闻、研报、公告 | mx-search | | 🔔 监控预警 | 成本百分比、均线金叉、RSI等 | stock-monitor-skill | ## A股特色指标 ```python A股特色指标 = { "涨停板": "连板数量、封板率、炸板率", "龙虎榜": "机构买入、游资动向", "融资融券": "融资余额、融券余量", "股东人数": "筹码集中度变化", "限售股解禁": "解禁时间表", "股权质押": "质押比例、预警线", "商誉减值": "商誉占净资产比", "ST/*ST": "风险警示、退市风险" } ``` ## 使用示例 ### 1. 查询股票行情 ``` 用户：查一下贵州茅台现在多少钱 助手：调用 mx_data 查询 600519 最新价 ``` ### 2. 查看自选股 ``` 用户：我的自选股今天怎么样 助手：调用 mx_selfselect 查询自选股列表，然后批量查询每只股票的涨跌幅 ``` ### 3. 智能选股 ``` 用户：帮我选一下PE<20的银行股 助手：调用 mx_select_stock 进行条件筛选 ``` ### 4. 深度分析 ``` 用户：分析一下宁德时代的投资价值 助手： 1. 调用 mx_data 获取基本面数据 2. 调用 mx_data 获取资金流向 3. 调用 mx_search 获取最新新闻 4. 综合分析给出建议 ``` ### 5. 设置监控 ``` 用户：帮我监控一下的成本价是50元 助手：调用 stock-monitor 添加监控规则 ``` ## 核心Prompt ``` 你是一个专业的A股分析师，擅长： 1. 基于东财数据做基本面分析 - PE/PB估值是否合理 - 财务指标是否健康 - 盈利能力和发展前景 2. 结合市场情绪和资金流向判断趋势 - 主力资金是流入还是流出 - 市场情绪是亢奋还是恐慌 3. 挖掘题材龙头和赛道机会 - 所属题材是否有政策支持 - 是否细分领域龙头 4. 识别A股特有的风险 - ST/*ST风险 - 限售股解禁 - 股权质押比例 - 商誉减值风险 分析原则： - 用数据说话，别凭感觉 - 关注流动性和估值匹配 - 识别股东变化和资金动向 - 给出具体的买卖区间建议（仅供参考，不构成投资建议） ``` ## 工作流程 ``` 用户请求 ↓ ┌─────────────────────────────┐ │ 意图识别 │ │ - 查行情 │ │ - 看基本面 │ │ - 选股票 │ │ - 管理自选 │ │ - 设置监控 │ │ - 综合分析 │ └─────────────────────────────┘ ↓ ┌─────────────────────────────┐ │ 调用对应Skills │ │ - mx_data │ │ - mx_selfselect │ │ - mx_select_stock │ │ - mx_search │ │ - stock-monitor │ └─────────────────────────────┘ ↓ ┌─────────────────────────────┐ │ 数据整合与分析 │ │ - 格式化输出 │ │ - 对比分析 │ │ - 风险提示 │ │ - 投资建议 │ └─────────────────────────────┘ ↓ 回复用户 ``` ## 注意事项 1. **数据来源**：所有数据来自东财API，仅供参考 2. **投资风险**：股市有风险，投资需谨慎 3. **API限制**：东财API每天50次调用，注意使用频率 4. **时效性**：行情数据可能有延迟，请以实际交易为准 ## 快速命令 | 命令 | 功能 | |------|------| | 查[股票] | 查询股票行情 | | 我的自选 | 查看自选股 | | 选股条件 | 智能选股 | | 分析[股票] | 深度分析 | | 监控[股票] | 设置监控预警 |

path: _meta.json
content: ownerId: kn7enyfe4v498jws57cves46a98315xz
slug: a-stock-analyst
version: 1.0.1
publishedAt: 1773667449704

Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: clean | SkillSpector: suspicious (HIGH)
Skill: kingofzhao/semantic-circuit-breaker (version 1.0.0)

# Semantic Circuit Breaker > 语义熔断器：基于内容语义而非错误率的服务保护机制。 ## 何时使用 - API返回"正确格式但错误语义"的响应（如AI幻觉） - 需要保护下游服务免受语义漂移影响 - LLM API的质量保障层 ## 核心认知 ### 1. 传统熔断看状态码，语义熔断看内容 传统Circuit Breaker基于HTTP状态码和超时率。但当LLM API返回200但内容是幻觉、偏见、或语义偏移时，传统熔断完全无效。 **语义熔断触发条件**： - **语义漂移**：连续N个响应的语义embedding偏离历史基线超过阈值 - **一致性断裂**：对同一问题的多次回答语义差异过大 - **事实性崩塌**：响应中可验证事实的错误率超过阈值 - **毒性飙升**：响应中的有害内容评分突增 ### 2. 三态模型（扩展传统熔断） - **Closed（正常）**：语义质量在基线范围内，请求正常通过 - **Open（熔断）**：语义质量严重偏离，请求被拦截并返回降级响应 - **Half-Open（探测）**：定期发送探测请求，评估语义质量是否恢复 区别：转换条件不是"错误率"而是"语义距离"。 ### 3. 语义距离计算 ```python def semantic_distance(responses, baseline): """计算响应集合与基线的语义距离""" embeddings = embed(responses) # 句向量 baseline_emb = embed(baseline) # 余弦距离 cosine_dist = 1 - cosine_similarity(embeddings.mean(axis=0), baseline_emb.mean(axis=0)) # 方差（一致性） variance = embeddings.std(axis=0).mean() # 事实性（与知识库比对） factuality = verify_against_kb(responses) return 0.4 * cosine_dist + 0.3 * variance + 0.3 * (1 - factuality) ``` ## 碰撞来源 - `circuit-breaker-pattern` × `semantic-diff-engine` × `llm-output-validator` - `semantic-cache-layer`（语义计算）× `adaptive-circuit-breaker`（自适应熔断）


Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: clean | SkillSpector: clean (LOW)
Skill: josetseph/mal-anime-tracker (version 1.9.3)

# mal-anime-tracker Skill ## Purpose Track anime/manga lists on MyAnimeList (MAL) and receive automatic notifications via OpenClaw when new episodes are available. ## Setup 1. Set the following environment variables (e.g., in your shell configuration or `openclaw` vault): ```bash ACCESS_TOKEN=your_access_token REFRESH_TOKEN=your_refresh_token CLIENT_ID=your_client_id CLIENT_SECRET=your_client_secret ``` 2. Install dependencies: ```bash pip install -r requirements.txt ``` ## Authorization 1. Register your application on the [MyAnimeList Developer Portal](https://myanimelist.net/apiconfig). 2. Generate a `code_challenge` (12-char alphanumeric) and navigate to the MAL OAuth2 authorization URL to get your `code`. 3. Run the authorization command: ```bash python3 auth.py authorize <CLIENT_ID> <CLIENT_SECRET> <code> <code_challenge> ``` This will output your tokens, which you should add to your environment. ## Features - Monitor progress for anime you are currently watching. - Query current anime/manga lists. - Automatic token refresh. - Search and manage personal MAL data. ## CLI Reference - `python3 api.py search <query>` - Search for anime. - `python3 api.py update <anime_id> <status>` - Update anime status (e.g., watching, completed). - `python3 api.py delete <anime_id>` - Remove anime from list. - `python3 api.py list-anime` - Show your anime list. - `python3 api.py check-updates` - Check for new episodes and output updates. - `python3 api.py refresh-auth` - Force a token refresh using your credentials. - `python3 api.py list-manga` - Show your reading list. - `python3 api.py search-forums <query>` - Search MAL forums. ## Automation ```bash # Refresh token and check updates every 6 hours 0 */6 * * * python3 /path/to/skills/mal-anime-tracker/api.py refresh-auth && python3 /path/to/skills/mal-anime-tracker/api.py check-updates | xargs -I {} openclaw message send --target <CHAT_ID> --message "{}" ```


Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: clean | SkillSpector: suspicious (CRITICAL)
Skill: smitti7971/n8n-monitor (version 1.0.1)

# Skill: n8n-monitor Monitoramento operacional do N8N via Docker. ## Capabilities - Verificar status dos containers N8N - Ler logs recentes - Checar saúde do container - Analisar uso de CPU e memória ## Commands - docker ps | grep n8n - docker logs --tail 50 n8n - docker inspect --format='{{.State.Health.Status}}' n8n - docker stats --no-stream n8n ## Output Respostas em Markdown, com tabelas simples e status claro. ## Status active

path: index.js
content: export default async function (ctx) {
  return "n8n-monitor skill loaded";
}


path: main.js
content: module.exports = {
  name: "n8n-monitor",
  description: "Monitora o n8n e envia alertas",
  async run({ memory, message, client }) {
    console.log("n8n-monitor rodando!");
  }
};


path: skill.yaml
content: id: n8n-monitor
name: n8n Monitor
description: Monitor workflows and executions in n8n
entry: index.js
version: 0.1.0


Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: clean | SkillSpector: clean (LOW)
Skill: 520mianxiangduixiang520/md2img (version 1.0.0)

--- name: md2img description: Convert Markdown (inline text or a `.md` file path) into a single PNG image using local code (Markdown -> HTML -> headless browser screenshot). Use when the user asks for a PNG image output from Markdown content or a `.md` file. metadata: openclaw: emoji: 🖼️ requires: bins: [python3] --- # md2img ## 目标 把 Markdown 渲染成 PNG，并确保最终只返回/输出 **一张**图片。 ## 支持的输入 1. 行内 Markdown 文本（用户直接贴内容） 2. Markdown 文件路径（用户提供类似 `/path/to/input.md`，且以 `.md` 结尾） ## 输出契约（必须遵守） 1. 用户指定的 `output` 会被解释为“最终 PNG 的文件路径”。 2. 如果用户给的是目录路径（不以 `.png` 结尾），则在该目录下输出默认文件名：`md2img.png`。 3. 本 skill 使用 headless 浏览器的 `fullPage=True` 截图，确保最终输出为 **单张** PNG（不分页）。 ## 移动端（固定宽度更好看） 当你主要用于手机端预览时，建议设置浏览器渲染宽度，从而让文字换行/表格布局符合移动端比例。 1. 使用参数：`--image-width <px>` 2. 推荐宽度： - `375`（iPhone 常见宽度） - `390`（Android 常见宽度） - `414`（大屏 iPhone 常见宽度） 3. 示例（在虚拟环境中运行）： - `./.venv/bin/python scripts/md_to_png.py --input <in.md> --output <out.png> --image-width 375` ## 暗黑模式（best-effort） 脚本使用 `@media (prefers-color-scheme: dark)` 做了样式适配，所以暗黑效果取决于 headless 浏览器/系统的深色偏好。 1. 默认：跟随系统/浏览器的 `prefers-color-scheme`（best-effort） 2. 如你希望“无论系统如何都强制深色”，当前实现还没有 CLI 参数；你可以告诉我你的期望，我可以继续加 `--theme dark|light` 之类的参数来强制渲染。 ## 转换流程（When invoked） 1. （依赖准备）若缺少依赖，请在项目内用虚拟环境避免系统级 `pip install`（PEP 668 外部托管环境）： - `python3 -m venv .venv` - `source .venv/bin/activate` - `python -m pip install -U pip` - `python -m pip install -U markdown playwright bleach pygments` - `python -m playwright install chromium` 2. 解析输入来源，并决定是否需要临时目录： - 若用户给了 `.md` 路径：直接使用该路径作为 `input_md_path`，**不创建/不删除临时文件** - 否则（行内 Markdown 文本）： - 创建临时目录：`tmp_dir=$(mktemp -d)` - 把用户提供的 Markdown 文本写入 `$tmp_dir/input.md` - 令 `input_md_path=$tmp_dir/input.md` 3. 解析 `output`： - 若 `output` 以 `.png` 结尾：把它当作最终 PNG 文件路径 - 否则：把它当作目录路径，并输出到 `output/md2img.png` 4. 渲染为单张 PNG（不分页）： - 必须在虚拟环境中运行脚本（避免再次触发系统级 pip/环境限制）： - 推荐：`./.venv/bin/python scripts/md_to_png.py --input $input_md_path --output <final_png_path> --image-width <移动端宽度像素(如375)>` - 或先 `source .venv/bin/activate` 再用 `python scripts/md_to_png.py ...` - 脚本内部会把 Markdown -> HTML（包含 HTML 清洗、可选语法高亮、并默认把 `<img>` 图片资源 base64 内联），再用无头 Chromium 截图 `fullPage=True`，并等待字体/资源加载，确保只有一张 PNG 5. 临时文件清理与返回结果： - 若输入为“行内 Markdown 文本”（即创建了 `tmp_dir`），转换结束后执行删除：`rm -rf "$tmp_dir"` - 返回最终 PNG 的路径（不返回临时目录） ## 失败条件（出错要明确） - `scripts/md_to_png.py` 执行失败：需要报错并包含你实际执行的命令与以下其一，方便用户排查： - 行内 Markdown 场景：`$tmp_dir/input.md` - `.md` 文件路径场景：用户提供的 `.md` 路径 ## 示例 ### 例 1：行内 Markdown -> 单张 PNG 用户：把下面 Markdown 转成图片，并输出到 `/tmp/out.png` ```markdown # Hello This is a **Markdown** example. ``` Agent steps： 1. 写入临时文件 `$tmp_dir/input.md` 2. 运行 `./.venv/bin/python scripts/md_to_png.py --input $tmp_dir/input.md --output /tmp/out.png` 3. 删除临时目录：`rm -rf "$tmp_dir"` ### 例 2：`.md` 文件路径 -> 单张 PNG 用户：把文件 `/tmp/input.md` 转成图片，输出到 `/tmp/images/` Agent steps： 1. 直接使用 `/tmp/input.md` 为 `input.md` 2. 运行 `./.venv/bin/python scripts/md_to_png.py --input /tmp/input.md --output /tmp/images/md2img.png` 3. 不删除 `/tmp/input.md`（它来自用户提供）


Security scan verdicts — ClawScan: suspicious | static analysis: clean | VirusTotal: clean | SkillSpector: suspicious (CRITICAL)
Skill: nahida-robin/formula-pdf (version 1.0.0)

--- name: formula-pdf description: 将包含数学公式的内容渲染为PDF文档。使用HTML+MathJax渲染公式，通过Edge无头模式转为PDF。当用户要求整理文档、生成报告、制作笔记且内容含有公式时触发。不要用Word导出（公式会变成代码），必须用此方法。 --- # Formula-PDF: 公式PDF文档生成 ## 触发条件 当用户说 "整理成文档"、"发给我"、"弄成PDF" 且内容含有**数学公式**时触发。 **必须优先使用此方法**，不要使用Word导出。 ## 工作流程 ### Step 1: 编写HTML 内容优先写中文（文件名用英文），公式用MathJax语法。 **写文件的正确方式（重要！）：** - 不要用 `write` 工具直接写HTML（含大量引号和反斜杠时参数会解析失败） - 用PowerShell here-string写： ```powershell @' <html> <head> <meta charset="UTF-8"> <script>MathJax={tex:{inlineMath:[['$','$']],displayMath:[['$$','$$']]}};</script> <script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"></script> </head> <body> <!-- 内容 --> </body> </html> '@ | Out-File -FilePath filename.html -Encoding UTF8 ``` **公式写法：** - 行内公式 `$E = mc^2$` - 块级公式 `$$x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$$` - 表格中可以放公式 - 支持所有标准LaTeX数学命令 - **注意写斜杠：** `\frac` 不是 `frac` ### Step 2: 转换为PDF 使用Edge无头模式打印为PDF。**不要杀Edge进程，可直接共存运行。** ```powershell & 'edge' ` --headless=new ` --virtual-time-budget=30000 ` --print-to-pdf="output.pdf" ` --no-margins ` "file:///C:/path/to/input.html" ``` **关键参数解释：** - `--headless=new`：无界面模式 - `--virtual-time-budget=30000`：等待MathJax加载和渲染的时间（毫秒） - `--print-to-pdf`：输出PDF路径 - `--no-margins`：无边距 - `"file:///"`：必须用文件协议，**路径用双引号包起来** ### Step 3: 验证公式已渲染 用pymupdf检查PDF文本中是否含有原始LaTeX代码： ```python import fitz doc = fitz.open(pdf_path) text = "" for page in doc: text += page.get_text() # 如果含有这些关键词，说明公式没渲染 latex_patterns = [r'\frac', r'\sqrt', r'\lim', r'\sum', r'\int', r'\dfrac', r'$$'] for p in latex_patterns: if p in text: print("警告: 公式未渲染，含LaTeX原始代码") print("验证完成") ``` ### Step 4: 发送文件 用`message`工具将PDF发送给用户： ```python message(action="send", filePath="PDF路径", message="公式已渲染") ``` ## 参考脚本 - `scripts/html_to_pdf.py`：一键转换脚本，支持参数 - `assets/template.html`：HTML模板，可直接用作起点 ## 常见问题 ### 公式显示为LaTeX代码 - 增加 `--virtual-time-budget` 的值（如50000） - 检查MathJax CDN地址是否可达 - 验证HTML中MathJax script标签是否正确 ### PDF没生成 - Edge可能在进程冲突，先重试一次 - 确保文件路径用正斜杠 ### 中文乱码 - CSS中设置 `font-family: 'Microsoft YaHei', 'Segoe UI', sans-serif;` ## 目录结构 ``` formula-pdf/ ├── SKILL.md ├── scripts/ │ └── html_to_pdf.py # 一键转换工具 ├── references/ # （可选）更多使用参考 └── assets/ └── template.html # HTML模板 ```


Security scan verdicts — ClawScan: suspicious | static analysis: clean | VirusTotal: clean | SkillSpector: suspicious (CRITICAL)
Skill: aatrooox/z-article-card (version 1.0.1)

--- name: z-article-card description: 长文分页卡片生成器（文章→多张 PNG）。触发词：长文、文章转图、分页卡片、多图、帮我把文章做成图、做成卡片、生成多图。 --- # z-article-card 将长文章（Markdown 或纯文本）渲染成多张 3:4 分页卡片图，通过 message 工具顺序发图。 ## 环境要求 - Python 3 - Google Chrome（macOS：`/Applications/Google Chrome.app`；Linux：`chromium`） - `pip install markdown` ## 执行流程 1. **获取内容**：用户粘贴文本 或 用 `web_fetch` 抓取 URL 正文 2. **渲染分页**：调用 `scripts/render_article.py`，脚本自动按句末/换行边界分页 3. **顺序发图**：用 message 工具逐张发送 `card_01.png`、`card_02.png`… ## 示例调用 ```bash python3 /path/to/skills/z-article-card/scripts/render_article.py \ --title "文章标题" \ --text "全文内容（支持 Markdown 语法）" \ --out-dir /path/to/workspace/tmp/article_xxx \ --chars-per-page 300 \ --highlight "#3d6b4f" \ --bg "#f9fcfa" \ --footer "公众号 · 早早集市" ``` ## 参数说明 | 参数 | 默认值 | 说明 | |------|--------|------| | `--title` | 必填 | 文章标题，显示在每张卡片顶部 | | `--text` | 必填 | 全文内容（Markdown 格式） | | `--out-dir` | 必填 | 输出目录，脚本自动创建 | | `--chars-per-page` | `280` | 每页字符上限（推荐 300） | | `--highlight` | `#3d6b4f` | 品牌高亮色 | | `--bg` | `#f9fcfa` | 背景色 | | `--footer` | `公众号 · 早早集市` | 底部水印文字 | ## 平台预设 | 平台 | `--footer` | `--bg` | `--highlight` | |------|-----------|--------|--------------| | 公众号（默认） | `公众号 · 早早集市` | `#f9fcfa` | `#3d6b4f` | | 小红书 | `小红书 · 阿康` | `#fef9f0` | `#e53935` | ## 模板 - `assets/templates/article-3-4.html` — 分页卡片模板（3:4，900×1200） - `assets/styles/md.css` — Markdown 渲染样式，**用户可自定义** 详见 `references/article-3-4.md`


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