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

Pr Test Recommender

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

A Claude skill from srinidhis05/agentura.

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

Install

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

✓ 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-recommender)

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 Recommender? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

PR Test Recommender

Task

You analyze a pull request diff and recommend specific, actionable test cases that should be written for the changed code. You do NOT execute tests or write test files — you produce a structured list of test recommendations with enough detail for a developer to implement them.

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
  • repo_context — optional CLAUDE.md content providing business context, project structure, and test conventions

Execution Protocol

Phase 1: Change Analysis

Parse the diff to identify:

  1. Which functions/methods were added or modified
  2. What each function does (infer from name, parameters, return type, body)
  3. Whether the change is in a critical path (payments, auth, data mutations, compliance)
  4. Whether corresponding test files already exist in the diff

Context gate: "Analyzing {N} changed files. {M} functions modified across {packages}."

Phase 2: Test Convention Detection

From repo_context (CLAUDE.md) or file patterns in changed_files, determine:

  1. Language: Go, Java, TypeScript, etc.
  2. Test framework: go test, JUnit 5, jest, pytest, etc.
  3. Test location: same package, test/unit/, src/test/java/, etc.
  4. Naming convention: {name}_test.go, {Name}Test.java, {name}.test.ts
  5. Assertion library: testify, AssertJ, chai, etc.
  6. Patterns: table-driven (Go), AAA pattern, MockMvc (Spring), etc.

If repo_context is absent, infer from file extensions and directory structure.

Phase 3: Test Case Recommendation

For each changed function/method, recommend test cases covering:

  1. Happy path — normal input, expected output
  2. Edge cases — empty/nil/null inputs, boundary values, zero-length collections
  3. Error paths — invalid input, downstream failures, timeout scenarios
  4. Concurrency (if applicable) — race conditions, mutex correctness
  5. Security (if applicable) — injection vectors, auth bypass, input sanitization

Each recommendation MUST include:

  • A concrete test name following the project's naming convention
  • What it tests (one sentence)
  • Test type: unit | integration
  • Priority: high (critical path, bug-prone) | medium (standard coverage) | low (nice-to-have)
  • Key assertions to verify
  • Mock/stub requirements (what dependencies to mock)

Phase 4: Prioritization

Rank recommendations by:

  1. Critical path changes (payments, auth, data mutations) → high priority
  2. New public functions without any existing tests → high priority
  3. Modified functions with existing tests that don't cover the new behavior → medium priority
  4. Refactored code with existing passing tests → low priority

Output Format

{
  "summary": "12 test cases recommended across 4 files. 3 high priority (payment validation), 6 medium, 3 low.",
  "test_convention": {
    "language": "go",
    "framework": "go test",
    "assertion_library": "testify",
    "test_location": "same package or test/unit/",
    "naming": "{name}_test.go"
  },
  "recommendations": [
    {
      "target_file": "internal/payment/service.go",
      "target_function": "ProcessPayment",
      "test_file": "internal/payment/service_test.go",
      "priority": "high",
      "reason": "New payment processing function with no existing tests. Handles money — bugs here cause financial loss.",
      "test_cases": [
        {
          "name": "TestProcessPayment_ValidCard_Success",
          "description": "Verify successful payment with valid card details returns transaction ID and debits correct amount",
          "type": "unit",
          "assertions": [
            "Response contains non-empty transaction ID",
            "Amount debited matches input amount",
            "Payment status is COMPLETED"
          ],
          "mocks": ["PaymentGatewayClient", "TransactionRepository"]
        },
        {
          "name": "TestProcessPayment_InsufficientFunds_ReturnsError",
          "description": "Verify payment with insufficient funds returns appropriate error without creating a transaction",
          "type": "unit",
          "assertions": [
            "Error is ErrInsufficientFunds",
            "No transaction record created",
            "Payment status is FAILED"
          ],
          "mocks": ["PaymentGatewayClient"]
        },
        {
          "name": "TestProcessPayment_GatewayTimeout_Retries",
          "description": "Verify gateway timeout triggers retry logic and eventual failure with correct error",
          "type": "unit",
          "assertions": [
            "Retry attempted up to max retries",
            "Final error wraps gateway timeout",
            "Idempotency key prevents duplicate charges"
          ],
          "mocks": ["PaymentGatewayClient (return timeout error)"]
        }
      ]
    }
  ],
  "coverage_summary": {
    "functions_changed": 8,
    "functions_with_existing_tests": 2,
    "functions_needing_tests": 6,
    "total_test_cases_recommended": 12,
    "high_priority": 3,
    "medium_priority": 6,
    "low_priority": 3
  }
}

Language-Specific Guidance

Go (goms, harbor)

  • Use table-driven tests with t.Run() subtests
  • Mock interfaces, not concrete types
  • Use testify/assert and testify/require
  • Test error wrapping with errors.Is() and errors.As()
  • For Gin handlers: use httptest.NewRecorder() + gin.CreateTestContext()
  • For GORM: suggest sqlmock for unit tests, real DB for integration

Java (app-server)

  • Use JUnit 5 @Test, @ParameterizedTest for multiple inputs
  • Use @MockBean or Mockito for dependency mocking
  • For Spring controllers: use MockMvc with @WebMvcTest
  • For repositories: use @DataJpaTest with H2
  • Use AssertJ fluent assertions
  • For services: constructor injection makes mocking straightforward

Guardrails

  • Recommend tests for CHANGED code only — do not suggest tests for unchanged functions.
  • Every recommendation MUST reference a specific function from the diff with file path.
  • Do NOT recommend tests for trivial getters/setters, generated code, or config classes.
  • Priority MUST reflect business impact — payment/auth/compliance changes are always high.
  • If the diff only touches config files or documentation, return an empty recommendations list with a summary explaining why.
  • 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.