bash-linux

A collection of Bash command patterns for Linux and macOS terminals. Bash is a program for running commands and scripts to manage files, processes, and command output.

In plain words
What is it for?
Listing and finding files, viewing or searching file contents, following logs, checking disk space, finding processes or programs using a port, and writing basic command-line scripts.
Why use it?
It provides standard ways to chain commands, handle failures, search files, inspect logs, and manage running programs. This reduces trial and error when working in a terminal.

Skill for Claude CodeCodex

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 skills/misonl/ling/bash-linux
Any agent
npx skills add MisonL/Ling --skill bash-linux
Clone the repo
git clone --depth 1 https://github.com/MisonL/Ling

Made for: Claude Code, Codex.

Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,781 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. Scan, not verified.
Origin 84% copy Near-identical to another mod 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.00057 $0.01781
Opus 5 $0.00028 $0.00890
Sonnet 5 $0.00011 $0.00356
Haiku 4.5 $0.00006 $0.00178

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

Security

Grade B, and why

bash-linux scanned grade B 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 yesterday.

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.

Sends data to an external URLmediumData exfiltration

A POST to an outside endpoint may be telemetry or may be exfiltration; either way the mod talks to somewhere, and you should know where.

| POST JSON(发送 JSON) | `curl -X POST -H "Content-Type: application/json" -d '{"key":"value"}' URL` |

Makes network callslowCapability

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

| Download(下载) | `curl -O https://example.com/file` |
Origin

This is a copy

84% identical to bash-linux — 184 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.agents/skills/bash-linux/SKILL.md · 202 lines

How it starts

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

Bash Linux Patterns(Bash/Linux 实践模式)

Essential patterns for Bash on Linux/macOS(适用于 Linux/macOS 的 Bash 核心模式)。


1. Operator Syntax(操作符语法)

Chaining Commands(链式命令)

Operator(操作符) Meaning(含义) Example(示例)
; Run sequentially(顺序执行) cmd1; cmd2
&& Run if previous succeeded(前一命令成功后执行) npm install && npm run dev
` `
` ` Pipe output(管道输出)

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(前 N 行) head -n 20 file.txt
Last N lines(后 N 行) 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
Kill by PID(按 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
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(追加 PATH) export PATH="$PATH:/new/path"

Read the full file on GitHub · 202 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. yesterday First seen · 202 lines · 57 tokens per session scan B 32929387b9e2

Subscribe to this mod's changes

bash-linux is a skill published in the GitHub repository MisonL/Ling (9 stars, last pushed 5mo ago), licensed MIT. It adds 57 tokens to every session and 1,781 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it B with 2 findings (sends data to an external url, makes network calls). It is 84% identical to bash-linux, differing in 184 lines, and is treated as a copy.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

babysit-pr

Babysit a GitHub pull request after creation by continuously polling review comments, CI checks/workflow runs, and mergeability state until the PR is merged/closed or user help is required. Diagnose failures, retry likely flaky failures up to 3 times, auto-fix/push branch-related issues when appropriate, and keep…

openai/codex · 114 tokens

imagegen

Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output…

openai/codex · 113 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens