git-query-commits

Query git commit trailers to surface decision context and rationale.

1|Updated Feb 8, 2026
One-click install
npx skills add https://github.com/srdjan/structured-git-commits --skill git-query-commits
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-query-commits
Source: https://github.com/srdjan/structured-git-commits/tree/main/skills/git-query-commits
Command: npx skills add https://github.com/srdjan/structured-git-commits --skill git-query-commits

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps agents and developers surface the rationale behind code changes by interpreting structured commit trailers, turning scattered notes into a traceable decision record.

Core Features & Use Cases

  • Proactive history queries by intent, scope, and session to surface decisions and rationale.
  • Decision archaeology: surface what was changed, why, and what alternatives were rejected.
  • Scoped analysis across modules or time windows to understand architectural patterns and commitments.

Quick Start

Ask the agent to parse recent commits for a module with scope and intent filters to surface decision context.

Frequently Asked Questions about git-query-commits

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

FAQPage Schema
How do I query git history to find the rationale behind past code changes?

You query git history by interpreting structured commit trailers to surface decision context and rationale. This approach turns scattered commit notes into a traceable record of what was changed, why, and what alternatives were rejected.

What are structured git commits and how do they help surface decision context?

Structured git commits use trailers like Intent, Scope, Decided-Against, and Session to provide queryable insights. They transform standard commit messages into a rich, searchable record of architectural decisions and historical context.

How do I track rejected alternatives and architectural decisions in git history?

You track rejected alternatives by querying the Decided-Against trailer within structured git commits. This surfaces decision archaeology, revealing what options were considered and dismissed during feature development or bug fixes.

Do I need specific commit message formats to query git history by scope and intent?

Yes, you need structured commits with trailers like Intent, Scope, and Session. The skill relies on these specific trailers and an optional body to enable rich, queryable insights across modules or time windows.

Can I analyze architectural patterns in a specific module using git history?

Yes, you can perform scoped analysis across modules or time windows to understand architectural patterns and commitments. The skill proactively filters structured git history to surface relevant decisions for your specific context.

What's the best way to reclaim context for a feature from past git commits?

The best way to reclaim context is to proactively query git history by intent, scope, and session. This surfaces the historical decision context and rationale needed to resume feature development or bug fixes effectively.