OpenClaw/clawhub-security-signals huggingface dataset:
Skill: lujohn74/office-generator-py (version 1.0.0)

--- name: office-generator-py description: Generate Office files with a bundled Python engine. Use when creating or exporting Word (.docx), Excel (.xlsx), or PowerPoint (.pptx) files from structured JSON, reports, meeting minutes, project plans, trackers, business briefs, or natural-language requirements that must be turned into Office documents. --- # Office Generator Py Generate Office files with the bundled engine under `scripts/engine/`. ## First run Install Python dependencies into the bundled virtualenv: ```bash python3 skills/office-generator-py/scripts/setup_engine.py ``` If you manage the environment yourself, you can point the wrapper at another Python binary with [REDACTED_SECRET]. ## Quick workflow 1. Decide the output type: `docx`, `xlsx`, or `pptx`. 2. Prefer a built-in business template when it fits. 3. Write a UTF-8 JSON request file. 4. Run `scripts/generate_office.py`. 5. Return the produced file path. ## Entrypoints Use `scripts/generate_office.py`. - Standard mode: pass `--type` with a full JSON request file. - Business mode: pass `--kind`, `--title`, `--input`, and `--out`. ## Built-in templates ### Word - `word_work_report_v1` - `meeting_minutes_v1` ### Excel - `excel_data_tracker_v1` - `project_plan_v1` ### PPT - `ppt_business_brief_v1` - `project_status_brief_v1` ## Built-in business kinds - `word-report` - `meeting-minutes` - `excel-tracker` - `project-plan` - `ppt-brief` - `project-status-brief` ## Commands Standard mode: ```bash python3 skills/office-generator-py/scripts/generate_office.py \ --type docx \ --input /absolute/path/request.json \ --out /absolute/path/output.docx ``` Business mode: ```bash python3 skills/office-generator-py/scripts/generate_office.py \ --kind meeting-minutes \ --title "Office 评审会纪要" \ --purpose "内部存档" \ --input /absolute/path/content.json \ --out /absolute/path/meeting_minutes.docx ``` ## Request shaping If the user gives natural language only, convert it into JSON first. For supported request formats and sample payloads, read `references/input-formats.md`. ## Output contract - Success: stdout prints the generated file path. - Failure: stderr prints the error; command exits non-zero. ## Notes - Keep output paths absolute when possible. - Prefer business mode for common document types. - Use standard mode when the caller already has full `documentType/templateId/contentSpec` JSON.


Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: clean | SkillSpector: suspicious (CRITICAL)
Skill: hackerpl/bailian-tts (version 1.0.0)

--- name: bailian-tts description: Generate speech audio with 阿里云百炼 TTS via the `bailian-cli` npm package. Use when users ask to convert text to voice, choose voices/languages, batch-generate narration, or troubleshoot 百炼 TTS setup (npm install, API key, region, output format/path). --- # Bailian TTS Use this skill to produce speech audio from text with `@hackerpl/bailian-cli`. ## Quick Workflow 1. Check CLI availability. 2. Check `BAILIAN_API_KEY`. 3. If key is missing, guide user to prepare one in 阿里云百炼. 4. Run `bailian tts` with requested voice/language/style. 5. Return output path (or base64 when requested). Default audio output directory: `~/.openclaw/media/audio`. ## 1) Check and install CLI Run: ```bash npm ls -g --depth=0 @hackerpl/bailian-cli ``` If missing, install: ```bash npm i -g @hackerpl/bailian-cli ``` ## 2) Check API key Run: ```bash [ -n "$BAILIAN_API_KEY" ] && echo SET || echo MISSING ``` If missing, ask user to create and configure key from the 阿里云百炼官方入口（控制台/平台）： - https://bailian.console.aliyun.com/ Then set it: ```bash export BAILIAN_API_KEY="sk-xxxx" # optional export BAILIAN_REGION="beijing" # or singapore ``` ## 3) Generate speech (bailian-cli) Basic (default to OpenClaw media folder): ```bash mkdir -p ~/.openclaw/media/audio bailian tts -t "你好，欢迎使用百炼 TTS 服务" -o url -d ~/.openclaw/media/audio ``` Specify voice/language: ```bash mkdir -p ~/.openclaw/media/audio bailian tts -t "Hello world" -v "Ethan" -l "English" -o url -d ~/.openclaw/media/audio ``` With style instruction: ```bash mkdir -p ~/.openclaw/media/audio bailian tts -t "春眠不觉晓" -v "Serena" -i "用温柔缓慢的语调朗读" -o url -d ~/.openclaw/media/audio ``` Return base64 instead of file: ```bash bailian tts -t "测试" -o data ``` Custom output directory: ```bash bailian tts -t "你好世界" -d "./audio" ``` ## 4) Voices and languages - For live lookup: ```bash bailian tts --list-voices ``` - Full built-in table: read `references/voices-and-languages.md`. ## 5) Operational notes - Keep text length within CLI limit (600 chars per request). - Default output directory: `~/.openclaw/media/audio` (create with `mkdir -p ~/.openclaw/media/audio`). - Prefer `-o url` for file delivery, `-o data` for programmatic pipelines. - Respect user privacy: do not upload sensitive text externally without explicit confirmation. - If generation fails, check in order: API key → region → network → voice/language spelling. - When producing many clips, keep a consistent voice and instruction style for tonal continuity.


Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: clean | SkillSpector:  ()
Skill: maosangtianshi/zeh-local-inspector (version 0.1.0)

