capture-code-version

Record the git HEAD commit and dirty-state snapshot into run_metadata.json.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/j-mckerracher/agent-research --skill capture-code-version
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: capture-code-version
Source: https://github.com/j-mckerracher/agent-research/tree/main/skills-main/capture-code-version
Command: npx skills add https://github.com/j-mckerracher/agent-research --skill capture-code-version

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Pin runs to the exact git commit hash for reproducibility across pipeline executions.

Core Features & Use Cases

  • Pin a run to a specific commit by recording HEAD and repository state at startup.
  • Capture and store the commit hash and dirty-state snapshot as baseline artifacts for validation.
  • Use during production runs or experiments to ensure results can be replayed against the same code version.

Quick Start

Pin the pipeline run to the exact git commit by capturing the HEAD and status at startup.

Frequently Asked Questions about capture-code-version

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

FAQPage Schema
How do I pin a pipeline run to a specific git commit for reproducibility?

To pin a pipeline run for reproducibility, capture the git HEAD and repository status at startup. This records the exact commit hash and dirty-state snapshot into validation artifacts and run_metadata.json to lock the code version.

Why do I need to record the git commit hash before running pipeline experiments?

Recording the git commit hash before pipeline experiments ensures reproducibility by locking the exact code version. It captures the HEAD commit and dirty-state snapshot so validation artifacts can verify results against the same code.

What's the best way to capture dirty-state repository diffs for validation artifacts?

The best way to capture dirty-state diffs for validation artifacts is to record the git status and diffs at run startup. This locks the repository state and writes it into run_metadata.json for later validation checks.

Can I use this approach to trace production runs back to their exact code version?

Yes, you can trace production runs to their exact code version by capturing the git HEAD and status at startup. This locks the commit hash and dirty-state snapshot into validation artifacts for traceability.

Does capturing git run metadata work without any external dependencies?

Capturing git run metadata works without external dependencies. The skill uses standard git commands to record HEAD, status, and diffs, writing them directly into validation artifacts and run_metadata.json.

When do I need to snapshot git status and diffs for run traceability?

You need to snapshot git status and diffs for run traceability during production runs and experiments. Capturing the HEAD commit and dirty-state at startup ensures validation artifacts can replay results against the locked code version.