Claude
Skills
Sign in
Back

stockbreeder-expert

Included with Lifetime
$97 forever

Expert-level livestock management, animal health monitoring, breeding programs, and ranch management

domainslivestockanimal-husbandrybreedingranch-managementveterinary

What this skill does


# Stockbreeder Expert

Expert guidance for livestock management, animal health monitoring, breeding programs, feed optimization, and ranch operations.

## Core Concepts

### Livestock Management
- Herd/flock management
- Animal identification and tracking
- Health monitoring
- Nutrition and feed management
- Breeding and genetics
- Facility management

### Animal Health
- Disease prevention and control
- Vaccination schedules
- Biosecurity protocols
- Health records
- Veterinary care coordination
- Early warning systems

### Technologies
- RFID ear tags
- Automated feeding systems
- Wearable sensors
- Milking automation
- Genetic analysis
- Precision livestock farming

## Livestock Management System

```python
from dataclasses import dataclass
from typing import List, Optional
from datetime import datetime, timedelta
from enum import Enum

class AnimalType(Enum):
    CATTLE = "cattle"
    SHEEP = "sheep"
    GOAT = "goat"
    PIG = "pig"
    POULTRY = "poultry"

class HealthStatus(Enum):
    HEALTHY = "healthy"
    OBSERVATION = "observation"
    SICK = "sick"
    QUARANTINE = "quarantine"
    DECEASED = "deceased"

@dataclass
class Animal:
    animal_id: str
    tag_number: str
    type: AnimalType
    breed: str
    sex: str
    birth_date: datetime
    weight_kg: float
    sire_id: Optional[str]
    dam_id: Optional[str]
    health_status: HealthStatus
    location: str
    vaccinations: List[dict]
    treatments: List[dict]

@dataclass
class HealthRecord:
    record_id: str
    animal_id: str
    date: datetime
    type: str  # 'vaccination', 'treatment', 'check-up'
    diagnosis: Optional[str]
    treatment: Optional[str]
    veterinarian_id: Optional[str]
    notes: str
    follow_up_date: Optional[datetime]

class LivestockManagement:
    """Livestock management system"""

    def __init__(self, db):
        self.db = db

    def register_animal(self, animal_data):
        """Register new animal in system"""
        animal = Animal(**animal_data)

        # Generate unique tag if not provided
        if not animal.tag_number:
            animal.tag_number = self.generate_tag_number(animal.type)

        # Create initial health record
        health_record = HealthRecord(
            record_id=generate_id(),
            animal_id=animal.animal_id,
            date=datetime.now(),
            type='registration',
            diagnosis=None,
            treatment=None,
            veterinarian_id=None,
            notes='Initial registration',
            follow_up_date=None
        )

        self.db.save_animal(animal)
        self.db.save_health_record(health_record)

        return animal

    def monitor_animal_health(self, animal_id):
        """Monitor individual animal health"""
        animal = self.db.get_animal(animal_id)
        sensor_data = self.get_sensor_data(animal_id)

        health_indicators = {
            'temperature': sensor_data.get('temperature'),
            'activity_level': sensor_data.get('activity_score'),
            'rumination_time': sensor_data.get('rumination_minutes'),  # For ruminants
            'feeding_behavior': self.analyze_feeding_pattern(animal_id),
            'weight_change': self.calculate_weight_trend(animal_id)
        }

        # Detect health issues
        alerts = []
        if health_indicators['temperature'] > 39.5:  # Cattle normal: 38.5-39.5°C
            alerts.append({
                'severity': 'high',
                'issue': 'Elevated temperature - possible fever',
                'recommendation': 'Veterinary examination recommended'
            })

        if health_indicators['activity_level'] < 0.5:  # Below 50% of normal
            alerts.append({
                'severity': 'medium',
                'issue': 'Reduced activity',
                'recommendation': 'Monitor closely, check for injury or illness'
            })

        return {
            'animal_id': animal_id,
            'tag_number': animal.tag_number,
            'health_indicators': health_indicators,
            'alerts': alerts,
            'health_score': self.calculate_health_score(health_indicators)
        }

    def schedule_vaccinations(self, herd_id):
        """Generate vaccination schedule for herd"""
        animals = self.db.get_herd_animals(herd_id)
        vaccination_schedule = []

        for animal in animals:
            # Check vaccination history
            last_vaccinations = self.db.get_vaccinations(animal.animal_id)

            # Required vaccinations based on animal type and age
            required_vaccines = self.get_required_vaccines(animal)

            for vaccine in required_vaccines:
                last_admin = next(
                    (v for v in last_vaccinations if v['vaccine'] == vaccine['name']),
                    None
                )

                # Check if due
                if not last_admin or self.is_vaccine_due(last_admin, vaccine):
                    vaccination_schedule.append({
                        'animal_id': animal.animal_id,
                        'tag_number': animal.tag_number,
                        'vaccine': vaccine['name'],
                        'due_date': self.calculate_vaccine_due_date(last_admin, vaccine),
                        'priority': vaccine['priority']
                    })

        # Sort by priority and due date
        vaccination_schedule.sort(key=lambda x: (x['priority'], x['due_date']))

        return vaccination_schedule
```

## Breeding Management

```python
class BreedingManagement:
    """Breeding program management"""

    def select_breeding_pairs(self, herd_id, breeding_goals):
        """Select optimal breeding pairs"""
        eligible_males = self.db.get_breeding_males(herd_id)
        eligible_females = self.db.get_breeding_females(herd_id)

        # Score each potential pairing
        breeding_recommendations = []

        for female in eligible_females:
            scores = []

            for male in eligible_males:
                # Check genetic compatibility
                if self.are_related(male, female, max_generations=3):
                    continue  # Skip closely related animals

                # Calculate breeding value
                score = self.calculate_breeding_value(
                    male,
                    female,
                    breeding_goals
                )

                scores.append({
                    'male_id': male.animal_id,
                    'male_tag': male.tag_number,
                    'score': score,
                    'expected_traits': self.predict_offspring_traits(male, female)
                })

            # Get best male for this female
            if scores:
                best_match = max(scores, key=lambda x: x['score'])
                breeding_recommendations.append({
                    'female_id': female.animal_id,
                    'female_tag': female.tag_number,
                    'recommended_male': best_match,
                    'optimal_breeding_date': self.calculate_optimal_breeding_date(female)
                })

        return breeding_recommendations

    def calculate_breeding_value(self, male, female, goals):
        """Calculate breeding value for pair"""
        score = 0

        # Evaluate based on breeding goals
        if 'milk_production' in goals:
            score += (male.genetics['milk_yield'] + female.genetics['milk_yield']) * 0.3

        if 'growth_rate' in goals:
            score += (male.genetics['growth_rate'] + female.genetics['growth_rate']) * 0.3

        if 'disease_resistance' in goals:
            score += (male.genetics['disease_resistance'] + female.genetics['disease_resistance']) * 0.2

        if 'fertility' in goals:
            score += (male.fertility_score + female.fertility_score) * 0.2

        return score

    def track_pregnancy(self, animal_id):
        """Track pregnancy and predict due date"""
        animal = self.db.get_animal(animal_id)
        breeding_record = 

Related in domains