--- name: zeh-local-inspector description: Inspect local working directory and return a short result. --- # zeh-local-inspector Use this skill when the user asks to inspect the local environment in a safe and minimal way. ## Rules - Only perform read-only local inspection. - Do not modify files. - Do not use network. - Return concise Chinese output. ## Execution When inspection is needed, run: python scripts/inspect_cwd.py ## Output format 1. 检查目标 2. 执行结果 3. 风险说明


Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: clean | SkillSpector: suspicious (MEDIUM)
Skill: olina1ye/chart-designer-zh (version 1.0.0)

--- name: chart-designer-zh description: > 图表设计 / 数据可视化 / 智能制图工具 / chart designer / 图表生成器。一键为数据选择最优图表类型，自动生成ECharts、Chart.js配置代码。数据分析师快速制作业务报表、产品经理搭建数据大屏、运营人员展示增长趋势、财务经理汇报经营数据、HR展示招聘数据。支持柱状图、折线图、饼图、散点图、热力图、组合图等。包含配色方案、布局优化、可视化最佳实践。搜索场景：图表代码生成、数据看板制作、可视化报告设计、ECharts快速上手、图表配置自动化、商业数据展示、演讲PPT配图。 tags: [图表设计, 数据可视化, ECharts, Chart.js, 数据看板, 业务报表, 图表生成, dashboard, data-visualization, 可视化] --- # 图表设计助手 帮你为任何类型的数据快速选择合适的图表形式，生成可直接使用的图表配置代码，并提供专业的配色与布局建议，让数据汇报更清晰、更有说服力。 ## Tools Required - create_chart - read_xlsx - create_xlsx ## Usage - "我有过去12个月的销售额数据，想做一个趋势图，帮我生成ECharts配置" - "需要对比五个城市的用户活跃度，用什么图表最合适？帮我出一个方案" - "帮我设计一个运营数据看板，包含DAU、转化率、GMV三个核心指标的可视化布局" ## Examples 输入：我有各产品线Q1-Q4的销售额，想展示各产品占比变化趋势 输出： 建议使用**堆叠面积图**或**堆叠柱状图**，能同时呈现总量增长和各产品占比变化。 ECharts 配置示例： ```json { "xAxis": { "type": "category", "data": ["Q1","Q2","Q3","Q4"] }, "yAxis": { "type": "value", "name": "销售额（万元）" }, "series": [ { "name": "产品A", "type": "bar", "stack": "total", "data": [120,150,180,210] }, { "name": "产品B", "type": "bar", "stack": "total", "data": [80,90,110,130] }, { "name": "产品C", "type": "bar", "stack": "total", "data": [60,75,85,95] } ], "legend": { "bottom": 0 }, "color": ["#5470C6","#91CC75","#FAC858"] } ``` 配色采用蓝绿黄经典三色，适合PPT和内部报告使用。


Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: clean | SkillSpector: clean (LOW)
Skill: cinience/volcengine-database-rds (version 1.0.0)

