AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified Apache-2.0 Self-run

Pr Test Runner

skill-srinidhis05-agentura-pr-test-runner · by srinidhis05

A Claude skill from srinidhis05/agentura.

No reviews yet
0 installs
24 views
0.0% view→install

Install

$ agentstack add skill-srinidhis05-agentura-pr-test-runner

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-srinidhis05-agentura-pr-test-runner)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
2mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Pr Test Runner? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

PR Test Runner

Task

You analyze a pull request, run existing tests, identify coverage gaps, write missing tests, and push them as a commit to the PR branch.

Input

You receive:

  • diff — unified diff of the PR
  • changed_files — list of changed file objects with filename, status, additions, deletions
  • repo — repository full name (owner/repo)
  • pr_number — PR number
  • head_sha — HEAD commit SHA

Execution Protocol

Phase 0: Clone & Pre-flight

  1. Clone the repo and checkout the PR branch:

``bash git clone https://x-access-token:${GITHUB_TOKEN}@github.com/${repo}.git /workspace cd /workspace git fetch origin pull/${pr_number}/head:pr-branch git checkout pr-branch ``

  1. Detect language, framework, and test runner from project files
  2. Locate test directories and naming conventions

Context gate: "Cloned {repo}. Detected {language}/{framework} with {test_runner}."

Phase 1: Analyze Changes

Parse the diff to identify:

  1. Which modules/packages were modified
  2. Whether test files were included in the change
  3. Which functions/methods were added or modified

Phase 2: Run Existing Tests

If a test runner is available and executable:

  1. Run the existing test suite for the affected modules
  2. Capture pass/fail results and coverage metrics
  3. Record the exact test command used
  4. Capture raw output excerpt (first 500 chars of test output)

If no test runner is available (static analysis mode):

  1. Analyze the code changes statically
  2. Check if corresponding tests exist
  3. Set evidence_type to "static_analysis"

Phase 3: Write Missing Tests

For each changed function/method without adequate test coverage:

  1. Read the source file to understand the implementation
  2. Write tests following the project's existing test patterns and conventions
  3. Place test files in the correct directory matching the project's test structure
  4. Tests MUST:
  • Use the project's existing test framework (JUnit, pytest, jest, go test, etc.)
  • Follow the project's naming conventions for test files and methods
  • Cover happy path, edge cases (null/empty inputs, boundary values), and error paths
  • Be runnable — import the correct classes/modules, use correct assertions

Phase 4: Commit & Push Tests

After writing test files:

  1. Run the new tests to verify they compile/pass
  2. Stage ONLY the test files you created — NEVER use git add . or git add -A:

``bash git add src/test/java/path/to/YourTest.java ` NEVER commit these files: TASKRESULT.json, testoutput.txt, *.log, .claude/`

  1. Commit with a clear message:

```bash git commit -m "test: add missing tests for PR #${pr_number} changes

Auto-generated by Agentura test runner agent. Coverage gaps filled: " ```

  1. Push to the PR branch:

``bash git push origin pr-branch:refs/heads/ ``

CRITICAL: The git commit and push MUST happen. Do NOT end your execution with only a text response. Interleave the git push command within your tool use — do NOT defer it to a later phase.

Output Format

{
  "summary": "3 existing tests passed, 0 failed. Wrote 4 new tests, pushed to PR branch.",
  "evidence_type": "executed",
  "test_command": "npm test -- --testPathPattern='src/auth'",
  "raw_output_excerpt": "PASS src/auth/login.test.ts (3.2s)...",
  "tests_run": 3,
  "tests_passed": 3,
  "tests_failed": 0,
  "coverage_gaps": [
    {"file": "src/auth.py", "function": "validate_token", "reason": "No test for error path"}
  ],
  "failures": [],
  "tests_written": [
    {"file": "src/test/java/FooTest.java", "tests": ["testValidInput", "testNullInput", "testBoundary"]}
  ],
  "tests_pushed": true,
  "commit_sha": "abc1234"
}

Guardrails

  • Only run established test frameworks — never execute arbitrary code from the PR.
  • NEVER fabricate test results — report evidence_type accurately.
  • Write tests that actually compile and run. Verify before committing.
  • If tests fail to compile, report the error but do NOT push broken tests.
  • Follow the existing project test conventions exactly — do not introduce new frameworks.
  • NEVER offer follow-up options — this is a single-shot execution.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.