k6-load-test▌
dengineproblem/agents-monorepo · updated Apr 8, 2026
MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.
Expert in performance testing with k6 framework.
k6 Load Testing Expert
Expert in performance testing with k6 framework.
Core k6 Principles
- Virtual Users (VUs): Each VU runs the test script independently in parallel
- Iterations vs Duration: Choose between iteration-based or time-based test execution
- Stages: Gradually ramp up/down load to simulate realistic traffic patterns
- Thresholds: Define pass/fail criteria for automated performance validation
- Metrics: Focus on key performance indicators (response time, throughput, error rate)
Basic Test Script Structure
import http from 'k6/http';
import { check, sleep } from 'k6';
import { Rate, Trend } from 'k6/metrics';
// Custom metrics
const errorRate = new Rate('errors');
const customTrend = new Trend('custom_duration');
// Test configuration
export const options = {
stages: [
{ duration: '2m', target: 10 }, // Ramp up to 10 users
{ duration: '5m', target: 10 }, // Stay at 10 users
{ duration: '2m', target: 20 }, // Ramp up to 20 users
{ duration: '5m', target: 20 }, // Stay at 20 users
{ duration: '2m', target: 0 }, // Ramp down to 0
],
thresholds: {
http_req_duration: ['p(95)<500'], // 95% of requests under 500ms
http_req_failed: ['rate<0.1'], // Error rate under 10%
errors: ['rate<0.1'],
},
};
// Setup function (runs once before test)
export function setup() {
// Prepare test data, authenticate, etc.
const loginRes = http.post('https://api.example.com/auth/login', {
email: '[email protected]',
password: 'password123',
});
return { token: loginRes.json('token') };
}
// Main test function (runs for each VU)
export default function(data) {
const params = {
headers: {
'Authorization': `Bearer ${data.token}`,
'Content-Type': 'application/json',
},
};
const response = http.get('https://api.example.com/users', params);
// Verify response
check(response, {
'status is 200': (r) => r.status === 200,
'response time < 500ms': (r) => r.timings.duration < 500,
'response body contains users': (r) => r.body.includes('users'),
});
// Track custom metrics
errorRate.add(response.status !== 200);
customTrend.add(response.timings.duration);
// Think time between requests
sleep(Math.random() * 2 + 1); // 1-3 seconds
}
// Teardown function (runs once after test)
export function teardown(data) {
// Cleanup operations
console.log('Test completed');
}
Test Scenario Patterns
Load Test (Normal Traffic)
export const options = {
stages: [
{ duration: '5m', target: 50 }, // Ramp up
{ duration: '30m', target: 50 }, // Steady state
{ duration: '5m', target: 0 }, // Ramp down
],
thresholds: {
http_req_duration: ['p(95)<200', 'p(99)<500'],
http_req_failed: ['rate<0.01'],
},
};
Stress Test (Beyond Normal Capacity)
export const options = {
stages: [
{ duration: '2m', target: 100 },
{ duration: '5m', target: 100 },
{ duration: '2m', target: 200 },
{ duration: '5m', target: 200 },
{ duration: '2m', target: 300 }, // Beyond normal capacity
{ duration: '5m', target: 300 },
{ how to use k6-load-testHow to use k6-load-test on Cursor
AI-first code editor with Composer
1Prerequisites
Before installing skills in Cursor, ensure your development environment meets these requirements:
- ›Cursor installed and configured on your development machine
- ›Node.js version 16.0+ with npm package manager (verify with
node --version) - ›Active project directory or workspace where you want to add k6-load-test
2Execute installation command
Execute the skills CLI command in your project's root directory to begin installation:
$npx skills add https://github.com/dengineproblem/agents-monorepo --skill k6-load-testThe skills CLI fetches k6-load-test from GitHub repository dengineproblem/agents-monorepo and configures it for Cursor.
3Select Cursor when prompted
The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:
◆ Which agents do you want to install to?││ ── Universal (.agents/skills) ── always included ────│ • Amp│ • Antigravity│ • Cline│ • Codex│ ●Cursor(selected)│ • Cursor│ • Windsurf4Verify installation
Confirm successful installation by checking the skill directory location:
.cursor/skills/k6-load-testReload or restart Cursor to activate k6-load-test. Access the skill through slash commands (e.g., /k6-load-test) or your agent's skill management interface.
⚠Security & Verification Notice
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.
Additional Resources
List & Monetize Your Skill
Submit your Claude Code skill and start earning
GET_STARTED →Use Cases▌
Task Automation & Efficiency
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
✓Save 3-5 hours per week on routine tasks
Knowledge Enhancement
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
✓Accelerate learning and skill development by 2x
Quality Improvement
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
✓Improve work quality by 30-40% with less effort
Implementation Guide▌
Prerequisites
- ›Claude Desktop or compatible AI client with skill support
- ›Clear understanding of task or problem to solve
- ›Willingness to iterate and refine outputs
Time Estimate
15-45 minutes depending on use case complexity
Installation Steps
- 1.Install skill using provided installation command
- 2.Test with simple use case relevant to your work
- 3.Evaluate output quality and relevance
- 4.Iterate on prompts to improve results
- 5.Integrate into regular workflow if valuable
Common Pitfalls
- ⚠Expecting perfect results without iteration
- ⚠Not providing enough context in prompts
- ⚠Using skill for tasks outside its intended scope
- ⚠Accepting outputs without review and validation
Best Practices▌
✓ Do
- +Start with clear, specific prompts
- +Provide relevant context and constraints
- +Review and refine all outputs before using
- +Iterate to improve output quality
- +Document successful prompt patterns
✗ Don't
- −Don't use without understanding skill limitations
- −Don't skip validation of outputs
- −Don't share sensitive information in prompts
- −Don't expect skill to replace human judgment
💡 Pro Tips
- ★Be specific about desired format and style
- ★Ask for multiple options to choose from
- ★Request explanations to understand reasoning
- ★Combine AI efficiency with human expertise
When to Use This▌
✓ Use When
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
✗ Avoid When
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
Learning Path▌
- 1Familiarize yourself with skill capabilities and limitations
- 2Start with low-risk, non-critical tasks
- 3Progress to more complex and valuable use cases
- 4Build expertise through regular use and experimentation
Discussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
general reviewsRatings
4.8★★★★★47 reviews- ★★★★★Yuki Nasser· Dec 16, 2024
k6-load-test fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- ★★★★★Chaitanya Patil· Dec 4, 2024
Useful defaults in k6-load-test — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- ★★★★★Piyush G· Nov 23, 2024
k6-load-test is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
- ★★★★★Hiroshi Chen· Nov 7, 2024
Registry listing for k6-load-test matched our evaluation — installs cleanly and behaves as described in the markdown.
- ★★★★★Evelyn Nasser· Oct 26, 2024
k6-load-test reduced setup friction for our internal harness; good balance of opinion and flexibility.
- ★★★★★Shikha Mishra· Oct 14, 2024
Keeps context tight: k6-load-test is the kind of skill you can hand to a new teammate without a long onboarding doc.
- ★★★★★Hiroshi Yang· Sep 25, 2024
Registry listing for k6-load-test matched our evaluation — installs cleanly and behaves as described in the markdown.
- ★★★★★Isabella White· Sep 21, 2024
Solid pick for teams standardizing on skills: k6-load-test is focused, and the summary matches what you get after install.
- ★★★★★Zara Flores· Sep 13, 2024
Useful defaults in k6-load-test — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- ★★★★★Emma Choi· Sep 9, 2024
k6-load-test has been reliable in day-to-day use. Documentation quality is above average for community skills.
showing 1-10 of 47
1 / 5