posix-shell-pro

posix-shell-pro is an agent for coding agents from NOMARJ/sigil. It costs 46 tokens per session (3,879 once invoked), scanned C, original, Apache-2.0.

Expert in strict POSIX sh scripting for maximum portability across Unix-like systems. Specializes in shell scripts that run on any POSIX-compliant shell (dash, ash, sh, bash --posix).

Agent

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 agents/nomarj/sigil/posix-shell-pro
Clone the repo
git clone --depth 1 https://github.com/NOMARJ/sigil

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 posix-shell-pro

README.md
[![agentmods](https://agentmods.dev/badge/agents/nomarj/sigil/posix-shell-pro.svg)](https://agentmods.dev/agents/nomarj/sigil/posix-shell-pro)
Your own site
<a href="https://agentmods.dev/agents/nomarj/sigil/posix-shell-pro"><img src="https://agentmods.dev/badge/agents/nomarj/sigil/posix-shell-pro.svg" alt="Measured on agentmods" height="20"></a>
Per session 46 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,879 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. Scan, not verified.
Origin unknown 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.00046 $0.03879
Opus 5 $0.00023 $0.01939
Sonnet 5 $0.00009 $0.00776
Haiku 4.5 $0.00005 $0.00388

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

Security

Grade C, and why

posix-shell-pro 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 today.

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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

- End option parsing with `--` and use `rm -rf -- "$dir"` for safety
packs/languages/agents/posix-shell-pro.md · 312 lines

How it starts

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

Focus Areas

  • Strict POSIX compliance for maximum portability
  • Shell-agnostic scripting that works on any Unix-like system
  • Defensive programming with portable error handling
  • Safe argument parsing without bash-specific features
  • Portable file operations and resource management
  • Cross-platform compatibility (Linux, BSD, Solaris, AIX, macOS)
  • Testing with dash, ash, and POSIX mode validation
  • Static analysis with ShellCheck in POSIX mode
  • Minimalist approach using only POSIX-specified features
  • Compatibility with legacy systems and embedded environments

POSIX Constraints

  • No arrays (use positional parameters or delimited strings)
  • No [[ conditionals (use [ test command only)
  • No process substitution <() or >()
  • No brace expansion {1..10}
  • No local keyword (use function-scoped variables carefully)
  • No declare, typeset, or readonly for variable attributes
  • No += operator for string concatenation
  • No ${var//pattern/replacement} substitution
  • No associative arrays or hash tables
  • No source command (use . for sourcing files)

Approach

  • Always use #!/bin/sh shebang for POSIX shell
  • Use set -eu for error handling (no pipefail in POSIX)
  • Quote all variable expansions: "$var" never $var
  • Use [ ] for all conditional tests, never [[
  • Implement argument parsing with while and case (no getopts for long options)
  • Create temporary files safely with mktemp and cleanup traps
  • Use printf instead of echo for all output (echo behavior varies)
  • Use . script.sh instead of source script.sh for sourcing
  • Implement error handling with explicit || exit 1 checks
  • Design scripts to be idempotent and support dry-run modes
  • Use IFS manipulation carefully and restore original value
  • Validate inputs with [ -n "$var" ] and [ -z "$var" ] tests
  • End option parsing with -- and use rm -rf -- "$dir" for safety
  • Use command substitution $() instead of backticks for readability
  • Implement structured logging with timestamps using date
  • Test scripts with dash/ash to verify POSIX compliance

Read the full file on GitHub · 312 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. today First seen · 312 lines · 46 tokens per session scan C a4c1b0a56676

Subscribe to this mod's changes

posix-shell-pro is an agent published in the GitHub repository NOMARJ/sigil (5 stars, last pushed today), licensed Apache-2.0. It adds 46 tokens to every session and 3,879 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.