agentleFS
autsachiautsachi/codex-skills/skills/commit-message/SKILL.md

commit-message

Skill0 starsChanged 3 months agoMITView on GitHub

เขียน commit message คุณภาพดีจาก file diff โดยใช้รูปแบบ Conventional Commits และใช้ภาษาไทยเป็นหลัก ยกเว้นคำศัพท์เฉพาะหรือคำที่ไม่ควรแปลให้ทับศัพท์ เช่น git diff, staged changes, scope, breaking change. ใช้เมื่อผู้ใช้ขอ commit message, commit title, commit body, Conventional Commit หรือต้องการให้ Codex อ่าน git diff/staged changes แล้วสรุปเป็น commit.

62 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use pr-description, changelog and 9 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • MicrosoftSkill

    pr-description

    Draft Nacelle PR titles, pull request descriptions, commit titles, commit descriptions, and squash commit messages. Use when asked for PR or commit wording, a branch summary, or a PR description that can be used in a commit. Omit validation sections from commit bodies and remove filler.

    Also in 9 projects that use this

  • HashiCorpSkill

    changelog

    Add a `.changelog/<PR_NUMBER>.txt` entry for a GitHub Pull Request, commit, and push.

    Also in 3 projects that use this

  • GitHubSkill

    refactor

    Surgical code refactoring to improve maintainability without changing behavior. Covers extracting functions, renaming variables, breaking down god functions, improving type safety, eliminating code smells, and applying design patterns. Less drastic than repo-rebuilder; use for gradual improvements.

    Also in 3 projects that use this

  • GoogleSkill

    code-review

    Adversarial systems, concurrency, memory-model, and architecture code review protocol. Use this skill whenever asked to review code, PRs, diffs, or branches in Filament.

    Also in 7 projects that use this

  • GoogleSkill

    grilling

    Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases.

    Also in 3 projects that use this

  • OpenAISkill

    brainstorming

    You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

    Also in 3 projects that use this

  • +2 more from google

The file

Files
SKILL.md

Commit Message

หลักการใช้ภาษา

  • ใช้ภาษาไทยเป็นหลักในการอธิบาย เหตุผล ตัวเลือก และคำแนะนำ
  • คงคำศัพท์เฉพาะเป็นภาษาอังกฤษหรือทับศัพท์เมื่อแปลแล้วเสียความหมาย เช่น git diff, staged, unstaged, commit, scope, type, subject, body, footer, Conventional Commits, BREAKING CHANGE
  • โดย default ให้เขียน commit message เป็นภาษาไทย แต่ยังคง type(scope): เป็นภาษาอังกฤษตามรูปแบบ Conventional Commits
  • คงคำศัพท์เฉพาะหรือคำที่แปลแล้วแปลกเป็นภาษาอังกฤษ/ทับศัพท์ใน subject และ body เช่น WebAuthn, passkey, TanStack Query, PostgreSQL, rate limiter
  • ถ้าผู้ใช้ขอ commit message ภาษาอังกฤษ ให้เขียน subject/body เป็นภาษาอังกฤษได้

Workflow

  1. อ่าน diff ก่อนเขียน commit message
    • ใช้ git diff --staged เป็นหลักเมื่อผู้ใช้กำลังเตรียม commit
    • ใช้ git diff เมื่อไม่มี staged changes หรือผู้ใช้ถามถึง working tree
    • ถ้าทั้ง staged และ unstaged changes มีผลต่อคำตอบ ให้อ่านทั้งคู่แล้วบอกให้ชัดว่า message ครอบคลุมส่วนไหน
  2. หา intent หลักของการเปลี่ยนแปลง ไม่ต้องไล่สรุปทุกไฟล์
  3. เลือก Conventional Commit type:
    • feat: เพิ่ม feature หรือความสามารถที่ผู้ใช้เห็นได้
    • fix: แก้ bug หรือพฤติกรรมที่ผิด
    • docs: เปลี่ยนเฉพาะ documentation
    • style: เปลี่ยน formatting เท่านั้น ไม่กระทบ behavior
    • refactor: เปลี่ยนโครงสร้าง code โดยไม่เพิ่ม feature และไม่แก้ bug
    • perf: ปรับ performance
    • test: เพิ่มหรือแก้ tests/test infrastructure
    • build: build system, dependencies, packaging
    • ci: CI configuration หรือ automation
    • chore: งาน maintenance ที่ไม่เข้ากลุ่มอื่น
    • revert: revert commit ก่อนหน้า
  4. ใส่ scope เฉพาะเมื่อเห็นชัดและช่วยให้ message อ่านง่าย โดยใช้ lowercase kebab-case หรือ convention ของ project
  5. เขียน subject ให้กระชับ อ่านเหมือนคำสั่งหรือผลลัพธ์ของ change และใช้ตัวพิมพ์เล็กหลัง type เมื่อเป็นภาษาอังกฤษ
  6. ให้ subject กระชับ โดยทั่วไปประมาณ 50-72 ตัวอักษร
  7. ใส่ body เฉพาะเมื่อ diff มีหลายประเด็นสำคัญ มี motivation ที่ไม่ obvious หรือมี behavior ที่ควรอธิบาย
  8. ใส่ BREAKING CHANGE: ใน footer เฉพาะเมื่อ diff แสดงชัดว่ามี breaking API, schema, behavior หรือ compatibility change

รูปแบบคำตอบ

สำหรับคำขอทั่วไป ให้ตอบเป็น commit message ที่แนะนำ 1 อันใน fenced text block:

feat(auth): เพิ่มการเข้าสู่ระบบด้วย passkey

ถ้า body มีประโยชน์ ให้เว้นบรรทัดแล้วใส่ body ต่อ:

feat(auth): เพิ่มการเข้าสู่ระบบด้วย passkey

เพิ่มขั้นตอนลงทะเบียนและเข้าสู่ระบบด้วย WebAuthn.
รองรับ fallback ไปยังรหัสผ่านเดิมเมื่ออุปกรณ์ไม่รองรับ passkey.

ถ้าผู้ใช้ขอตัวเลือก ให้เสนอ 2-3 แบบ พร้อมอธิบายสั้น ๆ เป็นภาษาไทยว่าแต่ละแบบเหมาะกับกรณีไหน

Guardrails

  • อย่าเดาการเปลี่ยนแปลงที่ไม่อยู่ใน diff
  • อย่าเน้น generated files, formatting หรือชื่อไฟล์ เว้นแต่เป็นสาระหลักของ change
  • เลือก commit message เดียวสำหรับ intent เดียวที่ชัดเจน ถ้า diff มีหลาย intent ที่ไม่เกี่ยวกัน ให้แนะนำ split commit และให้ message แยกกัน
  • ถ้าไม่มี diff ให้ขอ diff จากผู้ใช้ หรือรัน git diff commands เมื่อเข้าถึง local repo ได้
  • ถ้าผู้ใช้ขอภาษาไทย ให้ตอบคำอธิบายเป็นภาษาไทย และใช้คำศัพท์เฉพาะแบบทับศัพท์ตามความเหมาะสม

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.