git-phase-restore

git-phase-restore is a skill for Claude Code from mahmoud20138/Tradecraft. It costs 165 tokens per session (3,019 once invoked), scanned A, original, MIT.

A skill for finding and restoring earlier stages of a Git project. Git is a version-control system that records commits, branches, tags, and the changes made over time.

In plain words
What is it for?
Exploring project history, comparing development stages, finding when a regression began, and restoring a selected phase such as a release or pre-feature state.
Why use it?
It helps locate the point when a feature worked or a bug appeared, without relying on manually saved snapshots.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the tradecraft plugin — 58 skills shipped together

Good fit Exploring project history, comparing development stages, finding when a regression began, and restoring a selected phase such as a release or pre-feature state.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mahmoud20138/tradecraft/git-phase-restore
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 mahmoud20138/Tradecraft --skill git-phase-restore
Clone the repo
git clone --depth 1 https://github.com/mahmoud20138/Tradecraft

Made for: Claude Code.

Or install tradecraft, the plugin that ships this one along with the rest of its 58 skills.

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 git-phase-restore

README.md
[![agentmods](https://agentmods.dev/badge/skills/mahmoud20138/tradecraft/git-phase-restore/github.svg)](https://agentmods.dev/skills/mahmoud20138/tradecraft/git-phase-restore)
Your own site
<a href="https://agentmods.dev/skills/mahmoud20138/tradecraft/git-phase-restore"><img src="https://agentmods.dev/badge/skills/mahmoud20138/tradecraft/git-phase-restore/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 git-phase-restore

Your own site · 80×15
<a href="https://agentmods.dev/skills/mahmoud20138/tradecraft/git-phase-restore"><img src="https://agentmods.dev/badge/skills/mahmoud20138/tradecraft/git-phase-restore.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 165 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,019 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.00165 $0.03019
Opus 5 $0.00082 $0.01510
Sonnet 5 $0.00033 $0.00604
Haiku 4.5 $0.00016 $0.00302

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

Security

Grade A, and why

git-phase-restore 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 9d 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.

plugins/tradecraft/skills/git-phase-restore/SKILL.md · 368 lines

How it starts

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

Git Phase Restore — Autonomous Development Phase Recovery

Leverage Git's full history to identify development phases and restore any project state automatically. No manual snapshots needed — Git already has everything.


Core Philosophy

Every Git repository already contains a complete record of every development phase. This skill teaches Claude to read that record intelligently and act on it:

  • Commits with conventional messages → semantic phase boundaries
  • Tags → explicit version milestones
  • Branches → parallel development tracks
  • Timestamps → temporal navigation
  • Diffs → understanding what each phase changed

Instead of maintaining separate snapshot systems, this skill mines Git itself as the single source of truth.


When to Trigger

Always trigger this skill when the user wants to:

Intent Example phrases
Restore a phase "go back to when auth worked", "restore to v1.2", "undo last feature"
Explore history "show project phases", "what was the state on March 1st", "git timeline"
Find a regression "when did this bug appear", "find when X broke", "bisect this issue"
Compare phases "diff between auth and current", "what changed since last week"
Inspect a past state "show me the code before the refactor", "what did file X look like in phase Y"
Undo / rollback "roll back", "undo", "revert", "go back" (in any Git project context)

Phase Detection Strategy

Development phases are identified by analyzing Git history through multiple lenses. Run scripts/detect_phases.sh in the project root to get a structured phase map, or follow the manual steps below.

1. Tag-Based Phases (highest confidence)

Tags are explicit developer-placed milestones. Always check these first.

# List all tags with dates and messages
git tag -l --sort=-creatordate --format='%(creatordate:short) %(refname:short) %(subject)'

2. Semantic Commit Phases (high confidence)

Parse conventional commit messages to detect phase boundaries. A new phase starts when:

Read the full file on GitHub · 368 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. 9d ago First seen · 368 lines · 165 tokens per session scan A 93e99ca4555d

Subscribe to this mod's changes

git-phase-restore is a skill published in the GitHub repository mahmoud20138/Tradecraft (15 stars, last pushed 4mo ago), licensed MIT. It adds 165 tokens to every session and 3,019 once invoked, about $0.0008 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

resolve-pr-comments

Evaluate, fix, answer, and reply to GitHub pull request review comments and conversation comments. Handles both change requests (fix or skip) and reviewer questions (explain using reasoning recalled from past Claude Code transcripts). Use when the user asks to "resolve PR comments", "fix review comments", "address PR…

tobihagemann/turbo · 95 tokens

create-pr

Create a GitHub pull request with a drafted title and description. Use when the user asks to "create a PR", "create a pull request", "open a PR", or "submit a PR".

tobihagemann/turbo · 44 tokens

changelog-rules

Shared changelog conventions and formatting rules referenced by /create-changelog and /update-changelog. Not typically invoked directly.

tobihagemann/turbo · 29 tokens

update-pr

Update an existing GitHub pull request's title and description to reflect the current state of the branch. Use when the user asks to "update the PR", "update PR description", "update PR title", "refresh PR description", or "sync PR with changes".

tobihagemann/turbo · 56 tokens

fetch-pr-comments

Fetch and summarize review feedback and conversation from a GitHub PR (unresolved review threads, review bodies, and PR conversation comments) without making changes. Use when the user asks to "fetch PR comments", "show PR comments", "check PR for unresolved comments", "list review comments", "what comments are on the…

tobihagemann/turbo · 83 tokens

reply-to-pr-threads

Draft, confirm, and post replies to GitHub PR review threads. Handles per-category reply formatting, re-fetches thread resolution state so auto-resolved threads are skipped, and posts via GraphQL. Use when the user asks to "reply to PR threads", "post PR thread replies", or "draft PR reply messages".

tobihagemann/turbo · 71 tokens