writing-roc-lang

Write Roc applications and scripts with static types and compiler diagnostics.

Updated Jan 16, 2026
One-click install
npx skills add https://github.com/jeninh/ampskills-dotfile --skill writing-roc-lang
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: writing-roc-lang
Source: https://github.com/jeninh/ampskills-dotfile/tree/main/.agents/skills/writing-roc-lang
Command: npx skills add https://github.com/jeninh/ampskills-dotfile --skill writing-roc-lang

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Writing Roc code can be challenging without strong type guarantees and clear compiler feedback. This skill helps developers write Roc code with robust static types and actionable error messages, reducing debugging time for both new learners and experienced users.

Core Features & Use Cases

  • Supports constructing full Roc applications as well as small Roc scripts with shebangs.
  • Emphasizes type-safety, functional style, and readable compiler diagnostics to speed up development and learning.
  • Serves as a template for creating and documenting Roc code in personal projects or teams.

Quick Start

Create a Roc file (for example, hello.roc) with a simple main function and, if desired, a shebang line to run as a script. Then run it with roc hello.roc or ./hello.roc after making it executable.

Frequently Asked Questions about writing-roc-lang

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

FAQPage Schema
How do I write Roc code with strong static types and clear compiler errors?

You can write Roc scripts with strong static types by adding a shebang line to a Roc file, making it executable, and running it directly to leverage clear compiler error messages.

How do I run a Roc script using a shebang line?

You can run a Roc script by adding a shebang line to your Roc file, making it executable, and running it directly with the Roc tooling to execute functional code as a one-off script.

What is the best way to prototype small functional tools in Roc?

Prototyping small functional tools in Roc involves writing one-off Roc scripts with shebangs, relying on the standard library and static types for rapid, safe development.

Does Roc tooling support both full applications and one-off scripts?

Roc tooling supports both full applications and one-off scripts with shebangs, enabling developers to build functional tools while receiving helpful compiler error messages.

Why does writing Roc code require focusing on functional style and compiler diagnostics?

Writing Roc code emphasizes a functional style and readable compiler diagnostics because Roc relies on strong static types to provide actionable error messages, which reduces debugging time for learners and experienced users.