bash-linux
Skill9 starsChanged 3 months agoApache-2.0View on GitHub
Bash/Linux terminal patterns. Critical commands, piping, error handling, scripting. Use when working on macOS or Linux systems. When working on macOS or Linux systems, writing bash scripts, or using terminal commands. NOT for Windows/PowerShell environments.
- Installs packages
- Sends data out
9 other projects use a version of this, 9 of them edited.
Adopted by
Most recently taken up by
- sid-lakhani/agents-configedited, first seen Oct 20, 2026
- xfstudio/skillsedited, first seen Oct 13, 2026
- xenitV1/Antigravity-Workflowsedited, first seen Oct 8, 2026
- vudovn/ag-kitedited, first seen Oct 8, 2026
- vudovn/antigravity-kitedited, first seen Oct 8, 2026
- VoDaiLocz/kilo-kit-mcpedited, first seen Aug 21, 2026
Used with
Projects with it also use nextjs-react-expert, rust-pro and 3 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
SKB3002Skillnextjs-react-expert
React and Next.js performance optimization from Vercel Engineering. Use when building React components, optimizing performance, eliminating waterfalls, reducing bundle size, reviewing code for performance issues, or implementing server/client-side optimizations.
Also in 3 projects that use this
xfstudioSkillrust-pro
Master Rust 1.75+ with modern async patterns, advanced type system
Also in 5 projects that use this
jornalistainclusivoSkilldesign-spec
How to author a DESIGN.md file — the machine-readable design-token + human-rationale format that must exist before any UI is built. YAML front-matter token schema (colors, typography, spacing, rounded, components), type system, token references, and canonical section order.
Also in 3 projects that use this
zzfancitizenSkillverify-changes
Verify code changes do not break the project by running tests, linter checks, and import validation. Use after making any code changes, editing Python files, modifying imports, updating dependencies, or refactoring.
Also in 3 projects that use this
VercelSkillweb-design-guidelines
Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my site against best practices".
Also in 6 projects that use this
Other versions9 projects use a version of this.
Word for word · 0
None found.
Edited · 9
- vudovn/ag-kit★ 8.2k98% same
- vudovn/antigravity-kit★ 8.2k98% same
- xenitV1/Antigravity-Workflows★ 13099% same
- VoDaiLocz/kilo-kit-mcp★ 2899% same
- xfstudio/skills★ 999% same
- SKB3002/agenthub★ 499% same
- ai4brands-design/claude-skills★ 299% same
- sid-lakhani/agents-config★ 299% same
- jornalistainclusivo/jinc-skills★ 199% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository36 other files it gives its agents.
- .claude/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- api-designSkill
- architectureSkill
- batch-operationsSkill
- behavioral-modesSkill
- claude-code-worktreesSkill
- clean-codeSkill
- context-compressionSkill
- coordinator-modeSkill
- database-designSkill
- deployment-proceduresSkill
- documentation-templatesSkill
- error-handlingSkill
- github-issuesSkill
- github-pmSkill
- github-projectSkill
- git-workflowSkill
- goal-builderSkill
- graphifySkill
- intelligent-routingSkill
- lint-and-validateSkill
- lint-fixSkill
- memory-systemSkill
- performance-profilingSkill
- powershell-windowsSkill
- pre-commit-verifySkill
- red-team-tacticsSkill
- release-vsixSkill
- run-testsSkill
- server-managementSkill
- setup-testingSkill
- testing-patternsSkill
- test-triageSkill
- uncle-bob-craftSkill
- vulnerability-scannerSkill
The file
Files
<!-- Vendored from ag-kit (github.com/vudovn/ag-kit) @ 20a13da6d4414c7c6ae33db050a9c606eaef9f40 :: .agents/skills/bash-linux/SKILL.md. MIT (c) vudovn. -->Bash Linux Patterns
Essential patterns for Bash on Linux/macOS.
1. Operator Syntax
Chaining Commands
| Operator | Meaning | Example |
; | Run sequentially | cmd1; cmd2 |
&& | Run if previous succeeded | npm install && npm run dev |
|| | Run if previous failed | npm test || echo "Tests failed" |
| | Pipe output | ls | grep ".js" |
2. File Operations
Essential Commands
| Task | Command |
| List all | ls -la |
| Find files | find . -name "*.js" -type f |
| File content | cat file.txt |
| First N lines | head -n 20 file.txt |
| Last N lines | tail -n 20 file.txt |
| Follow log | tail -f log.txt |
| Search in files | grep -r "pattern" --include="*.js" |
| File size | du -sh * |
| Disk usage | df -h |
3. Process Management
| Task | Command |
| List processes | ps aux |
| Find by name | ps aux | grep node |
| Kill by PID | kill -9 <PID> |
| Find port user | lsof -i :3000 |
| Kill port | kill -9 $(lsof -t -i :3000) |
| Background | npm run dev & |
| Jobs | jobs -l |
| Bring to front | fg %1 |
4. Text Processing
Core Tools
| Tool | Purpose | Example |
grep | Search | grep -rn "TODO" src/ |
sed | Replace | sed -i 's/old/new/g' file.txt |
awk | Extract columns | awk '{print $1}' file.txt |
cut | Cut fields | cut -d',' -f1 data.csv |
sort | Sort lines | sort -u file.txt |
uniq | Unique lines | sort file.txt | uniq -c |
wc | Count | wc -l file.txt |
5. Environment Variables
| Task | Command |
| View all | env or printenv |
| View one | echo $PATH |
| Set temporary | export VAR="value" |
| Set in script | VAR="value" command |
| Add to PATH | export PATH="$PATH:/new/path" |
6. Network
| Task | Command |
| Download | curl -O https://example.com/file |
| API request | curl -X GET https://api.example.com |
| POST JSON | curl -X POST -H "Content-Type: application/json" -d '{"key":"value"}' URL |
| Check port | nc -zv localhost 3000 |
| Network info | ifconfig or ip addr |
7. Script Template
#!/bin/bash
set -euo pipefail # Exit on error, undefined var, pipe fail
# Colors (optional)
RED='\033[0;31m'
GREEN='\033[0;32m'
NC='\033[0m'
# Script directory
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# Functions
log_info() { echo -e "${GREEN}[INFO]${NC} $1"; }
log_error() { echo -e "${RED}[ERROR]${NC} $1" >&2; }
# Main
main() {
log_info "Starting..."
# Your logic here
log_info "Done!"
}
main "$@"8. Common Patterns
Check if command exists
if command -v node &> /dev/null; then
echo "Node is installed"
fiDefault variable value
NAME=${1:-"default_value"}Read file line by line
while IFS= read -r line; do
echo "$line"
done < file.txtLoop over files
for file in *.js; do
echo "Processing $file"
done9. Differences from PowerShell
| Task | PowerShell | Bash |
| List files | Get-ChildItem | ls -la |
| Find files | Get-ChildItem -Recurse | find . -type f |
| Environment | $env:VAR | $VAR |
| String concat | "$a$b" | "$a$b" (same) |
| Null check | if ($x) | if [ -n "$x" ] |
| Pipeline | Object-based | Text-based |
10. Error Handling
Set options
set -e # Exit on error
set -u # Exit on undefined variable
set -o pipefail # Exit on pipe failure
set -x # Debug: print commandsTrap for cleanup
cleanup() {
echo "Cleaning up..."
rm -f /tmp/tempfile
}
trap cleanup EXITRemember: Bash is text-based. Use
&&for success chains,set -efor safety, and quote your variables!
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

