pi-anthropic-auth: Skill for Claude Code

.pi/skills/shell-traps/SKILL.md

shell-traps is a skill for Claude Code, Codex from gotgenes/pi-anthropic-auth. It costs 56 tokens per session (785 once invoked), scanned A, original, MIT.

A reference guide for avoiding common mistakes in non-trivial shell commands. It covers pipelines, loops, heredocs, in-place edits, GitHub command bodies, and shell state between calls.

In plain words
What is it for?
Use it before writing complex Bash or zsh commands, checking piped results, or putting formatted text into GitHub issues, pull requests, or commits.
Why use it?
It helps prevent quoting errors, incorrect command flags, lost variables, and other failures that are easy to miss in shell work.

Skill for Claude CodeCodex

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

This is gotgenes/pi-anthropic-auth's own configuration. It tells Claude Code and Codex how to work on pi-anthropic-auth itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything pi-anthropic-auth configures →

Reuse

Borrowing it

Nothing to install: this file belongs to gotgenes/pi-anthropic-auth. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/gotgenes/pi-anthropic-auth/main/.pi/skills/shell-traps/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/gotgenes/pi-anthropic-auth

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 shell-traps

README.md
[![agentmods](https://agentmods.dev/badge/skills/gotgenes/pi-anthropic-auth/shell-traps/github.svg)](https://agentmods.dev/skills/gotgenes/pi-anthropic-auth/shell-traps)
Your own site
<a href="https://agentmods.dev/skills/gotgenes/pi-anthropic-auth/shell-traps"><img src="https://agentmods.dev/badge/skills/gotgenes/pi-anthropic-auth/shell-traps/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 shell-traps

Your own site · 80×15
<a href="https://agentmods.dev/skills/gotgenes/pi-anthropic-auth/shell-traps"><img src="https://agentmods.dev/badge/skills/gotgenes/pi-anthropic-auth/shell-traps.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 785 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00056 $0.00785
Opus 5.5 $0.00022 $0.00314
Sonnet 5.5 $0.00011 $0.00157
Haiku 4.5 $0.00006 $0.00078

Measured 29d ago against content hash 95cf0f815db5, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

shell-traps 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 29d 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.

.pi/skills/shell-traps/SKILL.md · 43 lines

How it starts

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

Shell traps

Load this skill before composing a non-trivial bash call. The zsh facts every session needs (no word-split of an unquoted parameter, =word expansion, $status read-only, an unquoted glob aborting) stay in AGENTS.md; this is the rest.

Command flags and state

rg -r is --replace, not --recursive; rg recurses by default, so drop the -r (Refs #47, #66, #74). Each bash call runs in a fresh shell — a variable set in one call is unset in the next. Chain producer and consumer in one call, or re-derive the value. Pass file tool paths repo-relative (src/x.ts), not hand-built absolute ones — a mistyped absolute path fails confusingly instead of fast, and trips pi-permission-system's external_directory gate when that extension is installed. The zsh echo decodes backslash escapes (\u2014 prints an em-dash; bash and dash print it literally), so it misreports a file's literal escape text; print bytes with print -r --, printf '%s\n', or sed -n.

Bodies with backticks

A gh issue comment / gh pr comment body containing backticks or fences belongs in a file passed with --body-file, whatever the quoting. Single quotes ship a \` literally, and double quotes need every ` escaped, where one miscount publishes mismatched code spans. A git commit body with quotes or backticks belongs in a file passed with -F <file>, written with Write — never -F - from a heredoc. A -m string corrupts one silently; the damage shows only in git log -1 --format=%B.

Pipelines

Do not pipe a long-output command into an early-exiting reader (head -1, sed -n '1p;q') under set -euo pipefail — the reader closes the pipe, the writer dies of SIGPIPE, and pipefail promotes the 141 into a script abort. It is a race that fires only once output exceeds one 4096-byte stdio buffer, so it survives for months and then fails always. Let the command do its own limiting: git for-each-ref --count=1, not git tag --list | head -1.

Read the full file on GitHub · 43 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. 29d ago Changed · +1 lines 95cf0f815db5
  2. 1mo ago First seen · 42 lines · 56 tokens per session scan A 030b46d22d91

Subscribe to this mod's changes

shell-traps is a skill published in the GitHub repository gotgenes/pi-anthropic-auth (426 stars, last pushed 13d ago), licensed MIT. It adds 56 tokens to every session and 785 once invoked, about $0.0002 per session on Opus 5.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-09-24.

Related

Other skills, from other repositories

git-advanced-workflows

Master advanced Git workflows including rebasing, cherry-picking, bisect, worktrees, and reflog to maintain clean history and recover from any situation. Use when managing complex Git histories, collaborating on feature branches, or troubleshooting repository issues.

wshobson/agents · 54 tokens

enable-check-includes-strict

Enable and migrate Chromium targets and directories to checkincludesstrict = true, diagnosing and resolving header include violations as part of the checkincludesstrict LSC. Use when adding directories to the allowlist, enabling strict header checks on targets, or resolving CHECKINCLUDESSTRICTUNTRIAGED targets.

chromium/chromium · 70 tokens

resolve-publish

Commit the validated fix and follow local-only, workflow-owned, or direct PR publication.

omnigent-ai/omnigent · 21 tokens

gsd-audit-fix

Autonomous audit-to-fix pipeline — find issues, classify, fix, test, commit.

open-gsd/gsd-core · 25 tokens

source-code-management

Create or review caddy-security commit messages using repository indicators, required body sections, and timestamped message files. A message request does not create a commit.

greenpau/caddy-security · 35 tokens

fix-issue

Fixes GitHub issues using parallel analysis agents for root cause investigation, code exploration, and regression detection. Reads issue context from gh CLI, searches codebase and memory for related patterns, generates a fix with tests, and links the resolution back to the issue via PR. Includes prevention analysis to…

yonatangross/orchestkit · 82 tokens