inline-bash-in-slash-commands

inline-bash-in-slash-commands is a command for Claude Code from runnithan/claudex-setup. It costs 0 tokens per session (317 once invoked), scanned A, original, MIT.

A technique for putting shell commands inside reusable slash commands so routine project information is collected in advance. Shell commands are text instructions run by the project’s command-line environment.

In plain words
What is it for?
Use it to precompute Git status, change summaries, branch names, or similar project state before the agent acts.
Why use it?
It cuts down on repeated checks and back-and-forth when a command needs information such as Git status or the current branch.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: reads .claude/ paths; mentions Claude Code.

Part of the claudex-setup plugin — 3 skills, 21 commands, 22 agents shipped together

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 commands/runnithan/claudex-setup/inline-bash-in-slash-commands
Clone the repo
git clone --depth 1 https://github.com/runnithan/claudex-setup

Made for: Claude Code.

Or install claudex-setup, the plugin that ships this one along with the rest of its 3 skills, 21 commands, 22 agents.

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 inline-bash-in-slash-commands

README.md
[![agentmods](https://agentmods.dev/badge/commands/runnithan/claudex-setup/inline-bash-in-slash-commands.svg)](https://agentmods.dev/commands/runnithan/claudex-setup/inline-bash-in-slash-commands)
Your own site
<a href="https://agentmods.dev/commands/runnithan/claudex-setup/inline-bash-in-slash-commands"><img src="https://agentmods.dev/badge/commands/runnithan/claudex-setup/inline-bash-in-slash-commands.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 317 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.1 $0.00000 $0.00317
Opus 5 $0.00000 $0.00159
Sonnet 5 $0.00000 $0.00063
Haiku 4.5 $0.00000 $0.00032

Measured 5d ago against content hash 2ca891051d68, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

inline-bash-in-slash-commands 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 5d 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.

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.

lessons/commands/inline-bash-in-slash-commands.md · 26 lines

What it actually says

Pre-compute context with inline bash inside slash commands

TL;DR: Embed bash in a slash command to pre-compute state (e.g. git status) so the model gets the context for free instead of round-tripping for it.

Why it matters

A high-frequency command that makes the model gather routine context itself burns tool calls and turns every time. Pre-computing that context with inline bash makes the command fast and deterministic, Boris Cherny (who created Claude Code) runs a /commit-push-pr command this way dozens of times a day.

How to apply

In a checked-in .claude/commands/*.md command, use inline bash to compute things like git status, diff stats, or the branch name up front, then have the model act on the pre-filled result rather than fetching it.

"Claude and I use a /commit-push-pr slash command dozens of times every day. The command uses inline bash to pre-compute git status and a few other pieces of info to make the command run quickly and avoid back-and-forth with the model.", Boris Cherny

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. 5d ago First seen · 26 lines · 0 tokens per session scan A 2ca891051d68

Subscribe to this mod's changes

inline-bash-in-slash-commands is a command published in the GitHub repository runnithan/claudex-setup (1 stars, last pushed 4d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 317 tokens. 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-31.