Generate and execute real-environment deployment tests via Taskfile + SSH
Generate Taskfile-based testing frameworks for projects that need real remote environment deployment testing — build → deploy → benchmark → collect results, all automated via SSH.
Use /real-env-test when:
Do NOT use when:
test-runner agent instead)| Component | Type | Purpose |
|---|
| This file (SKILL.md) | Skill — injected instructions | Guides the current session through framework generation |
test-runner | Sub-agent — independent context | Executes tests following the generated README workflows |
/run-test | Command — user-triggered | Directly invokes test-runner for existing frameworks |
Key distinction: This Skill runs inside the current session. It is NOT a
separate process. The sub-agent test-runner IS a separate context window.
Phase 1: Information Collection (this session)
↓
Phase 2: Framework Generation (this session)
↓
Phase 3: Test Execution (delegated to test-runner sub-agent)
↓
Phase 4: Result Analysis (back in this session)
Goal: Understand the project and gather everything needed to generate the testing framework.
Detailed instructions: Read phase1-collection.md in this directory.
Auto-scan the project: Read build files (Makefile, Cargo.toml, go.mod), deployment docs (README, INSTALL.md), systemd units, config templates.
Evaluate completeness and select mode:
| Project docs | User intent | Mode |
|---|---|---|
| Complete | Clear | Fast — ≤3 questions |
| Partial | Clear | Semi — ask only about gaps |
| Complete | Vague | Semi — ask only about test specifics |
| Missing | Vague | Full — 7-category questionnaire |
Collect missing information via multi-turn dialogue.
Present a summary of all inferred + confirmed values for user approval.
Goal: Generate a complete testing/ directory with all files needed for
automated testing.
Detailed instructions: Read phase2-generation.md in this directory.
Generate the following directory structure:
<project>/testing/
├── Taskfile.yml # All task definitions
├── env.example.yml # Configuration template (committed)
├── env.yml # User's local config (git-ignored)
├── .gitignore # Ignore env.yml and results/
├── scripts/
│ ├── remote-setup.sh # Install + configure on remote
│ ├── collect-metrics.sh # System metrics sampling
│ └── collect-logs.sh # Service log capture
├── results/ # Test results (git-ignored)
└── README.md # Agent-friendly workflow documentation
Templates are in the templates/ subdirectory of this skill. Use them as
the skeleton and fill in project-specific values.
templates/Taskfile.yml.tpl — replace {{PLACEHOLDER}} markerstemplates/README.md.tpl — fill in project-specific sectionstemplates/env.example.yml — adjust fields for the projectscripts/ based on project's deploy/install requirements.gitignore with env.yml and results/Goal: Execute the generated testing workflows on the remote host.
This phase is delegated to the test-runner sub-agent (defined in
.claude/agents/test-runner.md).
env.yml/run-test command directlySpawn the test-runner sub-agent with the following message:
Execute testing workflow for project at <path>.
Working directory: <project>/testing/
Workflow: <1|2|3|4> (or specific task commands)
Parameter overrides: <if any, e.g., rate=20, duration=120>
Read the README.md in the testing directory for complete workflow instructions.
testing/README.md for available workflowstesting/env.yml for current configurationtask validate to confirm setupbench:start → poll bench:status → bench:stoptask collectGoal: Interpret the test results and report findings to the user.
After test-runner completes:
Read result files in testing/results/run_<timestamp>/:
benchmark/*.json — benchmark reportsmetrics/ — system resource usage (CPU, memory, disk I/O)logs/ — service logsExtract key metrics:
Identify issues:
Report to user with:
All generated testing frameworks MUST follow these principles:
env.yml