🚀 快速安装

复制以下命令并运行,立即安装此 Skill:

npx skills add https://skills.sh/claude-office-skills/skills/clickup-automation

💡 提示:需要 Node.js 和 NPM

ClickUp 自动化 (ClickUp Automation)

用于自动化 ClickUp 工作区和任务管理的综合技能。

核心概念 (Core Concepts)

工作区层级 (Workspace Hierarchy)

CLICKUP 层级 (CLICKUP HIERARCHY):
┌──────────────────────────────────────────────────────────────────┐
│ 🏢 工作区 (WORKSPACE)                                             │
├──────────────────────────────────────────────────────────────────┤
│   ├── 📁 空间:工程 (SPACE: Engineering)                           │
│   │   ├── 📂 文件夹:Q1 项目 (FOLDER: Q1 Projects)                 │
│   │   │   ├── 📋 列表:功能开发 (LIST: Feature Development)         │
│   │   │   │   ├── ✅ 任务:实现认证 (Task: Implement Auth)          │
│   │   │   │   │   └── ☑️ 子任务:OAuth 设置 (Subtask: OAuth setup) │
│   │   │   │   └── ✅ 任务:构建 API (Task: Build API)              │
│   │   │   └── 📋 列表:Bug 修复 (LIST: Bug Fixes)                  │
│   │   └── 📂 文件夹:基础设施 (FOLDER: Infrastructure)              │
│   │                                                              │
│   ├── 📁 空间:市场 (SPACE: Marketing)                             │
│   │   └── 📋 列表:内容日历 (LIST: Content Calendar)                │
│   │                                                              │
│   └── 📁 空间:运营 (SPACE: Operations)                            │
└──────────────────────────────────────────────────────────────────┘

任务结构 (Task Structure)

task_structure:
  required:
    name: "{{task_name}}"
    list_id: "{{list_id}}"
    
  optional:
    description: "{{description}}"
    assignees: ["user_id_1", "user_id_2"]
    tags: ["功能", "高优先级"] (["feature", "priority"])
    status: "Open"
    priority: 2  # 1=紧急, 2=高, 3=普通, 4=低 (1=Urgent, 2=High, 3=Normal, 4=Low)
    due_date: "2024-01-20"
    start_date: "2024-01-15"
    time_estimate: 28800000  # 毫秒(8 小时)(milliseconds - 8 hours)
    
  custom_fields:
    - id: "field_id"
      value: "custom_value"
      
  checklists:
    - name: "验收标准 (Acceptance Criteria)"
      items:
        - name: "需求 1 (Requirement 1)"
          resolved: false

自动化规则 (Automation Rules)

内置自动化 (Built-in Automations)

automations:
  - name: 创建时自动分配 (auto_assign_on_create)
    trigger:
      type: 任务已创建 (task_created)
      list_id: "list_123"
    conditions:
      - tag_contains: "设计" ("design")
    actions:
      - add_assignee: "design_lead_id"
      - set_priority: 高 (high)
      
  - name: 截止日期提醒 (due_date_reminder)
    trigger:
      type: 截止日期 (due_date)
      before: 1 天 (1_day)
    actions:
      - send_notification:
          to: 负责人 (assignees)
          message: "任务明天到期:{{task.name}} (Task due tomorrow: {{task.name}})"
      - add_tag: "即将到期 (due-soon)"
      
  - name: 状态变更工作流 (status_change_workflow)
    trigger:
      type: 状态已变更 (status_changed)
      to: "待审查 (In Review)"
    actions:
      - remove_assignee: "{{previous_assignee}}"
      - add_assignee: "reviewer_id"
      - add_comment: "准备审查 @reviewer (Ready for review @reviewer)"
      
  - name: 完成父任务 (complete_parent_task)
    trigger:
      type: 所有子任务已完成 (all_subtasks_done)
    actions:
      - set_status: "已完成 (Complete)"
      - add_comment: "所有子任务已完成 ✓ (All subtasks completed ✓)"

高级自动化 (Advanced Automations)

advanced_rules:
  - name: 冲刺滚动 (sprint_rollover)
    trigger:
      type: 定时 (schedule)
      cron: "0 0 * * 1"  # 周一午夜 (Monday midnight)
    conditions:
      - status_not: "已完成 (Complete)"
      - due_date_passed: true
    actions:
      - move_to_list: "{{next_sprint_list}}"
      - update_due_date: "+7 days"
      - add_comment: "从上一冲刺转移而来 (Rolled over from previous sprint)"
      
  - name: 升级工作流 (escalation_workflow)
    trigger:
      type: 任务被阻塞 (task_blocked)
      duration: 48 小时 (48_hours)
    actions:
      - set_priority: 紧急 (urgent)
      - notify: 经理 (manager)
      - add_watcher: "manager_id"
      - add_tag: "已升级 (escalated)"

