edge-python

A set of instructions for building Edge Python programs, a restricted form of Python that can run in a browser or through the edge command-line tool.

In plain words
What is it for?
Use it when editing Python files in an Edge Python project or when asked to create Edge Python code.
Why use it?
It gives developers a defined way to write, run, test, and package programs for that environment.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/dylan-sutton-chavez/edge-python/skill
Any agent
npx skills add dylan-sutton-chavez/edge-python --skill skill
Clone the repo
git clone --depth 1 https://github.com/dylan-sutton-chavez/edge-python

Made for: Claude Code, Codex.

Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 9,547 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00039 $0.09547
Opus 5 $0.00019 $0.04773
Sonnet 5 $0.00008 $0.01909
Haiku 4.5 $0.00004 $0.00955

Measured yesterday against content hash 2a378f0e3912, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

edge-python scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

`fetch(url[, options_json])` returns a JSON string with `id`, `ok`, `status`, `headers` and `body`. `fetch_text` and `fetch_json` return the body directly and raise on non-2xx responses. All three suspend until the respo
skill/SKILL.md · 893 lines

How it starts

The opening of the file, as written. The whole thing — 893 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Edge Python

This document is self-verifying and its examples follow the cells v1 grammar. A python or yml block followed immediately by a text block is a runnable cell, and the skill crate in this directory executes every cell through the edge CLI and compares it against the text block. The tag on the text block picks the engine, Output runs on both, Native on the native engine only, Web on the web runtime only, and Error expects a failing run whose stderr contains the given text. A python block tagged skip never runs on any engine and never pairs with a text block, and it always says why with one comment at the exact construct that is nondeterministic. A yml block tagged swarm runs a trusted worker pool through edge swarm, while one tagged untrusted runs eval groups. Any python block without a text pair is illustrative only. Verify the whole file from the repository root with cargo run -p skill -- skill/SKILL.md --engine both.

Edge Python is a sandboxed Python subset compiled in a single pass to bytecode and executed by a stack VM. It runs in the browser as WebAssembly and in the edge CLI as an in-process native engine. There is no bundled stdlib, every module is an external package resolved at compile time. Programs are deterministic, there is no file, network or environment access unless a system module grants it.

Use this skill to write correct Edge Python on the first try. The language looks like Python 3 but is a strict subset, and the differences matter more than the similarities. Read the delta section before writing non-trivial code.

The working loop

A project is any folder with .py files and an optional packages.json. The loop is always the same.

  1. Write or edit the .py files.
  2. Run the entry point with edge run main.py.
  3. Add tests in *_test.py files and run edge test.
  4. Pack a release with edge build when the program must run elsewhere.
edge init myapp        # scaffold main.py, packages.json and index.html
cd myapp
edge run main.py       # execute in the native engine
edge test              # discover and run every *_test.py
edge build             # pack a standalone ./app.edge binary

Read the full file on GitHub · 893 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 893 lines · 39 tokens per session scan A 2a378f0e3912

Subscribe to this mod's changes

edge-python is a skill published in the GitHub repository dylan-sutton-chavez/edge-python (264 stars, last pushed 2d ago), licensed Apache-2.0. It adds 39 tokens to every session and 9,547 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

scena-renderer-quality

Use when adding or reviewing scena tests, visual proof, browser/WASM checks, headless screenshots, color/capability validation, resource lifetime tests, dirty-state tests, allocation gates, or benchmark evidence.

johannesPettersson80/scena · 47 tokens

x402

Set up Browser Use Cloud payments with x402 — pay per request from a crypto wallet (USDC on Base mainnet), no signup or API key. Two setups it works out up front — "just use it" (set up a wallet so you or Claude Code can run cloud browser tasks paid from the wallet — Claude writes and runs throwaway scripts, nothing…

browser-use/browser-use · 175 tokens

browser-use

Direct browser control via CDP for web interaction: automation, scraping, testing, screenshots, and site/app work.

browser-use/browser-use · 26 tokens

textual-screenshot

Capture a Textual terminal UI as an SVG using its headless test harness. Use when asked to make, attach, or preview a screenshot of deepagents-code/dcode or another Textual app, visually verify a TUI state, or render a modal, screen, or widget without a desktop or browser.

langchain-ai/deepagents · 67 tokens

playwright

Use when the task requires capturing or automating a real browser from the terminal.

openai/openai-agents-python · 19 tokens

tiny-web-crawler

Crawl from one or more starting web pages, fetch readable content, search within pages, follow relevant links, and stop when the requested information is found or a bounded limit is reached.

leon-ai/leon · 42 tokens