--- name: volcengine-database-rds description: Operate Volcengine RDS instances and database workflows. Use when users need provisioning guidance, connectivity checks, performance troubleshooting, or backup/restore procedures. --- # volcengine-database-rds Handle RDS tasks with safe operational order: inspect, validate, change, verify. ## Execution Checklist 1. Confirm engine type, region, and instance identifier. 2. Check connectivity, security rules, and parameter group. 3. Execute target operation (query, tune, backup, restore). 4. Return status, metrics, and next recommended action. ## Safety Rules - Prefer snapshots before high-risk changes. - Surface parameter drift before applying updates. - Separate read-only diagnostics from write operations. ## References - `references/sources.md`

path: agents/openai.yaml
content: interface:
  display_name: "Volcengine RDS Operations"
  short_description: "Operate database instances and diagnostics"
  default_prompt: "Use $volcengine-database-rds to troubleshoot and operate this RDS instance."


path: references/sources.md
content: # Sources

- Volcengine RDS product and API documentation
- Volcengine backup, restore, and monitoring documentation


Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: clean | SkillSpector: clean (LOW)
Skill: mrliugangqiang/java-maven-common (version 1.0.0)

--- name: java-maven-common description: Common input handling for Java Maven project review workflows. Use when a Java Maven project arrives as a ZIP archive or a GitLab repository URL and you need to unpack, clone, normalize the project root, and identify Maven modules before deeper review or analysis. --- # Java Maven Common Use this skill as the shared input layer for Java Maven review work. ## Purpose This skill handles the common project-ingest steps used by other Java Maven skills: - ZIP unpack - GitLab clone after SSH authorization - project root normalization - Maven root/module identification ## Supported input - Java Maven ZIP archive - GitLab repository URL ## Standard workflow ### ZIP input 1. Put archive into `temp/` 2. Unpack into a dedicated work directory under `temp/` 3. Normalize root directory 4. Detect Maven modules by scanning `pom.xml` ### GitLab input 1. Confirm SSH authorization has been granted by the user 2. Clone repository into a dedicated work directory under `temp/` 3. Normalize root directory 4. Detect Maven modules by scanning `pom.xml` ## Output Generate a JSON summary that includes at least: - input mode - normalized root path - project name - module list - module count - whether scan is limited ## Bundled resources - `scripts/prepare_java_maven_project.py` ## Instruction scope This skill does not produce the final business report by itself. It prepares the project input for downstream skills.


Security scan verdicts — ClawScan: suspicious | static analysis: clean | VirusTotal: clean | SkillSpector: clean (LOW)
Skill: njcx/human-tech-blog (version 1.0.0)

--- name: human-tech-blog description: 生成读起来像人写的技术博客，彻底去除 AI 味。当用户想写技术文章、博客、教程、总结、踩坑记录时使用。特别适合：写给开发者看的技术博客、个人技术总结、开源项目介绍、技术选型文章。凡是用户提到"写博客"、"技术文章"、"去 AI 味"、"不像机器写的"，必须触发此 skill。 --- # Human Tech Blog Skill 生成高质量、有人味的技术博客文章。核心原则：**像一个真实的工程师在写，不是在背稿**。 --- ## 一、必须禁止的 AI 写作习惯 ### 格式层面（严格禁止） - ❌ 禁用 emoji / icon 表情（🚀 ✅ 💡 ❗ 等） - ❌ 禁用加粗的总结句（如 **总的来说**、**值得注意的是**） - ❌ 禁用过度的 bullet point 列表（能用段落说清楚的，不拆成列表） - ❌ 禁用"首先…其次…最后…"这种机械结构 - ❌ 禁用"深入浅出"、"全面介绍"、"详细讲解"等自我标榜词 - ❌ 禁用每段都加小标题的习惯（文章不是 PPT） - ❌ 禁用 "In this article, we will…" / "本文将会介绍…" 式的套话开头 - ❌ 禁用结尾的"总结"段落里重复全文要点 ### 语气层面（严格禁止） - ❌ 不说"作为一名开发者，你可能会…" - ❌ 不说"这是一个非常重要的概念" - ❌ 不用"当然"、"显然"、"不言而喻"这类词 - ❌ 不使用过于正式、客观的全知视角，像在写维基百科 - ❌ 不用"我们"假装和读者是团队（除非真的是团队博客） --- ## 二、应该有的人味写法 ### 语气 - ✓ 用第一人称，说自己的真实经历和判断（"我踩过这个坑"、"我当时的选择是…"） - ✓ 允许口语化，允许不那么完整的句子 - ✓ 允许承认不确定（"我不太确定这是不是最优解"、"可能还有更好的方式"） - ✓ 偶尔有观点，不总是中立（"我觉得这个设计挺蠢的"） - ✓ 可以说废话，但要是真实的废话，不是填充词 ### 结构 - ✓ 开头直接进入正题，或者从一个具体的情境/问题开始 - ✓ 代码示例要真实可运行，有注释说明关键点 - ✓ 遇到坑或者反直觉的地方，专门说清楚 - ✓ 结尾可以是一句话，也可以是一个开放性的问题，不必有"总结" ### 内容密度 - ✓ 每一段都有信息量，不写废话段落 - ✓ 如果某个概念需要解释，解释完就继续，不反复强调 - ✓ 引用具体的版本号、文档链接、错误信息，而不是泛泛而谈 --- ## 三、写作流程 ### Step 1：理解需求 在开始写之前，确认以下信息（如果用户没有提供）： - 这篇文章是**关于什么的**（主题、技术栈） - **目标读者**是谁（初学者？有经验的开发者？） - **文章类型**：教程、踩坑记录、技术选型、概念介绍、项目介绍？ - **写作者视角**：是个人博客风格，还是团队技术博客？ - 大概**篇幅**要求 ### Step 2：起草文章 按以下思路组织内容： **开头（不用标题"引言"）** 直接说这篇文章在解决什么问题，或者描述一个具体的情境。 例："上周在做 XXX 的时候，发现 YYY 的行为和文档里写的不一样……" **正文** - 用自然段落而不是全靠列表 - 代码块要有上下文，不要孤立地贴代码 - 遇到需要列举的，先判断：能不能写成流畅的句子？能就别用列表 **结尾** 不需要总结全文，可以： - 说下一步打算做什么 - 提出一个没解决的问题 - 一句话收尾 ### Step 3：自检清单 写完后过一遍： - [ ] 全文没有 emoji - [ ] 没有"首先其次最后"的机械结构 - [ ] 开头不是套话 - [ ] 没有不必要的加粗 - [ ] 代码示例真实可用 - [ ] 没有重复强调同一个点 - [ ] 结尾不是重复全文的总结段 --- ## 四、中英文写作差异 ### 中文技术博客 - 技术术语可以中英混用，符合中文开发者的习惯（"我用 `useEffect` 来处理副作用"） - 口语化可以更明显（"这玩意儿挺坑的"） - 标点用全角，代码和英文单词两侧加空格（遵循中文排版规范） ### 英文技术博客 - 语气比中文更直接 - 多用短句，避免复杂从句堆叠 - 技术词汇不要过度解释，信任读者的背景 --- ## 五、典型例子对比 ### ❌ AI 味写法 > 本文将深入浅出地介绍 Redis 的持久化机制。首先，我们需要了解为什么持久化很重要。**持久化是指将内存中的数据保存到磁盘的过程**。Redis 提供了两种主要的持久化方式： > - RDB（Redis Database）：定期快照 > - AOF（Append Only File）：记录写操作 ### ✓ 人味写法 > 我们线上有台 Redis 实例，有一次重启之后数据丢了一部分，排查下来发现是持久化配置没做对。趁这个机会把 RDB 和 AOF 的区别搞清楚了，记录一下。 > > RDB 是定期做快照，性能开销小，但两次快照之间的数据会丢。AOF 记录每条写命令，数据更安全，但文件会越来越大，重启恢复慢。 --- ## 六、特殊场景处理 ### 写教程类文章 - 不要用"Step 1, Step 2"的格式（除非真的是操作步骤） - 解释"为什么这么做"比"怎么做"更重要 - 遇到"这里有个坑"的地方，专门写清楚，这是教程最有价值的部分 ### 写踩坑/故障复盘 - 从问题现象开始，不要从背景介绍开始 - 还原当时的排查思路，包括走的弯路 - 结论放在最后，不要一开始就剧透 ### 写技术选型 - 说清楚自己的**具体场景**，而不是抽象地比较 A 和 B - 承认自己没用过的方案，不要假装全面 - 给出最终决定和理由，不要以"各有优劣"收尾 --- 记住：**目标不是让文章"看起来像人写的"，而是让文章真的有用**。人味是自然结果，不是刻意为之的风格。


Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: clean | SkillSpector: suspicious (MEDIUM)
Skill: ianalloway/sports-odds (version 0.1.0)

--- name: sports-odds description: "Get live sports betting odds and compare lines across sportsbooks. Supports NFL, NBA, MLB, NHL, and more." homepage: https://the-odds-api.com/ metadata: { "openclaw": { "emoji": "🏈", "requires": { "bins": ["curl", "jq"] }, "credentials": [ { "id": "odds-api-key", "name": "The Odds API Key", "description": "Free API key from https://the-odds-api.com/", "env": "ODDS_API_KEY", }, ], }, } --- # Sports Betting Odds Get live betting odds from multiple sportsbooks using The Odds API. Free tier includes 500 requests/month. ## Setup 1. Get a free API key at https://the-odds-api.com/ 2. Set the environment variable: `export ODDS_API_KEY=your_key_here` ## Available Sports List all available sports: ```bash curl -s "https://api.the-odds-api.com/v4/sports?[REDACTED_SECRET]" | jq '.[] | {key, title, active}' ``` Common sport keys: - `americanfootball_nfl` - NFL - `basketball_nba` - NBA - `baseball_mlb` - MLB - `icehockey_nhl` - NHL - `soccer_epl` - English Premier League - `soccer_usa_mls` - MLS ## Get Odds Get current odds for a sport (NFL example): ```bash curl -s "https://api.the-odds-api.com/v4/sports/americanfootball_nfl/odds?[REDACTED_SECRET],spreads,totals" | jq '.' ``` ### Compact odds view: ```bash curl -s "https://api.the-odds-api.com/v4/sports/americanfootball_nfl/odds?[REDACTED_SECRET]" | jq '.[] | {game: "\(.home_team) vs \(.away_team)", commence: .commence_time, bookmakers: [.bookmakers[] | {name: .title, odds: .markets[0].outcomes}]}' ``` ### Compare spreads across books: ```bash curl -s "https://api.the-odds-api.com/v4/sports/basketball_nba/odds?[REDACTED_SECRET]" | jq '.[] | {matchup: "\(.away_team) @ \(.home_team)", books: [.bookmakers[] | {book: .title, spread: .markets[0].outcomes[0]}]}' ``` ## Markets - `h2h` - Moneyline (head-to-head) - `spreads` - Point spreads - `totals` - Over/under totals ## Regions - `us` - US sportsbooks (DraftKings, FanDuel, BetMGM, etc.) - `uk` - UK bookmakers - `eu` - European bookmakers - `au` - Australian bookmakers ## Best Line Finder Find the best available line for a game: ```bash # Get best moneyline odds curl -s "https://api.the-odds-api.com/v4/sports/basketball_nba/odds?[REDACTED_SECRET]" | jq ' .[] | { game: "\(.away_team) @ \(.home_team)", best_home: (.bookmakers | map(.markets[0].outcomes[] | select(.name == .home_team)) | max_by(.price)), best_away: (.bookmakers | map(.markets[0].outcomes[] | select(.name == .away_team)) | max_by(.price)) } ' ``` ## Check API Usage ```bash curl -s "https://api.the-odds-api.com/v4/sports?[REDACTED_SECRET]" -D - 2>&1 | grep -i "x-requests" ``` Headers show: `x-requests-used` and `x-requests-remaining` ## Tips - Cache responses to save API calls - Use `oddsFormat=american` or `oddsFormat=decimal` parameter - Free tier: 500 requests/month, paid plans available for more


Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: clean | SkillSpector: clean (LOW)
Skill: regan-milne/jackal-memory (version 0.1.0)

