bat-adhoc

bat-adhoc is a skill for Claude Code from homeassistant-ai/ha-mcp. It costs 48 tokens per session (1,306 once invoked), scanned A, original, MIT.

A workflow for acceptance-testing MCP tools through real AI coding agents. MCP tools are connections that let an agent use external capabilities or services.

In plain words
What is it for?
Use it to design test scenarios, run them with Claude or Gemini, review pass or fail results, and investigate integration problems.
Why use it?
It checks whether tool changes work from an agent's point of view, not only in isolated tests. It also helps compare failures with another branch when looking for regressions.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is cat <<'EOF' | python tests/uat/run_uat.py --agents gemini.

Good fit Use it to design test scenarios, run them with Claude or Gemini, review pass or fail results, and investigate integration problems.

Compare 6 skills from other repositories ↓
About the project

ha-mcp is an unofficial Model Context Protocol server that lets AI assistants interact with Home Assistant, including controlling devices, checking states, running services, and managing automations. Home Assistant users can connect it through the HA-MCP custom component or another supported setup. The catalogue entries are skills, agents, instructions, settings, and an MCP configuration for working with it.

homeassistant-ai/ha-mcp · 4,682 stars · on GitHub · homeassistant-ai.github.io

Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/homeassistant-ai/ha-mcp
agentmods
npx agentmods add skills/homeassistant-ai/ha-mcp/bat-adhoc

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 bat-adhoc

README.md
[![agentmods](https://agentmods.dev/badge/skills/homeassistant-ai/ha-mcp/bat-adhoc/github.svg)](https://agentmods.dev/skills/homeassistant-ai/ha-mcp/bat-adhoc)
Your own site
<a href="https://agentmods.dev/skills/homeassistant-ai/ha-mcp/bat-adhoc"><img src="https://agentmods.dev/badge/skills/homeassistant-ai/ha-mcp/bat-adhoc/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 bat-adhoc

Your own site · 80×15
<a href="https://agentmods.dev/skills/homeassistant-ai/ha-mcp/bat-adhoc"><img src="https://agentmods.dev/badge/skills/homeassistant-ai/ha-mcp/bat-adhoc.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,306 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00048 $0.01306
Opus 5 $0.00024 $0.00653
Sonnet 5 $0.00010 $0.00261
Haiku 4.5 $0.00005 $0.00131

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

Security

Grade A, and why

bat-adhoc 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 11d 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

  • bat-adhoc — 100% identical, 0 lines differ
.claude/skills/bat-adhoc/SKILL.md · 139 lines

How it starts

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

BAT - Bot Acceptance Testing

Bot acceptance testing validates that MCP tools work correctly from a real AI agent's perspective. You design test scenarios dynamically, run them via tests/uat/run_uat.py, and evaluate results.

When to Use BAT

  • PR validation: Test that tool changes work correctly from an agent's perspective
  • Regression detection: Compare behavior between branches
  • Integration verification: Ensure MCP tools work end-to-end with real agent CLIs

Workflow

  1. Analyze the change: Read the diff, identify which tools are affected
  2. Design scenario: Generate a scenario JSON with setup/test/teardown prompts
  3. Run the script: Pipe the scenario to python tests/uat/run_uat.py
  4. Evaluate summary: Check all_passed per agent. If true, you're done.
  5. Dig deeper on failure: Read results_file for full output, stderr, raw JSON
  6. Regression check: If test fails, re-run with --branch master to compare

Output Structure

The runner returns a concise summary to stdout (saves context when all passes):

{
  "results_file": "/tmp/bat_results_abc123.json",
  "agents": {
    "gemini": {
      "all_passed": true,
      "test": {
        "completed": true,
        "duration_ms": 8100,
        "exit_code": 0,
        "num_turns": 5,
        "tool_stats": { "totalCalls": 4, "totalSuccess": 4, "totalFail": 0 }
      },
      "aggregate": {
        "total_duration_ms": 15300,
        "total_turns": 12,
        "total_tool_calls": 9,
        "total_tool_success": 9,
        "total_tool_fail": 0
      }
    }
  }
}
  • Phase stats: num_turns, tool_stats (per phase) for fine-grained comparison
  • Aggregate stats: Total counts across all phases for overall efficiency comparison
  • On failure: also includes output and stderr for diagnosis
  • Full results: raw JSON, complete output always available at results_file

Scenario Design Guidelines

  • setup_prompt: Create any entities/state the test needs
  • test_prompt: Exercise the tools being tested, ask the agent to report results clearly
  • teardown_prompt: Clean up created entities
  • Keep prompts focused - each scenario tests ONE behavior
  • Ask the agent to report: what succeeded, what failed, any unexpected behavior

Read the full file on GitHub · 139 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. 11d ago First seen · 139 lines · 48 tokens per session scan A 7d1582ae174c

Subscribe to this mod's changes

bat-adhoc is a skill published in the GitHub repository homeassistant-ai/ha-mcp (4,682 stars, last pushed 2d ago), licensed MIT. It adds 48 tokens to every session and 1,306 once invoked, about $0.0002 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-30.

Related

Other skills, from other repositories

tdd-workflow

Use this skill when writing new features, fixing bugs, or refactoring code. Enforces test-driven development with 80%+ coverage including unit, integration, and E2E tests.

affaan-m/ECC · 43 tokens

e2e-testing

Playwright E2E testing patterns, Page Object Model, configuration, CI/CD integration, artifact management, and flaky test strategies. Use when writing Playwright tests, structuring page objects, or fixing flaky E2E runs in CI.

affaan-m/ECC · 53 tokens

dogfood

Exploratory QA of web apps: find bugs, evidence, reports.

NousResearch/hermes-agent · 18 tokens

reproduce-bug

Reproduce a reported bug in googleapis/mcp-toolbox and decide whether it is real, delivering an evidence-backed verdict: confirmed, already fixed, misconfiguration, client-side, works as intended, not reproducible, or blocked. Use whenever a maintainer asks you to reproduce, verify, confirm, or investigate a bug…

googleapis/mcp-toolbox · 130 tokens

langbot-testing

Test LangBot WebUI and core product flows with an automated browser and backend logs. Use when validating the configured LangBot frontend, pipeline Debug Chat, model provider setup and test buttons, bot and knowledge-base UI flows, or troubleshooting failed LangBot end-to-end tests.

langbot-app/LangBot · 58 tokens

playwright-cli

Automates browser interactions for web testing, form filling, screenshots, and data extraction. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, test web applications, or extract information from web pages.

VoltAgent/voltagent · 52 tokens