core: Agent for Claude Code

.claude/agents/raise-pull-request.md

raise-pull-request is an agent for Claude Code from home-assistant/core. It costs 44 tokens per session (2,477 once invoked), scanned A, original, Apache-2.0.

A workflow assistant for opening pull requests in the Home Assistant core code repository. It checks the branch, changed files, tests, formatting, and pull-request checkboxes.

In plain words
What is it for?
Use it after implementing a Home Assistant core change to inspect the work, run tests and formatting checks, and create the pull request.
Why use it?
It reduces the manual checks and repository-specific steps needed before asking others to review a change.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

This is home-assistant/core's own configuration. It tells Claude Code how to work on core 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 core configures →

About the project

Home Assistant is open-source home automation software that lets people control devices and actions locally through a modular system. It is used by home-automation enthusiasts and DIY users, often on a Raspberry Pi or local server; the catalogue entries support operating or developing its integrations and codebase.

home-assistant/core · 91,801 stars · on GitHub · home-assistant.io

Reuse

Borrowing it

Nothing to install: this file belongs to home-assistant/core. 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/home-assistant/core/dev/.claude/agents/raise-pull-request.md
Clone the repo
git clone --depth 1 https://github.com/home-assistant/core

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 raise-pull-request

README.md
[![agentmods](https://agentmods.dev/badge/agents/home-assistant/core/raise-pull-request/github.svg)](https://agentmods.dev/agents/home-assistant/core/raise-pull-request)
Your own site
<a href="https://agentmods.dev/agents/home-assistant/core/raise-pull-request"><img src="https://agentmods.dev/badge/agents/home-assistant/core/raise-pull-request/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 raise-pull-request

Your own site · 80×15
<a href="https://agentmods.dev/agents/home-assistant/core/raise-pull-request"><img src="https://agentmods.dev/badge/agents/home-assistant/core/raise-pull-request.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 44 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,477 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.00044 $0.02477
Opus 5.5 $0.00018 $0.00991
Sonnet 5.5 $0.00009 $0.00495
Haiku 4.5 $0.00004 $0.00248

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

Security

Grade A, and why

raise-pull-request 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 12d 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/agents/raise-pull-request.md · 226 lines

How it starts

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

You are an expert at creating pull requests for the Home Assistant core repository. You will automate the PR creation process with proper verification, formatting, testing, and checkbox handling.

Execute each step in order. Do not skip steps.

Step 1: Gather Information

Run these commands in parallel to analyze the changes:

# Get current branch and remote
git branch --show-current
git remote -v | grep push

# Determine the best available dev reference
if git rev-parse --verify --quiet upstream/dev >/dev/null; then
  BASE_REF="upstream/dev"
elif git rev-parse --verify --quiet origin/dev >/dev/null; then
  BASE_REF="origin/dev"
elif git rev-parse --verify --quiet dev >/dev/null; then
  BASE_REF="dev"
else
  echo "Could not find upstream/dev, origin/dev, or local dev"
  exit 1
fi

BASE_SHA="$(git merge-base "$BASE_REF" HEAD)"
echo "BASE_REF=$BASE_REF"
echo "BASE_SHA=$BASE_SHA"

# Get commit info for this branch vs dev
git log "${BASE_SHA}..HEAD" --oneline

# Check what files changed
git diff "${BASE_SHA}..HEAD" --name-only

# Check if test files were added/modified
git diff "${BASE_SHA}..HEAD" --name-only | grep -E "^tests/.*\.py$" || echo "NO_TESTS_CHANGED"

# Check if manifest.json changed
git diff "${BASE_SHA}..HEAD" --name-only | grep "manifest.json" || echo "NO_MANIFEST_CHANGED"

From the file paths, extract the integration domain from homeassistant/components/{integration}/ or tests/components/{integration}/.

Track results:

  • BASE_REF: the dev reference used for comparison
  • BASE_SHA: the merge-base commit used for diff-based checks
  • TESTS_CHANGED: true if test files were added or modified
  • MANIFEST_CHANGED: true if manifest.json was modified

If no suitable dev reference is available, STOP and tell the user to fetch upstream/dev, origin/dev, or a local dev branch before continuing.

Step 2: Run Code Quality Checks

Run prek to perform code quality checks (formatting, linting, hassfest, etc.) on the files changed since BASE_SHA:

Read the full file on GitHub · 226 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. 12d ago Changed 8006ccb3317b
  2. 1mo ago First seen · 226 lines · 44 tokens per session scan A ea76b31c68ab

Subscribe to this mod's changes

raise-pull-request is an agent published in the GitHub repository home-assistant/core (91,801 stars, last pushed today), licensed Apache-2.0. It adds 44 tokens to every session and 2,477 once invoked, about $0.0002 per session on Opus 5.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.

Related

Other agents, from other repositories

quality-guardian

Code quality, testing, and validation enforcement specialist.

roboticforce/sugar · 13 tokens

eng-reviewer

Final review gate and quality enforcer for the /eng-team skill. Invoked as the mandatory final gate before release, verifying architecture compliance, security standards compliance, and test coverage. Integrates /adversary for C2+ deliverables per R-013 at >= 0.95 quality threshold. Routes from Step 7 of the /eng-team…

geekatron/jerry · 109 tokens

reviewer

Grades a diff against the spec and tests. Returns a JSON verdict. Makes no changes.

DanielHashmi/Q4_learning · 21 tokens

ai-hygiene-auditor

Audit codebases for AI-generation warning signs: vibe coding patterns, agent psychosis indicators, slop artifacts, and Tab-completion bloat. Specialized complement to bloat-auditor.

athola/claude-night-market · 48 tokens

sap-test-plan-reviewer

Adversarial review of a test-case plan produced by design-cases. READS the actual ABAP source snapshot (plus findings.md, flow.md, units.md, and the TC-.md files) to catch branches and MESSAGEs the plan missed, checks total case count against the enumerated minimum, checks every mandatory category has at least one…

marcellourbani/vscode_abap_remote_fs · 161 tokens

edge-case-explorer

Systematically discovers and catalogs edge cases that should be covered by tests for a given piece of code. Traces input sources, call chains, and integration boundaries to find boundary values, type coercion traps, external input messiness, state-dependent failures, and error propagation gaps. Use when exploring how…

testdouble/han · 135 tokens