multiline-commit-messages
하는 일
셸이 안정적으로 전달하는 형식으로 여러 줄 커밋 메시지를 쓰는 방법을 에이전트에 알려 줍니다. 커밋을 만드는 에이전트의 메시지가 가끔 깨질 때 쓰면 좋은 스킬입니다.
사용하는 경우
- ✓에이전트가 한 줄보다 긴 메시지로 git 커밋을 만들 때.
- ✓커밋 메시지에 셸 텍스트가 섞여 나왔을 때.
- ✓요약 줄과 본문 문단이 있는 커밋 메시지를 원하는 경우.
스킬 링크
https://github.com/prisma/orm/blob/main/skills-contrib/multiline-commit-messages/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“이 변경 사항을 짧은 요약과 두 문단짜리 설명이 담긴 메시지로 커밋해 주실 수 있나요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 메시지를 실제 줄바꿈이 있는 작은따옴표 문자열로 씁니다. 명령 치환 안에서 heredoc을 쓰지 않으므로 셸이 메시지를 그대로 git에 전달합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Multiline commit messages
The Shell tool sends commands as a single string. Heredoc syntax (<<'EOF') inside $(cat ...) is fragile and fails silently — the literal $(cat <<'EOF' ... ends up as the commit message instead of the intended text.
Rule
Never use $(cat <<'EOF' ...) or $(cat <<EOF ...) for commit messages.
Use single-quoted strings with embedded newlines:
git commit -m 'short summary line
Longer body paragraph explaining why the change exists.
Additional context if needed.'
Why heredocs fail
The Shell tool passes the command as a single string argument. When you write:
git commit -m "$(cat <<'EOF'
message
EOF
)"
The shell may not parse the heredoc correctly in this context — the EOF delimiter, newlines, and nested quoting interact unpredictably. The result is the raw $(cat <<'EOF' ... text appearing as the commit message.
Single-quoted strings with literal newlines are simple, portable, and always work.
자주 묻는 질문
heredoc은 왜 실패하나요?
스킬에 따르면 그 맥락에서 셸이 제대로 해석하지 못해 명령 원문이 메시지로 들어갈 수 있습니다.
이 방식은 어디에 적용되나요?
스킬은 명령 하나를 문자열로 보내는 에이전트의 셸 도구를 위해 작성되었으므로, 그 환경에서 이 방식이 가장 안전합니다.
가장 중요한 규칙은 무엇인가요?
커밋 메시지에 명령 치환 안의 heredoc을 쓰지 말고, 줄바꿈이 있는 작은따옴표 문자열을 쓰라는 것입니다.
상세 정보
작성자의 원본 설명
Use single-quoted strings for multiline git commit messages in the Shell tool. Prevents heredoc escaping failures that produce garbled commit messages.
repo: prisma/orm
인기도
- GitHub 스타
- 48k
- 순위
- #6311
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
adr-review
48k아키텍처 결정 기록을 새로운 눈으로 검토한 뒤, 새 독자도 결정을 명확히 이해하도록 다시 씁니다.
ast-visitor-pattern
48k여러 곳에서 처리되는 유니온 타입에서, 새 변형을 추가하면 컴파일러가 빠뜨린 곳을 잡아내도록 하는 코드 패턴을 가르칩니다.
markdown-no-artificial-line-wraps
48k마크다운 문단을 한 줄로 쓰도록 에이전트를 돕습니다. 화면에서 글이 깔끔하게 줄바꿈되고 파일 변경도 깨끗하게 유지됩니다.
product-direction
48k기능 요청을 프로젝트가 문서로 정해 둔 제품 방향과 비교해 이유가 있는 판정을 내리고, 거절한 내용을 기록하도록 돕습니다.