Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

nondominium-holochain-dna-dev

БесплатноБез исполняемых скриптовНе проверен

Specialized skill for nondominium Holochain DNA development, focusing on zome creation, entry patterns, integrity/coordinator architecture, ValueFlows…

Microckот Microck★ 417 звёзд на GitHub

Об этом скилле

Nondominium Holochain DNA Development

This skill transforms Claude into a specialized nondominium Holochain DNA development assistant, providing expert guidance for creating zomes, implementing entry patterns, and following ValueFlows standards.

When to Use This Skill

Use this skill when:

  • Creating new zomes or modifying existing DNA code
  • Implementing entry types and validation functions
  • Working with integrity/coordinator architecture
  • Following ValueFlows compliance patterns
  • Optimizing WASM compilation and performance
  • Implementing capability-based access control
  • Creating cross-zome communication patterns

Do NOT use for:

  • Testing workflows (use the Tryorama testing skill)
  • Frontend/UI development (use appropriate web development skills)
  • Generic Holochain development outside nondominium context

Core DNA Development Workflows

1. Zome Creation Workflow

Create new zomes following nondominium's 3-zome architecture pattern:

  1. Initialize Zome Structure

    ./scripts/create_zome.sh <zome_name> both
    
  2. Implement Integrity Layer

    • Define entry types in lib.rs
    • Add validation functions
    • Define link types and relationships
    • See assets/entry_types/ for templates
  3. Implement Coordinator Layer

    • Import integrity types: use zome_<name>_integrity::*;
    • Implement CRUD functions following naming conventions
    • Add cross-zome calls for business logic
    • See assets/function_templates/ for patterns
  4. Configure Dependencies

    # Cargo.toml
    [zome_traits]
    hdk_integrity = "zome_<name>_integrity"
    
  5. Validate Structure

    ./scripts/sync_integrity_coordinator.sh <zome_name>
    

2. Entry Creation Workflow

Follow ValueFlows-compliant entry patterns:

  1. Define Entry Structure - NO TIMESTAMP FIELDS

    #[hdk_entry_helper]
    #[derive(Clone, PartialEq)]
    pub struct EconomicResource {
        // Business fields
        pub resource_specification: ActionHash, // Link to spec
        pub current_state: String,
    
        // Agent information (NO timestamps!)
        pub created_by: AgentPubKey,
    }
    
  2. Create Input Structure

    #[derive(Serialize, Deserialize, Debug)]
    pub struct CreateEconomicResourceInput {
        pub resource_specification: ActionHash,
        pub current_state: String,
    }
    
  3. Implement Create Function

    • Get agent pubkey: agent_info()?.agent_initial_pubkey
    • Validate input data
    • Create entry with NO created_at field
    • Create discovery links for global access
    • Create agent links for ownership tracking
    • Handle errors with custom error types
  4. Add Discovery Patterns

    // Global anchor - discoverable by everyone
    let path = Path::from("resources");
    create_link(path.path_entry_hash()?, entry_hash, LinkTypes::AllResources, LinkTag::new("resource"))?;
    
    // Agent link - discoverable by agent
    create_link(agent_pubkey, entry_hash, LinkTypes::AgentToResources, LinkTag::new("created"))?;
    
    // Hierarchical link - facility to its specification
    create_link(facility_hash, spec_hash, LinkTypes::SpecificationToFacility, LinkTag::new("implements"))?;
    
  5. Get Timestamps from Action Headers When Needed

    let record = get(entry_hash, GetOptions::default())?;
    let action = record.action().as_create()?;
    let created_at = action.timestamp();
    

3. Build and Validation Workflow

  1. Build WASM

    ./scripts/build_wasm.sh release [zome_name]
    
  2. Validate Patterns

    ./scripts/validate_entry.sh <zome_name>
    
  3. Check Performance

    • Monitor WASM file sizes (target < 500KB per zome)
    • Review optimization suggestions
    • Test memory usage patterns
  4. Package hApp

    ./scripts/package_happ.sh production
    

Critical Holochain DNA Patterns

✅ CORRECT Data Structure Patterns

NEVER use SQL-style foreign keys in entry fields!

// ❌ WRONG - Direct ActionHash references
struct BadFacility {
    pub facility_hash: ActionHash,  // SQL-style foreign key
    pub owner: ActionHash,        // Should be a link instead
}

// ✅ CORRECT - Use links for relationships
struct GoodFacility {
    pub conforms_to: ActionHash,     // Link to specification
    // No direct references to other entries
}

// ✅ CORRECT - Link patterns for relationships
create_link(facility_hash, owner_hash, LinkTypes::FacilityToOwner, LinkTag::new("managed_by"))?;

✅ NO Manual Timestamps

Use Holochain's built-in header metadata:

// ❌ WRONG - Manual timestamps
struct BadEntry {
    pub created_at: Timestamp,    // Redundant!
    pub updated_at: Timestamp,    // Redundant!
}

// ✅ CORRECT - No timestamps in entries
struct GoodEntry {
    pub name: String,
    pub description: String,
    // No created_at/updated_at fields
}

// Get timestamps from action header when needed:
let record =
Полный SKILL.md на GitHub

Установить nondominium-holochain-dna-dev в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

metadata.json

FAQ

Что делает скилл nondominium-holochain-dna-dev?

Specialized skill for nondominium Holochain DNA development, focusing on zome creation, entry patterns, integrity/coordinator architecture, ValueFlows compliance, and WASM optimization. Use when creating new zomes, implementing entry types, or modifying Holochain DNA code.

Как установить скилл nondominium-holochain-dna-dev?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл nondominium-holochain-dna-dev запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить nondominium-holochain-dna-dev с