전통적인 Unix 스타일 규칙을 보존하는 Claude Code 기술

hackernews | | 📦 오픈소스
#claude #cli #c언어 #posix #unix #스크립트 #하드웨어/반도체
원문 출처: hackernews · Genesis Park에서 요약 및 분석

요약

Claude Code를 위한 Unix 전통 스타일 가이드라인 검토 스킬이 소개되었습니다. 이 스킬은 ESR의 'Unix 프로그래밍의 예술', POSIX, GNU 코딩 표준 등 총 5가지 핵심 문서를 바탕으로 CLI 도구와 셸 스크립트 등을 검토합니다. 사용자는 프로젝트 루트의 설정 파일을 통해 표준(POSIX 또는 GNU)을 선택하고, 긴 옵션 사용 여부나 셸버튼(sh 또는 bash) 지정 등 세부적인 규칙을 시스템적으로 맞춤 설정할 수 있습니다. 설치 시 관련 문서들이 자동으로 로드되며, 기준 간 충돌이 발생할 경우 사용자가 지정한 설정 값을 우선순위로 하여 일관된 코드 리뷰를 지원합니다.

본문

A Claude Code skill for reviewing CLI tools, shell scripts, C programs, and documentation against Unix tradition. Five sources: The Art of Unix Programming (ESR), POSIX (IEEE Std 1003.1), GNU Coding Standards, "Worse is Better" (R.P. Gabriel, 1989), and The Jargon File (Community Edition). ./install.sh Copies the skill to ~/.claude/skills/unix-conventions/ . Requires Claude Code. Claude loads the skill automatically when reviewing CLI tools, shell scripts, or man pages. Invoke it directly with /unix-conventions . Only the references relevant to the task are loaded. ./fetch-taoup.sh [-v] [-o FILE] # requires wget, pandoc, iconv, perl ./fetch-gnu-standards.sh [-v] [-o FILE] # requires wget ./fetch-jargon.sh [-v] [-o FILE] # requires wget, pandoc Each script writes to its default output file under documentation/ ; use -o to redirect. All support -h . fetch-jargon.sh pulls the Jargon File (Community Edition) from GitHub Pages and includes all letter entries, linguistic conventions, style chapters, and appendices (Story of Mel, AI Koans, J. Random Hacker portrait). documentation/posix-conventions.txt is an original POSIX utility conventions summary. The full standard is copyrighted by The Open Group and IEEE; authoritative text at https://pubs.opengroup.org/onlinepubs/9799919799/ SKILL.md skill definition and checklists references/ taoup-principles.md the 17 Rules from TAOUP cli-conventions.md POSIX option syntax, exit codes, streams, error format gnu-coding-standards.md GNU error format, standard options, shell scripting, C style man-page-format.md man page sections, macros, writing style worse-is-better.md Gabriel's four properties and when to apply them jargon-lore.md curated hacker lore: koans, incidents, cultural touchstones jargon-terms.md curated vocabulary: design quality signals and hacker terminology documentation/ taoup.md The Art of Unix Programming (full text, Markdown) jargon.md The Jargon File, Community Edition (full text, Markdown) taoup.pdf The Art of Unix Programming (PDF) posix-conventions.txt POSIX utility conventions summary (original) gnu-coding-standards.txt GNU Coding Standards (fetched from gnu.org) .unix-conventions.example per-project config template fetch-taoup.sh fetches and converts TAOUP HTML to Markdown fetch-gnu-standards.sh fetches the GNU Coding Standards as plain text fetch-jargon.sh fetches the Jargon File and converts it to Markdown install.sh installs the skill to ~/.claude/skills/unix-conventions/ Copy .unix-conventions.example to .unix-conventions at your project root to set per-project preferences. For user-wide defaults, edit ~/.config/unix-conventions/config . Project file takes precedence. .unix-conventions is gitignored. When POSIX, GNU, and TAOUP disagree, the skill checks config first. Unset keys default to ask . standard = posix | gnu | ask Global tiebreaker. posix for tools that must run on any POSIX system (OpenBSD, macOS, Solaris); gnu for Linux-only. short_h = help | domain | ask Whether -h is reserved for --help or free for domain use (human-readable sizes, host, header, etc.). long_options = require | optional | none | ask Whether GNU long options (--verbose , --output ) are expected alongside short ones. options_after_operands = yes | no | ask yes = GNU permutation (options anywhere); no = POSIX strict (first non-option ends option parsing). shebang = sh | bash | ask sh for scripts that must run on dash, ash, or other minimal shells. bash when the script actually uses bash-specific features: arrays, [[ ]] , pipefail , process substitution. echo_or_printf = printf | echo | ask printf is portable. echo behavior with -n and backslash escapes is implementation-defined across bash, dash, and /bin/sh . c_indent = gnu | kr | linux | ask gnu = 2 spaces. kr = 8-space tabs (Kernighan & Ritchie). linux = 8-space tabs with Linux kernel brace rules. glibc_error = yes | no | ask Whether to recommend error() /error_at_line() . Non-portable (glibc only); use no for code targeting macOS, BSDs, or musl. worse_is_better = yes | no | ask Whether to apply the Worse is Better design lens during reviews. GPL v3. See LICENSE. Reference documents are derived from works with their own licenses; see CREDITS.md.

Genesis Park 편집팀이 AI를 활용하여 작성한 분석입니다. 원문은 출처 링크를 통해 확인할 수 있습니다.

공유

관련 저널 읽기

전체 보기 →