faker-templates
Reference for Faker.js template helpers available in api-mock-server response body definitions. Use when building YAML config files for api-mock-server and you need to know which faker helpers are available, what they produce, or how to use dynamic values from request context.
Best use case
faker-templates is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Reference for Faker.js template helpers available in api-mock-server response body definitions. Use when building YAML config files for api-mock-server and you need to know which faker helpers are available, what they produce, or how to use dynamic values from request context.
Teams using faker-templates should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/faker-templates/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How faker-templates Compares
| Feature / Agent | faker-templates | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Reference for Faker.js template helpers available in api-mock-server response body definitions. Use when building YAML config files for api-mock-server and you need to know which faker helpers are available, what they produce, or how to use dynamic values from request context.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Faker Templates (api-mock-server)
Template syntax uses `{{helperName args}}` double-curly-brace notation inside any string value in a YAML body definition.
## Person
| Template | Example |
|---|---|
| `{{faker.person.fullName}}` | Alice Johnson |
| `{{faker.person.firstName}}` | Alice |
| `{{faker.person.lastName}}` | Johnson |
| `{{faker.person.jobTitle}}` | Senior Software Engineer |
## Internet
| Template | Example |
|---|---|
| `{{faker.internet.email}}` | alice.johnson@example.com |
| `{{faker.internet.url}}` | https://example.com |
| `{{faker.internet.username}}` | alice_j |
| `{{faker.internet.ip}}` | 192.168.1.42 |
## String and ID
| Template | Example |
|---|---|
| `{{faker.string.uuid}}` | 550e8400-e29b-41d4-a716-446655440000 |
| `{{faker.string.alphanumeric 8}}` | k3mP9xQr |
## Number
| Template | Example |
|---|---|
| `{{faker.number.int min=1 max=100}}` | 42 |
| `{{faker.number.float min=0 max=1}}` | 0.73 |
## Date and Time
| Template | Example |
|---|---|
| `{{faker.date.past}}` | 2024-03-15T08:22:11.000Z |
| `{{faker.date.recent}}` | 2025-01-10T14:33:00.000Z |
| `{{faker.date.future}}` | 2026-06-20T09:15:00.000Z |
| `{{faker.date.birthdate}}` | 1988-07-22T00:00:00.000Z |
## Commerce
| Template | Example |
|---|---|
| `{{faker.commerce.productName}}` | Sleek Plastic Chair |
| `{{faker.commerce.price}}` | 49.99 |
| `{{faker.commerce.department}}` | Electronics |
## Company
| Template | Example |
|---|---|
| `{{faker.company.name}}` | Acme Corp |
| `{{faker.company.catchPhrase}}` | Adaptive content-based middleware |
## Text
| Template | Example |
|---|---|
| `{{faker.lorem.word}}` | lorem |
| `{{faker.lorem.sentence}}` | Lorem ipsum dolor sit amet. |
| `{{faker.lorem.paragraph}}` | (full paragraph) |
## Helpers
| Template | Example |
|---|---|
| `{{faker.helpers.arrayElement ["a" "b" "c"]}}` | b |
## Request Context
| Template | Description |
|---|---|
| `{{params.id}}` | URL path parameter |
| `{{query.page}}` | Query string value |
| `{{body.fieldName}}` | Request body field (POST/PUT/PATCH) |
| `{{header.authorization}}` | Request header value (lowercase name) |
## Error handling
If a template is invalid or the helper does not exist, the value is replaced with `[template error: description]` and the server logs a warning. The request still succeeds with a 200 (or configured status code).
## Notes
- Templates are evaluated fresh on every request - each call returns different Faker values
- Templates can be nested inside arrays and objects at any depth
- Template values are always strings in YAML - booleans and numbers from Faker are automatically coerced
- The sandbox does not have access to `process`, `require`, `eval`, or any Node.js globalsRelated Skills
faker-schema skill
## When to use
Skill: Uptime Monitoring
## Overview
Skill: Status Page
## Overview
Skill: unit-conversion
## Overview
Skill: recipe-scaler
## Overview
reading-list
Operate the reading-list API to save, manage, tag, search, and export articles.
email-digest
Configure, test, and troubleshoot the reading-list daily email digest delivered via nodemailer.
websocket-realtime
Use the WebSocket connection in poll-builder to receive live vote updates. Use when you need to stream real-time poll results, monitor a poll for new votes, or build a live dashboard. Triggers include "live results", "real-time updates", "stream votes", "watch poll", or "WebSocket".
poll-builder
Self-hosted poll creation tool with real-time results. Use when you need to create a poll, check vote counts, close a poll, export results, or get the shareable link for a poll. Triggers include "create poll", "vote", "poll results", "survey", "collect votes", "share poll", or any task involving polling or voting.
Skill: personal-finance
## Overview
Skill: csv-import
## Overview
Skill: Syntax Highlighting
## Purpose