| name | shiftee |
| description | Interact with Shiftee workforce management platform using browser automation. Use when approving leave requests, checking leave balances, viewing attendance, managing schedules, or handling employee requests on Shiftee. Triggers include "請假", "休假", "審核", "approve leave", "shiftee", "leave balance", "出勤", "排班". |
| allowed-tools | Bash(agent-browser:*), Bash(npx agent-browser:*) |
Shiftee Workforce Management Automation
Automate leave approval, balance checking, and request management on Shiftee.
Quick Start
Always start with the auth flow below. Never skip auth detection.
agent-browser state load shiftee-auth.json
agent-browser open https://shiftee.io/app/companies/2549258/manager/home
agent-browser wait --load networkidle
Then immediately verify auth status (see Auth Flow below).
Auth Flow
Every session MUST start with auth detection. Do not assume saved state is valid.
agent-browser state load shiftee-auth.json
agent-browser open https://shiftee.io/app/companies/2549258/manager/home
agent-browser wait --load networkidle
agent-browser get url
If auth expired:
agent-browser close
agent-browser --headed open https://shiftee.io/en/accounts/login
agent-browser wait --load networkidle
agent-browser screenshot /tmp/shiftee-login.png
agent-browser get url
agent-browser state save shiftee-auth.json
If auth valid: proceed directly to task.
URL Pattern
Base: https://shiftee.io/app/companies/{company_id}/manager/
| Page | Path |
|---|
| Dashboard | home |
| Schedule Calendar | schedules |
| Attendance Calendar | attendances |
| All Leave | leaves |
| Leave Balance | leaves/balance |
| Requests | requests |
| Reports | reports |
| Admin | settings |
Core Workflow
- Load auth state:
state load shiftee-auth.json
- Navigate: Click sidebar links using refs from snapshot
- Snapshot:
snapshot -i (good accessibility tree, reliable refs)
- Interact: Click, fill, select
- Screenshot: Capture results
Sidebar Structure (Manager Mode)
├── 首頁 (Home)
├── 排班 (Schedule)
│ ├── 日曆 (Calendar)
│ └── 清單 (List)
├── 出勤 (Attendance)
│ ├── 日曆 (Calendar)
│ └── 清單 (List)
├── 休假 (Leave)
│ ├── 所有休假 (All Leave)
│ └── 休假餘額 (Leave Balance)
├── 申請 (Requests)
├── 內部通知 (Internal Notifications)
├── 禁止異動期間 (Freeze Periods)
├── 報表 (Reports)
│ ├── 即時 (Real-time)
│ └── 快照 (Snapshot)
├── 薪資 (Swingvy) (external link)
├── 管理 (Admin)
└── 個人設定 (Personal Settings)
Top bar has: "切換至員工模式" (Switch to Employee Mode) button.
Common Tasks
Approve Leave Requests
agent-browser snapshot -i
agent-browser click @e18
agent-browser wait 2000
agent-browser screenshot requests.png
The requests page has filter options:
| Filter | Description |
|---|
| 待我核准 | Pending my approval (default) |
| 我的申請 | My own requests |
| 已完成 | Completed (approved/rejected/cancelled) |
| 被副本通知的申請 | CC'd requests |
| 待我核准(沒有其他層核准正在等待) | Pending my approval (no other level waiting) |
| 查看所有員工的申請 | View all employee requests |
To change filter:
agent-browser eval 'document.querySelector("a[data-toggle=dropdown].sft-filter-is-used").click(); void 0'
agent-browser wait 500
agent-browser screenshot filter-options.png
agent-browser find text "查看所有員工的申請" click
agent-browser wait 1000
Request table columns: 申請類型, 申請人, 主要部門, 詳情, 申請原因, 狀態, 核准人備註, 送出時間, 行動.
Status values: 待核准 (pending, orange badge), 已核准 (approved), 已拒絕 (rejected), 已取消 (cancelled).
Check Leave Balances
agent-browser click @e17
agent-browser wait 2000
agent-browser screenshot leave-balance.png
Balance table columns: 員工, 到職日, 主要部門, 假別, 有效期間, 總天數, 已使用, 剩餘可用.
Leave types:
- 特休 Annual leave - paid annual leave
- 事假 Personal leave - personal leave (14 days)
- 病假 Sick leave - sick leave (30 days)
- 國定假日補假 Compensatory day off - comp days for national holidays
Filters available: 基準日期 (base date), 篩選 (filter), 部門 (department), 員工/清單 toggle.
View All Leave
agent-browser click @e16
agent-browser wait 2000
agent-browser screenshot all-leave.png
Shows all leave entries with: 員工, 休假期間, 假別, 休假選項 (full/half day), 休假時數, 休假餘額扣除天數, 備註.
Schedule Leave (排定休假)
agent-browser snapshot -i
agent-browser click @e30
agent-browser wait 1000
agent-browser screenshot schedule-leave-form.png
View Dashboard
agent-browser click @e8
agent-browser wait 2000
agent-browser screenshot dashboard.png
Dashboard shows:
- Today's attendance summary (打卡上班, 遲到, 未打卡, 早退次數, 休假)
- 未打卡 (missed clock-in) list with dates
- 待處理 (action items): 員工使用相同裝置, 員工未註冊, 員工將於一個月內離職, etc.
Switch to Employee Mode
agent-browser find text "切換至員工模式" click
agent-browser wait 2000
Tips
- Good accessibility: Unlike Swingvy, Shiftee has a well-structured accessibility tree.
snapshot -i returns reliable refs for all sidebar items.
- Filter dropdown: The request filter dropdown uses Bootstrap
data-toggle=dropdown. Use JS eval to open it since find text may match multiple elements.
- Date range: Most pages default to current month. Change date range using the date picker at the top.
- Department filter: "部門 已選取 9" dropdown lets you filter by department.
- Manager vs Employee: Manager mode shows team data. Toggle with "切換至員工模式" button.
- 申請類型: Includes 休假 (leave), 加班 (overtime), and potentially others.
Debugging
agent-browser get url
agent-browser screenshot --full page.png
agent-browser eval 'document.querySelector(".sft-switch-company-mode-btn")?.textContent?.trim()'
agent-browser get title