Skills & Scheduled tasks — Tự động hóa Cowork

4 — Nâng caoTrung cấp45 phút

Sau 9 bài, bạn đã biết viết brief chất lượng. Nhưng có vấn đề: brief 300 từ cho mỗi task lặp lại = tốn thời gian + dễ quên detail.

Bạn sẽ học được
  • Giải thích Skill là gì — markdown file đóng gói workflow, có frontmatter + step-by-step
  • Tạo skill qua Cowork (Skill Creator) hoặc bằng tay (viết markdown trực tiếp)
  • Tạo skill có parameters để reusable (không hard-code values)
  • Setup Scheduled tasks — cron-style để Cowork tự chạy skill theo lịch
  • Kết hợp Skills + Scheduled → tạo automation workflows như "morning brief" hàng ngày
  • Tránh các lỗi phổ biến: skill quá rigid, scheduled task máy tắt không chạy, usage bùng nổ

Skill là gì — Định nghĩa kỹ thuật

Tim giải thích rất đơn giản:

Diễn đạt lại:

File SKILL.md — Anatomy

File SKILL.md có frontmatter (YAML ở đầu) + body (markdown workflow):

Weekly Sales Review: [Date range]

Skill = 1 folder chứa:
├── SKILL.md           ← required: metadata + workflow description
├── references/        ← optional: context files (guides, examples)
│   ├── brand-guide.md
│   └── style-examples.md
└── scripts/           ← optional: Python/shell scripts cho task kỹ thuật
    └── format-data.py

name: weekly-sales-review
description: Generate weekly sales review memo from CRM + Slack + files.
  Use when user says "weekly review", "sales summary", "Friday report".

# Weekly Sales Review Skill

## When this skill runs

User triggers với `/weekly-sales-review` hoặc natural language
"run weekly review" / "sales summary this week".

## Workflow

### Step 1: Gather data

- Pull deals từ HubSpot (last 7 days, closed/updated)
- Read Slack #sales-ops last 7 days
- Read /sales/forecasts/current-quarter.xlsx

### Step 2: Analyze

- Group deals by: rep, segment, size
- Compare to prior week
- Identify top 3 insights

### Step 3: Generate output

- Create weekly-review-YYYY-MM-DD.docx (1 page)
- Draft email to VP in Gmail (subject: "Weekly Sales Review: [date]")
- DO NOT send email — leave as draft

## Output format

TL;DR

[3-bullet summary]

Top 3 insights

  • [Insight with $ impact]
  • ...
  • ...

Actions needed

[bullet list]

Frontmatter required:

Body khuyến nghị:

Tại sao markdown?

Vì:

Tim xác nhận:

  • name — machine-friendly, kebab-case
  • description — khi nào skill trigger (Cowork dùng để match)
  • Workflow step-by-step
  • Output format (explicit)
  • Rules/constraints
  • Parameters (nếu có)
  • Human-readable — bạn đọc hiểu, edit được
  • Portable — skill file .md chạy trên Cowork, Claude Code, cả Agent SDK
  • Version-control-friendly — git diff rõ ràng
  • AI-friendly — Claude parse markdown tốt hơn JSON

## Parameters

None currently — uses current week automatically.

## Rules

- Never expose individual rep performance publicly
- Always anonymize problem deals
- If data missing, flag explicit — don't guess

2 cách tạo skill

Cách 1: Qua Skill Creator (Cowork tự viết skill)

Cowork có built-in skill tên Skill Creator. Dùng khi:

Flow:

Tim demo flight search:

Cowork process 8-10 phút, generate skill với parameters [origin_city], [destination_city], [date_range], [class], [max_budget].

Cách 2: Viết tay (hand-write skill)

Dùng khi:

Flow:

Tim: "You can write it yourself. But generally describe what you want to do, test it, make sure it works, and then add it to the skills."

Ví dụ skill viết tay — morning-brief:

Subject: Brief DD/MM: N meetings, M urgent actions

Morning!

📅 Today

📧 Email (priority)

💬 Slack pending

✅ Tasks

