shell-scripting

shell-scripting is a skill for Claude Code, Codex from alibaba/anolisa. It costs 60 tokens per session (3,631 once invoked), scanned C, original, Apache-2.0.

A guide for writing Bash or Zsh scripts, which are command-line programs used to automate work on Unix-like systems.

In plain words
What is it for?
Use it to write or review shell scripts, command-line automation, file processing, and scripts that handle flags or failures.
Why use it?
It helps avoid fragile scripts by covering argument handling, errors, safe file operations, signals, and exit codes.

Skill for Claude CodeCodex ✓ vendor

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument; mentions Codex; mentions Gemini CLI.

Good fit Use it to write or review shell scripts, command-line automation, file processing, and scripts that handle flags or failures.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/alibaba/anolisa/shell-scripting
About the project

ANOLISA is a server-side operating layer for AI agent workloads that provides terminal access, token-saving tool-output compression, runtime controls, security, observability, skills, memory, and sandbox management. It is for running and supervising agents from a Linux terminal while retaining an existing shell, agent framework, and sandbox. The catalogue add-ons are components of its agent operating environment and workflows.

alibaba/anolisa · 603 stars · on GitHub · agentic-os.sh

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 alibaba/anolisa --skill shell-scripting
Clone the repo
git clone --depth 1 https://github.com/alibaba/anolisa

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-scripting

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/alibaba/anolisa/shell-scripting"><img src="https://agentmods.dev/badge/skills/alibaba/anolisa/shell-scripting.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 60 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,631 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 7 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Output Handling · line 193
    Output size or generation rate is not bounded. Unbounded output enables denial-of-service through resource exhaustion, log flooding, or context-window stuffing.
    Fix: Set explicit limits on output length, generation count, and rate. Use max_tokens and truncation to prevent unbounded output.
  • medium Prompt Injection · line 365
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
  • medium Prompt Injection · line 365
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
  • medium Prompt Injection · line 367
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
  • medium Prompt Injection · line 369
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
  • medium Prompt Injection · line 372
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
  • medium MCP Rug Pull · line 397
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
How audits are shown
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.00060 $0.03631
Opus 5.5 $0.00024 $0.01452
Sonnet 5.5 $0.00012 $0.00726
Haiku 4.5 $0.00006 $0.00363

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

Security

Grade C, and why

shell-scripting scanned grade C with 2 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 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.

Recursive force deletehighDestructive command

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

rm -rf "$TMP_DIR"

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

require_cmd curl
src/os-skills/system-admin/shell-scripting/SKILL.md · 398 lines

How it starts

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

When this skill is activated, always start your first response with the 🧢 emoji.

Shell Scripting

Shell scripting is the art of automating tasks through the Unix shell - combining built-in commands, control flow, and process management to build reliable CLI tools and automation workflows. This skill covers production-quality bash and zsh scripting: robust error handling, portable argument parsing, safe file operations, and the idioms that separate fragile one-liners from scripts that hold up in production.


When to use this skill

Trigger this skill when the user:

  • Asks to write or review a bash or zsh script
  • Needs to parse command-line arguments or flags
  • Wants to automate a CLI workflow or task runner
  • Asks about exit codes, signal trapping, or error handling in shell
  • Needs to process files, lines, or streams from the terminal
  • Asks about here documents, process substitution, or subshells
  • Wants a portable script that works across bash, zsh, and sh

Do NOT trigger this skill for:

  • Python or Node.js CLI tools (shell is the wrong tool for complex logic)
  • Scripts that require structured data parsing at scale (use a real language instead)

Key principles

  1. Always use set -euo pipefail - Start every non-trivial script with this. -e exits on error, -u treats unset variables as errors, -o pipefail catches failures in pipelines. Without this, silent failures hide bugs for weeks.
  2. Quote everything - Always double-quote variable expansions: "$var", "$@", "${array[@]}". Unquoted variables break on whitespace and glob characters. The only exceptions are intentional word splitting and arithmetic contexts.
  3. Check dependencies upfront - Verify required commands exist before the script runs. Fail fast at the top with a clear error, not halfway through a destructive operation.
  4. Use functions for reuse and readability - Extract logic into named functions. Shell functions support local variables (local), can return exit codes, and make scripts testable. A main() function at the bottom with a guard is idiomatic.
  5. Prefer shell built-ins over external commands - [[ ]] over [ ], ${var##*/} over basename, ${#str} over wc -c. Built-ins are faster, more portable, and avoid spawning subshells. Use printf over echo for reliable output formatting.

Read the full file on GitHub · 398 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. 1mo ago First seen · 398 lines · 60 tokens per session scan C 824c89974b23

Subscribe to this mod's changes

shell-scripting is a skill published in the GitHub repository alibaba/anolisa (603 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 60 tokens to every session and 3,631 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it C with 2 findings (recursive force delete, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.