视图与布局 (Views & Layouts)

视图类型 (View Types)

views:
  list_view:
    type: 列表 (list)
    group_by: 状态 (status)
    sort_by: 优先级 (priority)
    columns:
      - 名称 (name)
      - 负责人 (assignees)
      - 截止日期 (due_date)
      - 优先级 (priority)
      - 预估时间 (time_estimate)
      
  board_view:
    type: 看板 (board)
    group_by: 状态 (status)
    card_fields:
      - 负责人 (assignees)
      - 截止日期 (due_date)
      - 标签 (tags)
      - 子任务数量 (subtasks_count)
      
  calendar_view:
    type: 日历 (calendar)
    date_field: 截止日期 (due_date)
    color_by: 优先级 (priority)
    
  timeline_view:
    type: 时间线 (timeline)
    start_field: 开始日期 (start_date)
    end_field: 截止日期 (due_date)
    dependencies: true
    
  workload_view:
    type: 工作量 (workload)
    capacity_field: 预估时间 (time_estimate)
    group_by: 负责人 (assignee)

仪表板小部件 (Dashboard Widgets)

dashboard:
  widgets:
    - type: 冲刺燃尽图 (sprint_burndown)
      list_id: "current_sprint"
      
    - type: 工作量 (workload)
      space_id: "engineering"
      period: 本周 (this_week)
      
    - type: 任务状态 (task_status)
      filter:
        assignee: 我 (me)
        
    - type: 记录时间 (time_tracked)
      group_by: 项目 (project)
      period: 本月 (this_month)
      
    - type: 目标进度 (goals_progress)
      folder_id: "q1_goals"

时间跟踪 (Time Tracking)

时间条目配置 (Time Entry Configuration)

time_tracking:
  settings:
    billable_default: true
    rounding: 15 分钟 (15_minutes)
    require_description: false
    
  entry:
    task_id: "task_123"
    start: "2024-01-15T09:00:00Z"
    end: "2024-01-15T11:30:00Z"
    duration: 9000000  # 2.5 小时(毫秒)(2.5 hours in ms)
    billable: true
    description: "开发工作 (Development work)"
    
  reports:
    - type: 用户汇总 (user_summary)
      period: 本周 (this_week)
      group_by: 任务 (task)
      
    - type: 项目汇总 (project_summary)
      period: 本月 (this_month)
      group_by: 用户 (user)

时间报告仪表板 (Time Reports Dashboard)

时间跟踪 - 本周 (TIME TRACKING - THIS WEEK)
═══════════════════════════════════════

总计 (TOTAL): 32 小时 45 分 (32h 45m)

按项目 (BY PROJECT):
功能开发 (Feature Dev)   ████████████████ 18h 30m
Bug 修复 (Bug Fixes)     ████████░░░░░░░░ 8h 15m
会议 (Meetings)          ████░░░░░░░░░░░░ 4h 00m
管理 (Admin)             ██░░░░░░░░░░░░░░ 2h 00m

按天 (BY DAY):
周一 (Mon)    █████████████████ 7h 30m
周二 (Tue)    ███████████████░░ 6h 45m
周三 (Wed)    ██████████████░░░ 6h 15m
周四 (Thu)    ████████████████░ 7h 00m
周五 (Fri)    ███████████░░░░░░ 5h 15m

可计费 (BILLABLE): 28h 00m (85%)

目标与 OKRs (Goals & OKRs)

目标结构 (Goal Structure)

goals:
  - name: "Q1 产品目标 (Q1 Product Goals)"
    type: 文件夹 (folder)
    
    targets:
      - name: "发布 v2.0 (Ship v2.0)"
        type: 布尔值 (true_false)
        due_date: "2024-03-31"
        
      - name: "减少 Bug 数量 (Reduce bug count)"
        type: 数字 (number)
        start: 45
        target: 10
        unit: "未解决的 Bug (open bugs)"
        
      - name: "提高测试覆盖率 (Increase test coverage)"
        type: 百分比 (percentage)
        start: 65
        target: 85
        
    key_results:
      - task_list: "v2.0_features"
        measure: 已完成任务数 (tasks_completed)

目标仪表板 (Goal Dashboard)

Q1 目标进度 (Q1 GOALS PROGRESS)
═══════════════════════════════════════

发布 v2.0 (Ship v2.0)
████████████████████ 100% ✓
3 月 28 日完成 (Completed on March 28)

减少 Bug 数量 (Reduce Bug Count)
████████████████░░░░ 78%
当前 (Current): 15 | 目标 (Target): 10

