peggy

Define and generate parsing expression grammars and parsers with Peggy.

1|Updated Jan 10, 2026
One-click install
npx skills add https://github.com/mcclowes/fpl-oas --skill peggy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: peggy
Source: https://github.com/mcclowes/fpl-oas/tree/main/.claude/skills/peggy
Command: npx skills add https://github.com/mcclowes/fpl-oas --skill peggy

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Peggy helps you define and generate parsing expression grammars (PEGs) using Peggy, simplifying parser creation and syntax definition.

Core Features & Use Cases

  • Grammar generation and parsing using Peggy (PEG.js successor) for fast parser creation.
  • Support for syntax definitions, grammar composition, and semantic actions.
  • Use Case: quickly implement a small DSL and test grammar against input strings.

Quick Start

Run Peggy on a grammar.peggy file to generate a parser and validate input.

Frequently Asked Questions about peggy

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

FAQPage Schema
How do I generate a parser from a PEG grammar definition?

To generate a parser from a PEG grammar, load your grammar.peggy file and run Peggy to produce a parser that validates input strings and executes parsing results in Node.js or browsers.

What is Peggy used for in parser creation?

Peggy is used to define and generate parsing expression grammars for building domain-specific languages, syntax definitions, and parser tooling, simplifying the creation of fast parsers across projects.

Can I use Peggy to build and test a custom DSL in Node.js?

Yes, you can use Peggy to quickly implement a small DSL and test your grammar against input strings, generating a parser that executes parsing results directly in Node.js or browser environments.

Does Peggy support semantic actions and grammar composition?

Peggy supports syntax definitions, grammar composition, and semantic actions, allowing you to define how parsed input is processed and structured within your generated parser.

What is the best way to define syntax rules for a new domain-specific language?

The best way to define syntax rules for a new DSL is using parsing expression grammars via Peggy, which provides grammar generation and parsing capabilities to fast-track parser creation and syntax validation.

Are there limitations when using parsing expression grammars for syntax definitions?

Parsing expression grammars provide a structured way to define syntax and build parsers, but they require a valid grammar.peggy file as input to generate a working parser and validate input strings successfully.