npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

gitpm-agent

v1.0.1

Published

AI agent that reads git history and writes blameless post-mortems automatically

Readme

git-postmortem

An incident autopilot that reads your git history and writes blameless post-mortems.

It is 2am. Production is down. Someone already found the bad commit and reverted it. Now everyone needs to write the post-mortem, and nobody wants to. The timeline is fuzzy, the root cause analysis is shallow ("the config was wrong"), and the action items are vague ("be more careful"). Three weeks later, the same class of incident happens again.

git-postmortem fixes this. It reads the git history that already contains all the evidence -- every commit, every diff, every revert -- and assembles a complete post-mortem document in seconds. Forensics, timeline, root cause analysis with 5 Whys driven to the systemic level, and prioritized action items with owners and success criteria. Blameless by design.

The problem it solves

Post-mortems are painful because they require reconstructing what happened from memory while the incident is still fresh and everyone is tired. But git already recorded exactly what happened: what changed, when, in what order, and what got reverted. All the forensic evidence is sitting in the commit log. This agent reads it and does the reconstruction automatically.

The hard part of a post-mortem is not the timeline -- it is driving the root cause analysis past "the config was wrong" to "we have no process for validating config changes against production baselines." This agent applies the 5 Whys methodology systematically, starting from git evidence and driving to systemic causes. Then it generates action items that are specific, measurable, and assigned to roles.

How it works

Four skills run in sequence:

  1. git-forensics examines the commit history around the incident window, identifies the causal commit using heuristics (timing, affected files, reverts), and produces a structured findings report.

  2. timeline-builder pulls all commits from the window, merges them with user-provided events (when the alert fired, when someone started investigating), and outputs a chronological timeline table.

  3. rca-generator takes the forensics findings and applies 5 Whys -- starting from the technical symptom and driving through the causal chain to the systemic root cause. It separates root cause from contributing factors.

  4. action-items maps each finding to a concrete action with priority (P0/P1/P2), owner role, success criteria, and what part of the incident it prevents.

The final output is a complete post-mortem document in markdown, ready to paste into your incident tracker.

Prerequisites

Before running this agent you need three things:

Node.js installed on your machine. Download from https://nodejs.org

gitclaw installed globally:

npm install -g gitclaw

A free Google Gemini API key. Get one at https://aistudio.google.com/apikey

Once you have your key, set it in your terminal before running the agent.

On Windows:

set GEMINI_API_KEY=your_key_here

On Mac or Linux:

export GEMINI_API_KEY=your_key_here

Quick start

# Clone the repository
git clone https://github.com/befikre/git-postmortem.git
cd git-postmortem

# Validate the agent definition
npx @open-gitagent/gitagent validate

# Set your Gemini API key (Windows)
set GEMINI_API_KEY=your_key_here

# Set your Gemini API key (Mac/Linux)
export GEMINI_API_KEY=your_key_here

# Go into the demo repo and run the agent
cd demo-repo
gitclaw --dir ../ "Production incident. The /users API was returning 500 errors for 45 minutes. It started about 30 minutes after the last deploy. Generate a full post-mortem."

Install as npm package

You can also install git-postmortem as a global CLI tool:

npm install -g gitpm-agent

Then use it inside any git repository:

cd your-project
set GEMINI_API_KEY=your_key_here
git-pm "Describe your incident here"

npm package: https://www.npmjs.com/package/gitpm-agent

Project structure git-postmortem/

├── agent.yaml # Agent manifest (gitagent spec 0.1.0) ├── SOUL.md # Agent personality and identity ├── RULES.md # Hard constraints and boundaries ├── AGENTS.md # Fallback instructions for other tools ├── README.md # This file ├── index.js # CLI entry point for npm package ├── package.json # npm package configuration ├── .gitignore ├── skills/ │ ├── git-forensics/SKILL.md # Finds the causal commit │ ├── timeline-builder/SKILL.md # Builds the incident timeline │ ├── rca-generator/SKILL.md # 5 Whys root cause analysis │ └── action-items/SKILL.md # Generates prioritized action items ├── workflows/ │ ├── postmortem.yaml # Full pipeline definition │ └── postmortem-template.md # Blank post-mortem template ├── memory/ │ └── MEMORY.md # Cross-incident pattern tracking ├── config/ │ └── default.yaml # Default configuration └── demo-repo/ # Example repo with fake incident ├── README.md ├── src/ │ ├── server.js │ ├── db.js │ ├── cache.js │ └── middleware.js └── config/ └── database.yaml

Skills

| Skill | Description | |-------|-------------| | git-forensics | Finds the causal commit by analyzing git log, diff, and blame in the incident window | | timeline-builder | Reconstructs a chronological timeline from git history and user-provided events | | rca-generator | Applies 5 Whys root cause analysis from forensics findings to systemic causes | | action-items | Generates prioritized P0/P1/P2 action items with owners and success criteria |

Demo scenario

The demo-repo folder contains a realistic production incident baked into the git history. A performance commit silently reduced the database connection pool timeout from 30 seconds to 3 seconds and dropped max connections from 20 to 5. It looked like an optimization. It caused 500 errors for 45 minutes before the team found and reverted it.

Run the agent against it and watch it find the bad commit, build the timeline, trace the root cause through 5 Whys, and generate the action items automatically.

Built with

Built on the gitagent open standard (https://github.com/open-gitagent/gitagent) and runs with gitclaw. Uses Google Gemini 1.5 Pro as the AI model.