Skip to content

foryourhealth111-pixel/Vibe-Skills / bundled/skills/statistics-math

statistics-math

Verified

Statistics, probability, linear algebra, and mathematical foundations for data science

FileKindSize
SKILL.mdskill md7.9 KB
assets/config.yamlconfig696 B
assets/schema.jsonconfig1.2 KB
references/GUIDE.mdmarkdown1.9 KB
references/PATTERNS.mdmarkdown1.5 KB
scripts/validate.pyscript3.7 KB

references/PATTERNS.md

View on GitHub
# Statistics Math Patterns

## Design Patterns

### Pattern 1: Input Validation

Always validate input before processing:

```python
def validate_input(data):
    if data is None:
        raise ValueError("Data cannot be None")
    if not isinstance(data, dict):
        raise TypeError("Data must be a dictionary")
    return True
```

### Pattern 2: Error Handling

Use consistent error handling:

```python
try:
    result = risky_operation()
except SpecificError as e:
    logger.error(f"Operation failed: {e}")
    handle_error(e)
except Exception as e:
    logger.exception("Unexpected error")
    raise
```

### Pattern 3: Configuration Loading

Load and validate configuration:

```python
import yaml

def load_config(config_path):
    with open(config_path) as f:
        config = yaml.safe_load(f)
    validate_config(config)
    return config
```

## Anti-Patterns to Avoid

### ❌ Don't: Swallow Exceptions

```python
# BAD
try:
    do_something()
except:
    pass
```

### ✅ Do: Handle Explicitly

```python
# GOOD
try:
    do_something()
except SpecificError as e:
    logger.warning(f"Expected error: {e}")
    return default_value
```

## Category-Specific Patterns: General

### Recommended Approach

1. Start with the simplest implementation
2. Add complexity only when needed
3. Test each addition
4. Document decisions

### Common Integration Points

- Configuration: `assets/config.yaml`
- Validation: `scripts/validate.py`
- Documentation: `references/GUIDE.md`

---

*Pattern library for statistics-math skill*
planning-and-task-breakdownaddyosmani/agent-skillsBreaks work into ordered tasks. Use when you have a spec or clear requirements and need to break work into implementable tasks. Use when a task feels too large to start, when you need to estimate scope, or when parallel work is possible.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
screenpipethedotmack/claude-memSearch screen and audio history recorded by Screenpipe and optionally save selected context into claude-mem. Use when the user asks to recall desktop activity, a meeting, or something seen in another app through Screenpipe.Stars: 118kUpdated Claude CodeCodexVerifiedInstall
contact-widgetnexu-io/open-designSelf-contained floating chat widget with welcome screen, social links, meeting button, and message input. Single HTML file, zero dependencies.Stars: 108kUpdated Claude CodeCodexVerifiedInstall
meeting-notesnexu-io/open-designMeeting notes page — title bar with attendees, agenda checklist, decisions block, action items table with owners + dates, and a "next meeting" footer. Use when the brief mentions "meeting notes", "minutes", "1:1 notes", "all-hands recap", or "会议纪要".Stars: 108kUpdated Claude CodeCodexVerifiedInstall