mongez-reinforcements-random

Generate deterministic random values with seedable mode for TypeScript testing.

3|2|Updated Dec 20, 2021
One-click install
npx skills add https://github.com/hassanzohdy/reinforcements --skill mongez-reinforcements-random
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mongez-reinforcements-random
Source: https://github.com/hassanzohdy/reinforcements/tree/main/skills/random
Command: npx skills add https://github.com/hassanzohdy/reinforcements --skill mongez-reinforcements-random

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Generate deterministic random values for testing and data generation in TypeScript projects, enabling reproducible results across runs.

Core Features & Use Cases

  • Random primitives: int, float, bool
  • String & ID generation: string, id, uuid, nanoid, token
  • Dates & colors: date, color
  • Pick / sample / weighted: pick, sample, weighted
  • Seeded mode for reproducible fixtures and tests across environments

Quick Start

Seed Random with a fixed value and generate a reproducible sequence of random values for your tests.

Frequently Asked Questions about mongez-reinforcements-random

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate deterministic random values for TypeScript tests?

You generate deterministic random values by calling a seed function with a fixed value before creating random integers, strings, or UUIDs, ensuring your TypeScript tests produce identical results across every run.

What is seeded random data generation used for in software testing?

Seeded random data generation provides reproducible test fixtures by locking the random sequence, enabling developers to reliably debug failures by regenerating the exact same random inputs across different environments.

Can I generate UUID and nanoid values reproducibly in TypeScript?

Yes, you can generate UUID and nanoid values reproducibly in TypeScript by enabling seeded mode, which forces the identifier generation methods to produce identical string outputs on every execution run.

Does this random data generator support weighted picks and sampling?

Yes, the random data generator supports weighted picks and sampling through dedicated static methods, allowing you to select array elements or subsets with custom probability weights for data seeding.

What types of random primitives can I create for data seeding in TypeScript?

For data seeding in TypeScript, you can create random primitives including integers, floats, and booleans, alongside extended types like dates, colors, strings, tokens, UUIDs, and nanoids.

Why are my random values changing between test runs in TypeScript?

Random values change between test runs because the generator lacks a fixed seed; activating seeded mode forces the random sequence to remain static and fully reproducible across all environments.