Have a good day.

  • Bạn chưa quen format skill
  • Task có nhiều step phức tạp
  • Muốn iterate + test nhanh
  • Bạn run task 1-2 lần thường (không skill)
  • Khi task ổn, gõ: "Turn this into a reusable skill that I can run anytime."
  • Cowork hỏi:
  • Tên skill
  • Parameters cần input từ user mỗi lần
  • Edge cases cần handle
  • Cowork viết skill file
  • Cowork test skill
  • Bạn review + "Copy to my skills"
  • Bạn đã quen format
  • Task đơn giản (1-2 step)
  • Muốn control tuyệt đối
  • Mở text editor (VS Code, TextEdit, etc.)
  • Tạo folder skill: ~/.claude/skills/[skill-name]/
  • Tạo file SKILL.md với frontmatter + workflow
  • Add references/ nếu cần
  • Import vào Cowork: Settings > Customize > Skills > Add
  • [N] meetings. Key ones: [meeting A needing prep]
  • Heads up: [conflict or back-to-back]
  • [Sender]: [subject] — [why urgent]
  • ...
  • ...
  • [Person]: awaiting response since [time]
  • [Top 3]

name: morning-brief
description: Daily morning brief for user, covering calendar,
  email priority, and pending tasks. Triggers at 7am or on-demand
  with "morning brief" / "daily brief".

# Morning Brief Skill

## Workflow

### Step 1: Check calendar
- Pull today's events from Google Calendar connector
- Flag: meetings requiring prep, back-to-back blocks,
  potential conflicts

### Step 2: Email priority
- Check Gmail last 12 hours
- Filter senders in /Users/[name]/preferences/vip-list.md
- Rank: URGENT (reply < 24h), IMPORTANT (this week), FYI

### Step 3: Slack pending
- Check DMs unreplied > 6h
- Top 3 by timestamp

### Step 4: Task reminders
- Read /Users/[name]/tasks/top-3.md

### Step 5: Generate brief

Output format:

Cách 2: Viết tay (hand-write skill)

Dài khoảng 60 dòng. Import vào Cowork. Xong.


## Parameters

None — uses "today" by default.

## Rules

- Tone: succinct, bullet-heavy
- Length: 200-250 words total
- DRAFT only in Gmail — DO NOT send
- Save a copy to /Users/[name]/briefs/YYYY-MM-DD.md

Đặt tên skill đúng

Tên skill quan trọng vì:

Quy tắc đặt tên:

✅ Dùng:

❌ Tránh:

10 skill name mẫu:

  • Bạn gọi bằng /skill-name
  • Cowork match skill dựa vào description + name
  • kebab-case: weekly-sales-review
  • Verb-object: generate-report, analyze-data
  • Specific enough: q-monthly-close > finance-task
  • Underscore: weekly_sales_review
  • CamelCase: WeeklySalesReview
  • Quá generic: report, analysis
  • Quá specific: weekly-sales-review-for-acme-q3-2026
  • morning-brief — daily morning overview
  • weekly-review — weekly team/department review
  • monthly-close — finance month-end
  • competitor-scan — monthly competitor intel
  • account-prep — prep for sales/customer call
  • content-repurpose — blog → multi-format
  • feedback-synth — user feedback synthesis
  • deck-drafter — PowerPoint from outline
  • email-triage — inbox priority ranking
  • vendor-check — vendor performance review

Skill với parameters

Skill không có parameters → hard-code, dùng 1 cách. Skill có parameters → reusable.

Ví dụ so sánh

Skill không params (rigid):

Chỉ dùng 1 kiểu.

Skill có params (flexible):


name: miami-dubai-flights
description: Search flights from Miami to Dubai under $3000

# Workflow
1. Search Google Flights Miami → Dubai
2. Business class
3. Budget < $3000
...

Ví dụ so sánh

Cách gọi:


name: flight-search
description: Search flights between 2 cities with constraints.
  Ask user for: origin, destination, date range, class, budget.

# Workflow

## Step 1: Ask user for parameters

If not provided in trigger, ask:
- origin_city (required)
- destination_city (required)
- date_range (e.g., "next 6 months")
- class (economy / business / first) — default: economy
- max_budget (USD)

## Step 2: Search

- Use Google Flights
- Try 5-10 date combinations in range
- Parallel search nếu >5 combinations

## Step 3: Output
...

Skill với parameters (tiếp)

Hoặc Cowork sẽ hỏi từng param.

