
Description
Internal skill to configure environments. Never use unless the user explicitly initiates the skill. Focus on localhost-ready setup and validation.
SKILL.md
<step number="2">
<title>Inspect static repository evidence</title>
<description>Collect only evidence that supports concrete environment fields.</description>
<actions>
<action>Before broader inspection, look through the target repo's developer local-setup documentation first. Start with the closest setup docs that explain how developers run the project locally in a sandbox or localhost context, such as `AGENTS.md`, `README*`, or repo-local runbooks.</action>
<action>Treat repo-local developer setup docs as the primary source of truth for sandbox setup flow, then use package manifests, scripts, CI, and config files to confirm or refine the exact commands.</action>
<action>Do not run `git clone`, ask the user to clone the repo again, or add clone steps to the environment config when the repository is already present in the workspace.</action>
<action>Inspect README and docs.</action>
<action>Inspect repository structure.</action>
<action>Inspect package manifests and lockfiles.</action>
<action>Inspect monorepo/workspace files such as `pnpm-workspace.yaml`, `turbo.json`, and `nx.json`.</action>
<action>Inspect tool version files such as `.tool-versions`, `.nvmrc`, `.node-version`, and `.python-version`.</action>
<action>Inspect Dockerfiles and compose files.</action>
<action>Inspect CI config.</action>
<action>Inspect framework config files.</action>
<action>Inspect the canonical environment config schema or types (for example `packages/types/src/environment-config.ts`) before using optional keys.</action>
<action>Inspect scripts for install, dev, build, preview, test, serve, and start.</action>
<action>When the repo needs infrastructure beyond what is already available, remember that the worker CLI can provision supported services on demand: run `worker services` to see the full list and `worker service <name>` to install and start one service.</action>
<action>Do not invent mocked, stubbed, or fake replacement services just to get the app booting. If repository evidence and supported worker tooling still do not reveal how to run a required real service, stop and ask the user for help with that service.</action>
<action>Identify the canonical test-suite command and any required wrappers (for example `dotenvx`, package filter, or workspace command) when tests exist.</action>
<action>Inspect environment examples such as `.env.example` and `.env.local.example`.</action>
<action>Prefer correctness and evidence over completeness.</action>
<action>Omit uncertain fields rather than guessing.</action>
</actions>
<validation>Developer local-setup docs were checked first, and every planned config field has concrete repository evidence or is intentionally omitted.</validation>
</step>
</steps>
<step number="4">
<title>Run practical validation when feasible</title>
<description>Use runtime evidence to confirm install/start assumptions without over-expanding scope. Local validation should prove that the app serves successfully on localhost when a browser UI exists, without relying on direct browser automation from this workflow.</description>
<actions>
<action>Run validation workflow in order:
- Inspect the repository statically.
- Draft the initial config.
- For every command added to
repositories[].commands, run that exact command in config order when practical instead of validating only a representative subset. - For each command you run, confirm the result immediately from exit status, stdout/stderr, created artifacts, log output, readiness checks, localhost reachability, or other command-appropriate runtime evidence.
- For detached commands, confirm both that the process launched and that its
logfileor readiness check shows the expected service actually started. - If a test suite exists and is practical to run, execute the canonical test command.
- Treat that test result as a blocker when it points to missing setup, broken environment definition, unavailable required services or secrets, or another problem that environment-setup can fix or that prevents local startup from being trusted.
- When the test failure instead appears to be a clearly pre-existing repository or unit-test failure outside environment-setup scope, record the exact command and failure, keep the suite referenced in
agentInstructions, and continue only if install/start/localhost validation is otherwise sufficient. - If the app exposes an HTTP UI, set
initialUrlto the best validated absolute localhost URL (or keepabout:blankonly when no better landing page exists), confirm that localhost URL through loopback HTTP reachability and startup evidence, and record the exact URL plus the evidence used. Do not use direct browser automation fromenvironment-setup. - When the config includes a
portsentry for a validated HTTP surface, confirm itsportnumber matches the actual validated listening port and that anyinitial_pathresponds successfully over loopback. 10a. When the config includesdocker_projects, rundocker compose config --quietagainst the selected files or an equivalent generated one-service Compose model, start the selected services, wait for readiness, and confirm mapped HTTP ports over loopback. Capturedocker compose ps --alland recent service logs when startup fails. - If the app exposes only an HTTP API or a non-browser surface, verify localhost reachability using loopback addresses only.
- If any command in the draft config fails or cannot be confirmed, either revise or remove that command from the YAML, or report the exact blocker; do not leave unrun or unconfirmed commands in the final config.
- As soon as repository evidence or early validation makes it clear that specific environment variables or secrets will be required and values are unavailable, request them immediately instead of waiting for a later failure.
- In web dashboard tasks and Slack-started setup tasks, use
request_environment_variablesto request the needed keys securely instead of asking the user to paste secret values into the conversation. - In Slack-started setup tasks, send a concise
send_chat_replyupdate withpurposeset toprogressthat names the required keys and explains what they unblock, but do not include the secure/setuplink yourself because the platform automatically accompanies the request with that secure-entry link afterrequest_environment_variablessucceeds. - In non-web surfaces where that tool is unavailable, ask the user to add the missing environment variables locally in the current running task, including exact variable names, what command each one blocks, and exact actions to set them.
- If a required real service still cannot be installed, started, or connected after checking repository evidence and supported worker tooling, ask the user for help with that service instead of substituting a mocked or fake service.
- If local install/test/start validation is blocked by missing environment variables or secrets, do not create an environment yet.
- Keep the drafted YAML best-effort and revise it so it will work once those variables are provided, without fabricating values.
- After the user confirms variables were added locally or provides guidance for the blocked real service, rerun the blocked or otherwise affected local validation steps and re-confirm every affected command.
- Revise the config based on actual observations, using runtime evidence for startup details.
- Only after local install/test/start works (or is otherwise sufficiently validated), persist the drafted YAML by creating a new environment or updating the specified existing environment, depending on the task context.
- If environment persistence fails because the YAML still needs adjustment, revise the config based on the failure and retry at most 2 times.
- After environment persistence succeeds, use the Roomote MCP task tools to launch one lightweight follow-up verification task against that environment before finishing this setup task.
- For that follow-up task launch, call the Roomote MCP tool
mcp__roomote__manage_taskswithaction: "list_environments"first so you can confirm the created or updated environment appears as a current launch target and copy the exact returnedenvironmentId. - Then call the Roomote MCP tool
mcp__roomote__manage_taskswithaction: "launch",environmentIdset to that created or updated environment ID,notifyOnSettleset totrue, and a concrete prompt such asConfirm that this environment is running correctly. First read .roomote/setup-status.json in the workspace root: while its state is "running", environment setup commands are still executing in the background — wait for it to reach a terminal state (you will get an in-session notification when it settles) instead of concluding startup is stuck. Re-read .roomote/setup-status.json every 10-15 seconds while it is still running, rather than sleeping for several minutes at a time. Once setup has settled, use localhost or the environment's initial URL to verify the expected service responds successfully and confirm there are no obvious startup failures blocking basic use. If any setup command failed, report each failing command's name and exit code from .roomote/setup-status.json plus the relevant error lines from .roomote/setup-logs/. Report the exact step that fails plus any visible error messages or logs. If everything works, say that the environment looks ready.. - Keep the returned
taskIdfor internal monitoring only. Do not expose the spawned verification task link in the user-facing response. 27a. Because the launch usednotifyOnSettle: true, the platform delivers aSpawned task updatemessage into this session when the verification task settles (completes, fails, is canceled, or goes idle after reporting). Treat that message as the primary completion signal: it is safe to finish other pending work or wait between summary checks, because the settle notification arrives even if this task has gone idle. When it arrives, immediately fetch the verification outcome withaction: "get_summary"andaction: "get_messages"and continue the workflow from step 31. - While waiting for that settle notification, check the verification task every 10-15 seconds with the Roomote MCP tool
mcp__roomote__manage_tasksusingaction: "get_summary"and the returnedtaskIdas a fallback signal. Use that per-task summary as the source of truth for task state, including any surfaced startup or runtime failure details and theEnvironment Setupline, which reports the ground-truth lifecycle of the verification task's environment setup commands: treatstill running in the backgroundas normal active startup rather than a stall, treatfailedorcompleted with warningsas direct evidence that specific setup commands failed even when the verification task has not described the failure yet, and whenEnvironment Setupiscompletedimmediately inspect the latest task messages instead of sleeping for another long interval. - Narrate concise, plain-language progress updates while the follow-up check runs, so the user can see that setup is still being checked without being asked to wait. Say what is being checked (for example,
I'm confirming the environment starts cleanly) rather than mentioning a spawned task, task status, polling, or monitoring. - Continue checking the verification task while the summary shows an active startup or running state, or until it clearly reports a startup or runtime blocker through the summary. Preparing the environment can take several minutes, so do not stop monitoring just because startup is taking a long time; keep checks frequent enough that a completed setup or completed verification is noticed promptly.
- If the monitored summary reaches
Completedwithout a surfaced startup or runtime failure, treat that as a successful spawned-task run and report that observed outcome directly instead of asking the user to confirm it manually. - If the monitored summary reaches
Ready,Idle, orNeeds input, do not keep polling that same state indefinitely. Inspect the latest task messages to determine whether the verification task already reported success, surfaced a blocker, or is unexpectedly waiting for follow-up input. - If those latest task messages clearly report that the environment looks ready, treat that as a successful spawned-task run and report the observed success directly.
- If those latest task messages surface a startup or runtime blocker, request unexpected user input, or otherwise fail to give a clear success outcome, treat that as a blocker or verification failure instead of pretending the environment is verified.
34a. The persisted environment metadata is the source of truth for the web UI's verification state, so you must record the verification outcome explicitly. Once you have a clear outcome, call the Roomote MCP tool
mcp__roomote__manage_environmentswithaction: "record_verification"andenvironmentIdset to the created or updated environment id: usesuccess: trueonly when the explicit "environment looks ready" criterion above is satisfied, and usesuccess: falsewith a short, user-safeerrormessage when verification reaches a terminal failure or cannot be completed. Never put secrets or the full environment YAML in theerrortext. You do not need to pass any task id; Roomote derives the recording task automatically. 34b. Ifrecord_verificationis rejected because a newer verification attempt or a runtime-affecting edit superseded this one, do not retry recording; treat this verification attempt as superseded and stop, since a newer attempt now owns the environment's verification state. - If the settle notification or the monitored summary reports
Failed,Canceled, a startup or runtime error, or anEnvironment Setupstate offailedorcompleted with warnings, inspect the exact status and error — asking the verification task for the failing command names, exit codes, and log excerpts from.roomote/setup-status.jsonand.roomote/setup-logs/when they are not already surfaced — and decide whether the problem appears fixable within environment-setup scope, such as revising commands, services, environment variables, startup order, readiness checks, or other environment-definition details. - When the spawned verification task reveals a fixable setup or environment-definition error, try to fix it yourself, rerun any affected local validation, recreate or update the environment with the revised YAML, launch a fresh verification task, and repeat the monitoring process instead of stopping after the first failure.
- Treat each fix attempt as a real retry loop: revise based on the observed error, revalidate the affected setup steps, persist the updated environment again, relaunch the verification task with
notifyOnSettle: true, and wait for the new settle notification rather than assuming the old failure is resolved. - Keep this verification-repair loop bounded. Retry at most 2 additional full environment-update-plus-verification attempts after the first spawned verification task unless the task context explicitly justifies a smaller limit.
- If the observed verification error appears to require product or source-code changes outside environment-setup scope, missing external credentials, unsupported infrastructure, or another user decision you cannot safely make, report that blocker instead of pretending the environment can be repaired automatically.
- If the verification task remains in an active startup or running state without surfacing a blocker you can act on, keep monitoring instead of handing the waiting back to the user.
- If the environment was persisted but the follow-up check could not be completed, explain that readiness could not be confirmed and name the real blocker in user terms. Do not pretend the environment is ready.
- If full validation or environment persistence is blocked by missing dependencies, localhost reachability limits, permissions, unavailable environment APIs, or a required real service that still needs user guidance after local validation, keep the config minimal and report the blocker.
The final config reflects observed install/test/start behavior where practical and clearly reports any validation limits.
<completion_criteria>
mcp__roomote__manage_tasks with action: "get_summary" before this setup task finishes, unless an explicit blocker prevents launch or monitoring.mcp__roomote__manage_environments with action: "record_verification" (success: true only when the environment explicitly looks ready, otherwise success: false with a user-safe error), unless a blocker prevents launch or monitoring or the recording is rejected as superseded.[Create a new task](/) as the clear next action.Completed without a surfaced startup or runtime failure, the final response reports that the environment is ready to use instead of asking the user to confirm it manually or describing the verification task.request_environment_variables in web tasks and Slack-started setup tasks, or asks the user to set them locally in the current task before proceeding with affected validation.repositories[].commands list was run and explicitly confirmed during validation, or an explicit blocker explains why validation could not proceed.
<schema_reference>
<docker_project_config>
<docker_project_port>
<named_port_config>
ROOMOTE_WEB_HOST variable). Configure one entry per validated human-facing HTTP surface, particularly web app UIs.<repository_config>
<command_config>
<allowed_services>
</schema_reference>
<hard_rules>
repositories[].repository; never shorten or reconstruct it from a checkout path. Azure DevOps identifiers must retain organization/project/repository.git clone, ask the user to re-clone a repository that is already present, or include clone steps in repositories[].commands.repositories[].commands only for executing commands and setting configuration needed to validate the environment.repositories[].commands entries instead of asking the user to edit files directly.repositories[].commands to write, generate, or patch application or source code; if source changes are required, report that as a blocker or separate follow-up work.run field as newline-split before execution. Do not rely on YAML multiline blocks to preserve shell control flow across lines.run: | blocks for if ... fi, case, loops, heredocs, or multiline shell functions unless the entire block is wrapped inside one explicit shell command such as bash -lc '...'.docker_projects only when a checked-in Compose project or Dockerfile is the evidence-backed development path, and validate the exact model before persistence.tool_versions only when clearly discoverable.initialUrl to the best validated absolute URL unless about:blank is intentionally required.ports entry so the environment publishes a shareable preview URL for it; keep the ports list limited to validated human-facing surfaces and confirm each configured port number against the actual validated listening port.agentInstructions as instructions for future agents running inside the created environment, not as setup progress notes or setup next-step guidance for this skill run.agentInstructions must explain how agents access it, including any authentication steps. Do not assume agents will discover auth flows, test credentials, or dev-mode conventions on their own.agentInstructions and state that the suite should pass before completing future code changes, even when setup validation reports a clearly pre-existing repo failure.repositories[].commands must be run during validation in config order unless an explicit blocker prevents it.repositories[].commands must be explicitly confirmed from execution evidence appropriate to that command, such as exit status, log inspection, artifact creation, localhost reachability, or other command-appropriate runtime evidence.environment-setup; keep localhost validation in this skill to loopback reachability and startup evidence.request_environment_variables in web tasks and Slack-started setup tasks, or the user adds them locally and validation is retried.request_environment_variables and never ask the user to paste secret values into the conversation.send_chat_reply message with purpose set to progress naming the required keys and what they unblock, but do not include the secure /setup link yourself because the platform automatically accompanies the request with that secure-entry link after request_environment_variables succeeds.initialUrl through non-browser evidence when the app exposes a browser UI.mcp__roomote__manage_tasks to launch a lightweight verification task against the created or updated environment and monitor it yourself instead of leaving verification as an implicit manual next step.mcp__roomote__manage_tasks with action: "list_environments" so the environment target is grounded in current Roomote data and you can copy the exact returned environmentId.mcp__roomote__manage_tasks using action: "get_summary" and use that per-task summary surface as the source of truth for task status and surfaced startup failures.Ready, Idle, or Needs input, inspect the latest task messages instead of polling that state forever, and only treat it as success when those messages clearly report that the environment looks ready.mcp__roomote__manage_environments with action: "record_verification" and the created or updated environmentId: success: true only when the explicit "environment looks ready" criterion is satisfied, and success: false with a short, user-safe error when verification reaches a terminal failure or cannot be completed. Do not include secrets or the full environment YAML in the error, and do not pass a task id (Roomote derives the recording task from the current run).record_verification result as a superseded attempt: do not retry recording, because a newer verification attempt or a runtime-affecting edit now owns the environment's verification state.dev, start, serve, preview, or watchers) must use detached: true.detached: true must set logfile to capture runtime output.pm2 start, nohup, shell trailing &, or another process supervisor in run for environment repository commands. Use the normal foreground command with detached: true; Roomote supervises it with PM2 and restarts it if it exits unexpectedly.env values.
<example_notes>
<best_practices>
commands keeps setup reproducible and avoids asking the user for avoidable code changes.run commands.run on literal newlines, so one-line commands or explicit shell wrappers are much less error-prone than YAML block-scalar shell scripts./tmp reduces repository noise and prevents unexpected unstaged changes.
<error_handling>
Assumptions or Blockers instead of guessing.agentInstructions, and continue with environment persistence only when install/start/localhost validation is otherwise sufficient.commands-based setup and non-repo file options were insufficient.
More skills from the Roomote repository
View all 32 skillsaddress-pr-feedback
address unresolved GitHub PR feedback
Jul 19Code ReviewGitHubPull Requestsagent-browser
automate browser interactions for agents
Jul 16Browser AutomationCLITestingcapture-visual-proof
capture visual proof of browser tasks
Jul 16AutomationBrowser AutomationScreenshotsci-failure-triage
triage failed CI workflows
Jul 23CI/CDDebuggingGitHub Actionscode-quality-auditor
audit code quality in merged pull requests
Jul 26Code AnalysisCode ReviewQAcodeql-triage
triage and remediate CodeQL security alerts
Jul 19Code AnalysisCodeQLDebuggingGitHub +2
More from Roo Code
View publishercreate-draft-pr
create draft pull requests
Roomote
Jul 16AutomationGitHubPull Requestscreate-pr
create pull requests for pending changes
Roomote
Jul 16GitHubPull Requestsdebug-reported-bug
reproduce and debug reported bugs
Roomote
Jul 16DebuggingGitTestingdependabot-triage
triage GitHub Dependabot alerts
Roomote
Jul 26AutomationGitHubSecurityTriageexplain-repo-code
explain repository code and architecture
Roomote
Jul 16Code AnalysisDocumentation