commitmsg

Generate git commit messages from multi-session context files.

Updated Feb 6, 2026
One-click install
npx skills add https://github.com/elfrucool/ai-context-template --skill commitmsg
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: commitmsg
Source: https://github.com/elfrucool/ai-context-template/tree/main/core/skills/commitmsg
Command: npx skills add https://github.com/elfrucool/ai-context-template --skill commitmsg

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves the problem of writing commit messages that only describe the last edit instead of the full set of related changes across multiple sessions.

Core Features & Use Cases

  • Smart scope detection: Uses git to identify uncommitted and staged changes, then determines the relevant time window.
  • Multi-session context synthesis: Scans ai-context/sessions/ for session files in the detected window and reads them to understand the broader work.
  • Policy-compliant message output: Generates a commit message that follows the subject/body/signature rules from CLAUDE.md.
  • User overrides: Supports time-based and topic-based narrowing (e.g., since yesterday, about authentication) to control the scope.

Quick Start

Ask your agent for a scope-aware commit message for your current changes by running /commitmsg and letting it read the relevant sessions automatically.

Frequently Asked Questions about commitmsg

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate git commit messages that capture the full scope of multi-session work?

To generate git commit messages covering multi-session work, the skill inspects git diff and log files, scans ai-context/sessions/ for relevant context, and outputs a copy-pastable message. It detects uncommitted and staged changes to determine the relevant time window automatically.

Can I narrow the scope of an automated commit message to specific topics or dates?

Yes, you can narrow the commit message scope using time-based and topic-based overrides. You can filter the generated message by specifying constraints like 'since yesterday' or 'about authentication' to control which session files and changes are included.

What is the best way to format commit messages for unstaged and newly created files?

The best way to format commit messages for unstaged and newly created files is by applying the subject, body, and signature rules from CLAUDE.md. The skill outputs a compliant code block complete with a Signed-off-by line for immediate pasting.

Does this commit message generator work without a dedicated session context directory?

No, this generator requires an ai-context/sessions/ directory to synthesize multi-session context. Without stored session files to scan, it cannot determine the broader scope of related work beyond the most recent git diff.