preview-sync
自动将文件同步到 GitHub 仓库,以便在 GitHub Pages 上进行预览。当代理生成需要通过网页界面预览的文件(markdown、HTML、图片)时使用。在请求如"同步此文件以预览"、"更新预览"、"上传到预览站点",或代理完成撰写应通过网页访问的文档/报告/文章时触发。
README 文档
1,476 字Preview Sync Skill
Sync local files to GitHub repository for automatic preview deployment on GitHub Pages.
Quick Start
preview-sync /path/to/file.md [agent-name]
Example:
preview-sync /tmp/report.md kira
This will:
- Copy file to project directory
- Commit and push to GitHub
- Trigger GitHub Actions deployment
- File appears at preview site in 1-2 minutes
Configuration
Skill reads configuration from ~/.openclaw/openclaw.json:
{
"skills": {
"entries": {
"preview-sync": {
"enabled": true,
"previewRepo": "username/repo-name",
"agentName": "default-agent-name"
}
}
}
}
Fields:
previewRepo: GitHub repository (format: username/repo)agentName: Default agent name (can be overridden via command line)
Project Structure
Files are organized by agent:
project-root/public/agents/
├── kira/ # Kira's files
├── ha/ # Ha's files
└── hen/ # Hen's files
Adding a new agent:
mkdir project-root/public/agents/new-agent
preview-sync /path/to/file.md new-agent
No code changes needed.
Supported File Types
- Markdown (.md): Rendered with GFM syntax, code highlighting
- HTML (.html): Rendered in iframe sandbox
- Images (.png, .jpg, .gif, .svg, .webp): Direct display
- Code files (.js, .py, .java): Plain text display
Workflow
- Agent generates a file (document, report, article)
- Call
preview-syncwith file path and agent name - Script copies file to project directory
- Git commit and push to GitHub
- GitHub Actions builds and deploys
- File accessible on preview site in 1-2 minutes
Script Location
The main script is at scripts/preview-sync.sh.
For installation, see install.sh.
For script details, see scripts/preview-sync.sh.
同分类其他技能
查看全部 ›ECC 是一个跨 Claude Code、Codex、Cursor、OpenCode、Gemini 等 harness 的 Agent
30.8万 11.6万 mcp-buildermcp-builder 用于从需求说明生成高质量 MCP Server,覆盖 TypeScript/Python SDK 选型、工具 s
19.8万 11.3万 skill-creator指导用户如何创建、组织和打包高效的 Skills
19.8万 10.5万 superpowerssuperpowers是一个为你的编码代理提供的完整软件开发工作流程,它建立在一系列可组合的"技能"和一些初始指令之上,这些指令确保你的
32.3万 6.5万 seo-audit当用户希望对其网站进行 SEO 审核、审查或诊断问题时使用。用户提到"SEO 审核"、"技术 SEO"、"为什么我排名不高"、"SEO
6.1万 1.3万 react-best-practicesReact 最佳实践指南,涵盖组件设计、状态管理、性能优化等核心主题。
3.4万 1.2万