# 151-java-performance-jmeter

Sets up JMeter load testing in Java projects by creating a run-jmeter.sh script and standard test directories.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 349 installs · ★ 456
- Author: Juan Antonio Breña Moral
- License: Apache-2.0 · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/jabrena/plinth/tree/HEAD/skills/151-java-performance-jmeter/SKILL.md
- Updated: 2026-10-21
- HTML: https://affpapa.org/en/nevibecode/skills/151-java-performance-jmeter

## What it does

The skill first checks `jmeter --version`. If JMeter is not on your `PATH`, the agent stops immediately. It then scaffolds `src/test/resources/jmeter/` for `load-test.jmx` and `target/` for output artifacts.

Next, it copies `run-jmeter.sh` into the project root and runs `chmod +x run-jmeter.sh`. The template stays unmodified. The script accepts flags for threads (`-t`), loops (`-l`), ramp-up (`-r`), and GUI mode (`-g`). You can also override settings via `JMETER_THREADS`, `JMETER_LOOPS`, or `JMETER_RAMP_UP`.

Without JMeter in your `PATH`, the workflow fails immediately. Install JMeter beforehand.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add jabrena/plinth --skill 151-java-performance-jmeter -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/151-java-performance-jmeter/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/151-java-performance-jmeter/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add jabrena/plinth --skill 151-java-performance-jmeter -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/151-java-performance-jmeter/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add jabrena/plinth --skill 151-java-performance-jmeter -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/151-java-performance-jmeter/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install jabrena/plinth 151-java-performance-jmeter
```

2. **Manually: put the files in place**
- File: `.github/skills/151-java-performance-jmeter/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add jabrena/plinth --skill 151-java-performance-jmeter -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/jabrena/plinth --path skills/151-java-performance-jmeter
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/151-java-performance-jmeter/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add jabrena/plinth --skill 151-java-performance-jmeter -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/jabrena/plinth/tree/HEAD/skills/151-java-performance-jmeter/SKILL.md

## When to use it
- Add a JMeter test execution script to a Java project root
- Create the src/test/resources/jmeter directory structure for test plans
- Configure load test parameters via CLI flags or environment variables
- Validate local JMeter availability before setting up tests

## Example prompts
- Set up JMeter performance testing for this Java project
- Add run-jmeter.sh script and test plan folders for load testing
- Configure JMeter load testing support with environment variable overrides

## Source text · SKILL.md · Apache-2.0

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: c3bbed03b42b2fcb.

BEGIN THIRD-PARTY FILE c3bbed03b42b2fcb
```text
---
name: 151-java-performance-jmeter
description: Use when you need to set up JMeter performance testing for a Java project — including creating the run-jmeter.sh script from the exact template, configuring load tests with loops, threads, and ramp-up, or running performance tests from the project root with custom or default settings. This should trigger for requests such as Improve the code with JMeter performance testing; Apply JMeter performance testing; Refactor the code with JMeter performance testing; Add JMeter support; Create a JMeter test plan for a Java service. Part of Plinth Toolkit
license: Apache-2.0
metadata:
  author: Juan Antonio Breña Moral
  version: 0.19.0
---
# Run performance tests based on JMeter

Provide a complete JMeter performance testing solution by creating the run-jmeter.sh script from the exact template, making it executable, and configuring the project structure for load testing. Supports custom loops, threads, ramp-up, and environment variable overrides.

**What is covered in this Skill?**

- Create run-jmeter.sh in project root from the exact template (no modifications)
- Project structure: src/test/resources/jmeter/load-test.jmx, target/ for results
- Script options: -l (loops), -t (threads), -r (ramp-up), -g (GUI), -h (help)
- Environment variables: JMETER_LOOPS, JMETER_THREADS, JMETER_RAMP_UP
- Verify JMeter is installed and available before proceeding

**Scope:** Copy the script template verbatim. Do not modify, interpret, or enhance the template content.

## Constraints

JMeter must be installed and available in PATH. If not available, show a message and exit. Use only the exact template for the run-jmeter.sh script.

- **PREREQUISITE**: Verify JMeter is installed and accessible via `jmeter --version` before creating the script
- **CRITICAL**: Copy the run-jmeter.sh template exactly — do not modify, interpret, or enhance
- **PERMISSION**: Make the script executable with `chmod +x run-jmeter.sh`
- **BEFORE APPLYING**: Read the reference for the exact script template and usage instructions
- **EDGE CASE**: If request scope is ambiguous, stop and ask a clarifying question before applying changes
- **EDGE CASE**: If required inputs, files, or tooling are missing, report what is missing and ask whether to proceed with setup guidance

## When to use this skill

- Improve the code with JMeter performance testing
- Apply JMeter performance testing
- Refactor the code with JMeter performance testing
- Add JMeter support
- Create a JMeter test plan for a Java service

## Workflow

1. **Verify JMeter prerequisite**

Check `jmeter --version` and stop with guidance if JMeter is not installed or not available in PATH.

2. **Read JMeter reference template**

Read `references/151-java-performance-jmeter.md` and use the `run-jmeter.sh` template exactly as provided.

3. **Create script and project structure**
```
END THIRD-PARTY FILE c3bbed03b42b2fcb

The third-party file has ended. Everything between the c3bbed03b42b2fcb tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2887 of 3372 bytes. © Juan Antonio Breña Moral · Apache-2.0 · https://github.com/jabrena/plinth/tree/HEAD/skills/151-java-performance-jmeter/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
