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.
What this skill does
# 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**
```bash
./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**
```toml
# Cargo.toml
[zome_traits]
hdk_integrity = "zome_<name>_integrity"
```
5. **Validate Structure**
```bash
./scripts/sync_integrity_coordinator.sh <zome_name>
```
### 2. Entry Creation Workflow
Follow ValueFlows-compliant entry patterns:
1. **Define Entry Structure - NO TIMESTAMP FIELDS**
```rust
#[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**
```rust
#[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**
```rust
// 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**
```rust
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**
```bash
./scripts/build_wasm.sh release [zome_name]
```
2. **Validate Patterns**
```bash
./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**
```bash
./scripts/package_happ.sh production
```
## Critical Holochain DNA Patterns
### ✅ CORRECT Data Structure Patterns
**NEVER use SQL-style foreign keys in entry fields!**
```rust
// ❌ 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:**
```rust
// ❌ 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 = get(entry_hash, GetOptions::default())?;
let action = record.action().as_create()?;
let created_at = action.timestamp();
```
### ✅ CORRECT Entry Definition Pattern (Updated 2025)
Use `#[hdk_entry_helper]` macro with proper validation requirements:
```rust
#[hdk_entry_helper]
#[derive(Clone, PartialEq)]
pub struct FacilitySpecification {
pub name: String,
pub description: String,
pub facility_type: String, // Use Display impl for enums
pub created_by: AgentPubKey,
pub is_active: bool,
// NO ActionHash fields for relationships
}
#[hdk_entry_types]
#[unit_enum(UnitEntryTypes)]
pub enum EntryTypes {
#[entry_def(required_validations = 2)] // Specify validation requirements
FacilitySpecification(FacilitySpecification),
#[entry_def(required_validations = 2)]
EconomicFacility(EconomicFacility),
#[entry_def(required_validations = 3)] // Higher validation for bookings
FacilityBooking(FacilityBooking),
#[entry_def(required_validations = 2, visibility = "private")]
PrivateFacilityData(PrivateFacilityData),
}
```
**🆕 NEW - Advanced Validation Options**:
```rust
#[hdk_entry_types]
#[unit_enum(UnitEntryTypes)]
pub enum EntryTypes {
// Public entry with standard validation
#[entry_def(required_validations = 2)]
PublicEntry(PublicEntry),
// Private entry with higher validation
#[entry_def(required_validations = 5, visibility = "private")]
PrivateEntry(PrivateEntry),
// Entry with custom name
#[entry_def(name = "custom_entry", required_validations = 3)]
CustomEntry(CustomEntry),
}
```
**🆕 NEW - Base64 Agent Keys Option**:
For web-compatible applications, consider base64 encoded agent keys:
```rust
#[hdk_entry_helper]
#[derive(Clone, PartialEq)]
pub struct FacilitySpecification {
pub name: String,
pub description: String,
pub created_by: AgentPubKeyB64, // Base64 encoded for web compatibility
pub is_active: bool,
}
```
### ✅ CORRECT Link Patterns
Use comprehensive link types for discovery:
```rust
#[hdk_link_types]
pub enum LinkTypes {
// Discovery anchors
AllFacilitySpecifications,
AllEconomicFacilities,
// Hierarchical relationships
SpecificationToFacility, // FacilitySpec -> EconomicFacility
FacilityToBookings, // EconomicFacility -> FacilityBookings
// Agent-centric patterns
AgentToOwnedSpecs, // Agent -> FacilitySpecs they created
AgentToManagedFacilities, // Agent -> EconomicFacilities they manage
// Type-based discovery
SpecsByType, // FacilityType -> FacilitySpecs
FacilitiesByLocation, // Location -> EconomicFacilities
FacilitiesByState, // FacilityState -> EconomicFacilities
}
```
### Function Naming Conventions
- `create_[entry_type]` - Creates new entries with validation and links
- `get_[entry_type]` - Retrieves single entry by hash
- `get_all_[entry_type]` - Global discovery via anchor links
- `get_my_[entry_type]` - Agent-speRelated in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.