Best practice cho params

  • Required params ở đầu
  • Optional params với default value
  • Validate input (budget > 0, date range valid)
  • Fail gracefully nếu param sai format
/flight-search Miami Dubai "next 6 months" business 3000

Skills đã có sẵn (pre-built)

Cowork ship với một số skill mặc định. Vào Customize > Skills để xem:

Dùng các skill này làm base — combine với skill của bạn để multi-skill workflow.

Plugin system

Plugin = đóng gói skills + connectors + commands + sub-agents thành 1 unit phân phối.

Michaela announce trong webinar:

Ví dụ plugin "Sales Ops Starter":

1 click install — team bạn có đầy đủ setup. Admin enterprise gate access per team.

SkillMục đích
skill-creatorTạo skill mới qua conversation
excel-generatorTạo .xlsx với formula
powerpoint-generatorTạo .pptx có structure
canvas-designDesign poster/flyer
theme-factoryGenerate brand theme
data-analyzerAnalyze CSV/Excel với NumPy
Sales Ops Starter Plugin
├── Skills:
│   ├── weekly-review
│   ├── account-prep  
│   ├── deal-forecast
│   └── lost-deal-postmortem
├── Connectors (recommended):
│   ├── Salesforce/HubSpot
│   ├── Gmail
│   └── Slack
├── Commands:
│   ├── /weekly-review
│   ├── /prep-call [company]
│   └── /forecast
└── Sub-agents:
    └── competitor-scanner (background)

Scheduled tasks — Cowork tự chạy theo lịch

Skills → trigger on-demand. Scheduled tasks → trigger theo cron.

Setup scheduled task — 2 cách

Cách 1: Qua UI

Cách 2: Qua natural language (Tim demo)

Tim gõ:

Cowork:

Frequency options

Quản lý scheduled tasks

