원클릭으로
zsh-writer
Use when writing or modifying ZSH functions.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Use when writing or modifying ZSH functions.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
Use when user says "ralph <dir>" or "ralph this". Implements the highest-priority issue from state.json in the given directory using TDD, updates docs, runs review in a subagent, fixes actionable feedback, then stops for user to commit. Argument is the directory containing state.json and GUIDANCE.md.
Use when user says "sidequest". Compact conversation context into a document for a fresh agent to pick up.
Use when writing or modifying JavaScript code. Apply when adding functions, fixing bugs, or implementing features.
Use when writing or modifying Python code. Apply when adding functions, fixing bugs, or implementing features.
Use when creating or updating skills.
Use when user says "phone pickup", "pick up the conversation from the phone", "récupère la discussion du téléphone", or wants to retrieve a mobile vocal session saved in Notion.
SOC 직업 분류 기준
| name | zsh-writer |
| description | Use when writing or modifying ZSH functions. |
Write ZSH code that is consistent with my conventions.
Goal: Correct path and name.
Exit criterion: File exists at correct path with correct name.
tools/term/zsh/config/functions/autoload/{domain}/{subdomain?}/{name}scripts/bin/{domain}/{subdomain?}/{name}{domain}-{subdomain?}-{action} — e.g. git-branch-list, json-lint-raw suffix → machine-readable ▮-separated output, consumed by other scriptsGoal: Ensure the bug/feature has a failing test first
Exit criterion: Test fails.
Write a failing test for the bug or missing feature you want to implement.
bats <test_filepath> to run the testsbats_load_library 'helper'
setup() {
bats_tmp_dir
}
@test "converts space-separated words to camelCase" {
bats_run_zsh "my-new-function hello world"
[ "$status" -eq 0 ]
[ "$output" = "helloWorld" ]
}
@test "passes result to clipboard" {
pbcopy() { echo "$1" > "$BATS_TMP_DIR/clipboard.txt"; }
bats_mock pbcopy
bats_run_zsh "my-new-function hello world"
[ "$(cat "$BATS_TMP_DIR/clipboard.txt")" = "helloWorld" ]
}
Goal: Working code, following coding style.
Exit criterion: Test passes.
Write code that follows the following patterns:
| Pattern | Rule |
|---|---|
| Headers | Top of the file: what the script does, how to call it and error protection |
| Args parsing | Use zparseopts to parse --named arguments |
| Variables | local myVar="$(myCommand)" on one line |
| Splitting | Use ▮ as separator and ${(@ps/▮/)line} to split |
| Conditions | [[ simpleCondition ]] && state=value. No nested if/else, return early |
| Calling Commands | Use existing helpers (git-branch-current), not raw calls. Use --long-form, not -l. |
# Show changed files with syntax-aware coloring
# Usage:
# $ git-diff-colorize # Unstaged changes
# $ git-diff-colorize --staged # Staged only
# $ git-diff-colorize --ext ts # Filter by extension
setopt local_options err_return
MAX_RESULTS=50
zmodload zsh/zutil
zparseopts -E -D \
s=flagStaged \
-staged=flagStaged \
e:=flagExt \
-ext:=flagExt
local isStaged=${#flagStaged}
local extFilter=${flagExt[2]}
local helperArgs=()
[[ $isStaged == 1 ]] && helperArgs+=(--staged)
[[ "$extFilter" != "" ]] && helperArgs+=(--ext "$extFilter")
local rawFiles="$(git-diff-list-raw "${helperArgs[@]}")"
# Nothing to display if working tree is clean
[[ "$rawFiles" == "" ]] && return 0
local output=""
for rawLine in ${(f)rawFiles}; do
local fields=(${(@ps/▮/)rawLine})
local name=$fields[1]
local dir=$fields[2]
local ext=$fields[3]
local parentDir="${dir:t}" # zsh modifier: last path component
local color=$COLOR_DEFAULT
[[ "$ext" == "ts" ]] && color=$COLOR_FILE_TS
[[ "$ext" == "zsh" ]] && color=$COLOR_FILE_ZSH
output+="$(colorize "$name" $color)▮$parentDir▮$ext\n"
done
table $output
Run zsh-lint --fix <file> on any modified .zsh files.
Run bats-lint <test_file> on any modified .bats test files.
Fix every violation, (including pre-existing ones not introduced by the current change).
| Rationalization | Reality |
|---|---|
| "It's only two levels of if/else, it's ok." | No it's not. Return early, always. |
local; script constants UPPER_CASE without localgit-branch-list-raw not git branch)zparseopts for --named arguments