zmNinjaNg: Skill for Claude Code

.claude/skills/mine-history/SKILL.md

mine-history is a skill for Claude Code from ZoneMinder/zmNinjaNg. It costs 61 tokens per session (960 once invoked), scanned A, original, Apache-2.0.

A procedure for examining a repository’s Git commit history to find lessons that are missing from its agent instructions. It uses past changes, reverts, and confirmed failures as evidence.

In plain words
What is it for?
Use it for periodic instruction audits, learning reviews, and checks that project rules reflect real incidents in the codebase.
Why use it?
It helps teams avoid repeating problems that already happened but were never recorded in the project guidance.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions Claude Code; mentions AGENTS.md.

This is ZoneMinder/zmNinjaNg's own configuration. It tells Claude Code how to work on zmNinjaNg itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything zmNinjaNg configures →

Reuse

Borrowing it

Nothing to install: this file belongs to ZoneMinder/zmNinjaNg. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/ZoneMinder/zmNinjaNg/main/.claude/skills/mine-history/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/ZoneMinder/zmNinjaNg

Made for: Claude Code.

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 mine-history

README.md
[![agentmods](https://agentmods.dev/badge/skills/zoneminder/zmninjang/mine-history/github.svg)](https://agentmods.dev/skills/zoneminder/zmninjang/mine-history)
Your own site
<a href="https://agentmods.dev/skills/zoneminder/zmninjang/mine-history"><img src="https://agentmods.dev/badge/skills/zoneminder/zmninjang/mine-history/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 mine-history

Your own site · 80×15
<a href="https://agentmods.dev/skills/zoneminder/zmninjang/mine-history"><img src="https://agentmods.dev/badge/skills/zoneminder/zmninjang/mine-history.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 61 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 960 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00061 $0.00960
Opus 5 $0.00030 $0.00480
Sonnet 5 $0.00012 $0.00192
Haiku 4.5 $0.00006 $0.00096

Measured 11d ago against content hash 1acab46389af, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

mine-history 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 11d 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.

.claude/skills/mine-history/SKILL.md · 81 lines

How it starts

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

Commit History Miner

Overview

Verify that the instruction system (AGENTS.md, AGENTS.project.md, agents/project/domain-context.md, playbooks) recorded the lessons the repo actually paid for. The day-to-day self-improvement protocol captures lessons one PR at a time; this skill is the periodic sweep that catches what slipped through.

Core principle: every candidate carries commit-hash evidence. A lesson without a commit behind it is speculation, and speculation does not enter the instruction files.

When to Use

  • "mine the history for lessons", "audit the agent files against history"
  • After a busy stretch of fixes, or roughly monthly (see Cadence)
  • After adopting this instruction system in a repo with existing history

Procedure

  1. Read what exists first. AGENTS.md, AGENTS.project.md, every file in agents/project/. Only NEW lessons get reported; re-reporting a covered fact is noise that erodes trust in the sweep.
  2. Scope the window. First run: full history. Later runs: since the last mining commit (find it with git log --grep="history-mined" --oneline).
  3. Probe, in order of yield:
    • Reverts: git log --grep=revert -i --oneline. Each revert is a paid experiment; the lesson is what not to retry and what worked instead.
    • Fix chains: group fix(<scope>): commits by scope; any scope with a disproportionate count is one misunderstanding surfacing repeatedly. Ask what stable fact would have prevented the class.
    • Churn files: rank files by fix-commit touches; read the fix bodies.
    • Should-not-have-happened: fixes that an existing contract or gate should have caught. Post-gate violations mean the gate has a hole.
  4. Tooling caution. Count with git rev-list --count, never piped wc (output wrappers have silently truncated pipelines here). Write long listings to a scratch file and read that. Sanity-check any suspiciously round number.
  5. Output contract, four sections, every bullet with hashes:
    • A: ready-to-paste domain-context.md entries, grouped by its existing section headers
    • B: contract or project-rule candidates (only for recurring classes; name the Owns/Path/Never/Gate you would write, with real paths)
    • C: generic rule candidates (only stack-agnostic classes; expect zero most runs)
    • D: checked-and-already-covered list, one line each, so the next run knows what was verified
  6. Apply through the protocol. Additions land as a PR touching the instruction files: domain entries verbatim, contracts with existing gate paths, budget re-checked (agents-contracts.test.ts enforces the word budget, hash validity, and privacy rules). Commit message includes the phrase history-mined so step 2 finds it next time.

Read the full file on GitHub · 81 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. 11d ago First seen · 81 lines · 61 tokens per session scan A 1acab46389af

Subscribe to this mod's changes

mine-history is a skill published in the GitHub repository ZoneMinder/zmNinjaNg (108 stars, last pushed yesterday), licensed Apache-2.0. It adds 61 tokens to every session and 960 once invoked, about $0.0003 per session on Opus 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-30.

Related

Other skills, from other repositories