提高测试覆盖率 (Increase Test Coverage)
██████████████░░░░░░ 72%
当前 (Current): 79% | 目标 (Target): 85%

Q1 总体进度 (OVERALL Q1): 83% 完成 (Complete)

模板 (Templates)

任务模板 (Task Templates)

task_templates:
  - name: "Bug 报告 (Bug Report)"
    status: "待处理 (Open)"
    priority: 高 (high)
    tags: ["bug"]
    description: |
      ## Bug 描述 (Bug Description)
      {{description}}
      
      ## 重现步骤 (Steps to Reproduce)
      1. 
      2. 
      3. 
      
      ## 预期行为 (Expected Behavior)
      
      ## 实际行为 (Actual Behavior)
      
      ## 环境 (Environment)
      - 浏览器 (Browser): 
      - 操作系统 (OS): 
      - 版本 (Version): 
      
    checklists:
      - name: "Bug 修复工作流 (Bug Fix Workflow)"
        items:
          - "重现 Bug (Reproduce bug)"
          - "确定根本原因 (Identify root cause)"
          - "实现修复 (Implement fix)"
          - "编写测试 (Write tests)"
          - "代码审查 (Code review)"
          - "部署 (Deploy)"
          
  - name: "功能需求 (Feature Request)"
    status: "待办 (Backlog)"
    custom_fields:
      story_points: null
    checklists:
      - name: "功能工作流 (Feature Workflow)"
        items:
          - "需求定义 (Requirements defined)"
          - "设计批准 (Design approved)"
          - "实现 (Implementation)"
          - "测试 (Testing)"
          - "文档 (Documentation)"

集成 (Integrations)

Slack 集成 (Slack Integration)

slack_integration:
  notifications:
    - trigger: 任务已创建 (task_created)
      channel: "#项目更新 (#project-updates)"
      include: [名称 (name), 负责人 (assignees), 截止日期 (due_date)]
      
    - trigger: 状态已变更 (status_changed)
      to: "已完成 (Complete)"
      channel: "#胜利 (#wins)"
      message: "✅ {{task.name}} 已完成,完成人:{{user.name}} (completed by {{user.name}})"
      
  commands:
    /clickup:
      - 创建任务 (create_task)
      - 我的任务 (my_tasks)
      - 记录时间 (log_time)

GitHub 集成 (GitHub Integration)

github_integration:
  branch_naming:
    pattern: "{{task.id}}-{{task.slug}}"
    
  automations:
    - trigger: 分支已创建 (branch_created)
      actions:
        - set_status: "进行中 (In Progress)"
        - add_comment: "分支已创建:{{branch.name}} (Branch created: {{branch.name}})"
        
    - trigger: 拉取请求已打开 (pr_opened)
      actions:
        - set_status: "待审查 (In Review)"
        - link_pr: "{{pr.url}}"
        
    - trigger: 拉取请求已合并 (pr_merged)
      actions:
        - set_status: "已完成 (Complete)"

API 示例 (API Examples)

任务操作 (Task Operations)

// 创建任务 (Create Task)
const task = await clickup.tasks.create(listId, {
  name: "实现用户认证 (Implement user authentication)",
  description: "添加 OAuth2 支持 (Add OAuth2 support)",
  assignees: [userId],
  priority: 2,
  due_date: Date.now() + 7 * 24 * 60 * 60 * 1000,
  time_estimate: 28800000,
  custom_fields: [
    { id: "field_id", value: "5" }
  ]
});

// 更新任务 (Update Task)
await clickup.tasks.update(taskId, {
  status: "进行中 (In Progress)",
  assignees: { add: [newUserId] }
});

// 添加时间条目 (Add Time Entry)
await clickup.timeEntries.create(taskId, {
  start: Date.now() - 3600000,
  duration: 3600000,
  billable: true
});

// 创建检查清单 (Create Checklist)
await clickup.checklists.create(taskId, {
  name: "验收标准 (Acceptance Criteria)"
});

最佳实践 (Best Practices)

  1. 层级设计 (Hierarchy Design):空间 → 文件夹 → 列表 (Spaces → Folders → Lists)
  2. 一致的状态 (Consistent Statuses):在列表中标准化状态
  3. 自定义字段 (Custom Fields):跟踪关键指标
  4. 自动化 (Automations):减少手动工作
  5. 时间跟踪 (Time Tracking):为容量规划启用
  6. 模板 (Templates):标准化任务创建
  7. 目标 (Goals):使任务与目标对齐
  8. 视图 (Views):根据不同需求进行配置

📄 原始文档

完整文档(英文):

https://skills.sh/claude-office-skills/skills/clickup-automation

💡 提示:点击上方链接查看 skills.sh 原始英文文档,方便对照翻译。

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。