Unison Development

Automate Unison development tasks with MCP tools for writing, testing, and updating code.

3|1|Updated Jun 23, 2024
One-click install
npx skills add https://github.com/channingwalton/dotfiles --skill unison-development
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Unison Development
Source: https://github.com/channingwalton/dotfiles/tree/main/.claude/skills/unison-development
Command: npx skills add https://github.com/channingwalton/dotfiles --skill unison-development

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires development, test-driven-development, code-reviewer.

What problem does it solve?

This Skill navigates the complexities of Unison's unique codebase management (UCM) and strict type-checking, ensuring you write, test, and update Unison code correctly and efficiently, adhering to best practices and TDD.

Core Features & Use Cases

  • UCM-Compliant Workflow: Guides development without direct ucm commands, focusing on type-safe updates and avoiding common pitfalls.
  • Mandatory TDD & Type-Checking: Enforces a strict Test-Driven Development methodology combined with incremental and final type-checking using Unison's MCP tools.
  • Fully Qualified Naming: Critical enforcement of fully qualified names to ensure existing definitions are modified, not duplicated, within the UCM.
  • Use Case: When tasked with adding a new function or modifying an existing one in a Unison project, this skill will lead you through writing tests, incrementally coding, meticulously type-checking, and correctly updating the UCM.

Quick Start

Implement a new Unison function myProject.myModule.utility.addTwoNumbers that takes two numbers and returns their sum, ensuring all type checks pass.

Frequently Asked Questions about Unison Development

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

FAQPage Schema
How do I write and test Unison code with type safety?

Unison development enforces Test-Driven Development combined with strict type-checking using MCP tools. Write tests first, incrementally code your functions, run typechecks before committing to the codebase, and use fully qualified naming to avoid duplicating definitions in the UCM.

What is the Unison Codebase Manager and how does it differ from traditional version control?

The Unison Codebase Manager (UCM) stores code by content hash rather than by file path, enabling type-safe refactoring and eliminating merge conflicts. This skill guides UCM-compliant workflows without direct command exposure, focusing on correct definition updates instead of duplication.

How do I avoid duplicating function definitions when updating Unison code?

Use fully qualified naming conventions enforced by this skill—for example, `myProject.myModule.utility.addTwoNumbers`—to ensure the UCM modifies existing definitions rather than creating duplicates. Type-checking before updates confirms you're targeting the correct definition.

Can I use Test-Driven Development with functional programming in Unison?

Yes. This skill combines mandatory TDD with Unison's functional programming paradigm and strict type-checking, guiding you to write tests, implement functions incrementally, and verify type safety before committing to the codebase.

What prerequisites do I need before managing a Unison project with type-safe workflows?

You need a Unison project, familiarity with TDD principles, and access to MCP tools for code operations. The skill handles UCM operations and type-checking, but you provide the initial project structure and development goals.

What happens if my Unison code fails type-checking during development?

The skill enforces on-demand typechecking before additions to the codebase. If type errors occur, you refactor incrementally and recheck until all types align, ensuring only validated code enters the UCM and preventing definition conflicts.