cc-bash-style

Enforces consistent style rules for Bash scripts, Dockerfiles, Makefiles, and shell command examples.

1.0k|109|Updated Jan 4, 2026
One-click install
npx skills add https://github.com/doccker/cc-use-exp --skill cc-bash-style
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cc-bash-style
Source: https://github.com/doccker/cc-use-exp/tree/main/.codex/skills/cc-bash-style
Command: npx skills add https://github.com/doccker/cc-use-exp --skill cc-bash-style

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Shell scripts, Dockerfiles, Makefiles, and command snippets often drift into inconsistent styles—inline comments, over-clever one-liners, and fragile quoting—that make them hard to review and maintain. This Skill keeps every script and command example readable, directly executable, and easy to audit.

Core Features & Use Cases

  • Comment conventions: Enforces standalone comment lines that explain intent, boundaries, and risk instead of trailing comments that restate the obvious.
  • Heredoc guidance: Promotes clear heredocs with quoted delimiters like <<'EOF' for literal multi-line content instead of nested escaping.
  • Safe file writes with tee: Recommends tee and sudo tee over error-prone patterns like sudo echo > file, with explicit distinction between overwrite and append.
  • Use Case: When asking an AI to modify a deployment shell script or add a Dockerfile, the Skill ensures the output uses clean heredocs, standalone comments, and reviewable step-by-step commands.

Quick Start

Ask the AI to write or modify a shell script, Dockerfile, or Makefile following the cc-bash-style conventions for comments, heredocs, and tee-based file writes.

Frequently Asked Questions about cc-bash-style

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write maintainable Bash scripts with consistent style?

Keep scripts direct and readable: use standalone comment lines that explain intent and risk, prefer clear heredocs over nested escaping, and break work into reviewable step-by-step commands instead of clever one-liners.

What is the correct way to write multi-line text in a shell script?

Use a heredoc instead of layered escape sequences. When the content must be literal, quote the delimiter as in <<'EOF' so no variable expansion occurs. Heredocs suit templates and config snippets, not hidden control flow.

Should I use sudo echo or sudo tee to write files as root?

Use sudo tee. The pattern sudo echo > file fails because the redirection runs as the unprivileged user. Use tee for overwriting and tee -a for appending, keeping the distinction explicit.

Does this style guide cover Dockerfile and Makefile conventions?

Yes, the same rules apply to Dockerfiles, Makefiles, and command snippets in documentation: standalone comments, readable step-by-step commands, and avoidance of hard-to-review compound shell constructs.

When should I not use this shell style skill?

Do not use it for operational risk assessment or approval decisions, language-agnostic coding principles, or formal code review and debugging workflows. It only governs script and command writing style.