rebase-agents

rebase-agents is a cursor rule for Cursor from briangmilnes/APAS-VERUS. It costs 320 tokens per session, scanned A, original, MIT.

A project rule for updating separate agent workspaces after changes are committed and pushed to the main branch. A worktree is a separate working directory containing another branch of the same Git project.

In plain words
What is it for?
Use it after committing and pushing changes on main, outside the normal merge cycle, to rebase each agent branch and review the resulting workspace state.
Why use it?
It keeps agent branches aligned with the latest main branch and checks that main is clean and fully pushed before updating them.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/briangmilnes/apas-verus/rebase-agents
Clone the repo
git clone --depth 1 https://github.com/briangmilnes/APAS-VERUS

Made for: Cursor.

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 rebase-agents

README.md
[![agentmods](https://agentmods.dev/badge/rules/briangmilnes/apas-verus/rebase-agents.svg)](https://agentmods.dev/rules/briangmilnes/apas-verus/rebase-agents)
Your own site
<a href="https://agentmods.dev/rules/briangmilnes/apas-verus/rebase-agents"><img src="https://agentmods.dev/badge/rules/briangmilnes/apas-verus/rebase-agents.svg" alt="Measured on agentmods" height="20"></a>
Per session 320 This file is loaded in full into every session.
When invoked 320 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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.00320 $0.00320
Opus 5 $0.00160 $0.00160
Sonnet 5 $0.00064 $0.00064
Haiku 4.5 $0.00032 $0.00032

Measured 5d ago against content hash d05b9b49ce67, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

rebase-agents 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 5d 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.

.cursor/rules/git/rebase-agents.mdc · 42 lines

What it actually says

Rebase Agents

When to use

After committing and pushing changes on main, run scripts/rebase-agents.sh to bring all agent worktrees up to date with main.

Prerequisites

  • Main worktree must be clean (no uncommitted changes).
  • Main must be pushed (no unpushed commits).
  • The script verifies both before proceeding.

Usage

cd ~/projects/APAS-VERUS && scripts/rebase-agents.sh

What it does

  1. Verifies main is clean and pushed.
  2. For each agent (agent1 through agent4):
    • git fetch origin
    • git rebase origin/main
    • git push origin agentN/ready --force
  3. On success, runs scripts/survey-agents.sh to show final state.

Conflict handling

If any agent's rebase fails:

  • The script stops immediately (does not continue to the next agent).
  • Fix conflicts in the reported worktree directory.
  • Run git add -A && GIT_EDITOR=true git rebase --continue to complete that rebase.
  • Rerun scripts/rebase-agents.sh to continue with remaining agents.

When NOT to use

  • During a merge cycle (Phases 0–7). The merge workflow handles rebases at specific points. Use scripts/rebase-agents.sh only outside the merge workflow.
  • If main has uncommitted or unpushed changes. Commit and push first.
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. 5d ago First seen · 42 lines · 320 tokens per session scan A d05b9b49ce67

Subscribe to this mod's changes

rebase-agents is a cursor rule published in the GitHub repository briangmilnes/APAS-VERUS (10 stars, last pushed 1mo ago), licensed MIT. It adds 320 tokens to every session, about $0.0016 per session on Opus 5. 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-08-31.