Actions:

  • Sidebar > Scheduled
  • + New scheduled task
  • Form:
  • Name
  • Description (= brief)
  • Skill (optional — có thể ref skill: /weekly-review)
  • Frequency: hourly / daily / weekly / monthly
  • Time
  • Folder/Project để làm việc
  • Model (Opus / Sonnet / Haiku)
  • Hiểu intent
  • Dùng built-in schedule skill
  • Tạo scheduled task
  • Timezone-adjust (Dubai 10am = Tim's local 2:04am)
  • Confirm — bạn bấm Schedule
  • Run now — test manually
  • Pause — stop tự chạy, data giữ nguyên
  • Edit — sửa brief, frequency
  • Delete — xóa hoàn toàn
FrequencyUse case
HourlyCheck email priority, inventory flag
DailyMorning brief, daily standup, ticket scan
WeeklyWeekly review (Friday 3pm), team update
MonthlyMonth-end close (1st of month), competitor scan
Custom cronAdvanced — expression like "0 9 1-5"
Sidebar > Scheduled
├── [Active] Morning brief — daily 7am
├── [Active] Weekly review — Friday 3pm
├── [Paused] Inventory check — Monday 8am
└── [Active] Monthly close — 1st 9am

⚠️ Điều kiện chạy scheduled task

Tim nhắc đi nhắc lại — quan trọng, đừng miss:

Nghĩa là:

Workaround

Mac:

Windows:

Thực tế: nếu scheduled task chạy trong giờ làm việc (9-5), không cần workaround — máy bật sẵn.

Alternative: Claude for work (cloud-hosted)

Version enterprise có thể chạy scheduled task trên cloud (không cần desktop bật). Tim hint:

Nếu team bạn cần scheduled task 24/7, xem xét Claude for Work/Enterprise.

  • ❌ Máy ngủ lúc 7am → morning brief không chạy
  • ❌ App Cowork quit → scheduled task không chạy
  • ❌ Máy tắt cuối tuần → Saturday task không chạy
  • ✅ Máy bật + app mở → chạy đúng giờ
  • Settings > System > Power & sleep > Sleep "Never" khi cắm điện
  • Hoặc dùng app PowerToys → "Awake"
# Terminal: prevent sleep
caffeinate -d

# Hoặc dài hạn: System Preferences > Energy Saver > Prevent sleep

Combine Skill + Scheduled — Automation workflow

Đây là nơi Cowork trở thành "employee" của bạn.

Pattern 1: Daily morning routine

Pattern 2: Friday closeout

7:00am — /morning-brief scheduled
  → Email draft với brief
  → You wake up, have brief ready

7:30am — /email-triage scheduled
  → Classify inbox
  → Top priority flagged

8:00am — You review + action

Pattern 2: Friday closeout

Pattern 3: Monthly close

Friday 3:00pm — 4 scheduled tasks parallel:
  /weekly-sales-review (for you)
  /weekly-team-update (for team Slack)
  /next-week-calendar-prep
  /expense-log-compile

Friday 3:30pm — You review all 4 outputs, edit, send

Pattern 3: Monthly close

Pattern 4: Ongoing monitoring

1st of month 8:00am:
  /monthly-close-reconcile (Finance)
  /variance-analysis
  /vendor-performance-review
  /monthly-metric-dashboard-update

2nd of month:
  You review + commentary

Pattern 4: Ongoing monitoring

Hourly:
  /inventory-check — flag low stock

Daily 9am:
  /competitor-monitor — check websites
  /ticket-scan — support trend

Weekly Monday 8am:
  /data-quality-check — ETL pipeline health

Skill templates — 10 starter skills

Dưới đây 10 skill starter cho mọi role. Copy, adapt, import.

1. /daily-brief

Brief 7am hàng ngày.

2. /weekly-review

Review thứ Sáu.

3. /monthly-close

Close cuối tháng.

4. /email-triage

Phân loại inbox ưu tiên.

5. /meeting-prep

Chuẩn bị cho cuộc họp cụ thể.

6. /post-meeting-summary

Action items + follow-up sau họp.

7. /research-deep

Research 1 topic deep.

8. /content-repurpose

Blog → multi-format.

9. /competitor-scan

Monitor competitor.

10. /proposal-draft

Draft proposal cho client.

Chi tiết mỗi skill — dùng Cowork tạo bằng prompt:

Create a skill called /[skill-name] that does [description].

Input parameters: [list]
Workflow steps: [rough outline]
Output format: [description]
Rules: [constraints]

Save as skill, test it, iterate based on results.

Anti-patterns — Lỗi với Skills & Scheduled

❌ Skill quá rigid, không params

Vấn đề: Skill hard-code values → chỉ dùng 1 trường hợp.

Fix: Design params từ đầu. Ví dụ: không phải miami-dubai-flight mà là flight-search [origin] [destination].

❌ Skill-ify task chỉ chạy 1-2 lần

Vấn đề: Overhead tạo skill > value tiết kiệm.

Fix: Skill-ify task chạy ≥ 3 lần/tháng hoặc hàng tuần.

❌ Không test skill sau khi tạo

Vấn đề: Skill có bug, chạy production fail.

Fix: Skill Creator tự test. Nhưng bạn review skill file, run 2-3 test manual trước khi publish.

❌ Scheduled task không monitor

Vấn đề: Task chạy 30 lần, bạn không check → 2 tuần output lệch brand.

Fix: Weekly review scheduled output. Sau 3-4 lần stable → có thể skip review.

❌ Quên máy tắt → scheduled task không chạy

Vấn đề: Morning brief chạy 7am nhưng máy ngủ → miss.

Fix: Prevent sleep hoặc schedule trong giờ máy bật sẵn (9am thay vì 7am).

❌ Quá nhiều scheduled task → usage bùng nổ

Vấn đề: 15 scheduled task hàng ngày với Opus = cạn Max plan trong 2 tuần.

Fix: Scheduled nên dùng Sonnet hoặc Haiku. Opus chỉ cho on-demand task khó. Monitor usage.

❌ Skill quá chung chung

Vấn đề: Skill /write-email quá broad — Cowork không biết email gì.

Fix: Skill cụ thể: /customer-followup-email, /internal-announcement, /vendor-inquiry.

❌ Sharing skill chứa secret

Vấn đề: Skill reference API key, client names — share team = leak.

Fix: Skill chỉ chứa logic. Secrets trong .env hoặc Vault. Anonymize trước khi share.

Mẹo nâng cao

Mẹo 1: Versioning skills

Khi update skill, giữ version cũ:

Rollback dễ nếu version mới tệ.

Mẹo 2: Skill chain

Skill A gọi skill B:

Nhiều skill nhỏ > 1 skill lớn — debug dễ hơn.

Mẹo 3: Conditional logic trong skill

~/.claude/skills/
├── weekly-review/
│   ├── SKILL.md (current)
│   └── archive/
│       ├── SKILL-v1.md
│       └── SKILL-v2.md
## Workflow
Step 1: Run /gather-data (skill A)
Step 2: Run /analyze-data với output từ step 1 (skill B)
Step 3: Run /generate-report (skill C)

Mẹo 3: Conditional logic trong skill

Skill đủ thông minh handle cases.

Mẹo 4: Log scheduled task output

## Workflow

### Step 1: Check condition
If folder has > 50 files → run batch processing
Else → run sequential

### Step 2: ...

Mẹo 4: Log scheduled task output

Bạn có audit trail — useful khi debug.

Mẹo 5: Team skill library

Nếu làm team, setup shared skill repo:

Mọi người pull về, sync regular. Anthropic plan support shared org library sớm — follow updates.

/team-skills/ (git repo)
├── sales/
├── marketing/
├── finance/
└── README.md
## Final step
- Save output to /scheduled-logs/[task-name]/YYYY-MM-DD.md
- Summary line to /scheduled-logs/master-log.md

Áp dụng ngay

Bài tập 1: Tạo skill đầu tiên (~30 phút)

Chọn task bạn làm ≥ 2 lần/tuần.

Ghi lại:

Bài tập 2: Scheduled task đầu tiên (~10 phút)

Pick skill từ bài tập 1.

Setup scheduled:

Chạy sau ___ giờ để kiểm tra:

Bài tập 3: Skill library kế hoạch (~15 phút)

Liệt kê 5 skill bạn sẽ build trong 2 tuần tới:

Mục tiêu: 5 skill built, 3 trong số đó scheduled.

  • Run task 1 lần thường (brief đầy đủ 5 thành phần)
  • Review output, adjust brief nếu cần
  • Run lần 2 với brief đã refine
  • Gõ: "Turn this into a skill called /[name]. Ask for these parameters next time: [list]."
  • Cowork tạo skill, test
  • Review skill file
  • Copy to my skills
  • Run /[name] để test
  • Skill tên: ___
  • Parameters: ___
  • Output quality lần đầu chạy /[name]: ___/10
  • So với run brief lần 2: ___/10 (kỳ vọng ≥ 8)
  • Frequency: ___
  • Time: ___
  • Model: ___ (recommend Sonnet cho đầu tiên)
  • Task có chạy đúng giờ? ___/Yes/No
  • Output có lưu đúng chỗ? ___/Yes/No
  • Quality stable so với manual run? ___/10
  • /___________ — [mục đích] — [frequency]
  • /___________ — [mục đích] — [frequency]
  • /___________ — [mục đích] — [frequency]
  • /___________ — [mục đích] — [frequency]
  • /___________ — [mục đích] — [frequency]

Tóm tắt bài học

🎯 Skill = markdown file + frontmatter + workflow description. Portable (works across Claude, OpenAI, Gemini), human-readable, version-control-friendly.

🎯 2 cách tạo: Skill Creator (Cowork tự viết) hoặc hand-write. Dùng Creator nếu phức tạp, hand-write nếu đơn giản.

🎯 Skill với parameters = reusable. Design parameters từ đầu. Không hard-code.

🎯 Scheduled task = cron-style automation. Requires máy bật + app mở. Setup qua UI hoặc natural language.

🎯 Combine Skill + Scheduled = "Cowork làm thay bạn từng buổi sáng". Morning brief, daily standup, weekly review — tất cả tự động.

🎯 Monitor usage — scheduled task dùng Sonnet/Haiku, không Opus. Check usage dashboard hàng tuần.

🎯 Plugin (coming soon) — bundle skills + connectors + commands thành 1 đơn vị phân phối cho team.

Tài liệu tham khảo
  • Tutorial Tech With Tim — Skills + Scheduled (16:30-22:30)
  • "Creating Custom Skills with Claude" — Anthropic, 16/10/2025
  • "Claude Agent Skills Explained" — Anthropic, 26/11/2025
  • "You're Using Claude Skills Wrong — Do This Instead" — 19/03/2026
Nội dung này có hữu ích không?