Agent skill

Python Bridge

by tmustier in tmustier/pi-for-excel

Native Python execution via the local Python bridge. An agent skill from tmustier/pi-for-excel.

MITAuto-check passedDocuments & Office

Install Python Bridge

skills CLI
$ npx skills add tmustier/pi-for-excel --skill python-bridge -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install tmustier/pi-for-excel python-bridge --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/tmustier/pi-for-excel.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/python-bridge .claude/skills/python-bridge && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
python-bridge
GitHub stars
434
Token cost
~820 tokens
SKILL.md length
312 words
Files
1
Skills in repo
7
Repo updated
First seen
Licence
MIT

At a glance

Native Python execution via the local Python bridge. An agent skill from tmustier/pi-for-excel.

  • Works in 3 steps: Start the bridge → Configure in Pi (optional) → First execution
  • The user asks about running Python locally
  • SKILL.md covers Pyodide (default) vs Native…, How to set it up, Tools and When the bridge is not running, plus 2 more sections
  • Calls npx and brew; needs PYTHON_BRIDGE_TOKEN

What it does

Python Bridge is an agent skill from tmustier/pi-for-excel. Native Python execution via the local Python bridge. Use when the user asks about running Python locally, setting up the Python bridge, LibreOffice conversion, or troubleshooting Python connectivity.

Its SKILL.md is about 820 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts. Compatibility notes: Python tools always work via in-browser Pyodide. The native bridge is optional and requires a local bridge process running on the user's machine.

It sits in Documents & Office, covering Excel spreadsheets. It works with Python, LibreOffice and Microsoft Excel. The repository describes itself as: Experimental Excel sidebar agent add-in. Multi-model. Powered by Pi. The licence is MIT.

When your agent uses it

  • The user asks about running Python locally
  • Setting up the Python bridge
  • LibreOffice conversion
  • Troubleshooting Python connectivity

Example prompts

  • “/python-bridge”

Requirements

  • Python 3
  • Node.js
  • A credential in PYTHON_BRIDGE_TOKEN
  • Compatibility (from SKILL.md): Python tools always work via in-browser Pyodide. The native bridge is optional and requires a local bridge process running on the user's machine.

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. Start the bridge
  2. Configure in Pi (optional)
  3. First execution

What it can do on your machine

Read from SKILL.md and the folder at commit a3cea8f. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npx
    • brew

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npx, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • PYTHON_BRIDGE_TOKEN

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Python tools always work via in-browser Pyodide. The native bridge is optional and requires a local bridge process running on the user's machine.

    From compatibility in the SKILL.md frontmatter.

Context cost

Python Bridge loads about 820 tokens when it runs. Until then it costs about 53 tokens; SKILL.md has 312 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~53
When it runs · the whole SKILL.md, loaded when a task matches
~820

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from tmustier/pi-for-excel at commit a3cea8f, republished under its MIT licence (© tmustier). 312 words, ~820 tokens.

