work-sampling-analyzer
БесплатноБез исполняемых скриптовНе проверенWork sampling analysis skill for activity distribution and utilization studies.
от a5c-ai★ 1 947 звёзд на GitHubОб этом скилле
work-sampling-analyzer
You are work-sampling-analyzer - a specialized skill for work sampling studies to analyze activity distribution and equipment/worker utilization.
Overview
This skill enables AI-powered work sampling including:
- Random observation scheduling
- Sample size determination
- Activity categorization
- Statistical confidence intervals
- Control chart monitoring
- Multi-activity studies
- Standard time development from sampling
- Utilization analysis
Capabilities
1. Sample Size Determination
import numpy as np
from scipy import stats
import random
from datetime import datetime, timedelta
def determine_sample_size_binomial(estimated_proportion: float,
desired_accuracy: float,
confidence_level: float = 0.95):
"""
Determine required sample size for work sampling
estimated_proportion: estimated percentage of time in activity (as decimal)
desired_accuracy: desired accuracy (e.g., 0.05 for ±5%)
confidence_level: statistical confidence (typically 0.95)
"""
p = estimated_proportion
e = desired_accuracy
z = stats.norm.ppf(1 - (1 - confidence_level) / 2)
# n = (z² × p × (1-p)) / e²
n = (z ** 2 * p * (1 - p)) / (e ** 2)
return {
"required_observations": int(np.ceil(n)),
"estimated_proportion": p,
"desired_accuracy": f"±{e * 100:.1f}%",
"confidence_level": f"{confidence_level * 100:.0f}%",
"z_score": round(z, 2)
}
def update_sample_size(observations: int, observed_proportion: float,
desired_accuracy: float, confidence_level: float = 0.95):
"""
Update sample size based on observed data
"""
z = stats.norm.ppf(1 - (1 - confidence_level) / 2)
# Recalculate with observed proportion
p = observed_proportion
required = int(np.ceil((z ** 2 * p * (1 - p)) / (desired_accuracy ** 2)))
return {
"current_observations": observations,
"observed_proportion": round(p, 3),
"required_observations": required,
"additional_needed": max(0, required - observations),
"study_complete": observations >= required
}
2. Random Observation Scheduling
def generate_random_schedule(study_duration_days: int,
observations_per_day: int,
work_start: str = "08:00",
work_end: str = "17:00",
exclude_lunch: tuple = ("12:00", "13:00")):
"""
Generate random observation times for work sampling study
"""
start_time = datetime.strptime(work_start, "%H:%M")
end_time = datetime.strptime(work_end, "%H:%M")
lunch_start = datetime.strptime(exclude_lunch[0], "%H:%M")
lunch_end = datetime.strptime(exclude_lunch[1], "%H:%M")
schedule = []
for day in range(study_duration_days):
day_schedule = []
# Generate random times
attempts = 0
while len(day_schedule) < observations_per_day and attempts < 1000:
# Random minutes from start to end
total_minutes = (end_time - start_time).seconds // 60
random_minutes = random.randint(0, total_minutes)
obs_time = start_time + timedelta(minutes=random_minutes)
# Check if during lunch
if lunch_start <= obs_time < lunch_end:
attempts += 1
continue
# Check minimum spacing (10 minutes)
too_close = False
for existing in day_schedule:
if abs((obs_time - existing).seconds) < 600: # 10 minutes
too_close = True
break
if not too_close:
day_schedule.append(obs_time)
attempts += 1
day_schedule.sort()
schedule.append({
'day': day + 1,
'times': [t.strftime("%H:%M") for t in day_schedule]
})
return {
"total_days": study_duration_days,
"observations_per_day": observations_per_day,
"total_observations": study_duration_days * observations_per_day,
"schedule": schedule
}
3. Activity Analysis
def analyze_observations(observations: list, categories: list):
"""
Analyze work sampling observations
observations: list of observed categories
categories: list of possible categories
"""
total = len(observations)
# Count by category
counts = {cat: observations.count(cat) for cat in categories}
# Calculate proportions and confidence intervals
z = stats.norm.ppf(0.975) # 95% confidence
results = []
for cat in categories:
count = counts[cat]
p = count / total if total > 0 else 0
# Standard error
se = np.sqrt(p * (1 - p) / total) if total > 0 else 0
# Confidence interval
ci_lower = max(0, p - z * se)
ci_upper = min(1,
Установить work-sampling-analyzer в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Bash(*)ReadWriteEditGlobGrepWebFetchFAQ
Что делает скилл work-sampling-analyzer?
Work sampling analysis skill for activity distribution and utilization studies.
Как установить скилл work-sampling-analyzer?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл work-sampling-analyzer запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic