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

Test With Examples

skill-jimmc414-claude-code-plugin-marketplace-test-with-examples · by jimmc414

For example-driven development: test cases as specifications, input/output pairs, documentation through examples.

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

Install

$ agentstack add skill-jimmc414-claude-code-plugin-marketplace-test-with-examples

✓ 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-jimmc414-claude-code-plugin-marketplace-test-with-examples)

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

About

test-with-examples

When to Use

  • Clear, discrete input/output relationships
  • Examples serve as specification
  • Teaching or documenting behavior
  • Regression testing

When NOT to Use

  • Behavior too complex for examples
  • Need property-based testing
  • Examples would be exhaustive

The Pattern

Write tests as lists of (input, expected_output) pairs.

# Test cases as data
tests = [
    (input1, expected1),
    (input2, expected2),
    (input3, expected3),
]

def run_tests(func, tests):
    """Run function on test cases."""
    for inp, expected in tests:
        result = func(inp)
        assert result == expected, f"{func.__name__}({inp}) = {result}, expected {expected}"
    print(f"All {len(tests)} tests pass.")

Example (from pytudes)

# lispytest.py - comprehensive test examples
lis_tests = [
    ("(quote (testing 1 (2.0) -3.14e159))", ['testing', 1, [2.0], -3.14e159]),
    ("(+ 2 2)", 4),
    ("(+ (* 2 100) (* 1 10))", 210),
    ("(if (> 6 5) (+ 1 1) (+ 2 2))", 2),
    ("(if (< 6 5) (+ 1 1) (+ 2 2))", 4),
    ("(define x 3)", None),
    ("x", 3),
    ("(+ x x)", 6),
    ("((lambda (x) (+ x x)) 5)", 10),
    ("(define fact (lambda (n) (if (<= n 1) 1 (* n (fact (- n 1))))))", None),
    ("(fact 10)", 3628800),
    ("(fact 50)", 30414093201713378043612608166064768844377641568960512000000000000),
]

# DocstringFixpoint.ipynb - rainfall tests
def test_rainfall():
    assert 0/2 == rainfall([0, 0]),                "no rain"
    assert 5/1 == rainfall([5]),                   "one day"
    assert 6/3 == rainfall([1, 2, 3]),             "mean of several days"
    assert 6/4 == rainfall([0, 1, 2, 3]),          "non-integer mean"
    assert 9/3 == rainfall([1, 2, -9, -100, 6]),   "negative values ignored"
    assert 7/5 == rainfall([1, 0, 2, 0, 4]),       "zeros not ignored"
    assert 8/3 == rainfall([1, 2, 5, -999, 404]),  "values after -999 ignored"
    return True

# Cryptarithmetic.ipynb - solver test examples
for solver in (solve, faster_solve):
    assert "1 + 2 = 3" in set(solver("A + B = C"))
    assert not set(solver("A + B = CDE"))  # No solution
    assert set(solver("A * B = CA")) == {
        '5 * 3 = 15', '5 * 7 = 35', '4 * 6 = 24',
        '8 * 6 = 48', '2 * 6 = 12', '5 * 9 = 45'
    }

Key Principles

  1. Examples as spec: Tests define expected behavior
  2. Comments explain: Brief note on what each tests
  3. Cover edge cases: Empty, zero, negative, boundary
  4. Expected first or last: Consistent (input, expected) order
  5. Readable assertions: assert result == expected, message

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.