wrap-local-script

Wrap a local Python script into a Pixie tool with tool.json and FastAPI main.py.

6|1|Updated May 17, 2026
One-click install
npx skills add https://github.com/AlexKapadia/Pixie --skill wrap-local-script
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: wrap-local-script
Source: https://github.com/AlexKapadia/Pixie/tree/main/.claude/skills/wrap-local-script
Command: npx skills add https://github.com/AlexKapadia/Pixie --skill wrap-local-script

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Wraps a local Python script that sits loose on disk into a fully runnable Pixie tool, generating tool.json and a FastAPI main.py, and validating the setup.

Core Features & Use Cases

  • Wraps a single .py file into a Pixie tool directory with an auto-generated tool.json, main.py wrapper, and dependency scaffolding.
  • Detects the script's entrypoint, validates input/output shapes with the user, and scaffolds the 127.0.0.1 FastAPI service for local execution.
  • Includes safeguards to avoid notebooks, Git URLs, or scripts importing streamlit/gradio, and provides clear guidance on allowed usage.

Quick Start

Follow the prompts to point Pixie at your local .py file and confirm entrypoint, inputs, and outputs.

Frequently Asked Questions about wrap-local-script

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I turn a local Python script into a deployable FastAPI tool?

To wrap a local Python script into a tool, this Skill generates a FastAPI main.py and tool.json, running your script as a standalone service on 127.0.0.1 with validated inputs and outputs.

Can I wrap a Jupyter notebook or a script importing Streamlit as a local tool?

You cannot wrap Jupyter notebooks, Git URLs, or scripts importing heavy UI frameworks like Streamlit or Gradio. The wrapping process restricts usage to loose local .py files to ensure clean entrypoint detection.

What is the process for mapping inputs and outputs when wrapping a Python script?

Mapping script inputs and outputs involves interactively confirming the detected entrypoint and validating data shapes with you before scaffolding the folder structure and local execution wiring.

Does this tool generate the tool.json configuration automatically for local Python scripts?

Yes, generating tool.json is automatic. The wrapping process creates an auto-generated tool.json alongside a FastAPI main.py wrapper and dependency scaffolding to run your local Python script.

Why should I not use this approach to package scripts that import heavy UI frameworks?

You should not use this wrapping approach for scripts importing heavy UI frameworks because the process explicitly excludes them to prevent conflicts during entrypoint detection and FastAPI service scaffolding on 127.0.0.1.