Agent skill

Integration Testing

by s-morgan-jeffries in s-morgan-jeffries/apple-mail-fast-mcp

A skill your agent uses when setting up, running, or debugging integration tests against real Apple Mail.

MITAuto-check passedTesting & QA

Install Integration Testing

skills CLI
$ npx skills add s-morgan-jeffries/apple-mail-fast-mcp --skill integration-testing -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install s-morgan-jeffries/apple-mail-fast-mcp integration-testing --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/s-morgan-jeffries/apple-mail-fast-mcp.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/integration-testing .claude/skills/integration-testing && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
integration-testing
GitHub stars
104
Token cost
~1.2k tokens
SKILL.md length
272 words
Files
1
Skills in repo
5
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when setting up, running, or debugging integration tests against real Apple Mail.

  • Works in 2 steps: Apple Mail configured with at least one… → macOS Automation permission granted to…
  • Debugging integration tests against real Apple Mail
  • SKILL.md covers Why Integration Tests Matter, Three-Tier Testing Strategy, Setting Up Integration Tests and Writing Integration Tests, plus 3 more sections
  • Calls make and pytest

What it does

Integration Testing is an agent skill from s-morgan-jeffries/apple-mail-fast-mcp. Use when setting up, running, or debugging integration tests against real Apple Mail. Also use when unit tests pass but behavior seems wrong, when adding new AppleScript operations, or when you need to understand why mocked tests are insufficient for this project.

Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Testing & QA, covering Integration testing and Unit testing. It works with Python, Model Context Protocol and Gmail. The repository describes itself as: 🤖 MCP server for Apple Mail - Manage emails with AI using Claude Desktop. Search, send, organize mail with natural language. The licence is MIT.

When your agent uses it

  • Debugging integration tests against real Apple Mail
  • Unit tests pass but behavior seems wrong
  • Adding new AppleScript operations
  • You need to understand why mocked tests are insufficient for this project

Example prompts

  • “/integration-testing”

Requirements

  • Python 3

Workflow steps

2 steps, taken from the first numbered list in SKILL.md.

  1. Apple Mail configured with at least one account
  2. macOS Automation permission granted to Terminal/IDE

What it can do on your machine

Read from SKILL.md and the folder at commit ed0cfbc. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • make
    • pytest

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Integration Testing loads about 1.2k tokens when it runs. Until then it costs about 71 tokens; SKILL.md has 272 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~71
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from s-morgan-jeffries/apple-mail-fast-mcp at commit ed0cfbc, republished under its MIT licence (© s-morgan-jeffries). 272 words, ~1,162 tokens.

