mcp-memory-service: Command for Claude Code

.claude/commands/merge-sweep.md

merge-sweep is a command for Claude Code from doobidoo/mcp-memory-service. It costs 0 tokens per session (862 once invoked), scanned A, original, Apache-2.0.

A command for coordinating the merging of open GitHub pull requests, which are proposed code changes awaiting review. It checks their status, reviews possible blockers, and sorts them into merge, quick-fix, or maintainer-decision groups.

In plain words
What is it for?
It inventories open pull requests, checks CI results and conflicts, identifies unresolved review threads, and runs scoped tests when a local check is needed. It can also point out small fixes or cases that need a maintainer's judgment.
Why use it?
It removes the need to inspect every open pull request manually and helps avoid merging changes with failed checks, unresolved review discussions, or conflicts. It also keeps temporary testing away from a shared main working folder.

Command for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions CLAUDE.md.

This is doobidoo/mcp-memory-service's own configuration. It tells Claude Code how to work on mcp-memory-service itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything mcp-memory-service configures →

About the project

mcp-memory-service is a self-hosted memory backend that lets AI agents store and retrieve shared project context through REST, MCP, OAuth, a command-line interface, and a dashboard. It is intended for agent pipelines and clients such as LangGraph, CrewAI, AutoGen, Claude Desktop, and OpenCode, with support for knowledge graphs and memory consolidation. The catalogue includes skills, agents, commands, instructions, hooks, a setting, an MCP entry, and a plugin for its workflows.

doobidoo/mcp-memory-service · 2,181 stars · on GitHub

Reuse

Borrowing it

Nothing to install: this file belongs to doobidoo/mcp-memory-service. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/doobidoo/mcp-memory-service/main/.claude/commands/merge-sweep.md
Clone the repo
git clone --depth 1 https://github.com/doobidoo/mcp-memory-service

Made for: Claude Code.

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 merge-sweep

README.md
[![agentmods](https://agentmods.dev/badge/commands/doobidoo/mcp-memory-service/merge-sweep/github.svg)](https://agentmods.dev/commands/doobidoo/mcp-memory-service/merge-sweep)
Your own site
<a href="https://agentmods.dev/commands/doobidoo/mcp-memory-service/merge-sweep"><img src="https://agentmods.dev/badge/commands/doobidoo/mcp-memory-service/merge-sweep/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 merge-sweep

Your own site · 80×15
<a href="https://agentmods.dev/commands/doobidoo/mcp-memory-service/merge-sweep"><img src="https://agentmods.dev/badge/commands/doobidoo/mcp-memory-service/merge-sweep.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 862 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.00000 $0.00862
Opus 5.5 $0.00000 $0.00345
Sonnet 5.5 $0.00000 $0.00172
Haiku 4.5 $0.00000 $0.00086

Measured 25d ago against content hash 4089c1497433, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

merge-sweep 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 25d 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.

.claude/commands/merge-sweep.md · 62 lines

How it starts

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

/merge-sweep — Merge Open PRs With Minimal Effort

Role: merge coordinator for open PRs (GitHub, gh). Goal: merge as many PRs as possible with minimal effort.

1. Inventory

gh pr list --state open --json number,title,author,headRefOid,isDraft,mergeable,mergeStateStatus,labels

2. Check each PR — read only, change nothing

  • CI per head SHA (gh api repos/{owner}/{repo}/commits/<sha>/check-runs), not gh pr checks.
  • Unresolved review threads (GraphQL reviewThreads, isResolved). ResolveThreads has no bypass.
  • Conflicts or drift against main. A fork PR showing action_required means the run needs approval.
  • Dependabot: did the bump widen a load-bearing constraint?
  • Claim state for every PR labelled unclaimed or no-issue: match it to one row of the table in CONTRIBUTING.md "How unclaimed PRs and stale claims are decided" and name the row. Evidence: the issue's assign/unassign events (gh api repos/{owner}/{repo}/issues/<N>/events), claim comments by others before the PR's createdAt (a /claim mangled by Git Bash into a path still counts), and other open PRs for the same issue (gh pr list --search "<N>" --state open).
  • Stale claims: open issues claimed more than 3 days ago with no PR, draft or update since. A claim is an assignment, a claim-pending label, or a claim comment that was never confirmed; all three block later PRs, so list all three with the row they fall under (ask, or expire).

Only when a question needs a local answer: worktree under ../worktrees/pr-<N>, run .venv/bin/pytest scoped there. Never touch the main tree — several sessions share it.

3. Classify

  • MERGE: green, no open threads, no conflicts, automated-review findings (Greptile summary and confidence) read, and for contributor PRs the diff reviewed (/pr-review)
  • QUICK-FIX: under 10 minutes (rebase, answer a thread, approve a run) — name the fix
  • CLAIM: unclaimed or no-issue; state the table row and the action it prescribes (assign author, close, ask, expire, skip-issue). Never merge a PR in this category before the claim is settled.
  • DECISION: needs the maintainer's judgment
  • SKIP: draft, red for a real reason, large

Read the full file on GitHub · 62 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. 25d ago Changed · +18 lines 4089c1497433
  2. 2mo ago First seen · 44 lines · 0 tokens per session scan A 9b8f77e33258

Subscribe to this mod's changes

merge-sweep is a command published in the GitHub repository doobidoo/mcp-memory-service (2,181 stars, last pushed today), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 862 tokens. 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-10-04.

Related

merge-sweep compared with commands from other repositories

merge-sweep next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
merge-sweepdoobidoo/mcp-memory-serviceCommand2.2ktodayApache-2.0A0Claude Code
contextfengshao1227/ccg-workflowCommand6.0k14d agoMITA23Claude Code
bmGoldziher/basemindCommand126todayMITA31Claude Code
context-loadgonzalezpazmonica/pm-workspaceCommand524d agoMITA33Claude Code
catchupfockus/skill-memory-bankCommand33todayMITA40Claude Code
yolo-exitfrankxai/Starlight-Intelligence-SystemCommand1026d agoMITA29Claude Code
recallAbsoluteMode/session-recallCommand132d agoMITA21Claude Code