Skip to content

gadost/regitize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Regitize

CI npm version Node.js 18+ Agent Skills License: MIT

Portable AI-agent skills for auditing and improving Git history — installed through one dependency-free npx CLI.

Regitize gives Codex, Claude Code, and Gemini CLI repeatable workflows for rewriting vague commit messages, redistributing dates, normalizing authors, scanning historical blobs, planning semantic squashes, and generating release notes.

Caution

Some Regitize skills rewrite Git history. They always preview the plan, require explicit approval, create a local backup ref, and never push automatically. Coordinate with collaborators before rewriting shared history.

Quick start

Requirements:

  • Node.js 18 or newer;
  • Git 2.30 or newer;
  • an Agent Skills-compatible coding agent.

Launch the interactive installer:

npx regitize

Choose:

  1. the agent host;
  2. one or more skills;
  3. project or global installation.

Example non-interactive installation:

npx regitize \
  --agent codex,claude \
  --scope project \
  --skills regitize,regitize-sensitive-scan \
  --yes

After installation, invoke a skill by name in your agent, for example:

Use $regitize to review this branch and improve its commit messages.

Claude Code also exposes installed skills as slash commands such as /regitize.

Supported agents

Host Project installation Global installation
OpenAI Codex .agents/skills/ ~/.agents/skills/
Claude Code .claude/skills/ ~/.claude/skills/
Gemini CLI .gemini/skills/ ~/.gemini/skills/

Every installed skill is self-contained: SKILL.md, deterministic scripts, references, and optional agent metadata are copied together. The skill does not depend on this repository after installation.

Skill catalog

Skill Purpose Changes history?
regitize Derive accurate commit messages from every actual diff Yes, after approval
regitize-date-customize Spread commit dates from a chosen start date through today Yes, after approval
regitize-sensitive-scan Find redacted secret patterns and oversized historical blobs No
regitize-squash Produce a semantic squash plan for noisy commits No, plan only
regitize-authors Apply canonical author identities from .mailmap Yes, after approval
regitize-release-notes Draft release notes from a verified commit or tag range No

Improve commit messages

Use $regitize on the current branch.

The skill reads every reachable commit and patch, proposes a complete old-to-new mapping, and waits for approval before changing refs.

Redistribute commit dates

Use $regitize-date-customize to spread this branch from 2024-01-01 through today.

Author and committer dates are distributed in parent-before-child topological order. Messages, identities, snapshots, and merge topology remain unchanged.

Scan historical blobs

Use $regitize-sensitive-scan before this repository is published.

The scanner checks all reachable blobs by default. Findings contain rule names, paths, line numbers, blob IDs, and redacted fingerprints — never the matched credential value.

This is a best-effort local audit, not a substitute for provider-side secret scanning. Rotate confirmed credentials before rewriting history.

Plan semantic squashes

Use $regitize-squash to identify fixup, WIP, checkpoint, typo, and formatting commits.

The skill evaluates patch semantics, adjacency, merge boundaries, shared refs, and file overlap. It produces a reviewable plan but does not run a rebase.

Normalize authors

Create .mailmap rules using standard Git syntax:

Canonical Name <canonical@example.com> Old Name <old@example.com>

Then invoke:

Use $regitize-authors to apply this repository's .mailmap to the current branch.

Authors are normalized by default. Committers are changed only when explicitly requested.

Generate release notes

Use $regitize-release-notes for the changes since v1.2.0.

The skill inspects messages and patches, combines implementation commits into user-visible outcomes, and preserves only issue or PR identifiers supported by repository evidence.

CLI reference

regitize [install] [options]

--agent, --model <list>  codex, claude, gemini
--skill, --skills <list> one or more bundled skill names
--scope <scope>          project or global
--force                  replace existing skill folders
--dry-run                print destinations without writing
--yes, -y                accept defaults in non-interactive use
--version, -v            print the package version
--help, -h               show help

Examples:

# Install every skill for Codex in the current repository
npx regitize --agent codex --scope project --yes

# Install two skills globally for Gemini CLI
npx regitize \
  --agent gemini \
  --scope global \
  --skills regitize-sensitive-scan,regitize-release-notes \
  --yes

# Preview installation destinations
npx regitize --agent codex,claude,gemini --scope project --dry-run --yes

Existing skill directories are not replaced unless --force is supplied or replacement is approved interactively.

History-rewrite safety

Rewrite-capable skills use Git plumbing to rebuild commit objects while preserving committed trees and parent topology. Before updating the selected local branch they:

  1. validate that the branch still points to the expected head;
  2. detect signed commits and special metadata;
  3. verify that the rewritten head has the same tree;
  4. create refs/regitize/backups/<timestamp>/<branch>;
  5. update only the selected local branch;
  6. leave every remote untouched.

Signed commits cannot retain valid signatures after their contents or metadata change. Regitize requires a separate acknowledgement before rewriting them.

To restore a branch from a reported backup ref:

git update-ref refs/heads/main refs/regitize/backups/<timestamp>/main

Project structure

regitize/
├── bin/regitize.mjs          # interactive installer
├── skills/                   # portable Agent Skills
├── scripts/                  # repository validation
├── test/                     # integration tests using temporary Git repos
└── package.json              # npm package and executable definition

Development

Clone the repository and run:

npm ci
npm test
npm run validate:skills
npm pack --dry-run

The test suite creates temporary repositories and verifies installation, linear and merge-history rewrites, backup refs, tree preservation, date endpoints, secret redaction, squash analysis, .mailmap normalization, and release ranges.

To try the installer without publishing:

node ./bin/regitize.mjs

See CONTRIBUTING.md for skill structure, pull request expectations, and the maintainer release checklist.

Security

Read SECURITY.md before reporting a vulnerability. Do not paste discovered credentials into a public issue.

License

Regitize is available under the MIT License.

About

Portable AI-agent skills for auditing and improving Git history

Topics

Resources

Contributing

Security policy

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages