📦 预演缓存

v1.0.1

Pre-generate and 缓存 all demo 内容 before 直播 presentations — hit every API endpoint in advance, verify playback, 报告 coverage gaps. Use before hack...

0· 301·1 当前·1 累计
by @nissan (Nissan Dookeran)
下载技能包
最后更新
2026/4/18
0
安全扫描
VirusTotal
无害
查看报告
OpenClaw
可疑
medium confidence
The skill's purpose (pre-generating demo content) matches what the code does, but there are a few inconsistencies and missing declarations (undeclared GEMINI key, undeclared dependencies, and placeholder Turso URL) that you should review before running it with real credentials.
安全有层次,运行前请审查代码。

运行时依赖

无特殊依赖

版本

latestv1.0.12026/3/6

- Added TURSO_AUTH_TOKEN to required environment variables. - Updated metadata formatting and structure. - Included a security note about base64 usage for encoding cached binary content. - Changed the metadata emoji from 🏃 to 🏃 (now specified as a Unicode character, not escaped).

无害

安装命令

点击复制
官方npx clawhub@latest install demo-precacher
🇨🇳 镜像加速npx clawhub@latest install demo-precacher --registry https://cn.longxiaskill.com

技能文档

async def precache_demo():
    scenarios = [
        {"name": "Sophie", "language": "fr", "prompt": "A story about cloud whales..."},
        {"name": "Kai", "language": "ja", "prompt": "A story about bamboo forests..."},
    ]
    for s in scenarios:
        # Step 1: Generate content (hits the real API)
        story = await generate_story(s["prompt"], s["name"], s["language"])
        # Step 2: Cache the result
        await cache.set(s, story)
        # Step 3: Generate all derived content (audio, images)
        for scene in story["scenes"]:
            audio = await generate_tts(scene["text"], voice_id)
            await cache.set(f"audio_{scene['id']}", audio)
        # Step 4: Verify playback
        cached = await cache.get(s)
        assert cached is not None, f"Cache miss for {s['name']}"
        # Step 5: Report coverage
        print(f"Cached {len(scenarios)} scenarios, all verified ✅")
## 演示前检查清单 在任何现场演示前,请确认: - [ ] 所有主场景已缓存并验证 - [ ] 音频文件可播放(格式正确,无损坏) - [ ] 缓存未命中时有备用内容 - [ ] 演示账号凭证有效 - [ ] 缓存播放无需网络 - [ ] 缓存 TTL 不会在演示期间过期 ## 文件 - scripts/precache_demo.py — 带验证与覆盖率报告的预缓存示例

数据来源:ClawHub ↗ · 中文优化:龙虾技能库