Langsung ke konten
Skillpedia
Pemrograman umum29k Β· #9762

contextual-commit

Fungsinya

Skill ini menulis pesan commit yang menyimpan alasan di balik perubahan kode, seperti maksud, keputusan, dan batasan. Ini untuk pengembang yang ingin pembaca di masa depan memahami mengapa kode itu ditulis.

Kapan dipakai

  • βœ“Saat Anda melakukan commit kode atau menyelesaikan tugas.
  • βœ“Saat Anda meminta agent melakukan commit perubahan.
  • βœ“Saat sebuah perubahan dibentuk oleh batasan atau trade-off yang tidak akan terlihat dari diff kode saja.

Link skill

https://github.com/yamadashy/repomix/blob/main/.agents/skills/contextual-commit/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/yamadashy/repomix/blob/main/.agents/skills/contextual-commit/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit β†’

Contoh permintaan ke AI

β€œCommit perubahan ini, dan catat mengapa kita memilih pendekatan ini serta batasan apa yang membentuknya.”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Agent mempertahankan baris subjek commit standar, lalu menambahkan baris tindakan bertipe di badan pesan yang menjelaskan maksud, keputusan, batasan, dan apa yang dipelajari.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.

Contextual Commits

You write commits that carry development reasoning in the body β€” the intent, decisions, constraints, and learnings that the diff alone cannot show.

The Problem You Solve

Standard commits preserve WHAT changed. The diff shows that too. What gets lost is WHY β€” what the user asked for, what alternatives were considered, what constraints shaped the implementation, what was learned along the way. This context evaporates when the session ends. You prevent that.

Commit Format

The subject line is a standard Conventional Commit. The body contains action lines β€” typed, scoped entries that capture reasoning.

type(scope): subject line (standard conventional commit)

action-type(scope): description of reasoning or context
action-type(scope): another entry

Subject Line

Follow Conventional Commits exactly. Nothing changes here:

  • feat(auth): implement Google OAuth provider
  • fix(payments): handle currency rounding edge case
  • refactor(notifications): extract digest scheduling logic

Action Lines

Each line in the body follows: action-type(scope): description

scope is a human-readable concept label β€” the domain area, module, or concern. Examples: auth, payment-flow, oauth-library, session-store, api-contracts. Use whatever is meaningful in this project's vocabulary. Keep scopes consistent across commits when referring to the same concept.

Action Types

Use only the types that apply. Most commits need 1-3 action lines. Never pad with noise.

intent(scope): ...

What the user wanted to achieve and why. Captures the human's voice, not your interpretation.

  • intent(auth): social login starting with Google, then GitHub and Apple
  • intent(notifications): users want batch notifications instead of per-event emails
  • intent(payment-flow): must support EUR and GBP alongside USD for enterprise clients

When to use: Most feature work, refactoring with a purpose, any change where the motivation isn't obvious from the subject line.

decision(scope): ...

What approach was chosen when alternatives existed. Brief reasoning.

  • decision(oauth-library): passport.js over auth0-sdk for multi-provider flexibility
  • decision(digest-schedule): weekly on Monday 9am, not daily β€” matches user research
  • decision(currency-handling): per-transaction currency over account-level default

When to use: When you evaluated options. Skip for obvious choices with no real alternatives.

rejected(scope): ...

What was considered and explicitly discarded, with the reason. This is the highest-value action type β€” it prevents future sessions from re-proposing the same thing.

  • rejected(oauth-library): auth0-sdk β€” locks into their session model, incompatible with redis store
  • rejected(currency-handling): account-level default β€” too limiting for marketplace sellers
  • rejected(money-library): accounting.js β€” lacks support for sub-unit (cents) arithmetic

When to use: Every time you or the user considered a meaningful alternative and chose not to pursue it. Always include the reason.

constraint(scope): ...

Hard limits, dependencies, or boundaries discovered during implementation that shaped the approach.

  • constraint(callback-routes): must follow /api/auth/callback/:provider pattern per existing convention
  • constraint(stripe-integration): currency required at PaymentIntent creation, cannot change after
  • constraint(session-store): redis 24h TTL means tokens must refresh within that window

When to use: When non-obvious limitations influenced the implementation. Things the next person working here would need to know.

learned(scope): ...

Something discovered during implementation that would save time in future sessions. API quirks, undocumented behavior, performance characteristics.

  • learned(passport-google): requires explicit offline_access scope for refresh tokens, undocumented in quickstart
  • learned(stripe-multicurrency): presentment currency and settlement currency are different concepts
  • learned(exchange-rates): Stripe handles conversion β€” do NOT store our own rates

When to use: "I wish I'd known this before I started" moments. Library gotchas, API surprises, non-obvious behaviors.

Before You Write the Commit

Determine the commit scope, then compose action lines:

  1. Check for staged changes first β€” run git diff --cached --stat.
    • If staged changes exist: these are the commit scope. Do no
Pertanyaan umum

Apakah mengubah format subjek commit?

Tidak. Baris subjek mengikuti format Conventional Commits standar.

Apa yang masuk ke badan pesan?

Baris tindakan bertipe yang menjelaskan alasan, seperti keputusan, batasan, dan pembelajaran.

Mengapa tidak cukup mendeskripsikan perubahannya saja?

Diff sudah menunjukkan apa yang berubah, sedangkan badan pesan menyimpan mengapa, yang jika tidak akan hilang.

Detail

Deskripsi asli dari pembuat

Write contextual commits that capture intent, decisions, and constraints alongside code changes. Use when committing code, finishing a task, or when the user asks to commit. Extends Conventional Commits with structured action lines in the commit body that preserve WHY code was written, not just WHAT changed.

repo: yamadashy/repomix

Popularitas

Bintang GitHub
29k
Peringkat
#9762
Lisensi
MIT
Diperbarui
1/11/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa