agentleFS
trappletrapple/skills/commit/SKILL.md

commit

Skill0 starsChanged 4 months agoMITView on GitHub

Analyze conversation history to extract "Why" for commit message, fallback to "How" if no Why found. Use when user says "commit", "コミット", or "コミットして

  • Reads credentials

188 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use validate-plan, act-on-feedback and 10 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.
  • shawn-dumasSkill

    validate-plan

    Validate an orchestration plan after pre-flight certification. Runs adversarial review, deep review (verify prompt data against codebase), and PoC gate for risky approaches. Auto-invoked by orchestrate-* skills at Step 8.

    Also in 5 projects that use this

  • MicrosoftSkill

    act-on-feedback

    Act on user feedback attached to the current session. Use when the user submits feedback on the session's changes via the Submit Feedback button.

    Also in 3 projects that use this

  • decocmsSkill

    add-mcp-tools

    Guide for adding new MCP tools with consistent patterns for schemas, tool definitions, registry updates, and Better Auth integration

    Also in 3 projects that use this

  • MicrosoftSkill

    generate-run-commands

    Generate or modify run commands for the current session. Use when the user wants to set up or update run commands that appear in the session's Run button.

    Also in 3 projects that use this

  • mitsuhikoSkill

    oebb-scotty

    Austrian rail travel planner (ÖBB Scotty). Use when planning train journeys in Austria, checking departures/arrivals at stations, or looking for service disruptions. Covers ÖBB trains, S-Bahn, regional trains, and connections to neighboring countries.

    Also in 3 projects that use this

  • mitsuhikoSkill

    pi-share

    Load and parse session transcripts from shittycodingagent.ai/buildwithpi.ai/buildwithpi.com/pi.dev (pi-share) URLs. Fetches gists, decodes embedded session data, and extracts conversation history.

    Also in 3 projects that use this

The file

Files
SKILL.md

commit - 会話履歴ベースのコミット

会話履歴からWhyを探し出し、意味のあるコミットメッセージを生成してコミットする。

手順

  1. git status と git diff を実行し、変更内容を把握する
  2. git log --oneline -5 で直近のコミットスタイルを確認する
  3. 会話履歴を分析して、Whyを抽出する

Why の抽出と分割

Whyが複数ある場合はコミットを分ける。

  • 会話履歴を遡り、ユーザーの目的・動機・課題をすべて列挙する
  • 異なるWhyに対応する変更は、別々のコミットに分割する
  • 各コミットには、そのWhyに関連するファイルだけをステージする
  • 例: 「バグ修正」と「新機能追加」が混在 → 2つのコミットに分ける

Whyが1つ、またはWhyが見つからない場合は1コミット。

メッセージ組み立てルール

優先度1: Why(なぜこの変更をしたか)

  • ユーザーが最初に伝えた目的・動機・課題を探す
  • 例: 「バグで○○が動かない」→ fix: ○○が動作しない問題を修正
  • 例: 「パフォーマンスが遅い」→ perf: ○○のパフォーマンスを改善

優先度2: How(何をどう変えたか)

  • Whyが見つからない場合のフォールバック
  • 変更内容を簡潔にまとめる
  • 例: refactor: ○○のロジックをシンプルに書き換え

WhyとHowの判定ガイド

メッセージがHowになっていないか、以下の例で確認する。

NG(How: 手段を述べている)OK(Why: 目的・動機を述べている)
コメント追加各プロパティの意味を明確化
関数名変更命名規則を統一
ファイル分割責務ごとに管理しやすくする
型定義を追加型安全性を向上
テストを追加リグレッションを防止

判定のコツ: 「何をしたか」ではなく「なぜそうしたか」が伝わるかを自問する。

メッセージフォーマット

  • 1行目: 簡潔な要約(日本語OK、70文字以内)
  • Conventional Commits形式のprefixを付ける(feat, fix, refactor, chore, docs, perf, test)
  • Whyが抽出できた場合: 3行目にWhyを記載する(2行目は空行)
  • Whyが見つからない場合: 1行目のみでOK
feat: ○○機能を追加

ユーザーから○○できないという要望があったため
  1. コミット計画をユーザーに提示し、確認を取る
    • 分割する場合: 各コミットの対象ファイルとメッセージを一覧表示
    • 単一の場合: メッセージのみ表示
  2. 承認されたら、各コミットを順番に実行する
    • 対象ファイルを git add する(.env等の機密ファイルは除外)
    • git commit を実行する(HEREDOCでメッセージを渡す)
  3. コミット結果を報告する

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.