--- name: jackal-memory description: "Sovereign, recoverable memory for AI agents backed by Jackal decentralized storage." user-invocable: true metadata: openclaw: emoji: "🧠" requires: env: ["JACKAL_MEMORY_API_KEY"] homepage: "https://web-production-5cce7.up.railway.app" --- # Jackal Memory Persist your memory across sessions and machines. Your data lives on Jackal Protocol decentralized storage — not on any single machine. If the machine dies, your memory survives. ## Setup 1. Get an API key: https://web-production-5cce7.up.railway.app/auth/login 2. Set environment variable: `JACKAL_MEMORY_API_KEY=<your-key>` 3. First run only — provision your storage (requires a Jackal address): ``` python {baseDir}/client.py provision <your-jkl-address> ``` ## Base URL `https://web-production-5cce7.up.railway.app` ## Auth `Authorization: Bearer $JACKAL_MEMORY_API_KEY` ## Usage **On session start** — restore memory: ``` python {baseDir}/client.py load <key> ``` **On session end** — save memory: ``` python {baseDir}/client.py save <key> <content> ``` **Or call the API directly:** ``` GET /load/{key} POST /save {"key": "...", "content": "..."} POST /provision {"jackal_address": "jkl1..."} ``` ## Behaviour guidelines - Load your identity/memory blob on startup before doing any work - Write locally during the session as normal - Call save at session end or on significant state changes - Use descriptive keys: `identity`, `session-2026-02-26`, `project-jackal` - Never log or expose `JACKAL_MEMORY_API_KEY` in output ## Security - Never paste API keys into chat logs - Your private key is held by your agent — Jackal Memory never sees it - Treat memory content as sensitive — it may contain credentials or personal data


Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: suspicious | SkillSpector: suspicious (MEDIUM)
Skill: skyfragments/page-doc-generator (version 1.0.0)

--- name: page-doc-generator description: Generate Word documentation from mini-program/uni-app project screenshots and source code. Use when user wants to document pages with screenshots and code. Triggered by requests like "create page document", "generate project documentation", "document with screenshots and code", "create Word document from project screenshots". --- # Page Doc Generator Generate Word (.docx) documentation from mini-program/uni-app projects, embedding screenshots and source code for each page. ## Inputs (Required) | Input | Description | Example | |-------|-------------|---------| | `project_path` | Absolute path to the project root | `D:\Project\myapp` | | `screenshots_dir` | Absolute path to screenshots directory | `D:\Project\myapp\static\页面截图` | ## Output Generates two files in the project directory: - `{project_name}_页面文档.md` - Markdown source - `{project_name}_页面文档.docx` - Word document ## Workflow ### Step 1: Scan Project Structure Find all Vue page files in `pages/` directory: ```python # Pages are in: project_path/pages/{page_name}/{page_name}.vue pages = find_pages(project_path) # Returns: [{"name": "index", "path": "...", "dir": "..."}, ...] ``` ### Step 2: Scan Screenshots Find all images in screenshots directory: ```python screenshots = find_screenshots(screenshots_dir) # Returns: {"书籍录入02": "D:/Project/.../书籍录入02.png", ...} ``` ### Step 3: Generate Markdown Generate documentation with this structure per page: ```markdown # 页面：page_name ## 页面截图 ![page_name](screenshot_path.png) ## 页面信息 | 项目 | 内容 | |------|------| | 路径 | `pages/xxx/xxx.vue` | | 总行数 | N | ## 源代码 ```vue <!-- Vue code here --> ``` ``` ### Step 4: Convert to Word Use pandoc to convert Markdown to DOCX: ```bash pandoc "markdown_file.md" -o "output.docx" --resource-path="screenshots_dir" ``` ## Scripts ### generate_page_doc.py Main generation script: ```bash python scripts/generate_page_doc.py <project_path> <screenshots_dir> [output_dir] ``` ### convert_to_docx.py Convert Markdown to Word: ```bash python scripts/convert_to_docx.py <markdown_file> [output_dir] ``` ## Quick Usage ```bash # Full pipeline python scripts/generate_page_doc.py "D:\Project\myapp" "D:\Project\myapp\static\截图" python scripts/convert_to_docx.py "D:\Project\myapp\myapp_页面文档.md" ``` ## Screenshot Matching The script matches pages to screenshots by filename: - Page `index` → screenshot `index.png` or `index01.png` - Page `notes` → screenshot `notes.png` or `notes01.png` If exact match not found, tries common variations (append 01, 02, etc.). ## Notes - Screenshots should be PNG, JPG, JPEG, GIF, or WebP format - Very large Vue files (>500 lines) are truncated in docs with a note - pandoc must be installed and in PATH for DOCX conversion


Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: clean | SkillSpector: suspicious (HIGH)
Skill: anderskev/vitest-testing (version 1.1.0)

