Extension Troubleshoot
Testing & Qualityextension-troubleshootExtension Troubleshoot is an Agent Skill for testing & quality published in the rcarmo/piclaw repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Diagnose and fix piclaw extension issues (imports, DB init errors, watcher perms), update skel, and restart safely.
QUICK START
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/rcarmo/piclaw/blob/HEAD/skel/.pi/skills/extension-troubleshoot/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/extension-troubleshoot, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
Extension Troubleshoot (piclaw)
Use this when piclaw web chats only show thinking or extensions throw errors.
Steps
- Check extension errors
tail -n 80 /var/log/piclaw/piclaw.stderr.log
- Inspect current extension file(s)
readlink -f /workspace/.pi/extensions/context-mode.ts
sed -n '1,120p' /workspace/.pi/extensions/context-mode.ts
- Ensure imports reference installed piclaw (not workspace src)
- Use installed path: /home/agent/.bun/install/global/node_modules/piclaw/dist/...
- Avoid /workspace/piclaw or node_modules symlinked to workspace.
- Harden extension
- Remove/avoid startup cleanup that touches DB before init.
- Wrap tool executes with try/catch to prevent crashes.
- Guard saveToolOutput with try/catch.
- Update skel extension too
cp /workspace/.pi/extensions/context-mode.ts /workspace/piclaw/skel/.pi/extensions/context-mode.ts
- Fix workspace watcher permissions (if fs.watch warns on tailscale)
sudo chown -R agent:agent /workspace/.piclaw/tailscale
- Restart piclaw
supervisorctl restart piclaw
- Verify
tail -n 40 /var/log/piclaw/piclaw.stderr.log