commit-session

Commit and push only files changed during the current Codex session.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/Kevin-Mok/ai-cli-dotfiles --skill commit-session-kevin-mok
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: commit-session
Source: https://github.com/Kevin-Mok/ai-cli-dotfiles/tree/main/dot_agents/skills/commit-session
Command: npx skills add https://github.com/Kevin-Mok/ai-cli-dotfiles --skill commit-session-kevin-mok

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This skill ensures that when you request changes to be committed, only the files dirtied during the active Codex session are shipped to the git repository, preventing unintended commits of unrelated or preexisting work.

Core Features & Use Cases

  • Session-scoped shipping: commits and pushes only the files touched within the current Codex session.
  • Baseline-aware safety: preserves existing dirty work that was not touched in the current session and avoids accidental shipping.
  • Automated validation: uses a session-scoped diff and lightweight checks before staging.
  • Structured commits: creates a concise conventional-commit message and an informative body describing the changes.

Quick Start

Say "commit-session" to ship only the changes from your current Codex session.

Frequently Asked Questions about commit-session

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

FAQPage Schema
How do I commit only the changes made during a specific coding session in git?

To commit only changes from a specific session, use a session-scoped baseline to compute and stage just the dirtied files, preserving preexisting work. This approach isolates files touched in the active session and pushes them with a conventional-commit message.

What is session-scoped git commit and how does it avoid shipping unrelated work?

A session-scoped git commit captures only files modified within the current session by using a unique session identifier to track the baseline. It avoids accidental shipping of preexisting or unrelated dirty work by staging only the diff generated during that specific session.

Do I need a specific environment variable to track and commit session changes?

Yes, you need the CODEX_THREAD_ID environment variable to identify the active session. This identifier establishes the session-scoped baseline required to accurately compute the committable changes and push them to the repository.

What is the best way to commit session changes without mixing preexisting dirty work?

The best way to commit session changes without mixing preexisting work is to apply a baseline-aware diff that isolates session files. This method runs lightweight checks before staging and creates a structured conventional-commit message for the pushed changes.

Does commit-session work with any git repository?

Yes, session-scoped committing works across any git repository because it relies on the session identifier and a computed diff rather than repository-specific configurations. It automatically stages and pushes only the files touched in that active session.

Why does my git commit include files I did not modify in my current session?

Your git commit includes unmodified files because standard staging captures all dirty work. To prevent this, use a session-scoped baseline that specifically computes and isolates the committable changes dirtied only during the active session.