mainframe

mainframe is a skill for Claude Code, Codex from gtwatts/mainframe. It costs 22 tokens per session (3,080 once invoked), scanned C, a copy of mainframe, MIT.

A guide to MAINFRAME, a local command-line runtime and control system for coding agents. It covers how to discover its read-only shell helpers and check which controlled actions are available.

In plain words
What is it for?
Use it to search for helper commands, inspect their usage, and route approved durable tasks through MAINFRAME when the environment supports them.
Why use it?
It helps agents avoid guessing available commands or assuming that an action is permitted. It also separates harmless inspection from actions that require the control system.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions OpenCode.

Good fit Use it to search for helper commands, inspect their usage, and route approved durable tasks through MAINFRAME when the environment supports them.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/gtwatts/mainframe/opencode
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.

Any agent
npx skills add gtwatts/mainframe --skill opencode
Clone the repo
git clone --depth 1 https://github.com/gtwatts/mainframe

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for mainframe

README.md
[![agentmods](https://agentmods.dev/badge/skills/gtwatts/mainframe/opencode/github.svg)](https://agentmods.dev/skills/gtwatts/mainframe/opencode)
Your own site
<a href="https://agentmods.dev/skills/gtwatts/mainframe/opencode"><img src="https://agentmods.dev/badge/skills/gtwatts/mainframe/opencode/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for mainframe

Your own site · 80×15
<a href="https://agentmods.dev/skills/gtwatts/mainframe/opencode"><img src="https://agentmods.dev/badge/skills/gtwatts/mainframe/opencode.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 22 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,080 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin 94% copy Near-identical to another mod 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.1 $0.00022 $0.03080
Opus 5.5 $0.00009 $0.01232
Sonnet 5.5 $0.00004 $0.00616
Haiku 4.5 $0.00002 $0.00308

Measured 1mo ago against content hash f06ef45ab1c3, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

mainframe scanned grade C 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 1mo ago.

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.

Hidden instructionshighPrompt injection

Directives inside HTML comments, invisible characters or bidirectional overrides are read by the model and not by the person reviewing the file.

<!-- MAINFRAME-HOST-CONTRACT {"schema_version":1,"contract_version":"1.3.0","registry":"config/host-capabilities.json","registry_sha256":"0b4a8b98161b5caddf7a2ebdfd26d1c2b8f0a8967fbbf89818cdf2ed4b1e3fc5","host":"opencode
Origin

This is a copy

94% identical to mainframe — 2 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/opencode/SKILL.md · 87 lines

How it starts

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

Instruction evidence: instructions only. Runtime configuration, enforcement, live use, and release status are platform-bound in config/host-capabilities.json; unsupported routes remain unverified.

Read the full file on GitHub · 87 lines

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. 1mo ago First seen · 87 lines · 22 tokens per session scan C f06ef45ab1c3

Subscribe to this mod's changes

mainframe is a skill published in the GitHub repository gtwatts/mainframe (12 stars, last pushed 5d ago), licensed MIT. It adds 22 tokens to every session and 3,080 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it C with 1 finding (hidden instructions). It is 94% identical to mainframe, differing in 2 lines, and is treated as a copy.

Related

Other skills, from other repositories

shell-scripting

Use this skill when writing bash or zsh scripts, parsing arguments, handling errors, or automating CLI workflows. Triggers on bash scripting, shell scripts, argument parsing, process substitution, here documents, signal trapping, exit codes, and any task requiring portable shell script development.

alibaba/anolisa · 60 tokens

shell-scripting

A guide to writing Bash shell scripts, which automate command-line tasks on Linux and similar systems. It covers variables, arrays, conditions, loops, functions, and safer script structure.

chaterm/terminal-skills · 13 tokens

bash-scripting

Use when writing or hardening a shell script that must survive another machine — a CI step, install script, cron job, git hook, devcontainer entrypoint: strict-mode leaks, quoting/word-splitting, arrays, trap cleanup, bash-vs-POSIX portability, ShellCheck findings. NOT CI workflow structure, runners, caching or matrix…

ericrisco/rsc-harness · 82 tokens

bash-scripting-safe

Write safe, robust Bash scripts — set -euo pipefail, quoting, word splitting, error handling, idempotency, and common data-loss gotchas.

vikasudasi/skill-vault · 38 tokens

shell-bash

Shell scripting and Bash programming patterns.

miles990/claude-software-skills · 10 tokens

completion-script-generator

Generates shell completion scripts for CLI tools. Parses command structure from help output, commander/yargs configs, or manual specification. Produces completions for bash, zsh, and fish that follow each shell's conventions.

curiositech/windags-skills · 50 tokens