Skip to content
Back to skills

Rewrite History

ASecurity

Use when the user asks to rebuild a feature branch into a clean, reviewable git history

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 16, 2026
ai-agentsrailsgit

Security analysis

A100/100

Scanned October 16, 2026

npx -y skills add alleneubank/agent-profile --skill rewrite-history --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Rewrite History?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Rewrite History
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/alleneubank-rewrite-history/badge)](https://www.skillsdirectory.com/skills/alleneubank-rewrite-history)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: rewrite-history
description: Use when the user asks to rebuild a feature branch into a clean, reviewable git history
---

# Rewrite History

Rewrite branch history only when the user explicitly asks. That invocation
authorizes the local rewrite: resets and rebases behind the backup tag are
reversible interior work — print each command as status and proceed.

## Workflow

1. Confirm the current branch and default branch.
2. Require a clean worktree before continuing.
3. Fetch and inspect the diff against the default branch.
4. Sync with the latest default branch before rewriting.
5. Create a local backup tag before any reset or rebase.
6. Triage changes into core feature work and independent changes.
7. Rebuild commits into a narrative-quality sequence with focused messages.
8. Verify the final tree matches the intended final state.

## Guardrails

- Print each destructive command as a one-line status before running it; the
  backup tag keeps every local step reversible.
- Use a local annotated backup tag and do not push backup refs unless asked.
- Force-push (`--force-with-lease`) only your own non-deploying branch; shared
  or deploy-tracked refs stay with the user.
- If syncing with the default branch conflicts, resolve via the
  `git-rebase-sync` skill's conflict ladder; if genuinely stuck, stop with an
  honest block: what was tried, why it cannot converge, and a proposed path.
- Do not mix unrelated independent changes into the rewritten feature history.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.