Agent Skillsrcarmo/piclaw › extension-troubleshoot

extension-troubleshoot

GitHub

诊断并修复 Piclaw 扩展错误,包括检查日志、修正导入路径、增强代码健壮性、同步骨架文件及处理权限问题。在用户确认后安全重启服务并验证状态。

skel/.pi/skills/extension-troubleshoot/SKILL.md rcarmo/piclaw

Trigger Scenarios

扩展报错 Web聊天仅显示思考过程

Install

npx skills add rcarmo/piclaw --skill extension-troubleshoot -g -y
More Options

Non-standard path

npx skills add https://github.com/rcarmo/piclaw/tree/main/skel/.pi/skills/extension-troubleshoot -g -y

Use without installing

npx skills use rcarmo/piclaw@extension-troubleshoot

指定 Agent (Claude Code)

npx skills add rcarmo/piclaw --skill extension-troubleshoot -a claude-code -g -y

安装 repo 全部 skill

npx skills add rcarmo/piclaw --all -g -y

预览 repo 内 skill

npx skills add rcarmo/piclaw --list

SKILL.md

Frontmatter
{
    "name": "extension-troubleshoot",
    "description": "Diagnose and fix piclaw extension issues (imports, DB init errors, watcher perms), update skel, and restart safely.",
    "distribution": "public"
}

Extension troubleshoot

Use this when piclaw web chats only show thinking or extensions throw errors.

Steps

  1. Check extension errors:

    tail -n 80 /var/log/piclaw/piclaw.stderr.log
    
  2. Inspect the current extension file:

    readlink -f /workspace/.pi/extensions/context-mode.ts
    sed -n '1,120p' /workspace/.pi/extensions/context-mode.ts
    
  3. Ensure imports reference installed Piclaw, not workspace source.

    • In the container layout, use packaged sources under /usr/local/lib/bun/install/global/node_modules/piclaw/runtime/....
    • Avoid imports from /workspace/piclaw or workspace-local node_modules; those paths can drift after reloads.
  4. Harden the extension.

    • Remove startup cleanup that touches the DB before init.
    • Wrap tool executes in try/catch.
    • Guard saveToolOutput with try/catch.
  5. Update the matching skel extension:

    cp /workspace/.pi/extensions/context-mode.ts /workspace/piclaw/skel/.pi/extensions/context-mode.ts
    
  6. Fix workspace watcher permissions if fs.watch warns on tailscale:

    sudo chown -R agent:agent /workspace/.piclaw/tailscale
    
  7. Restart Piclaw only with explicit user permission.

    For an agent-driven restart, run session_status first. If another session is active, report it and wait. Otherwise send the final response, then call exit_process as the last tool action.

    For a manual shell restart, identify the host's active service manager and use it directly:

    # Supervisor-managed container
    supervisorctl restart piclaw
    
    # systemd user unit, including LXC or host-native installs
    systemctl --user restart piclaw.service
    
  8. Verify:

    tail -n 40 /var/log/piclaw/piclaw.stderr.log
    

Version History

  • 5fa0ce5 Current 2026-07-25 10:25

Same Skill Collection

runtime/skills/builtin/reload/SKILL.md
runtime/skills/builtin/remote-peer/SKILL.md
runtime/skills/builtin/schedule/SKILL.md
runtime/skills/builtin/script-discovery-annotation/SKILL.md
runtime/skills/builtin/send-message/SKILL.md
runtime/skills/integrations/playwright/SKILL.md
runtime/skills/operator/graphite-power-chart/SKILL.md
runtime/skills/operator/token-chart/SKILL.md
skel/.pi/skills/adaptive-cards-authoring/SKILL.md
skel/.pi/skills/bootstrap-container/SKILL.md
skel/.pi/skills/debug/SKILL.md
skel/.pi/skills/export-timeline-pdf/SKILL.md
skel/.pi/skills/extension-design/SKILL.md
skel/.pi/skills/feature-refinement-flow/SKILL.md
skel/.pi/skills/feed-digest/SKILL.md
skel/.pi/skills/graph-design/SKILL.md
skel/.pi/skills/graphite-power-chart/SKILL.md
skel/.pi/skills/kanban-management/SKILL.md
skel/.pi/skills/mcp-adapter/SKILL.md
skel/.pi/skills/playwright/SKILL.md
skel/.pi/skills/reload/SKILL.md
skel/.pi/skills/remote-peer/SKILL.md
skel/.pi/skills/schedule/SKILL.md
skel/.pi/skills/script-discovery-annotation/SKILL.md
skel/.pi/skills/send-message/SKILL.md
skel/.pi/skills/setup/SKILL.md
skel/.pi/skills/situate-daily-notes/SKILL.md
skel/.pi/skills/technical-docs/SKILL.md
skel/.pi/skills/timeline-cleanup/SKILL.md
skel/.pi/skills/token-chart/SKILL.md
skel/.pi/skills/twitter-summary/SKILL.md
skel/.pi/skills/web-search-summary/SKILL.md
skel/.pi/skills/web-search/SKILL.md

Metadata

Files
0
Version
ae927fb
Hash
f95367e5
Indexed
2026-07-25 10:25

Главная - Вики-сайт
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-20 11:45
浙ICP备14020137号-1 $Гость$