본문으로 건너뛰기
cccskills
무료GitHub에 공개

bat-adhoc

Design and run focused acceptance scenarios to check MCP tools through real agent CLIs such as Claude or Gemini. Review task completion, tool failures, and detailed run output, and compare branches when investigating a regression.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

원문원문 설명 보기

Run bot acceptance tests to validate MCP tools work correctly from a real AI agent's perspective. Use when testing PRs, detecting regressions, or verifying tool changes end-to-end with Claude/Gemini CLIs.

homeassistant-ai/ha-mcp스타 5,357(GitHub 5,357 + cccskills 0)

실행 점수 미검증

설치 방법 보기

이럴 때 유용합니다

  • Validate MCP tool changes in a pull request
  • Check whether a tool regression occurs from an agent’s perspective
  • Run an end-to-end scenario with Claude or Gemini CLI
  • Compare local code with a baseline branch after a failure

포함된 파일(1)

  • SKILL.md5.4 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

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 uv run 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
  • Output: every phase includes output (plus tool_trace when tool calls were logged); a failed phase also includes stderr when it is not empty
  • 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

Example: Testing Error Signaling

cat <<'EOF' | uv run python tests/uat/run_uat.py --agents gemini
{
  "setup_prompt": "Create a test automation called 'bat_error_test' with a time trigger at 23:59 and action to turn on light.bed_light.",
  "test_prompt": "Try to get automation 'automation.nonexistent_xyz'. Report if the tool signaled an error or returned a normal response. Then get automation 'automation.bat_error_test' and report its structure.",
  "teardown_prompt": "Delete automation 'bat_error_test' if it exists."
}
EOF

Regression Comparison Workflow

Run the same scenario twice from the branch checkout and compare stats. --branch master installs ha-mcp from master on GitHub; omitting --branch runs the local code, which also covers unpushed commits:

# Baseline: master
uv run python tests/uat/run_uat.py --scenario-file <scenario.json> --branch master --agents gemini

# Target: local code
uv run python tests/uat/run_uat.py --scenario-file <scenario.json> --agents gemini

To compare a pushed branch that is not checked out, pass --branch <branch> for the target run too.

Compare these metrics:

Primary (decide pass/fail on these):

  • Task completion: Did both pass? Any new failures?
  • Accuracy: Check agent output quality - did it understand the task correctly?
  • Tool success rate: Compare aggregate.total_tool_calls vs total_tool_fail

Secondary (report but don't decide on these alone):

  • Tool call count: Compare aggregate.total_tool_calls, aggregate.total_turns — directional signal, not conclusive (agent exploration varies between runs)
  • Duration: Compare aggregate.total_duration_ms — noisy due to network, cache misses, server load. Only flag large (>2x) regressions.

Robustness tip: Ask the same task in different ways (variation testing) to check if results are consistent across phrasings.

Cost Awareness

Each scenario invocation costs API credits (one per agent per phase). Design scenarios efficiently:

  • Combine related checks in a single test_prompt when possible
  • Only use setup/teardown when the test needs specific state
  • Start with one agent, expand to both only when cross-agent comparison matters

Handling Arguments

When /bat-adhoc is invoked with arguments:

If arguments contain a scenario description, generate the JSON scenario and run it:

/bat-adhoc test automation create with sunrise trigger then modify to sunset

→ Generate appropriate scenario JSON and execute

If --help or no arguments, show this help text.

Otherwise, treat $ARGUMENTS as instructions for what to test and design+run the scenario accordingly.

Full Documentation

For complete CLI reference and output format, see tests/uat/README.md.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Compare MCP tool behavior in a target version with a released baseline. It selects relevant prebuilt scenarios, designs custom regression stories, runs them with agent CLIs, verifies outcomes, and reports behavior, tool usage, and cost trends.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Compare tool behavior between a release and a code change
  • Choose test stories that exercise modified MCP tools
  • Create regression scenarios for changed code paths
homeassistant-ai/ha-mcp5.4천2026년 10월 29일 업데이트

Review an external GitHub pull request for security concerns, test coverage, change size, and alignment with its linked issue or stated purpose. It summarizes findings and drafts a constructive review comment for you to approve before posting.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Review an external contribution before deciding whether it is ready to merge
  • Check whether a pull request has tests for its changed code
  • Assess whether a contributor’s changes match the linked issue
homeassistant-ai/ha-mcp5.4천2026년 10월 29일 업데이트

Finds authors of merged pull requests who are missing from a README contributors list, drafts concise descriptions of their work, and updates the list only after the user approves the proposed additions.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Find recent merged PR authors missing from the contributor list
  • Draft factual one-line summaries of contributors’ changes
  • Update a README after reviewing proposed additions
homeassistant-ai/ha-mcp5.4천2026년 10월 29일 업데이트

Analyze a GitHub issue by exploring related code, checking relevant external details, and assessing implementation complexity and architectural choices. The skill drafts a structured issue comment and recommends labels for maintainers to review.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Assessing the complexity of a GitHub issue
  • Planning implementation approaches
  • Preparing an issue analysis and labels
homeassistant-ai/ha-mcp5.4천2026년 10월 29일 업데이트

Take a GitHub issue through implementation in a worktree, tests, and a draft pull request. The skill then checks CI results and review threads, applies fixes, and repeats the review cycle until the pull request is ready for maintainer review.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Implementing a GitHub issue end to end
  • Creating a draft pull request from an issue
  • Resolving CI failures and review comments
homeassistant-ai/ha-mcp5.4천2026년 10월 29일 업데이트

Manage your own GitHub pull request by checking CI results, review comments, and unresolved threads. Triage feedback, make code fixes, reply to comments, resolve threads, and recheck until outstanding issues are cleared.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Check CI and review feedback on your own pull request
  • Triage bot and human comments and fix relevant issues
  • Resolve review threads after replying with an update
homeassistant-ai/ha-mcp5.4천2026년 10월 29일 업데이트

homeassistant-ai의 스킬 모두 보기

이 스킬의 문제 신고