# branch change audit

> Audit branch changes against main, grouping modified files by service and status for fast PR reviews.

branch change audit is a free AI agent skill on Agensi by Victor Becerra, in Technical Documentation. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Victor Becerra](https://www.agensi.io/creators/victor-becerra)
- Category: [Technical Documentation](https://www.agensi.io/skills/technical-documentation)
- Uses: 2
- Version: 1.0
- Last updated: 2026-10-13
- Security: scan passed (2026-10-13); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/branch-change-audit
- Tags: git, audit, review, changelog, monorepo

## About this skill

Manual branch reviews are prone to missing files, especially in monorepos where changes span multiple services. Identifying exactly what changed since branching from main requires tedious git commands and manual grouping.

### What it does
- **Service-level grouping** Categorizes changes by service or directory key using path segment analysis.
- **Status preservation** Tracks and reports the specific nature of changes including additions, modifications, deletions, and renames.
- **Automated baseline detection** Resolves the correct upstream branch automatically, checking symbolic refs and remote HEAD.
- **Rename tracking** Clearly maps file movements showing the transition from old paths to new locations.
- **Scope filtering** Limits audits to specific sub-directories like `apps/` or `services/` when requested.

### How it works
1. **Identify baseline** The skill probes the environment to find the upstream target branch, typically `origin/main` or `origin/master`.
2. **Execute diff** Runs a `name-status` diff between the baseline and the current HEAD to capture the exact delta.
3. **Parse and group** Organizes raw git output into a structured hierarchy based on repository folders.
4. **Generate report** Outputs a summary to the chat or writes a `CHANGE_AUDIT.md` file for PR documentation.

### Frameworks & tools
This skill utilizes Git CLI and shell scripting. It is compatible with any repository structure, including complex monorepos managed with tools like Nx, Turborepo, or Lerna.

### Why this beats prompting it yourself
Standard LLM prompts often hallucinate change lists or fail to correctly resolve the git baseline. This skill uses specific CLI sequences to ensure every file status is accurate and properly grouped by service, saving you from manual diff parsing.

### Use cases
- Generating a pre-PR impact assessment to verify only intended files were touched.
- Auditing monorepo changes to identify which microservices require deployment.
- Creating a structured changelog for team review sessions.
- Troubleshooting unexpected behavior by listing all modifications since the last stable merge.

### Known limitations
Requires a local git environment with an established origin to detect the baseline automatically. Does not include unstaged or uncommitted local changes in the branch-to-branch diff.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the branch change audit skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### How does this skill simplify the PR review process compared to standard git diff commands?

This skill automates the tedious process of manual diffing by using specific Git CLI commands to identify exactly what changed between your branch and the main baseline, then groups those changes by service/directory for easy reading.

### Can I use this skill with large monorepos that house multiple microservices?

Yes, it is specifically designed for complex structures and is compatible with tools like Nx, Lerna, and Turborepo, allowing you to filter audits to specific folders like /apps or /services.

### What are the technical requirements for running the branch change audit?

The skill requires a local git environment with an established 'origin' remote; it uses this to automatically detect your upstream branch and resolve the correct baseline for the audit.

### Does the audit include local files that haven't been committed yet?

The skill focuses on committed code; it audits the delta between your current HEAD and the upstream branch, meaning unstaged or uncommitted local changes are not included in the report.

### What exactly is included in the purchase of this skill?

You receive the fully functional skill ready to be imported into your AI agent's environment, enabling you to generate instant change summaries or structured CHANGE_AUDIT.md files.

### Why should I use this skill instead of just asking my AI to list changed files?

Unlike generic prompts that might hallucinate file names or miss renames, this skill uses precise path segment analysis and rename tracking to ensure 100% accuracy in the change report.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
