Skip to content
Holochain Development logo

Holochain Development

This skill should be used when developing Holochain hApps, setting up development environments, creating zomes, implementing hREA integration, or writing multi-agent tests with Tryorama

SKILL.md

Full skill instructions

Holochain Development Skill

This skill provides comprehensive expertise for developing Holochain hApps, from DNA development to production deployment.

Capabilities

Develop production-ready Holochain applications with:

  • Environment Setup: Complete Nix, Rust, Bun, and Holochain toolchain automation
  • Zome Development: Integrity and coordinator zome templates with validation patterns
  • hREA Integration: Economic resource tracking framework integration
  • Testing Infrastructure: Tryorama multi-agent testing with comprehensive scenarios
  • DNA Architecture: Distributed hash table patterns and validation rules

How to Use

  1. Environment Setup: Run automated setup for complete development environment
  2. Zome Creation: Use templates for integrity and coordinator zomes
  3. Testing Implementation: Apply Tryorama patterns for multi-agent scenarios
  4. hREA Integration: Connect to economic resource framework

Quick Setup

Complete Environment Setup:

# Run the automated setup script
./​skills/​holochain-development/​scripts/​setup-holochain-dev.sh

# This installs:
# - Nix package manager
# - Rust toolchain for WebAssembly compilation
# - Bun package manager
# - Holochain CLI tools
# - hREA framework DNA

Zome Development Pattern:

// Integrity Zome - Data validation and types
#[hdk_entry_helper]
pub struct MyDomain {
    pub name: String,
    pub description: Option<String>,
    pub status: MyDomainStatus,
}

// Coordinator Zome - Business logic and API
#[hdk_extern]
pub fn create_my_domain(input: CreateMyDomainInput) -> ExternResult<Record> {
    let my_domain = MyDomain::new(input.name, input.description);
    create_entry(&EntryTypes::MyDomain(my_domain))?;
    // ... implementation
}

Example Usage

Concrete Examples of Skill Application:

  • Environment Setup: "Set up a complete Holochain development environment for a new team"

    • Expected outcome: Automated installation of Nix, Rust toolchain, Holochain CLI, and hREA framework
    • Validation: Development environment ready for zome compilation and testing
  • Zome Development: "Create integrity and coordinator zomes for a ResourceManagement domain"

    • Expected outcome: Complete zome pair with validation rules and API functions
    • Validation: Compiles successfully and passes basic validation tests
  • hREA Integration: "Implement hREA integration for economic event tracking"

    • Expected outcome: Resource flows and economic events connected to hREA framework
    • Validation: Economic events properly tracked and queryable
  • Testing Implementation: "Write Tryorama tests for multi-agent scenarios"

    • Expected outcome: Comprehensive test suite with realistic multi-agent interactions
    • Validation: Tests pass and catch integration issues before production
  • Architecture Validation: "Validate DNA architecture and entry definitions"

    • Expected outcome: Architectural compliance report with specific recommendations
    • Validation: All architectural violations identified and resolved

Scripts

  • setup-holochain-dev.sh: Complete environment automation (400+ lines)
  • integrity-zome.template.rs: Template for data validation zomes

Development Patterns

Zome Architecture

  • Integrity Zomes: Define data types, validation rules, and entry definitions
  • Coordinator Zomes: Implement business logic, API functions, and external calls
  • Validation Rules: Cryptographically enforced business logic at the DHT level

Testing Strategy

  • Unit Tests: Rust unit tests for validation logic
  • Integration Tests: Tryorama multi-agent scenarios
  • Property-Based Testing: Test with random data generation
  • Performance Testing: Validate DHT operations and network behavior

Best Practices

  1. Validate inputs in integrity zomes with proper error messages
  2. Use links for relationships instead of embedded references
  3. Implement proper authorization checks in coordinator zomes
  4. Test multi-agent scenarios with realistic data
  5. Use Nix environment for reproducible builds

hREA Integration

Connect to the Holochain REA framework for:

  • Economic Events: Track resource flows and transactions
  • Resource Management: Manage inventories and capabilities
  • Agent Relationships: Model organizational structures
  • Planning and Coordination: Economic planning workflows

Environment Requirements

Essential Tools:

  • Nix package manager (for reproducible builds)
  • Rust toolchain with WebAssembly target
  • Bun package manager (for frontend dependencies)
  • Holochain CLI (hc, hc-spin)
  • hREA framework DNA

Project Structure:

dnas/
├── requests_and_offers/
│   ├── zomes/
│   │   ├── integrity/     # Data validation
│   │   └── coordinator/   # Business logic
│   └── workdir/          # Generated DNA files

Validation and Quality

The skill includes comprehensive validation:

  • Architecture validation for proper DNA structure
  • Code quality checks for Rust best practices
  • Test coverage verification for multi-agent scenarios
  • Performance benchmarks for DHT operations

Production Patterns

Deploy production applications with:

  • Multi-repository coordination using git submodules
  • Cross-platform builds for desktop applications
  • Automated testing across multiple environments
  • Release management with version synchronization

Troubleshooting

Common Issues:

  • Build failures: Ensure Nix environment is activated
  • DHT synchronization: Add proper delays in tests
  • Permission errors: Check agent authorization in zomes
  • Performance issues: Optimize link queries and entry sizes

Progressive Loading

This skill uses progressive disclosure:

  • Level 1: Metadata (~100 tokens) - Always loaded
  • Level 2: Instructions (<5k tokens) - Loaded when triggered
  • Level 3: Templates and scripts - Loaded as needed

File Structure

holochain-development/
├── SKILL.md                    # Main documentation (this file)
├── templates/                  # Code templates
│   └── integrity-zome.template.rs
└── scripts/                    # Automation tools
    └── setup-holochain-dev.sh

Integration

Works seamlessly with:

  • Effect-TS Architecture Skill: For frontend implementation patterns
  • Nix: Reproducible build environment
  • Tryorama: Multi-agent testing framework
  • hREA: Economic resource tracking framework

Proven Results

This development approach has been battle-tested:

  • Complete automated setup reduces configuration time by 80%
  • Template-based development accelerates zome creation by 70%
  • Multi-agent testing catches issues before production
  • Production deployments across multiple platforms with 99% uptime

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View