用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/MikeTreml/MissionControl --skill takt-time-calculator命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | takt-time-calculator |
| description | Takt time and cycle time analysis skill for production line balancing and capacity planning. |
| allowed-tools | Bash(*) Read Write Edit Glob Grep WebFetch |
| metadata | {"author":"babysitter-sdk","version":"1.0.0","category":"lean-manufacturing","backlog-id":"SK-IE-010"} |
You are takt-time-calculator - a specialized skill for calculating takt time, cycle time, and related metrics for production planning and line balancing.
This skill enables AI-powered takt time analysis including:
def calculate_takt_time(customer_demand, available_time, time_unit='seconds'):
"""
Takt Time = Available Production Time / Customer Demand
Args:
customer_demand: units required per period
available_time: production time available in period
time_unit: output unit ('seconds', 'minutes', 'hours')
Returns:
Takt time and related metrics
"""
if customer_demand <= 0:
raise ValueError("Customer demand must be positive")
takt_seconds = available_time / customer_demand
conversions = {
'seconds': takt_seconds,
'minutes': takt_seconds / 60,
'hours': takt_seconds / 3600
}
return {
"takt_time": conversions[time_unit],
"time_unit": time_unit,
"customer_demand": customer_demand,
"available_time_seconds": available_time,
"interpretation": f"Must complete 1 unit every {takt_seconds:.1f} seconds"
}
def calculate_available_time(shift_length_hours, breaks_minutes,
planned_downtime_minutes, shifts_per_day):
"""
Calculate net available production time
"""
shift_seconds = shift_length_hours * 3600
breaks_seconds = breaks_minutes * 60
downtime_seconds = planned_downtime_minutes * 60
net_per_shift = shift_seconds - breaks_seconds - downtime_seconds
total_daily = net_per_shift * shifts_per_day
return {
"gross_time_per_shift": shift_seconds,
"breaks_deduction": breaks_seconds,
"planned_downtime": downtime_seconds,
"net_available_per_shift": net_per_shift,
"shifts_per_day": shifts_per_day,
"total_daily_available": total_daily
}
import numpy as np
from scipy import stats
def analyze_cycle_times(observations):
"""
Statistical analysis of observed cycle times
"""
data = np.array(observations)
analysis = {
"count": len(data),
"mean": np.mean(data),
"median": np.median(data),
"std": np.std(data, ddof=1),
"min": np.min(data),
"max": np.max(data),
"range": np.max(data) - np.min(data),
"cv": np.std(data, ddof=1) / np.mean(data) * 100 # Coefficient of variation
}
# Percentiles
analysis["p5"] = np.percentile(data, 5)
analysis["p95"] = np.percentile(data, 95)
# Confidence interval for mean
ci = stats.t.interval(0.95, len(data)-1,
loc=np.mean(data),
scale=stats.sem(data))
analysis["ci_95"] = {"lower": ci[0], "upper": ci[1]}
# Outlier detection (IQR method)
q1, q3 = np.percentile(data, [25, 75])
iqr = q3 - q1
outliers = data[(data < q1 - 1.5*iqr) | (data > q3 + 1.5*iqr)]
analysis["outliers"] = outliers.tolist()
analysis
():
mean_ct = cycle_time_stats[]
p95_ct = cycle_time_stats[]
comparison = {
: takt_time,
: mean_ct,
: takt_time / mean_ct * mean_ct > ,
: mean_ct > takt_time * ,
: mean_ct > takt_time,
: p95_ct / takt_time * ,
: takt_time - mean_ct
}
comparison[]:
comparison[] =
comparison[]:
comparison[] =
:
comparison[] =
comparison
class OperatorCycleTimeTracker:
"""
Track and analyze operator cycle times
"""
def __init__(self):
self.observations = {} # {operator_id: [observations]}
def record_observation(self, operator_id, cycle_time, timestamp=None):
if operator_id not in self.observations:
self.observations[operator_id] = []
self.observations[operator_id].append({
"cycle_time": cycle_time,
"timestamp": timestamp or datetime.now()
})
def analyze_operator(self, operator_id):
obs = [o['cycle_time'] for o in self.observations.get(operator_id, [])]
return analyze_cycle_times(obs) if obs else None
def compare_operators(self):
"""Compare performance across operators"""
comparison = {}
for op_id in self.observations:
stats = self.analyze_operator(op_id)
if stats:
comparison[op_id] = {
"mean": stats['mean'],
: stats[],
: stats[]
}
ranked = (comparison.items(), key= x: x[][])
{
: comparison,
: [op_id op_id, _ ranked],
: ranked[][] ranked ,
: ranked[-][][] - ranked[][][] (ranked) >
}
def calculate_pitch(takt_time, pack_quantity):
"""
Pitch = Takt Time x Pack Quantity
Pitch is the time interval for paced withdrawal
(how often to move containers)
"""
pitch_seconds = takt_time * pack_quantity
return {
"pitch_seconds": pitch_seconds,
"pitch_minutes": pitch_seconds / 60,
"takt_time": takt_time,
"pack_quantity": pack_quantity,
"withdrawals_per_hour": 3600 / pitch_seconds,
"interpretation": f"Move {pack_quantity} units every {pitch_seconds/60:.1f} minutes"
}
def calculate_planned_cycle_time(takt_time, efficiency_factors):
"""
Planned Cycle Time accounts for expected inefficiencies
efficiency_factors: dict with components like:
- oee: Overall Equipment Effectiveness (0-1)
- quality_rate: First pass yield (0-1)
- availability: Machine availability (0-1)
"""
total_efficiency = 1.0
for factor, value in efficiency_factors.items():
total_efficiency *= value
planned_ct = takt_time * total_efficiency
return {
"takt_time": takt_time,
"efficiency_factors": efficiency_factors,
"combined_efficiency": total_efficiency,
"planned_cycle_time": planned_ct,
"buffer_percentage": (1 - total_efficiency) * 100,
"interpretation": f"Target {planned_ct:.1f}s to achieve takt of {takt_time:.1f}s"
}
def adjust_for_demand_changes(base_takt, base_demand, new_demand,
base_available_time, options):
"""
Calculate adjustments needed for demand changes
options: dict with available levers:
- overtime_available: max overtime minutes per shift
- additional_shifts: bool, can add shifts
- weekends: bool, can work weekends
"""
demand_ratio = new_demand / base_demand
if demand_ratio <= 1:
new_takt = base_takt / demand_ratio
return {
"action": "none_needed",
"new_takt": new_takt,
"demand_decrease": (1 - demand_ratio) * 100
}
# Need more capacity
additional_time_needed = base_available_time * (demand_ratio - 1)
solutions = []
# Overtime option
if options.get('overtime_available'):
overtime_per_shift = options['overtime_available'] * 60 # to seconds
shifts_needed = additional_time_needed / overtime_per_shift
if shifts_needed <= 5: # 5 day week
solutions.append({
"method": "overtime",
"overtime_minutes_per_day": additional_time_needed / 60,
"feasible": True
})
# Additional shift
if options.get('additional_shifts'):
solutions.append({
"method": "additional_shift",
"coverage_percentage": min(, (base_available_time / additional_time_needed) * ),
: additional_time_needed <= base_available_time
})
options.get():
solutions.append({
: ,
: additional_time_needed / base_available_time,
:
})
{
: (demand_ratio - ) * ,
: additional_time_needed / ,
: solutions,
: base_available_time / new_demand
}
This skill integrates with the following processes:
standard-work-development.jsline-balancing-analysis.jsvalue-stream-mapping-analysis.js{
"takt_analysis": {
"customer_demand": 460,
"available_time_hours": 7.5,
"takt_time_seconds": 58.7,
"takt_time_formatted": "58.7 sec/unit"
},
"cycle_time_comparison": {
"observed_mean": 52.3,
"observed_std": 4.2,
"takt_attainment_percent": 112.2,
"buffer_seconds": 6.4
},
"status": "healthy",
"recommendations": [
"Current cycle time provides adequate buffer",
"Monitor variability to maintain performance"
]
}