xiaohongshu
xiaohongshu
json-schema-faker
Generate realistic fake data from JSON schemas, producing 1-50 valid records that conform exactly to the schema. Use when creating sample datasets from schema definitions, populating test databases, or generating example API responses. Returns only valid JSON that passes schema validation.
Full skill instructions
Generate realistic fake data from JSON schemas with guaranteed validity.
When you have a JSON schema and need realistic sample data:
node scripts/generate-fake-data.mjs /path/to/schema.json 25
This generates 25 valid records conforming to your schema.
Install dependencies first:
npm install @json-schema-faker/core ajv
Schema Compliance: All generated records are validated against the schema—only valid JSON is returned.
Realistic Data: Uses faker.js with domain-specific extensions (currency codes, country codes, time windows) to produce realistic data beyond simple random strings.
Customizable: Specify 1-50 records. Script auto-caps at 50.
Error Handling: Handles generation failures gracefully; reports warnings for records that couldn't be generated after multiple attempts.
node scripts/generate-fake-data.mjs schema.json 10
Generates 10 records from schema.json, outputs JSON to stdout.
node scripts/generate-fake-data.mjs schema.json 50
Records are capped at 50 maximum. If omitted, defaults to 10.
node scripts/generate-fake-data.mjs schema.json 30 > output.json
The faker library generates realistic data based on schema hints. To improve data quality:
"format": "email", "format": "date", "format": "uri""faker": "name.firstName" to guide generationminimum, maximum, minLength, maxLength appropriatelySee references/faker-customization.md for detailed customization options and available faker methods.
Given a schema for accommodation listings (with faker hints for currency and country), the skill generates realistic data like:
[
{
"id": "listing_ashdod_001",
"title": "Beachfront Apartment",
"type": "apartment",
"location": {
"city": "Ashdod",
"countryCode": "IL",
"distanceToBeachMinutes": 5,
"coordinates": { "lat": 31.8, "lng": 34.65 }
},
"rating": { "score": 8.5, "count": 45 },
"pricePreview": {
"currency": "USD",
"nightly": 180,
"total": 540,
"nights": 3
},
...
}
]
"Could not generate valid record": The schema may have constraints that conflict (e.g., minLength > maxLength). Review your schema constraints.
"Failed to parse schema": Ensure the schema file is valid JSON.
Too few records generated: Some schemas have tight constraints. Increase attempts or relax schema constraints.
To add custom faker methods beyond the built-in ones (currencyCode, countryCode, timeWindow), edit the setupFaker() function in scripts/generate-fake-data.mjs.
Example: Add a custom "accommodationType" method:
faker.accommodationType = () => {
const types = ['apartment', 'house', 'hotel', 'bnb']
return faker.random.arrayElement(types)
}
Then use in your schema:
{
"type": "string",
"faker": "accommodationType"
}
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience