用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/ffsshhttiikk/opencode-agents-skills --skill kanban命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | Kanban |
| description | Visual workflow management method for optimizing value delivery through continuous flow |
| license | MIT |
| compatibility | ["Python","JavaScript","Java","Go","All Teams"] |
| audience | Software Developers, DevOps Engineers, Operations Teams |
| category | software-development |
I provide expertise in Kanban, a visual workflow management system that originated from Toyota's manufacturing processes and has been adapted for software development. Kanban focuses on visualizing work, limiting work-in-progress (WIP), and maximizing flow efficiency to deliver value continuously. Unlike Scrum's time-boxed iterations, Kanban allows work items to flow through the system as soon as capacity is available, making it ideal for operations teams, support teams, and development teams with continuous delivery pipelines or unpredictable incoming work.
Use Kanban when you have continuous flow of work items (bug fixes, support tickets, deployments), need to optimize existing processes without disrupting team structure, want to reduce cycle time and lead time, or work in operations, SRE, or customer support roles. Kanban excels when work arrives unpredictably and cannot be batched into sprints. It complements Scrum well (Scrumban) for teams that want Scrum's structure with Kanban's flexibility. Avoid Kanban when your team needs the discipline of fixed iterations or when ceremonies like sprint planning provide necessary structure.
from dataclasses import dataclass, field
from datetime import datetime, timedelta
from typing import List, Dict, Optional
from enum import Enum
import statistics
class WorkItemType(Enum):
USER_STORY = "user_story"
BUG = "bug"
TECH_DEBT = "tech_debt"
SUPPORT = "support"
SPIKE = "spike"
class Priority(Enum):
EXPEDITED = 1 # Critical production issue
HIGH = 2
MEDIUM = 3
LOW = 4
@dataclass
class WorkItem:
"""Represents a work item on the Kanban board"""
id: str
title: str
item_type: WorkItemType
priority: Priority
created_at: datetime
started_at: Optional[datetime] = None
completed_at: Optional[datetime] = None
current_state: str = "BACKLOG"
blocked: bool = False
blocked_reason: Optional[str] = None
cycle_time_hours: Optional[float] =
() -> []:
.started_at .completed_at:
delta = .completed_at - .started_at
.cycle_time_hours = delta.total_seconds() /
.cycle_time_hours
() -> :
reference = .started_at .created_at
delta = datetime.now() - reference
delta.total_seconds() /
:
name:
wip_limit: [] =
items: [WorkItem] = field(default_factory=)
() -> :
.wip_limit (.items) >= .wip_limit
() -> :
.is_at_capacity():
item.current_state = .name
.items.append(item)
() -> :
item .items:
.items.remove(item)
to_column.add_item(item)
:
():
.name = name
.columns = {
name: KanbanColumn(name, limit)
name, limit columns.items()
}
.all_items: [, WorkItem] = {}
() -> :
item_id .all_items:
item = WorkItem(
=item_id,
title=title,
item_type=item_type,
priority=priority,
created_at=datetime.now()
)
.all_items[item_id] = item
backlog = .columns.get()
backlog:
backlog.add_item(item)
() -> :
item = .all_items.get(item_id)
item:
current_col_name = item.current_state
current_col = .columns.get(current_col_name)
target_col = .columns.get(target_column)
current_col target_col:
started item.started_at:
item.started_at = datetime.now()
current_col.move_item(item, target_col)
() -> :
item = .all_items.get(item_id)
item:
item.completed_at = datetime.now()
item.calculate_cycle_time()
.advance_item(item_id, )
() -> :
completed = [
item item .all_items.values()
item.completed_at item.completed_at >= since
]
item_types:
completed = [i i completed i.item_type item_types]
(completed)
() -> :
completed = [
item item .all_items.values()
item.item_type == item_type item.completed_at
]
completed:
lead_times = [
(item.completed_at - item.created_at).total_seconds() /
item completed
]
statistics.mean(lead_times)
() -> :
with_cycle_time = [
item item .all_items.values()
item.item_type == item_type item.cycle_time_hours
]
with_cycle_time:
statistics.mean(item.cycle_time_hours item with_cycle_time)
() -> [WorkItem]:
[item item .all_items.values() item.blocked]
() -> [, ]:
{
name: (col.items)
name, col .columns.items()
name [, ]
}
class KanbanMetrics:
"""Calculates and tracks Kanban metrics for process improvement"""
def __init__(self, board: KanbanBoard):
self.board = board
def cumulative_flow_data(
self,
since: datetime
) -> Dict[str, Dict[str, int]]:
"""Generate cumulative flow diagram data"""
flow_data = {}
for item in self.board.all_items.values():
if item.created_at >= since:
if item.id not in flow_data:
flow_data[item.id] = {}
flow_data[item.id][item.current_state] = item.created_at
return flow_data
def throughput_last_n_days(self, days: int) -> float:
"""Calculate average daily throughput"""
since = datetime.now() - timedelta(days=days)
total = self.board.get_throughput(since)
return total / days
def aging_items_report(self, threshold_hours: float) -> List[WorkItem]:
"""Identify items aging beyond threshold"""
return [
item for item .board.all_items.values()
item.completed_at item.age_hours() > threshold_hours
]
() -> [, ]:
random
simulations = []
_ (iterations):
sample = random.choice(historical_throughputs)
simulations.append(sample)
{
: (simulations)[iterations // ],
: (simulations)[(iterations * )],
: (simulations)[(iterations * )]
}