Agent skill
bash-style
Bash 脚本与系统命令规范。禁止行尾注释,强制使用 tee/heredoc 写入,提升命令执行的可维护性。
Install this agent skill to your Project
npx add-skill https://github.com/doccker/cc-use-exp/tree/main/.gemini/skills/bash-style
SKILL.md
Bash 与系统命令规范
参考来源: Google Shell Style Guide
🚫 严格禁止
1. 禁止行尾注释
- ❌
curl -X POST ... # 发送请求 - ✅ 注释必须独占一行,放在代码上方
2. 禁止隐式路径
- ❌
rm test.txt - ✅ 优先使用变量或绝对路径:
rm "${WORK_DIR}/test.txt"
🛠️ 脚本编写原则
- 防御性头声明:所有
.sh文件首行必须包含set -euo pipefail。 - 变量引用:必须为所有变量引用加双引号(
"${VAR}"),防止空格溢出。 - 安全写入:禁止在大段脚本中使用
cat <<EOF > file。优先使用write_file(工具) 或分步tee写入。
# ✅ 良好的脚本头
#!/usr/bin/env bash
set -euo pipefail
💻 命令输出与日志
- 复杂命令必须使用
tee -a "${LOG_FILE}"同时记录到屏幕和日志。 - 循环操作必须打印当前进度索引(如
[1/50] Processing...)。
📋 本回复遵循:
bash-style- [章节]
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
ruanzhu
当用户执行 /ruanzhu 命令或请求生成软著源代码文档时触发。提供软著源代码 DOCX 生成规范。 覆盖项目信息检测、语言扫描规则、页数控制、DOCX 格式规范等。
ui-ux-pro-max
专业级 UI/UX 设计规范,需要高质量界面设计时手动触发或描述"设计感/专业UI"时自动触发。 覆盖视觉层次、配色体系、排版节奏、交互微动效、响应式适配等。 日常前端开发由 frontend-dev skill 覆盖。
verl-rl-training
Provides guidance for training LLMs with reinforcement learning using verl (Volcano Engine RL). Use when implementing RLHF, GRPO, PPO, or other RL algorithms for LLM post-training at scale with flexible infrastructure backends.
plotly
Interactive scientific and statistical data visualization library for Python. Use when creating charts, plots, or visualizations including scatter plots, line charts, bar charts, heatmaps, 3D plots, geographic maps, statistical distributions, financial charts, and dashboards. Supports both quick visualizations (Plotly Express) and fine-grained customization (graph objects). Outputs interactive HTML or static images (PNG, PDF, SVG).
sales-enablement
Create sales collateral such as decks, one-pagers, objection docs, demo scripts, playbooks, and proposal templates. Use when a sales team needs assets that help reps move deals forward and close.
jq
Expert jq usage for JSON querying, filtering, transformation, and pipeline integration. Practical patterns for real shell workflows.
Didn't find tool you were looking for?