test-environment-selection

test-environment-selection is a skill for Claude Code, Codex from makifbaysal/tasktrooper. It costs 45 tokens per session (1,185 once invoked), scanned A, original, Apache-2.0.

A procedure for choosing where to run tests before starting the application: a local workspace, a task preview, or a staging environment. It also checks that a preview was built from the correct pull-request code.

In plain words
What is it for?
Use it before executing test scenarios for backend, frontend, full-stack, or worker projects. It selects the appropriate environment, starts local services when needed, and avoids previews that are still building or contain different code.
Why use it?
Testing the wrong environment or an old preview can produce results that do not describe the change under review. This procedure also gives a clear blocker when nothing suitable can run.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it before executing test scenarios for backend, frontend, full-stack, or worker projects. It selects the appropriate environment, starts local services when needed, and avoids previews that are still building or contain different code.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/makifbaysal/tasktrooper/test-environment-selection
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add makifbaysal/tasktrooper --skill test-environment-selection
Clone the repo
git clone --depth 1 https://github.com/makifbaysal/tasktrooper

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for test-environment-selection

README.md
[![agentmods](https://agentmods.dev/badge/skills/makifbaysal/tasktrooper/test-environment-selection/github.svg)](https://agentmods.dev/skills/makifbaysal/tasktrooper/test-environment-selection)
Your own site
<a href="https://agentmods.dev/skills/makifbaysal/tasktrooper/test-environment-selection"><img src="https://agentmods.dev/badge/skills/makifbaysal/tasktrooper/test-environment-selection/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for test-environment-selection

Your own site · 80×15
<a href="https://agentmods.dev/skills/makifbaysal/tasktrooper/test-environment-selection"><img src="https://agentmods.dev/badge/skills/makifbaysal/tasktrooper/test-environment-selection.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,185 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00045 $0.01185
Opus 5.5 $0.00018 $0.00474
Sonnet 5.5 $0.00009 $0.00237
Haiku 4.5 $0.00005 $0.00119

Measured 8d ago against content hash 59b8fcdfdcb6, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

test-environment-selection scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- **Address.** Use `open_url` in the browser (`browser_navigate`) — for a protected preview it carries the bypass and sets a cookie, so the pages it links to load too. For HTTP requests (curl, an API client) use `branch_
catalog/agents/qa-agent/skills/test-environment-selection/SKILL.md · 47 lines

How it starts

The opening of the file, as written. The whole thing — 47 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Test Environment Selection

Overview

Before executing a single scenario, decide WHERE the product will run, in this order:

  1. Backend, worker or full-stack repository: local. DB rows, logs and third-party stubs are only observable there. First choice start_task_preview — it checks out the task branch in the task workspace, detects how to run it, starts it, stops a stale server, and returns a localhost URL for the browser tools; call it again if the URL isn't there yet. Only when it cannot run the project (e.g. a backend+frontend pair, or a worker it doesn't detect), boot by hand (backend-manual-testing).
  2. Frontend-only repository: the task's own preview, else local. When the component is deployed with a per-branch preview environment, get_task_preview returns it — use it when status: "ready" AND built_from_pr_head: true. Anything else (building, built_from_pr_head: false, error, canceled, none, or an empty list) is not the code under test: fall back to start_task_preview.
  3. Stage. Used when the repository is configured for stage verification, or when the app cannot boot locally (managed secrets, heavy infra the workspace lacks) — always after confirming stage is actually running the PR head (see Stage rules).

Production is never a test environment. No scenario is ever executed against the prod base URL or prod data — not a "harmless" GET, not seeding, not cleanup.

How to decide

  1. Identify the repository shape (backend/worker/full-stack vs frontend-only) and apply the order above.
  2. Read the repository settings (list_repositories): build_command, test_command, verify_command — and any comment the developer left on the task (a clean run leaves none). These are the project's declared way of running and checking itself. get_project_brief has the same information plus what each component talks to.
  3. If neither a usable preview nor a local boot nor stage works, you are blocked — see below.

Preview rules

Read the full file on GitHub · 47 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 47 lines · 45 tokens per session scan A 59b8fcdfdcb6

Subscribe to this mod's changes

test-environment-selection is a skill published in the GitHub repository makifbaysal/tasktrooper (113 stars, last pushed yesterday), licensed Apache-2.0. It adds 45 tokens to every session and 1,185 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-05.