bash-linux — Claude Code skill: terminal and scripting patterns
A Bash reference skill for macOS and Linux: command chaining, files, processes, error handling. Useful when the agent edits shell scripts or digs through logs.
npx claude-code-templates@latest --skill development/bash-linuxWhat bash-linux does
The skill hands the agent a cheat sheet of terminal patterns. Chaining operators ;, && and || sit next to pipes, and there are everyday calls like ls -la, find, tail -f and grep -r. Process work includes locating a name with ps aux | grep and freeing a port through lsof.
Text tools come as a separate table: sed, awk, cut, sort, uniq. Environment variables and network calls with curl and nc get their own sections. The script template uses set -euo pipefail, a trap for cleanup, and a command -v check before relying on a binary.
Tool access is declared in allowed-tools: Read, Write, Edit, Glob, Grep, Bash. A skill about shell commands without Bash in that list is dead weight. One table maps PowerShell habits onto Bash, which helps when porting scripts over from Windows. The advice it keeps repeating is simple: quote your variables, and let set -e stop the run at the first failure.
What it helps with
- chain
find,grepandxargswithout breaking the pipeline - find which process holds port 3000 and kill it
- write a bash script that stops on the first error
- replace a string across a file with
sed - port a script from PowerShell to Bash
Example prompts for the agent
- Find out which process is listening on port 3000 and kill it
- Rewrite
build.shso it exits on any error and removes its temp files - Count repeated IPs in
access.logand show the top five
How to install bash-linux
1claude-code-templates
npx claude-code-templates@latest --skill development/bash-linux2Skills CLI (Vercel)
npx skills add davila7/claude-code-templates --skill bash-linux -a claude-code3Manually: put the files in place
~/.claude/skills/bash-linux/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/bash-linux/
Manually: put the files in place
.agents/skills/bash-linux/SKILL.mdFor all projects use ~/.agents/skills/
Manually: put the files in place
.cursor/skills/bash-linux/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install davila7/claude-code-templates bash-linux2Manually: put the files in place
.github/skills/bash-linux/SKILL.mdPlatform CLI
gemini skills install https://github.com/davila7/claude-code-templates --path cli-tool/components/skills/development/bash-linuxManually: put the files in place
.devin/skills/bash-linux/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about bash-linux
How do I install bash-linux in Claude Code?
Use the templates command: npx claude-code-templates@latest --skill development/bash-linux. The other route is npx skills add davila7/claude-code-templates --skill bash-linux -a claude-code. Either way the skill ends up at ~/.claude/skills/bash-linux/SKILL.md.
What does bash-linux do?
It gives the agent a set of Bash patterns: file, process and text commands, environment variables, network requests, and error handling inside scripts.
Which tools does the skill need?
allowed-tools lists Read, Write, Edit, Glob, Grep and Bash. Take Bash away and the commands in the reference cannot run.