# Bash

> >-

- **Type:** Skill
- **Install:** `agentstack add skill-posidoni-shell-skill-bash`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [posidoni](https://agentstack.voostack.com/s/posidoni)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [posidoni](https://github.com/posidoni)
- **Source:** https://github.com/posidoni/shell-skill/tree/main/skills/bash

## Install

```sh
agentstack add skill-posidoni-shell-skill-bash
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Bash

Builds on [`skills/shell-standards`](../shell-standards/). Depth and citations in
[`reference/bash.md`](../../reference/bash.md); runnable pairs in
[`examples/bash/`](../../examples/bash/).

## Key points

| Topic | Do | Avoid |
|-------|----|-------|
| Arrays | `mapfile -t arr < file` | `arr=($(cat file))` (`SC2207`) |
| Array expansion | `"${arr[@]}"` | bare `$arr` = first element only (`SC2128`) |
| Forwarding args | `"$@"` | unquoted `$@` (`SC2068`) |
| Errors | `trap ... ERR`, explicit checks | `\|\| true` masking |
| Portability | assert `BASH_VERSINFO`; temp-file `sed` | assuming GNU coreutils / Bash 4 |

## Portability

macOS ships Bash 3.2 and BSD userland. `mapfile`, `readarray`, and
`declare -A` are Bash 4+; `sed -i` and `readlink -f` differ from GNU. If you rely
on Bash 4 features, assert the version early and exit with a clear message. See
`reference/bash.md` for the full compatibility table.

## Verify

`task ci` runs `shellcheck --severity=warning` and the bats suite over these
examples. The SC codes in the table map one-to-one to the anti-patterns.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [posidoni](https://github.com/posidoni)
- **Source:** [posidoni/shell-skill](https://github.com/posidoni/shell-skill)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-posidoni-shell-skill-bash
- Seller: https://agentstack.voostack.com/s/posidoni
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
