본문으로 건너뛰기
Skillpedia
일반 코딩48k · #6311

multiline-commit-messages

하는 일

셸이 안정적으로 전달하는 형식으로 여러 줄 커밋 메시지를 쓰는 방법을 에이전트에 알려 줍니다. 커밋을 만드는 에이전트의 메시지가 가끔 깨질 때 쓰면 좋은 스킬입니다.

사용하는 경우

  • ✓에이전트가 한 줄보다 긴 메시지로 git 커밋을 만들 때.
  • ✓커밋 메시지에 셸 텍스트가 섞여 나왔을 때.
  • ✓요약 줄과 본문 문단이 있는 커밋 메시지를 원하는 경우.

스킬 링크

https://github.com/prisma/orm/blob/main/skills-contrib/multiline-commit-messages/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/prisma/orm/blob/main/skills-contrib/multiline-commit-messages/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

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.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