El SKILL.md siguiente se reproduce de
shiker1996/wechat-editroom (commit
c64599c) bajo la licencia
MIT. El texto no se ha modificado; solo se omiten los metadatos de cabecera del archivo, las imágenes se muestran como enlaces y los archivos muy largos se truncan. Copyright 2026 shiker. Licencia:
LICENSE. Solo se muestra el archivo de instrucciones; consulta el repositorio original para ver los scripts.
HTML 元素批量截图
只渲染来自当前任务或可信模板的本地 HTML。HTML 可执行脚本并加载远程资源,不要对未知来源文件使用本技能。
执行
node index.js --htmlFile <input.html> --outputDir <output-dir> --selector <css-selector> --pageWidth 375 --pageHeight 667 --deviceScaleFactor 3
所有路径应显式传入,不依赖目录内的示例文件或默认 output。输出目录应位于当前任务工作目录,避免不同文章互相覆盖。
参数
htmlFile:必填,本地 HTML
outputDir:必填,PNG 输出目录
selector:必填,只截图匹配元素
pageWidth/pageHeight:CSS 视口尺寸
deviceScaleFactor:默认 2–3,控制清晰度与内存
门禁
截图前确认选择器至少匹配一个元素。完成后确认图片数量等于匹配数、每个 PNG 非空、文件名唯一且输出尺寸合理。若字体、图表或远程资源未加载完成,等待明确的完成标志;超时则失败,不输出空白图冒充成功。
该技能只返回本地图片路径;公网化必须由单独上传技能在用户授权后执行。
Ver el texto completo de la licencia (MIT)
MIT License
Copyright (c) 2026 shiker
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.