audit-merges
Deep retrospective audit of everything merged to main over a window - code quality against the stand-* skills, introduced bugs, unsafe changes, merges over…
Skill by lgtm-hq
Chalk Labs
Need help deploying audit-merges?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/lgtm-hq-audit-merges
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: documents, frontend, security, agent-building
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/audit-merges
What's inside
- Skill name
audit-merges- Description
- Deep retrospective audit of everything merged to main over a window - code quality against the stand-* skills, introduced bugs, unsafe changes, merges over red signals, hollow thread resolutions, and untracked deferrals - with a tabbed HTML report as the deliverable. Use when asked to audit merges, review what landed on main, or verify automated/agent-authored merges were up to standard.
- License
- MIT
- Instructions
- 172 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Audit Merges
Retrospective, read-only **code-substance audit** of every merge to `main`
across one or more repos over a time window. Where `sweep-prs` audits the PR
_lifecycle_ (green builds, red main, thread hygiene), this skill re-reads the
**merged code itself** — quality, correctness, safety, and whether deferred
work was actually tracked. Built for high-automation repos where most merges
are agent-authored or auto-merged and human review coverage is thin.
## Invocation
- `/audit-merges` — current repo, last 7 days.
- `/audit-merges since 2026-07-22` — explicit window start; `7d` / `30d` /
natural phrasing ("since last Wednesday") all work.
- `/audit-merges since 2026-07-22 lgtm-hq/py-lintro lgtm-hq/lgtm-ci` —
explicit repo list. Invoked outside any repo with no repo argument → ask
which repos, don't guess.
## Ground Rules
- **Read-only while auditing.** No pushes, no thread replies, no issue
creation, no workflow triggers until findings are confirmed (Remediation).
- **Evidence or it didn't happen.** Every finding carries severity, PR
link(s), concrete evidence (file:line, thread quotes, run IDs), and a
recommended action. No speculative nitpicks — if you can't point at it,
drop it.
- **Judge against the house standards.** Load the repo's matching standards
skills before reading any diff: `stand-general` always, plus `stand-py` /
`stand-rust` / `stand-ts` / `stand-odin` by language, `stand-ci` for
workflow changes, and `analyze-code` for repo-shape risk emphasis.
## Phase 1 — Enumerate and triage
Per repo, gather in bulk with one paginated GraphQL `search` query per repo
(`type: ISSUE`, query `repo:OWNER/NAME is:pr is:merged base:main
merged:>=DATE` — filter to the default branch, resolving it per repo when it
is not `main`) whose nodes fetch — inside a `... on PullRequest` inline
fragment, since `search` returns `SearchResultItem` nodes — the checks
rollup (`statusCheckRollup`) and review threads (`reviewThreads`) in the
same query — prefer server-side
search filters over client-side truncation. Paginate **every** connection
(`search`, `reviewThreads`, thread comments, rollup contexts) via
`hasNextPage`/`endCursor` — nested cursors do not advance with the search
cursor, so when a PR node reports `hasNextPage` on a nested connection,
drain it with per-PR follow-up queries (`repository { pullRequest(...) }`)
before moving on. GitHub search caps at 1,000 results per query, so split
the date window when a repo's merge volume can exceed it.
1. Full merged-PR list for the window — paginate past 100; verify the total
against `search(type: ISSUE)` `issueCount` (or the REST search API) and
treat any mismatch or truncated connection as a gathering failure, not a
smaller audit.
2. Default-branch workflow-run health across the window (`gh run list
--branch <default-branch> --created "START..END" --limit 1000 --json
databaseId,headSha,createdAt,event,conclusion,workflowName,url` — an
explicit date range plus a limit well above the repo's run volume; never
the bare default, which returns a recent time-unbounded subset). If the
returned count equals the limit, the window is truncated: raise the
limit or split the date range until the count comes back under it, so
every failure can be mapped to the merge that caused it. Attribute
`push` runs to merges via each PR's `mergeCommit` (squash commits have
one parent); classify `schedule`/manually dispatched runs separately —
they are not caused by a merge.
Then triage:
- **Bot PRs** (Renovate, release bots): light pass — merged green, `main`
stayed green after. Exception: in repos whose _content_ is the product
(skills, configs, infra), also read what the bot changed.
- **Substantive PRs** (human- or agent-authored): full deep-read against the
checklist below.
## Phase 2 — Deep-read checklist
Apply per substantive PR, diff in hand. The diff of record is the **landed**
change: `mergeCommit` against its first parent, not the PR-branch diff —
conflict resolutions, merge-queue rebases, and manual merge edits only show
up in the landed tree.
1. **Broken main, never fixed** — the merge caused a `main` failure and no
later merge fixed it. Map every red `main` run to a cause and a
resolution (or its absence).
2. **Quality regressions** — deviations from the loaded `stand-*` skills:
workarounds, lint/type suppressions, inline shell in workflows, unpinned
actions, dropped types, copy-paste drift, reduced maintainability.
3. **Merged over red signals** — failing or still-running required checks at
merge time, or unresolved review threads from any reviewer (CodeRabbit,
Greptile, CodeQL, humans). Current API state is mutable: judge checks by
comparing run timestamps for the evaluated commit against `mergedAt`,
and since GitHub exposes no thread-resolution history, mark
thread-timing findings the current state cannot prove as unverifiable
rather than asserting them.
4. **Hollow resolutions** — threads resolved with no fix and no reasoned
disagreement, just closed to clear the gate (review-thread hygiene canon:
resolve only via fix or disagreement reply).
5. **Unsafe changes** — secrets, token permissions, supply chain (unpinned
deps/actions, new registries), script injection (`${{ }}` into `run:`),
over-broad IAM, destructive CI or infra steps.
6. **Introduced bugs** — critical read of the diff: logic errors, unhandled
error paths, off-by-ones, concurrency hazards, silently changed behavior.
7. **Untracked deferrals** — "follow-up", "later", "TODO", "out of scope",
"in a separate PR" in code, PR body, or thread replies with **no
corresponding issue filed**. Cross-check the repo's issues in **all**
states (`gh issue list --state all`) — a closed follow-up still proves
the deferral was tracked; known intentionally-parked work is not a
finding.
8. **Auditor's judgment** — anything else that should be addressed:
convention breaks, doc drift, test assertions that assert nothing,
coverage theater (`analyze-tests` mindset on PRs touching tests).
## Orchestration
Multi-repo audits fan out **one background sub-agent per repo**
(sub-agents-first). Each agent:
- loads that repo's standards skills (Ground Rules above),
- gathers per Phase 1, deep-reads per Phase 2,
- writes structured findings to a scratchpad file: stats header (total
merges, bot/human split, `main` failure count), one section per findingFrom lgtm-hq/ai-skills, MIT.
More from lgtm-hq/ai-skills
- 0.587score
analyze-project
lgtm-hq
High-level project analysis.
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
analyze-tests
lgtm-hq
Test suite analysis.
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
babysit-pr
lgtm-hq
Autonomously drive an open PR to merge-ready state by triaging Greptile and CodeRabbit review comments, fixing CI failures, handling CodeRabbit rate limits…
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
implement-issues
lgtm-hq
Implement a set of GitHub issues in parallel - triage or take an explicit issue list, group by file-conflict, create a worktree per lane, delegate to…
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
lintro-review
lgtm-hq
AI branch review using lintro's own `lintro review` — a standard local pre-push pass alongside the coderabbit and greptile CLIs, and the review of record when…
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
commit
lgtm-hq
Pre-commit workflow and commit guidelines.
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
greptile
lgtm-hq
Run Greptile CLI for pre-push AI branch review.
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
issue
lgtm-hq
Create GitHub issues with proper formatting, labels, and AI implementation prompts.
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
pr
lgtm-hq
Create pull requests with proper templates and metadata.
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
pr-raycast
lgtm-hq
Prepare and open a pull request to raycast/extensions.
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
analyze-code
lgtm-hq
Code-level quality analysis.
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
backlog
lgtm-hq
Interactive dispatcher for backlog work.
SkillAFreshness: A★ 1Claude Code +9
Signals
- Stars
- 1
- Forks
- 0
- Open issues
- 15
- Last commit (this folder)
- Oct 3, 2026 (28 days ago)
- Last release
- Oct 22, 2026 (9 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/lgtm-hq/ai-skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from lgtm-hq
- 0.587score
analyze-tests
lgtm-hq
Test suite analysis.
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
analyze-project
lgtm-hq
High-level project analysis.
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
implement-issues
lgtm-hq
Implement a set of GitHub issues in parallel - triage or take an explicit issue list, group by file-conflict, create a worktree per lane, delegate to…
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
lintro-review
lgtm-hq
AI branch review using lintro's own `lintro review` — a standard local pre-push pass alongside the coderabbit and greptile CLIs, and the review of record when…
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
babysit-pr
lgtm-hq
Autonomously drive an open PR to merge-ready state by triaging Greptile and CodeRabbit review comments, fixing CI failures, handling CodeRabbit rate limits…
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
analyze-code
lgtm-hq
Code-level quality analysis.
SkillAFreshness: A★ 1Claude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get audit-merges running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
audit-merges skill. Agent Mart. https://agentmart.dev/skills/lgtm-hq-audit-merges (last updated 2026-10-24)