Download SKILL.mdSave it as .claude/skills/python-bridge/SKILL.md (or your agent's skills folder).
name
python-bridge
description
Native Python execution via the local Python bridge. Use when the user asks about running Python locally, setting up the Python bridge, LibreOffice conversion, or troubleshooting Python connectivity.
compatibility
Python tools always work via in-browser Pyodide. The native bridge is optional and requires a local bridge process running on the user's machine.
metadata.tool-name
python_run
metadata.docs
docs/python-bridge-contract.md

Python Bridge

The Python bridge gives Pi access to native Python on the user's machine. It is an opt-in capability that upgrades the default in-browser Pyodide runtime.

Pyodide (default) vs Native bridge

Pyodide (default)Native bridge
SetupNone — works out of the boxRequires local bridge process
PackagesPure-Python only (numpy, pandas, scipy via micropip)Full ecosystem (C extensions, ML libs, etc.)
FilesystemNo local filesystem accessFull local filesystem
LibreOfficeNot availableAvailable (libreoffice_convert tool)
Long scriptsWebAssembly limitsNo limits

Prefer Pyodide unless the task requires native-only capabilities.

How to set it up

1. Start the bridge
bash
npx pi-for-excel-python-bridge

This defaults to real execution mode on https://localhost:3340.

Options:

  • --install-missing — auto-install Python/LibreOffice via Homebrew (macOS)
  • PYTHON_BRIDGE_MODE=stub — safe simulated mode
  • PYTHON_BRIDGE_TOKEN=your-secret — require auth token
  • PYTHON_BRIDGE_PYTHON_BIN=python3.12 — specify Python binary

Requirements:

  • python3 must be on PATH (or set PYTHON_BRIDGE_PYTHON_BIN)
  • LibreOffice (soffice) is optional — only needed for libreoffice_convert
2. Configure in Pi (optional)

The default URL (https://localhost:3340) works automatically. Override if needed:

/experimental python-bridge-url <url>
/experimental python-bridge-token <token>

Or use: /extensions → Connections → Python bridge

3. First execution

The first time Python runs through the native bridge, Pi will ask for explicit user confirmation (one-time per bridge URL).

Tools

  • python_run — execute a Python snippet, inspect stdout/stderr/result
  • python_transform_range — read Excel range → run Python → write result back (single tool call)
  • libreoffice_convert — convert files between formats (xlsx ↔ csv ↔ pdf) — bridge-only

When the bridge is not running

python_run and python_transform_range fall back to Pyodide automatically. Only libreoffice_convert strictly requires the bridge.

Security

  • Loopback-only (localhost)
  • Origin allowlist
  • Optional bearer token auth
  • Python runs with -I isolation flag
  • Code/input/output size limits
  • Timeout enforcement

Troubleshooting

  • Falls back to Pyodide unexpectedly — the bridge process isn't running. Start it with npx pi-for-excel-python-bridge.
  • Import errors on Pyodide — the package likely has C extensions. Set up the native bridge.
  • LibreOffice convert fails — ensure soffice is on PATH. Install with brew install --cask libreoffice (macOS).
  • CORS/cert errors — visit https://localhost:3340 in your browser and accept the certificate.

© tmustier, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/python-bridge of tmustier/pi-for-excel.

Open the folder on GitHubat commit a3cea8f

Compare with similar skills

Python Bridge next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Python Bridge compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Python Bridge this skilltmustier/pi-for-excel434—~820Automated safety check: PassMIT
Office To Mdshuyu-labs/WebCode278—~1kAutomated safety check: NotesCustom licence
Calcaiskillstore/marketplace4303 repos~1.2kAutomated safety check: PassNone
XLSX Spreadsheet ToolkitXiaomiMiMo/MiMo-Code14k—~2.9kAutomated safety check: PassApache-2.0
Excel Spreadsheet Builderagentscope-ai/QwenPaw35k—~1.8kAutomated safety check: PassProprietary
BiSheng XLSX Workbook Builderdataelement/bisheng12k—~1.7kAutomated safety check: PassApache-2.0

Similar skills

  • Office To Md

    shuyu-labs/WebCode

    Convert Office documents (Word, Excel, PowerPoint, PDF) to Markdown format.

    278 GitHub stars~1k tokensUpdated 3 mo ago
    Documents & OfficeAuto-check: notes
  • Calc

    aiskillstore/marketplace

    Spreadsheet creation, format conversion (ODS/XLSX/CSV), formulas, data automation with LibreOffice Calc.

    430 GitHub starsUsed in 3 repos~1.2k tokens
    Documents & OfficeAuto-check passed
  • XLSX Spreadsheet Toolkit

    XiaomiMiMo/MiMo-Code

    Builds, edits, cleans, recalculates and reads Excel workbooks and CSV files with openpyxl and pandas, plus LibreOffice for recalculation and PDF export.

    14k GitHub stars~2.9k tokensUpdated 4 days ago
    Documents & OfficeAuto-check passed
  • Excel Spreadsheet Builder

    agentscope-ai/QwenPaw

    Creates, edits, cleans and analyzes Excel and CSV files with openpyxl and pandas, recalculating formulas through LibreOffice so files are delivered without formula errors.

    35k GitHub stars~1.8k tokensUpdated 7 days ago
    Documents & OfficeAuto-check passed
  • Builds, edits and cleans Excel workbooks inside BiSheng's code executor using openpyxl, with LibreOffice recalculation and a pre-delivery check.

    12k GitHub stars~1.7k tokensUpdated 7 days ago
    Documents & OfficeAuto-check passed
  • Excel Workbook Editor

    HKUDS/DeepTutor

    Reads, creates and edits Excel workbooks with openpyxl, including formulas, styles, charts and CSV or TSV tables, with advice on formula values openpyxl cannot compute.

    41k GitHub stars~1.9k tokensUpdated 3 days ago
    Documents & OfficeAuto-check passed

More from tmustier/pi-for-excel

  • Excel Background Verification

    tmustier/pi-for-excel

    Run model-driven end-to-end tests in real local Excel while keeping it in the background.

    434 GitHub stars~2.8k tokensUpdated yesterday
    Auto-check passed
  • Wps Windows Smoke

    tmustier/pi-for-excel

    Provision or reuse a local Windows 11 ARM VM as a reusable test harness for validating pi-for-excel inside real China-domestic WPS Spreadsheets.

    434 GitHub stars~4.7k tokensUpdated yesterday
    Auto-check passed
  • Tmux Bridge

    tmustier/pi-for-excel

    Local terminal access via the tmux bridge. An agent skill from tmustier/pi-for-excel.

    434 GitHub stars~819 tokensUpdated yesterday
    Auto-check passed
  • Extending Pi

    tmustier/pi-for-excel

    Plan and build Pi for Excel extensions safely: choose skill vs extension plugin vs connection, create flat SKILL.md skills, and handle API keys without asking users to paste secrets in chat.

    434 GitHub stars~1.6k tokensUpdated yesterday
    Auto-check passed
  • Web Search

    tmustier/pi-for-excel

    Search the public web for up-to-date facts. An agent skill from tmustier/pi-for-excel.

    434 GitHub stars~410 tokensUpdated yesterday
    Auto-check passed
  • MCP Gateway

    tmustier/pi-for-excel

    Discover and call tools from configured MCP servers. An agent skill from tmustier/pi-for-excel.

    434 GitHub stars~241 tokensUpdated yesterday
    Auto-check passed

Questions about Python Bridge

What does Python Bridge do?

Native Python execution via the local Python bridge. An agent skill from tmustier/pi-for-excel. Python Bridge is an agent skill from tmustier/pi-for-excel. Native Python execution via the local Python bridge.

When should I use Python Bridge?

Python Bridge fits situations like: the user asks about running Python locally; setting up the Python bridge; libreOffice conversion; troubleshooting Python connectivity.

How do I install Python Bridge in Claude Code?

Run `npx skills add tmustier/pi-for-excel --skill python-bridge -a claude-code`. Or copy the skill folder (skills/python-bridge in tmustier/pi-for-excel) into .claude/skills/python-bridge in your project. Claude Code loads it when a task matches its description.

How do I install Python Bridge in Codex?

Run `npx skills add tmustier/pi-for-excel --skill python-bridge -a codex`. Or copy the skill folder (skills/python-bridge in tmustier/pi-for-excel) into .agents/skills/python-bridge in your project. Codex loads it when a task matches its description.

Can I use Python Bridge in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add tmustier/pi-for-excel --skill python-bridge -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/python-bridge, .gemini/skills/python-bridge, .github/skills/python-bridge and .opencode/skills/python-bridge in your project.

What does Python Bridge need to run?

Going by SKILL.md and its folder, Python Bridge needs the command-line tools its instructions call (npx and brew) and credentials named PYTHON_BRIDGE_TOKEN. Our summary lists: Python 3; Node.js; A credential in PYTHON_BRIDGE_TOKEN. Compatibility (from SKILL.md): Python tools always work via in-browser Pyodide. The native bridge is optional and requires a local bridge process running on the user's machine..

Does Python Bridge access the network?

SKILL.md contains no URLs. Its commands use npx, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Python Bridge safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Python Bridge use?

Python Bridge is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Python Bridge use?

About 820 tokens (SKILL.md is roughly 3.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Python Bridge?

Skills that share tags, products or a category with Python Bridge: Office To Md (shuyu-labs/WebCode, 278 stars), Calc (aiskillstore/marketplace, 430 stars), XLSX Spreadsheet Toolkit (XiaomiMiMo/MiMo-Code, 14k stars) and Excel Spreadsheet Builder (agentscope-ai/QwenPaw, 35k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Python Bridge?

tmustier (a GitHub user) maintains it in tmustier/pi-for-excel, which has 434 GitHub stars. The repository holds 7 skills in this directory. The repository was last updated on October 6, 2026.

Source: tmustier/pi-for-excel on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.