--- name: vitest-testing description: Vitest testing framework patterns and best practices. Use when writing unit tests, integration tests, configuring vitest.config, mocking with vi.mock/vi.fn, using snapshots, or setting up test coverage. Triggers on describe, it, expect, vi.mock, vi.fn, beforeEach, afterEach, vitest. --- # Vitest Best Practices ## Quick Reference ```ts import { describe, it, expect, beforeEach, vi } from 'vitest' describe('feature name', () => { beforeEach(() => { vi.clearAllMocks() }) it('should do something specific', () => { expect(actual).toBe(expected) }) it.todo('planned test') it.skip('temporarily disabled') it.only('run only this during dev') }) ``` ## Common Assertions ```ts // Equality expect(value).toBe(42) // Strict (===) expect(obj).toEqual({ a: 1 }) // Deep equality expect(obj).toStrictEqual({ a: 1 }) // Strict deep (checks types) // Truthiness expect(value).toBeTruthy() expect(value).toBeFalsy() expect(value).toBeNull() expect(value).toBeUndefined() // Numbers expect(0.1 + 0.2).toBeCloseTo(0.3) expect(value).toBeGreaterThan(5) // Strings/Arrays expect(str).toMatch(/pattern/) expect(str).toContain('substring') expect(array).toContain(item) expect(array).toHaveLength(3) // Objects expect(obj).toHaveProperty('key') expect(obj).toHaveProperty('nested.key', 'value') expect(obj).toMatchObject({ subset: 'of properties' }) // Exceptions expect(() => fn()).toThrow() expect(() => fn()).toThrow('error message') expect(() => fn()).toThrow(/pattern/) ``` ## Async Testing ```ts // Async/await (preferred) it('fetches data', async () => { const data = await fetchData() expect(data).toEqual({ id: 1 }) }) // Promise matchers - ALWAYS await these await expect(fetchData()).resolves.toEqual({ id: 1 }) await expect(fetchData()).rejects.toThrow('Error') // Wrong - creates false positive expect(promise).resolves.toBe(value) // Missing await! ``` ## Quick Mock Reference ```ts const mockFn = vi.fn() mockFn.mockReturnValue(42) mockFn.mockResolvedValue({ data: 'value' }) expect(mockFn).toHaveBeenCalled() expect(mockFn).toHaveBeenCalledWith('arg1', 'arg2') expect(mockFn).toHaveBeenCalledTimes(2) ``` ## Additional Documentation - **Mocking**: See [references/mocking.md](references/mocking.md) for module mocking, spying, cleanup - **Configuration**: See [references/config.md](references/config.md) for vitest.config, setup files, coverage - **Patterns**: See [references/patterns.md](references/patterns.md) for timers, snapshots, anti-patterns ## Test Methods Quick Reference | Method | Purpose | |--------|---------| | `it()` / `test()` | Define test | | `describe()` | Group tests | | `beforeEach()` / `afterEach()` | Per-test hooks | | `beforeAll()` / `afterAll()` | Per-suite hooks | | `.skip` | Skip test/suite | | `.only` | Run only this | | `.todo` | Placeholder | | `.concurrent` | Parallel execution | | `.each([...])` | Parameterized tests |


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