360 Secure SkillHub
360 安全技能中心

shell

该 Skill 通过本地脚本按主题输出 Shell 脚本参考内容,涵盖变量、控制流、重定向与管道、安全实践、常用工具、信号与陷阱以及质量检查清单,适合编写或排查 Bash 脚本时查阅。

xueyetianya
xueyetianya
热度 25.15
最近更新 2026-09-20 04:21:10
分类:知识依赖:代码执行 / 读写文件应用场景:概念解释 / 自动化脚本 / 调试排错 / 教学辅导

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add shell
Metadata
name
shell
version
1.0.0
description
Shell scripting reference — Bash syntax, redirections, process substitution, signal handling, debugging techniques. Use when writing shell scripts, troubleshooting Bash behavior, or automating system tasks.
author
BytesAgain
homepage
https://bytesagain.com
source
https://github.com/bytesagain/ai-skills
tags
["shell","bash","scripting","linux","unix","terminal","automation","devtools"]
category
devtools

Shell — Shell Scripting Reference

Quick-reference skill for Bash shell scripting, built-in features, and best practices.

When to Use

  • Writing reliable Bash scripts with proper error handling
  • Understanding redirections, pipes, and process substitution
  • Managing signals, traps, and background processes
  • Debugging shell scripts with set options and tracing
  • Choosing between shell features and external tools

Commands

intro

scripts/script.sh intro

Overview of shell scripting — Bash features, shebang, execution, portability.

variables

scripts/script.sh variables

Variables — declaration, scope, arrays, parameter expansion, special variables.

control

scripts/script.sh control

Control flow — if/else, case, for, while, until, select, functions.

redirections

scripts/script.sh redirections

Redirections and pipes — stdin/stdout/stderr, heredocs, process substitution.

safety

scripts/script.sh safety

Safety practices — set -euo pipefail, quoting, shellcheck, error handling.

tools

scripts/script.sh tools

Essential tools — awk, sed, grep, find, xargs, cut, sort, jq patterns.

signals

scripts/script.sh signals

Signals and traps — SIGTERM, SIGINT, cleanup handlers, background jobs.

checklist

scripts/script.sh checklist

Shell script quality checklist.

help

scripts/script.sh help

version

scripts/script.sh version

Configuration

Variable Description
SHELL_DIR Data directory (default: ~/.shell/)

Powered by BytesAgain | bytesagain.com | hello@bytesagain.com