본문으로 건너뛰기
cccskills
무료GitHub에 공개

review-shell

Use when reviewing, debugging, or hardening Shell/Bash scripts in this repo (.github/workflows/*.yml steps, website build scripts, or any *.sh file) or when asked to "review bash", "revisa el script", "shellcheck", or "revisa el pipeline shell". Reviews for robustness, error handling, quoting, portability, injection, and CI-friendliness, and ends with what a CI failure or a hostile input would catch.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md4.1 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Shell / Bash Review

You review shell scripts like a sysadmin who has seen every broken pipe, unquoted variable, and half-run pipeline. You assume any input can be hostile, any command can fail, and anyone else running the script is using a different shell on a different OS.

Steps

  1. Read the whole script before judging. Know what it is for.
  2. Lint mechanically first — run shellcheck if available (each shell file), bash -n file.sh for syntax, sh -n for POSIX sh. Fix everything mechanical before the deep pass.
  3. Review the dimensions below.
  4. Failure-thinking pass — for each step, ask: what happens if this command fails mid-way, if the input has spaces, or if a variable is empty?
  5. Report in the output format at the bottom.

Review dimensions

  1. Set strict mode deliberately — is set -euo pipefail present and understood? set -e surprises (failing in if conditions, in pipelines, with grep returning 1). Call out code that will die or silently continue under set -e in ways the author did not intend.
  2. Quoting — every expansion quoted: "$VAR", "$@", "${arr[@]}". Unquoted variables break on spaces/globs. This is the single most common real bug. Flag every unquoted expansion.
  3. $@ vs $* — use "$@" for argument lists, never $* or unquoted $@.
  4. Exit codes and error propagation — every command that can fail is checked (|| exit 1, if ! cmd; then, trap). No ;-chained commands where a failure would be silently swallowed.
  5. Injection and unsafe eval — no eval, no $(echo "$USER_INPUT") in shell that runs commands, no sh -c from concatenated strings, no unchecked find -exec. Filenames/paths from input must be quoted and treated as data.
  6. Portability — shebang matches usage (#!/usr/bin/env bash vs sh); no bashisms in sh scripts; no GNU-only flags (find -regex in a busybox-free environment is fine, but note sed -i, head -n, xargs -I portability); avoid cd X && cmd — prefer (cd X && cmd) subshells or git -C, and never mutate the caller's working directory.
  7. Cleanup and traps — temp files removed (trap 'rm -f "$tmp"' EXIT), trap ERR/EXIT/INT, no leftover processes, no infinite loops without a guard.
  8. CI-friendliness (GitHub Actions especially) — steps are idempotent, fail loudly (|| exit 1), don't depend on cwd or environment that isn't set, $GITHUB_ENV/$GITHUB_OUTPUT used instead of hidden file writes, secrets never echoed or written to logs.

Failure-thinking checklist

  • Empty variables, unset variables under set -u.
  • Paths and filenames with spaces, quotes, or newlines.
  • Commands that exit non-zero in if/&&/|| chains.
  • Partial runs (script killed at step N) — is state left behind?
  • Re-runs — is the script idempotent, or does it double-apply?
  • Environment differences (Windows CI, macOS, minimal containers).

Output format

  • Verdict — lint results, then pass/fail per dimension.
  • Issues prioritized:
    • Critical — unquoted expansions in dangerous spots, injection, destructive commands (rm -rf) with unguarded variables, set -e swallowing a real failure.
    • Important — missing error checks, cd without subshell, unquoted variables, missing traps.
    • Style — readability, naming, comments. Each with file:line, the problem, and the fix as a code snippet.
  • Failure cases — the 3-5 concrete scenarios (input or CI state) that would break the script, with the exact fix.
  • When asked to fix, apply edits and re-run shellcheck/bash -n before reporting done.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Use when asked to analyze a file, a directory, or the whole codebase to understand structure, architecture, dependencies, complexity, duplication, dead code, or technical debt — e.g. "analyze this", "análisis total", "explain this codebase", "mapa del código", "how does X work", "technical debt". Produces a complete, structured picture with verified commands, not guesses. Distinct from review-* skills (which judge quality); this skill explains and maps.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

sazardev/networking-with-go592026년 8월 8일 업데이트

Use when asked to audit or harden security in this repo — e.g. "security audit", "auditoría de seguridad", "revisa la seguridad", "is this secure", "hardening", "vulnerabilities". Audits code, config, workflows, and secrets exposure. Covers injection, secrets, TLS, untrusted input, dependency risk, and CI supply-chain hygiene. Runs when the user asks about security, not just for code reviews.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

sazardev/networking-with-go592026년 8월 8일 업데이트

Use when reviewing the structure, ordering, coherence, and narrative flow of the book as a whole or across chapters. Checks chapter sequencing against the ID scheme, cross-references and forward hooks between chapters, README/index link integrity, exercise-to-chapter pairing, duplicate or contradictory content, and progression of difficulty. Best paired with a full-docs review rather than a single-chapter proofread.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

sazardev/networking-with-go592026년 8월 8일 업데이트

Use when writing, expanding, rewriting, or drafting any chapter (.mdx) or Go exercise for this book. Encodes the authorial voice, the mdx-pdf-format rules, the ID/naming scheme, the zero-emoji rule, chapter/exercise pairing, and the "theory first, then code" pedagogy so new or edited content reads like the rest of the book and keeps the PDF compiling.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

sazardev/networking-with-go592026년 8월 8일 업데이트

Use when brainstorming, evaluating ideas, designing architectures, writing technical plans, or choosing between approaches — e.g. "give me ideas", "ideas para", "diseña la arquitectura", "how should I structure this", "compare approaches", "plan". Turns vague ideas into concrete, prioritized, buildable designs with explicit tradeoffs. Use before writing code, not after.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

sazardev/networking-with-go592026년 8월 8일 업데이트

Use when proofreading, copy-editing, or verifying English in any docs/**/*.mdx chapter or code comment in this repo. Catches grammar, punctuation, spelling, syntax, article/tense/agreement errors, wordiness, tone drift, and style inconsistencies, and rewrites text in the book's confident second-person voice without changing meaning or breaking the mdx/PDF format rules.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

sazardev/networking-with-go592026년 8월 8일 업데이트

sazardev의 스킬 모두 보기

이 스킬의 문제 신고