# Sample: running tests on a Windows machine over SSH with an AI agent

ReportExport is a small library that writes orders to CSV files and archives them. All its tests pass on
macOS and Linux. Three of them fail on Windows, for three different reasons, and one of the reasons is hidden
behind another one until the first is fixed.

The agent works on your machine and runs the tests on a Windows machine over SSH. The Windows machine needs
the OpenSSH server, the .NET 10 SDK, and your public key in its authorized keys. Check that this works, and
does not ask for a password:

    ssh -o BatchMode=yes user@windows-machine "dotnet --list-sdks"

The skill copies the working tree with git: initialize a repository first, and make the script executable
(zip files do not keep the permission).

    chmod +x .claude/skills/testing-on-windows-over-ssh/run-on-windows.sh
    git init
    git add -A
    git commit -m "Initial commit"

Then set the host, and open the agent in this folder:

    export WINDOWS_TEST_HOST=user@windows-machine

and ask:

    The Windows CI fails on this repository, and all the tests pass on my Mac. Run the tests on Windows and
    fix what fails.

.claude/settings.json allows the agent to run the script without asking every time.
.claude/skills/testing-on-windows-over-ssh/SKILL.md is the skill the agent uses, and run-on-windows.sh, next
to it, is the script it runs. Claude Code and GitHub Copilot read the skill from that path as is; for Codex,
move the folder to .agents/skills/.

The script copies the files to %USERPROFILE%\agent-work\ReportExport on the Windows machine, and deletes the
previous copy first.
