A reusable Pi skill package for debugging any Thunderbird MailExtension from the command line via Thunderbird's Remote Agent / WebDriver BiDi endpoint.
- Verify
thunderbird --remote-debugging-port=<port>is reachable. - Install/uninstall XPI files with WebDriver BiDi.
- Inspect Thunderbird privileged chrome contexts.
- Open extension pages in Thunderbird content tabs.
- Locate and click visible Thunderbird extension action buttons.
- Capture protocol notes for future debugging sessions.
Install in Pi without a manual copy or symlink:
pi install https://github.com/xz-dev/thunderbird-remote-debug-skillPi auto-discovers the top-level skills/ directory and loads skills/thunderbird-remote-debug-skill/SKILL.md, so no manual ~/.pi/agent/skills checkout or package.json is needed.
For other agents, copy or symlink skills/thunderbird-remote-debug-skill into the agent's skill directory, or keep that directory as a standalone skill package.
Start Thunderbird with remote debugging:
$env:MOZ_REMOTE_ALLOW_SYSTEM_ACCESS = "1"
& "C:\Program Files\Mozilla Thunderbird\thunderbird.exe" --remote-debugging-port=9229From a checkout, run the helper scripts from the skill directory:
cd skills/thunderbird-remote-debug-skill
powershell.exe -NoProfile -ExecutionPolicy Bypass \
-File scripts/tb-bidi-chrome-tools.ps1 \
-Port 9229 \
-GetChromeTreeInstall an add-on and inspect tabs:
powershell.exe -NoProfile -ExecutionPolicy Bypass \
-File scripts/tb-bidi-chrome-tools.ps1 \
-Port 9229 \
-InstallXpi "C:\path\to\addon.xpi" \
-ExtensionId "your-addon@example.com" \
-OpenExtensionPage "path/to/extension-page.html" \
-ListTabsUse project-specific values when invoking the scripts:
<extension-id>/your-addon@example.com— the add-on ID frommanifest.jsonor thewebExtension.installresult.<extension-page-path>— a path inside the extension package, without themoz-extension://<uuid>/prefix.<button-title>— the toolbar/message action title, label, text, or aria-label shown in Thunderbird chrome.
- This is WebDriver BiDi, not Chrome DevTools Protocol.
/json/listand/json/versionreturning 404 is normal.- Use
MOZ_REMOTE_ALLOW_SYSTEM_ACCESS=1for chrome-context inspection. - Always end sessions; if Thunderbird says
Maximum number of active sessions, restart Thunderbird. - Do not expose the debug port outside a trusted local environment.
.
├── README.md
└── skills
└── thunderbird-remote-debug-skill
├── SKILL.md
├── scripts
│ ├── tb-bidi-debug.ps1
│ └── tb-bidi-chrome-tools.ps1
└── references
├── bidi-notes.md
└── chrome-context-recipes.md