mainframe

A guarded workflow for writing, reviewing, and running Bash shell commands, using MAINFRAME tools and its registered functions.

In plain words
What is it for?
Use it when working with Bash scripts, JSON, paths, HTTP requests, retries, Git, or MAINFRAME and AWM functions.
Why use it?
It helps an agent check its shell setup and select approved functions instead of inventing command implementations.

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/gtwatts/mainframe/pi
Any agent
npx skills add gtwatts/mainframe --skill pi
Clone the repo
git clone --depth 1 https://github.com/gtwatts/mainframe

Made for: Claude Code, Codex.

Per session 29 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,346 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00029 $0.01346
Opus 5 $0.00015 $0.00673
Sonnet 5 $0.00006 $0.00269
Haiku 4.5 $0.00003 $0.00135

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

Security

Grade A, and why

mainframe scanned grade A with 0 findings 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 2d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (extensions/mainframe.ts), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/pi/SKILL.md · 105 lines

How it starts

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

Pi + MAINFRAME Integration

MAINFRAME provides a generated registry of Bash functions and libraries for safe, portable agent shell work. Pi can use MAINFRAME through both Pi-native tools and normal bash sourcing.

Preferred Pi workflow

  1. Check readiness first

    • Run /mainframe doctor for the live in-process verdict, or use mainframe_status with validation when tool output is preferable.
    • Confirm the exact Pi compatibility tier, canonical package root, seven tools, three hooks, verified gate, protected Bash, and core doctor status.
    • Treat LIMITED, COMPATIBILITY_UNVERIFIED, SETUP_REQUIRED, and RELOAD_REQUIRED as not ready even if individual runtime checks pass.
  2. Discover before inventing

    • Use mainframe_search with purpose="script" (the default) for topics such as json, validate path, atomic write, awm, git, http, or retry.
    • Use purpose="execute" when selecting a function for mainframe_exec; this excludes functions that require a specialized Pi tool or an external human terminal.
    • Search results resolve through the canonical manifest and report risk, purity, idempotence, examples, and an explicit execution disposition. Relevance stays primary; those fields are decision aids, not proof that a script is safe.
    • Use mainframe_help for exact details of a specific function.
  3. Execute with guardrails

    • Use mainframe_exec only for one explicitly named MAINFRAME function at a time.
    • Use bounded timeouts.
    • Stable-core functions run through the canonical mainframe invoke broker; Pi maps the public function name to its reviewed canonical ID and closed named-input contract. Every function outside stable-core stays on Pi's guarded legacy path and requires Pi to show a human confirmation; model text or an environment variable cannot approve it.
    • Treat executionDisposition="specialized-tool-required" as a route to the purpose-built Pi tool (for example, mainframe_awm), not permission to force the function through mainframe_exec.
    • Do not grant approval for high-risk or side-effecting functions unless the user explicitly approved that action.

Read the full file on GitHub · 105 lines

Files

What ships with it

1 file 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. 2d ago First seen · 105 lines · 29 tokens per session scan A a6f835281922

Subscribe to this mod's changes

mainframe is a skill published in the GitHub repository gtwatts/mainframe (11 stars, last pushed 3d ago), licensed MIT. It adds 29 tokens to every session and 1,346 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. 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

claude-api

Build, debug, and optimize Claude API / Anthropic SDK apps. Apps built with this skill should include prompt caching. Also handles migrating existing Claude API code between Claude model versions (4.5 → 4.6, 4.6 → 4.7, retired-model replacements). TRIGGER when: code imports anthropic/@anthropic-ai/sdk; user asks for…

warpdotdev/warp · 193 tokens

create-skill

Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.

warpdotdev/warp · 64 tokens

gui-integration-test

GUI desktop app only. Writes, runs, and debugs Warp integration tests using the custom Builder/TestStep framework in crates/integration. Use when adding a new integration test, fixing a failing integration test, wiring a test into the manual runner or nextest suite, or verifying end-to-end UI and terminal behavior in…

warpdotdev/warp · 72 tokens

gui-onboarding-verification-skill

GUI desktop app only. Launch two parallel Oz cloud agents with computer use to download and install the latest stable Linux Warp build, capture screenshots while walking through first-time onboarding in both logged-out and logged-in states, then selectively fan out follow-up cloud agents for distinct onboarding…

warpdotdev/warp · 98 tokens

logging-and-error-reporting

How and when to log (log:: levels, safe macros) and report errors to Sentry (reporterror!) in the Warp codebase. Use when adding or reviewing any logging or error reporting — picking a log level, deciding log vs. reporterror!, keeping sensitive data out of logs, or surfacing an error to Sentry.

warpdotdev/warp · 75 tokens

figma-generate-design

Use this skill alongside figma-use when the task involves translating an application page, view, or multi-section layout into Figma. Triggers: 'write to Figma', 'create in Figma from code', 'push page to Figma', 'take this app/page and build it in Figma', 'create a screen', 'build a landing page in Figma', 'update the…

warpdotdev/warp · 160 tokens