pymapdl: Agent for Claude Code

.github/agents/tester.agent.md

tester is an agent for Claude Code from ansys/pymapdl. It costs 37 tokens per session (598 once invoked), scanned A, original, MIT.

A testing role for Python projects, with guidance on test coverage, mocks, fixtures, and conditional test setup. It includes project-specific practices for testing PyMAPDL, a Python library that connects to the MAPDL engineering solver.

In plain words
What is it for?
Use it to write or review Python tests, mock external services, investigate flaky tests, and run tests only in suitable local, remote, or platform environments.
Why use it?
It helps improve test coverage and reliability while avoiding unnecessary launches of expensive MAPDL instances.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md).

This is ansys/pymapdl's own configuration. It tells Claude Code how to work on pymapdl itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything pymapdl configures →

Reuse

Borrowing it

Nothing to install: this file belongs to ansys/pymapdl. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/ansys/pymapdl/main/.github/agents/tester.agent.md
Clone the repo
git clone --depth 1 https://github.com/ansys/pymapdl

Made for: Claude Code.

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 tester

README.md
[![agentmods](https://agentmods.dev/badge/agents/ansys/pymapdl/tester/github.svg)](https://agentmods.dev/agents/ansys/pymapdl/tester)
Your own site
<a href="https://agentmods.dev/agents/ansys/pymapdl/tester"><img src="https://agentmods.dev/badge/agents/ansys/pymapdl/tester/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 tester

Your own site · 80×15
<a href="https://agentmods.dev/agents/ansys/pymapdl/tester"><img src="https://agentmods.dev/badge/agents/ansys/pymapdl/tester.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 37 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 598 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00037 $0.00598
Opus 5.5 $0.00015 $0.00239
Sonnet 5.5 $0.00007 $0.00120
Haiku 4.5 $0.00004 $0.00060

Measured 2mo ago against content hash c3eb9c6413c8, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

tester scanned grade A with 0 findings 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 2mo 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.github/agents/tester.agent.md · 87 lines

How it starts

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

Test Engineer Agent

Coverage target

Minimum 90% — run with:

uv run pytest --cov=src/ansys/mapdl/core --cov-report=term

MAPDL instances are expensive — mock whenever possible

from unittest.mock import Mock


def test_feature_without_mapdl():
    expected_value = object()
    mock_mapdl = Mock()
    mock_mapdl.some_method.return_value = expected_value
    ...

Existing fixtures are in tests/conftest.py (especially the mapdl fixture).

Conditional skipping

Use requires() from conftest.py instead of pytest.mark.skipif:

from conftest import requires


@requires("local")
def test_local_feature(mapdl): ...


@requires("remote")
def test_remote_feature(mapdl): ...

Accepted strings: "local", "remote", "grpc", "console", "dpf", "linux", "nolinux", "windows", "nowindows", "xserver", "cicd", "nocicd", "gui", or any importable package name.

Key env vars

Variable Purpose
PYMAPDL_START_INSTANCE Set to False to connect to an existing instance instead of launching one
PYMAPDL_PORT gRPC server port (default 50052)
PYMAPDL_IP gRPC server IP (default 127.0.0.1)
ON_LOCAL Force local mode detection
ON_CI Marks run as CI; some tests skip

pytest config

Configured with --maxfail=2 in pyproject.toml. Override locally:

uv run pytest -p no:randomly --maxfail=100

CI-like testing via tox + Docker

Same tox envs as documented in the developer agent. For testers, typical workflow:

If running test locally against local Docker images:

export PYMAPDL_PORT=50052
export PYMAPDL_START_INSTANCE=True
uvx tox -e docker-run-mapdl
pytest -v
uvx tox -e docker-stop-mapdl # Stop MAPDL

If running test locally inside a container (mirroring CI):

uvx tox -e docker-test-local    # or docker-test-remote to mirror CI exactly

Each directory that needs env vars contains an example.env. Copy to .env — tox loads it automatically.

Read the full file on GitHub · 87 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. 2mo ago First seen · 87 lines · 37 tokens per session scan A c3eb9c6413c8

Subscribe to this mod's changes

tester is an agent published in the GitHub repository ansys/pymapdl (525 stars, last pushed today), licensed MIT. It adds 37 tokens to every session and 598 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

python-pro

Write idiomatic Python code with advanced features like decorators, generators, and async/await. Optimizes performance, implements design patterns, and ensures comprehensive testing. Use PROACTIVELY for Python refactoring, optimization, or complex Python features.

echoVic/blade-code · 51 tokens

temporal-test-builder

Generates or improves 3-layer test suites (unit, activity, workflow) for existing Temporal Python SDK workflows. Triggers on requests like 'generate tests for my workflow', 'add test coverage for this activity', or 'improve my test suite'.

canonical/copilot-collections · 56 tokens

python-test-engineer

Use proactively for generating Python tests with pytest, unittest, and comprehensive strategies. Expert in async testing, mocking, and property-based testing.

ProjAnvil/MindForge · 32 tokens

python-test-engineer

Write behavior-driven suites and drive TDD workflows in Python. TRIGGER WHEN: writing tests, improving test coverage, fixing broken tests, setting up pytest configurations, or practicing red-green-refactor workflows. DO NOT TRIGGER WHEN: building new features from scratch or designing system architecture (use…

acaprino/daodan · 66 tokens

aggregate-tests-implementator

Implements pytest test functions for > classes from the Tests table in .domain/test-plan.md. Requires @aggregate-fixtures-writer to have run first. Invoke with: @aggregate-tests-implementator.

voro6yov/spec-driven-development · 0 tokens

python-expert

Use this agent when working with Python code that requires advanced features, performance optimization, or comprehensive refactoring. Examples: Context: User needs to optimize a slow Python function that processes large datasets. user: "This function is taking too long to process our data, can you help optimize it?"…

xbim08/awesome-claude-code-plugins · 0 tokens