Agent skill

Mine History

by ZoneMinder in ZoneMinder/zmNinjaNg

A skill your agent uses when asked to mine the commit history for lessons the agent instruction files have not captured, to audit whether domain-context and contracts reflect what actually broke, or…

Apache-2.0Auto-check passedAgent Workflows

Install Mine History

skills CLI
$ npx skills add ZoneMinder/zmNinjaNg --skill mine-history -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ZoneMinder/zmNinjaNg mine-history --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ZoneMinder/zmNinjaNg.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/mine-history .claude/skills/mine-history && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
mine-history
GitHub stars
112
Token cost
~1k tokens
SKILL.md length
526 words
Files
1
Skills in repo
3
Repo updated
First seen
Licence
Apache-2.0

At a glance

A skill your agent uses when asked to mine the commit history for lessons the agent instruction files have not captured, to audit whether domain-context and contracts reflect what actually broke, or…

  • Works in 6 steps: Read what exists first. AGENTS.md,… → Scope the window. First run: full… → Probe, in order of yield → …
  • Asked to mine the commit history for lessons the agent instruction files have not captured
  • SKILL.md covers Overview, When to Use, Procedure and Judging candidates, plus 1 more section
  • Calls git and claude

What it does

Mine History is an agent skill from ZoneMinder/zmNinjaNg. Use when asked to mine the commit history for lessons the agent instruction files have not captured, to audit whether domain-context and contracts reflect what actually broke, or to run the periodic learnings review. Triggers on "mine history", "audit learnings", "check domain context against history".

Its SKILL.md is about 1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Agent Workflows, covering Agent instruction files. It works with React and Git. The repository describes itself as: ZoneMinder client for iOS, Android, Windows, macOS, Linux and web. Live camera view, event review, montage, timeline, push notifications. Rewrite of zmNinja. The licence is Apache-2.0.

When your agent uses it

  • Asked to mine the commit history for lessons the agent instruction files have not captured
  • Audit whether domain-context and contracts reflect what actually broke
  • Run the periodic learnings review
  • Audit learnings

Example prompts

  • “mine history”
  • “audit learnings”
  • “check domain context against history”
  • “/mine-history”

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Read what exists first. AGENTS.md, AGENTS.project.md, every file in
  2. Scope the window. First run: full history. Later runs: since the
  3. Probe, in order of yield
  4. Tooling caution. Count with git rev-list --count, never piped
  5. Output contract, four sections, every bullet with hashes
  6. Apply through the protocol. Additions land as a PR touching the

What it can do on your machine

Read from SKILL.md and the folder at commit 00b3bcd. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • claude

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Mine History loads about 1k tokens when it runs. Until then it costs about 79 tokens; SKILL.md has 526 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~79
When it runs · the whole SKILL.md, loaded when a task matches
~1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from ZoneMinder/zmNinjaNg at commit 00b3bcd, republished under its Apache-2.0 licence (© ZoneMinder). 526 words, ~1,039 tokens.

Download SKILL.mdSave it as .claude/skills/mine-history/SKILL.md (or your agent's skills folder).
name
mine-history
description
Use when asked to mine the commit history for lessons the agent instruction files have not captured, to audit whether domain-context and contracts reflect what actually broke, or to run the periodic learnings review. Triggers on "mine history", "audit learnings", "check domain context against history".

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.
Show full SKILL.md (144 more words)Show less

Judging candidates

SignalVerdict
Reverted approach with a working alternativeDomain entry: what failed, what works, do-not-retry
3+ fixes, one underlying misunderstandingDomain entry stating the stable fact
Recurring class across many commits (dozens)Contract candidate, not just an entry
Security-shaped fix (secrets, tokens, storage)Contract Never-line candidate
One-off typo/logic fix, no reusable factSkip; not every fix is a lesson
Fix predates the rule that now covers itAlready handled; list in section D

Cadence (optional, not mandated)

About once a month is enough; the per-PR protocol does the daily work. To schedule instead of remembering: any scheduler that can run the CLI works (claude -p "/mine-history" from cron or a calendar automation), or create a Claude Code routine with the /schedule command ("run /mine-history on the first of each month"). Running it manually after a heavy fix period is just as valid.

© ZoneMinder, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/mine-history of ZoneMinder/zmNinjaNg.

Open the folder on GitHubat commit 00b3bcd

Compare with similar skills

Mine History next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Mine History compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Mine History this skillZoneMinder/zmNinjaNg112—~1kAutomated safety check: PassApache-2.0
Neat-Freak Knowledge CloseoutKKKKhazix/khazix-skills21k—~1.9kAutomated safety check: PassMIT
Harness Evolution Feedback Looprevfactory/harness9.1k—~855Automated safety check: PassApache-2.0
Sync Public DocsCaldis/react-zmage945—~3.3kAutomated safety check: PassMIT
Setup Matt Pocock Skillsywwynm/EverythingDone1448 repos~1.7kAutomated safety check: PassGPL-3.0
Writing Docsc15t/c15t1.9k—~872Automated safety check: PassApache-2.0

Similar skills

  • Neat-Freak Knowledge Closeout

    KKKKhazix/khazix-skills

    Brings project docs, agent rule files, authorized memory and leftover workspace files back in line with what the code and runtime actually do at the end of a work session.

    21k GitHub stars~1.9k tokensUpdated 9 days ago
    Agent WorkflowsAuto-check passed
  • Collects feedback on how an agent harness performed, generalizes it, and updates the harness agents, skills and orchestrator along with a change-history table.

    9.1k GitHub stars~855 tokensUpdated 13 days ago
    Agent WorkflowsAuto-check passed
  • Sync Public Docs

    Caldis/react-zmage

    A skill your agent uses when modifying public API in packages/core (types/global.ts, types/default.ts, index.ts, or package.json exports field), adding/renaming/removing props, changing default…

    945 GitHub stars~3.3k tokensUpdated 4 mo ago
    Agent WorkflowsAuto-check passed
  • Setup Matt Pocock Skills

    ywwynm/EverythingDone

    Sets up an Agent skills block in AGENTS.md/CLAUDE.md and docs/agents/ so the engineering skills know this repo's issue tracker (GitHub or local markdown), triage label vocabulary, and domain doc…

    144 GitHub starsUsed in 8 repos~1.7k tokens
    Agent WorkflowsAuto-check passed
  • Writing Docs

    c15t/c15t

    Author or edit c15t documentation in docs//.mdx — the source for both the c15t.com site and the docs bundled into published packages.

    1.9k GitHub stars~872 tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Official

    Shared collaboration rules for a team of squad agents covering worktree awareness, writing decisions to an inbox, cross-agent requests and reviewer lockout.

    1.4k GitHub starsUsed in 4 repos~500 tokens
    Agent WorkflowsAuto-check passed

More from ZoneMinder/zmNinjaNg

  • Add Language

    ZoneMinder/zmNinjaNg

    A skill your agent uses when adding a new interface language (locale) to the app, or when asked to translate the UI into another language.

    112 GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Fable Review

    ZoneMinder/zmNinjaNg

    A skill your agent uses when asked for a full codebase review, health check, quality audit, or scorecard of this repo, or for a "fable review" / multi-pillar review whose output another agent will…

    112 GitHub stars~4.2k tokensUpdated today
    Auto-check passed

Works with

Questions about Mine History

What does Mine History do?

A skill your agent uses when asked to mine the commit history for lessons the agent instruction files have not captured, to audit whether domain-context and contracts reflect what actually broke, or…. Mine History is an agent skill from ZoneMinder/zmNinjaNg. Use when asked to mine the commit history for lessons the agent instruction files have not captured, to audit whether domain-context and contracts reflect what actually broke, or to run the periodic learnings review.

When should I use Mine History?

Mine History fits situations like: asked to mine the commit history for lessons the agent instruction files have not captured; audit whether domain-context and contracts reflect what actually broke; run the periodic learnings review; audit learnings.

How do I install Mine History in Claude Code?

Run `npx skills add ZoneMinder/zmNinjaNg --skill mine-history -a claude-code`. Or copy the skill folder (.claude/skills/mine-history in ZoneMinder/zmNinjaNg) into .claude/skills/mine-history in your project. Claude Code loads it when a task matches its description.

How do I install Mine History in Codex?

Run `npx skills add ZoneMinder/zmNinjaNg --skill mine-history -a codex`. Or copy the skill folder (.claude/skills/mine-history in ZoneMinder/zmNinjaNg) into .agents/skills/mine-history in your project. Codex loads it when a task matches its description.

Can I use Mine History in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ZoneMinder/zmNinjaNg --skill mine-history -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/mine-history, .gemini/skills/mine-history, .github/skills/mine-history and .opencode/skills/mine-history in your project.

What does Mine History need to run?

Going by SKILL.md and its folder, Mine History needs the command-line tools its instructions call (git and claude).

Does Mine History access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Mine History safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Mine History use?

Mine History is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Mine History use?

About 1k tokens (SKILL.md is roughly 4.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Mine History?

Skills that share tags, products or a category with Mine History: Neat-Freak Knowledge Closeout (KKKKhazix/khazix-skills, 21k stars), Harness Evolution Feedback Loop (revfactory/harness, 9.1k stars), Sync Public Docs (Caldis/react-zmage, 945 stars) and Setup Matt Pocock Skills (ywwynm/EverythingDone, 144 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Mine History?

ZoneMinder (a GitHub organization) maintains it in ZoneMinder/zmNinjaNg, which has 112 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on October 10, 2026.

Source: ZoneMinder/zmNinjaNg on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.