Skip to content
Back to skills

307 Discord Summary 11904d1f

ASecurity

We benchmarked two ways to generate tests with `pdd test`: **Code-based (original):** `pdd test prompt.prompt src/module.py` - Analyzes actual implementation code **TDD/Example-based (new):** `pdd test prompt.prompt examples/module_example.py` - Analyzes usage examples showing intended behavior - Triggered by `_example` suffix in filename

  • 9 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 11, 2026
testingbashtestingapi

Works with

  • api

Security analysis

A100/100

Scanned October 11, 2026

npx -y skills add tools-only/X-Skills --skill 307-discord_summary_11904d1f --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 307 Discord Summary 11904d1f?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for 307 Discord Summary 11904d1f
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tools-only-307-discord-summary-11904d1f/badge)](https://www.skillsdirectory.com/skills/tools-only-307-discord-summary-11904d1f)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

SKILL.md
# Test Generation Benchmark: Code-based vs TDD

We benchmarked two ways to generate tests with `pdd test`:

**Code-based (original):** `pdd test prompt.prompt src/module.py`
- Analyzes actual implementation code

**TDD/Example-based (new):** `pdd test prompt.prompt examples/module_example.py`
- Analyzes usage examples showing intended behavior
- Triggered by `_example` suffix in filename

## Results

| Metric | Code-based | Example-based |
|--------|-----------|---------------|
| Test functions | 20 | 37 |
| Tests passed | 17 | 34 |
| Private method refs | 0 | 0 |

## Key Findings

1. **Example-based generated 85% more tests** - more granular, better failure isolation

2. **Neither referenced private methods** - both respected "don't test internals" guidance

3. **Example-based tests are more portable** - one assertion per function vs batched loops

## When to Use Each

| Use Example-based (TDD) | Use Code-based |
|------------------------|----------------|
| Writing tests first | Testing existing code |
| API contract matters | Need coverage analysis |
| Implementation will change | Verifying specific behaviors |

## TL;DR

For new PDD development, prefer TDD approach - generates more comprehensive tests focused on intent, not implementation accidents.

---

Try it yourself:
```bash
cd examples/test_generation_benchmark
make benchmark
```

**Feedback welcome!** Does this match your experience? Any edge cases we should test?

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.