check-git-log-before-refix

check-git-log-before-refix is a skill for Claude Code, Codex from chen3feng/agent-skills. It costs 37 tokens per session (1,345 once invoked), scanned A, original, Apache-2.0.

A troubleshooting check that searches recent Git history before changing code for a recurring error.

In plain words
What is it for?
Use it when an error looks familiar, a previous fix seems missing, or several people or coding agents may have edited the repository.
Why use it?
It helps prevent duplicating a fix that already exists on another branch or commit, especially when the current checkout is out of date.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when an error looks familiar, a previous fix seems missing, or several people or coding agents may have edited the repository.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/chen3feng/agent-skills/check-git-log-before-refix
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add chen3feng/agent-skills --skill check-git-log-before-refix
Clone the repo
git clone --depth 1 https://github.com/chen3feng/agent-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for check-git-log-before-refix

README.md
[![agentmods](https://agentmods.dev/badge/skills/chen3feng/agent-skills/check-git-log-before-refix/github.svg)](https://agentmods.dev/skills/chen3feng/agent-skills/check-git-log-before-refix)
Your own site
<a href="https://agentmods.dev/skills/chen3feng/agent-skills/check-git-log-before-refix"><img src="https://agentmods.dev/badge/skills/chen3feng/agent-skills/check-git-log-before-refix/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for check-git-log-before-refix

Your own site · 80×15
<a href="https://agentmods.dev/skills/chen3feng/agent-skills/check-git-log-before-refix"><img src="https://agentmods.dev/badge/skills/chen3feng/agent-skills/check-git-log-before-refix.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,345 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00037 $0.01345
Opus 5.5 $0.00015 $0.00538
Sonnet 5.5 $0.00007 $0.00269
Haiku 4.5 $0.00004 $0.00135

Measured 3mo ago against content hash b1c33b3160ea, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

check-git-log-before-refix scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/check-git-log-before-refix/SKILL.md · 154 lines

How it starts

The opening of the file, as written. The whole thing — 154 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Check git log before re-fixing

When to use

The user reports an error that looks identical to something you (or another agent) recently fixed. Typical signals:

  • The same error message you just worked on yesterday.
  • The user says "it still fails" after you thought you landed a fix.
  • You're on a feature branch that was cut before the fix merged.
  • A teammate / another agent has been editing the same repo in parallel.

Before you write a single new line of code, stop and check whether the fix is already on the default branch and you just aren't looking at it.

Problem

Agents — and humans in a hurry — default to "I see an error, I write a patch." When the fix already exists on main/master but you're on a stale branch or a dirty working tree, that default makes things worse:

  • You re-invent a worse version of the existing fix.
  • You layer a wrong patch on top of a right one that's hidden by an uncommitted edit or an un-pulled commit.
  • You open a PR that either duplicates an already-merged PR or, more embarrassingly, conflicts with it.

The concrete failure mode that motivated this skill:

  1. PR-A lands a correct fix for error E on main.
  2. An agent is still checked out on a feature branch cut before PR-A.
  3. User re-runs the scenario, still sees E (because the feature branch predates the fix).
  4. Agent "diagnoses" E again, invents a new — and wrong — patch, and sometimes even leaves it as uncommitted changes that silently revert the real fix on the next merge.

Solution

Before modifying anything, run this short check:

  1. Check working tree and branch first.

    git status
    git branch --show-current
    git log --oneline -5
    

    If there are uncommitted changes in the file that "still has the bug", that is a huge red flag — previous agent output may have reverted a real fix locally.

  2. Grep the history for the symptom. Use a keyword from the error message or the affected file:

    git log --oneline --all --grep="AutomationCommandlet"
    git log --oneline --all -- path/to/affected_file
    

Read the full file on GitHub · 154 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3mo ago First seen · 154 lines · 37 tokens per session scan A b1c33b3160ea

Subscribe to this mod's changes

check-git-log-before-refix is a skill published in the GitHub repository chen3feng/agent-skills (5 stars, last pushed 6mo ago), licensed Apache-2.0. It adds 37 tokens to every session and 1,345 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

check-git-log-before-refix compared with skills from other repositories

check-git-log-before-refix next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
check-git-log-before-refixchen3feng/agent-skillsSkill56mo agoApache-2.0A37Claude Code, Codex
autopsyRune-kit/runeSkill962d agoMITA68Claude Code
fix-issueSebastianLuser/claude-code-arcaneSkill3yesterdaynoneA32Claude Code
debuggingtslateman/duetSkill12mo agoMITA48Claude Code
performancetslateman/duetSkill12mo agoMITA50Claude Code
sweeptslateman/duetSkill12mo agoMITA17Claude Code
resolve-handoffomnigent-ai/omnigentSkill12ktodayApache-2.0A23Claude Code, Codex