Skip to content

foryourhealth111-pixel/Vibe-Skills / bundled/skills/detecting-data-anomalies

detecting-data-anomalies

Verified

Investigate outliers, rare events, spikes, and suspicious records in datasets. Use as an explicit anomaly-analysis helper when you want concrete anomaly-detection workflow guidance, not generic data validation or end-to-end ML ownership.

scripts/report_generator.py

View on GitHub
#!/usr/bin/env python3
"""
anomaly-detection-system - report_generator.py
Creates a detailed report summarizing the detected anomalies, their severity, and potential causes.
Generated: 2025-12-10 03:48:17
"""

import os
import sys
import json
import argparse
from pathlib import Path
from datetime import datetime

def process_file(file_path: Path) -> bool:
    """Process individual file."""
    if not file_path.exists():
        print(f"โŒ File not found: {file_path}")
        return False

    print(f"๐Ÿ“„ Processing: {file_path}")

    # Add processing logic here based on skill requirements
    # This is a template that can be customized

    try:
        if file_path.suffix == '.json':
            with open(file_path) as f:
                data = json.load(f)
            print(f"  โœ“ Valid JSON with {len(data)} keys")
        else:
            size = file_path.stat().st_size
            print(f"  โœ“ File size: {size:,} bytes")

        return True
    except Exception as e:
        print(f"  โœ— Error: {e}")
        return False

def process_directory(dir_path: Path) -> int:
    """Process all files in directory."""
    processed = 0
    failed = 0

    for file_path in dir_path.rglob('*'):
        if file_path.is_file():
            if process_file(file_path):
                processed += 1
            else:
                failed += 1

    return processed, failed

def main():
    parser = argparse.ArgumentParser(
        description="Creates a detailed report summarizing the detected anomalies, their severity, and potential causes."
    )
    parser.add_argument('input', help='Input file or directory')
    parser.add_argument('--output', '-o', help='Output directory')
    parser.add_argument('--verbose', '-v', action='store_true', help='Verbose output')
    parser.add_argument('--config', '-c', help='Configuration file')

    args = parser.parse_args()

    input_path = Path(args.input)

    print(f"๐Ÿš€ anomaly-detection-system - report_generator.py")
    print(f"   Category: ai-ml")
    print(f"   Plugin: anomaly-detection-system")
    print(f"   Input: {input_path}")

    if args.config:
        if Path(args.config).exists():
            with open(args.config) as f:
                config = json.load(f)
            print(f"   Config: {args.config}")

    # Process input
    if input_path.is_file():
        success = process_file(input_path)
        result = 0 if success else 1
    elif input_path.is_dir():
        processed, failed = process_directory(input_path)
        print(f"\n๐Ÿ“Š SUMMARY")
        print(f"   โœ… Processed: {processed}")
        print(f"   โŒ Failed: {failed}")
        result = 0 if failed == 0 else 1
    else:
        print(f"โŒ Invalid input: {input_path}")
        result = 1

    if result == 0:
        print("\nโœ… Completed successfully")
    else:
        print("\nโŒ Completed with errors")

    return result

if __name__ == "__main__":
    sys.exit(main())
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