CLI tool for generating ATS-compliant PDF resumes from JSON data using Playwright and TypeScript
A TypeScript CLI tool for generating ATS-compliant PDF resumes from JSON data templates.
This skill helps you work with a resume generation tool that converts JSON resume data into professionally formatted PDFs. The tool uses Playwright for PDF rendering, Handlebars for templating, and follows the JSONResume standard for data structure.
When working with this codebase, understand these core components:
1. **CLI Layer** (`src/cli/`): Commander.js-based CLI with generate and validate commands
2. **Generation Pipeline** (`src/generators/`): HTML → PDF conversion using Playwright
3. **Schema & Validation** (`src/schemas/`, `src/validators/`): AJV-based JSON validation
4. **Utilities** (`src/utils/`): Browser pooling, file watching, error handling
5. **Templates** (`templates/`): Handlebars templates for resume styling
**Setup and Running**:
```bash
cp resume-data.example.json resume-data.json
npm run dev
npm run build
npm test
npm run test:ci
```
**Common CLI Operations**:
```bash
resume-gen --file resume-data.json
resume-gen --file resume-data.json --ats-mode
resume-gen --file resume-data.json --watch
resume-gen validate resume-data.json
resume-gen --file resume-data.json -o my-resume.pdf
```
**When modifying generators**:
**When updating schemas**:
**When adding features**:
Run tests with Vitest:
```bash
npm test
npx vitest run tests/generators/pdf-generator.test.ts
npx vitest --watch
npm run test:ci
```
Test categories:
The tool follows `.env` file patterns for personal data:
Setup pattern:
1. Copy example file
2. Edit with personal information
3. Generate resume
The CLI provides helpful prompts if `resume-data.json` is missing.
Templates in `templates/` use Handlebars:
Resume data must include:
Reference `resume-data.example.json` for complete structure.
**Browser Pool Pattern**: Reuses Playwright instances across generations for performance
**Debounced Watch Mode**: File watching with debouncing prevents rapid regeneration
**Error Handling**: Custom error types provide specific context and recovery suggestions
**Deterministic Output**: Ensures reproducible PDF generation for version control
**Adding a new CLI command**:
1. Create command file in `src/cli/commands/`
2. Register in `src/cli/index.ts`
3. Add tests in `tests/cli/`
**Modifying PDF output**:
1. Update Handlebars templates in `templates/`
2. Adjust styles in template CSS
3. Test with both ATS and professional modes
**Updating schema validation**:
1. Modify `src/schemas/resume-schema.ts`
2. Update validators in `src/validators/`
3. Run validation tests
**Debugging generation issues**:
```bash
resume-gen --file resume-data.json --debug
resume-gen validate resume-data.json
npx vitest run tests/generators/
```
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/resume-generator/raw