Download SKILL.mdSave it as .claude/skills/integration-testing/SKILL.md (or your agent's skills folder).
name
integration-testing
description
Use when setting up, running, or debugging integration tests against real Apple Mail. Also use when unit tests pass but behavior seems wrong, when adding new AppleScript operations, or when you need to understand why mocked tests are insufficient for this project.

Apple Mail Integration Testing

Why Integration Tests Matter

Unit tests mock _run_applescript() and test Python logic only. They CANNOT catch:

  • AppleScript syntax errors
  • Variable naming conflicts in AppleScript
  • Mail.app API behavior differences between versions
  • Silently-dropped record keys from NSJSONSerialization (e.g., name, id, size selector collisions)
  • Gmail-specific behavior differences
  • Timeout issues with real mailbox sizes

The OmniFocus project's story: A variable naming typo went undetected by 400+ unit tests because they all mocked the AppleScript boundary. Only integration tests against the real app caught it. This lesson applies equally to Apple Mail.

Three-Tier Testing Strategy

TierSpeedWhat it catchesWhen to run
Unit (mocked)~1s, 99 testsPython logic, parsing, validationEvery change
Integration (real)~30sAppleScript bugs, Mail.app quirksNew AppleScript code
E2E (full MCP)~30sTool registration, parameter passingNew/modified tools

Setting Up Integration Tests

Prerequisites
  1. Apple Mail configured with at least one account
  2. macOS Automation permission granted to Terminal/IDE
Test Account Setup
bash
# Set test account (default: "Gmail")
export MAIL_TEST_ACCOUNT="Gmail"

# Run integration tests
make test-integration
Running Tests
bash
# Integration tests are opt-in
pytest tests/integration/ --run-integration -v

# Or via Makefile
make test-integration

Writing Integration Tests

python
import pytest
from apple_mail_fast_mcp.mail_connector import AppleMailConnector

# Skip unless explicitly enabled
pytestmark = pytest.mark.skipif(
    "not config.getoption('--run-integration')",
    reason="Integration tests disabled by default."
)

class TestMailIntegration:
    @pytest.fixture
    def connector(self) -> AppleMailConnector:
        return AppleMailConnector()

    @pytest.fixture
    def test_account(self) -> str:
        import os
        return os.getenv("MAIL_TEST_ACCOUNT", "Gmail")

    def test_list_mailboxes(self, connector, test_account):
        """Verify we can list mailboxes from a real account."""
        result = connector.list_mailboxes(test_account)
        assert isinstance(result, list)
        assert len(result) > 0
        # INBOX should always exist
        assert any("INBOX" in mb for mb in result)

    @pytest.mark.skip(reason="Sends real email - enable manually")
    def test_draft_send_now(self, connector):
        """Test sending a draft - enable manually only."""
        ...

Key Patterns

Never Auto-Run Destructive Tests
python
# Destructive operations (send, delete, move) should be:
# 1. Skipped by default
# 2. Require explicit --run-integration flag
# 3. Require MAIL_TEST_ACCOUNT environment variable
# 4. Target a specific test account, never "all accounts"
Test Account Configuration
python
@pytest.fixture
def test_account(self) -> str:
    """Configurable test account - never hardcode."""
    import os
    return os.getenv("MAIL_TEST_ACCOUNT", "Gmail")
Cleanup After Tests
python
# If test creates data (mailbox, flag), clean up in fixture teardown
@pytest.fixture
def test_mailbox(self, connector, test_account):
    name = f"MCP-Test-{uuid.uuid4()}"
    connector.create_mailbox(test_account, name)
    yield name
    try:
        # Cleanup - don't fail if already deleted
        connector.delete_mailbox(test_account, name)
    except Exception:
        pass

Hard Rule

If you wrote or modified AppleScript in mail_connector.py, integration tests must cover that operation before merge.

This is not optional. This is not "nice to have." Unit tests with mocked _run_applescript() give false confidence about AppleScript correctness.

Common Integration Test Failures

  1. "Not authorized to send Apple events" — Grant Automation permission in System Settings > Privacy & Security > Automation
  2. Account not found — Verify MAIL_TEST_ACCOUNT matches an actual configured account name in Mail.app
  3. Timeout — Large mailboxes may exceed 60s default. Use AppleMailConnector(timeout=120)
  4. Gmail behavior — Gmail move/delete may behave differently than IMAP accounts. Test both if possible.

© s-morgan-jeffries, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/integration-testing of s-morgan-jeffries/apple-mail-fast-mcp.

Open the folder on GitHubat commit ed0cfbc

Compare with similar skills

Integration Testing next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Integration Testing compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Integration Testing this skills-morgan-jeffries/apple-mail-fast-mcp104—~1.2kAutomated safety check: PassMIT
Clean PytestLeoYeAI/openclaw-master-skills2.2k—~4.2kAutomated safety check: PassMIT
JS-in-HTML Testingliaohch3/claude-tap3.3k—~924Automated safety check: PassMIT
Build And Testdtprj/dongting208—~1.1kAutomated safety check: PassApache-2.0
Temporal Python Testingwshobson/agents40k12 repos~1.2kAutomated safety check: PassMIT
Zizkadb TestZIZKA-AI-SL/ZizkaDB123—~358Automated safety check: PassCustom licence

Similar skills

  • Clean Pytest

    LeoYeAI/openclaw-master-skills

    Write clean, maintainable pytest tests using Fake-based testing, contract testing, and dependency injection patterns.

    2.2k GitHub stars~4.2k tokensUpdated 2 mo ago
    Testing & QAAuto-check passed
  • JS-in-HTML Testing

    liaohch3/claude-tap

    Tests JavaScript embedded in an HTML file in two layers: pytest checks of the logic ported to Python, and Playwright runs in a real browser for the DOM.

    3.3k GitHub stars~924 tokensUpdated 16 days ago
    Testing & QAAuto-check passed
  • Build And Test

    dtprj/dongting

    Build/test commands, and unit testing key points including BugLog handling guidelines.

    208 GitHub stars~1.1k tokensUpdated 3 days ago
    Testing & QAAuto-check passed
  • Test Temporal workflows with pytest, time-skipping, and mocking strategies.

    40k GitHub starsUsed in 12 repos~1.2k tokens
    Testing & QAAuto-check passed
  • Zizkadb Test

    ZIZKA-AI-SL/ZizkaDB

    Run the full ZizkaDB test suite across all layers — lint, Python unit tests, SDK tests, MCP tests, TypeScript tests, and dashboard build verification.

    123 GitHub stars~358 tokensUpdated 2 days ago
    Testing & QAAuto-check passed
  • MCP Testing

    adeze/raindrop-mcp

    MCP Testing Strategies with Vitest, Inspector, and Integration Tests

    188 GitHub stars~1.6k tokensUpdated 2 mo ago
    Testing & QAAuto-check passed

More from s-morgan-jeffries/apple-mail-fast-mcp

  • API Design

    s-morgan-jeffries/apple-mail-fast-mcp

    Use BEFORE adding any new tool, parameter, or endpoint to the Apple Mail MCP server.

    104 GitHub stars~876 tokensUpdated 29 days ago
    Auto-check passed
  • Applescript Mail

    s-morgan-jeffries/apple-mail-fast-mcp

    A skill your agent uses when writing, modifying, or debugging ANY AppleScript that interacts with Apple Mail.

    104 GitHub stars~2.5k tokensUpdated 29 days ago
    Auto-check passed
  • Performance Patterns

    s-morgan-jeffries/apple-mail-fast-mcp

    A skill your agent uses when optimizing Apple Mail MCP operations, diagnosing slow queries, adding new filtering logic, or modifying how data is fetched from Mail.app.

    104 GitHub stars~1.5k tokensUpdated 29 days ago
    Auto-check passed
  • Release

    s-morgan-jeffries/apple-mail-fast-mcp

    A skill your agent uses when the user wants to release a new version.

    104 GitHub stars~1.3k tokensUpdated 29 days ago
    Auto-check passed

Categories

Questions about Integration Testing

What does Integration Testing do?

A skill your agent uses when setting up, running, or debugging integration tests against real Apple Mail. Integration Testing is an agent skill from s-morgan-jeffries/apple-mail-fast-mcp. Use when setting up, running, or debugging integration tests against real Apple Mail.

When should I use Integration Testing?

Integration Testing fits situations like: debugging integration tests against real Apple Mail; unit tests pass but behavior seems wrong; adding new AppleScript operations; you need to understand why mocked tests are insufficient for this project.

How do I install Integration Testing in Claude Code?

Run `npx skills add s-morgan-jeffries/apple-mail-fast-mcp --skill integration-testing -a claude-code`. Or copy the skill folder (.claude/skills/integration-testing in s-morgan-jeffries/apple-mail-fast-mcp) into .claude/skills/integration-testing in your project. Claude Code loads it when a task matches its description.

How do I install Integration Testing in Codex?

Run `npx skills add s-morgan-jeffries/apple-mail-fast-mcp --skill integration-testing -a codex`. Or copy the skill folder (.claude/skills/integration-testing in s-morgan-jeffries/apple-mail-fast-mcp) into .agents/skills/integration-testing in your project. Codex loads it when a task matches its description.

Can I use Integration Testing in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add s-morgan-jeffries/apple-mail-fast-mcp --skill integration-testing -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/integration-testing, .gemini/skills/integration-testing, .github/skills/integration-testing and .opencode/skills/integration-testing in your project.

What does Integration Testing need to run?

Going by SKILL.md and its folder, Integration Testing needs the command-line tools its instructions call (make and pytest). Our summary lists: Python 3.

Does Integration Testing access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Integration Testing safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Integration Testing use?

Integration Testing is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Integration Testing use?

About 1.2k tokens (SKILL.md is roughly 4.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Integration Testing?

Skills that share tags, products or a category with Integration Testing: Clean Pytest (LeoYeAI/openclaw-master-skills, 2.2k stars), JS-in-HTML Testing (liaohch3/claude-tap, 3.3k stars), Build And Test (dtprj/dongting, 208 stars) and Temporal Python Testing (wshobson/agents, 40k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Integration Testing?

s-morgan-jeffries (a GitHub user) maintains it in s-morgan-jeffries/apple-mail-fast-mcp, which has 104 GitHub stars. The repository holds 5 skills in this directory. The repository was last updated on September 9, 2026.

Source: s-morgan-jeffries/apple-mail-fast-mcp on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.