Shortcuts
Skill này làm gì
Xây các Shortcuts trên macOS cho những hành động không có đường tự động hóa nào khác, như thiết bị nhà thông minh, rồi chạy chúng từ dòng lệnh. Skill dành cho người dùng Mac muốn tự động hóa những việc chỉ các công cụ của Apple mới tới được.
Khi nào nên dùng
- ✓Khi bạn muốn điều khiển thiết bị HomeKit từ dòng lệnh.
- ✓Khi bạn cần tự động hóa một hành động gốc trên Mac không có API.
- ✓Khi bạn muốn kiểm tra những Shortcuts nào bạn đã thiết lập.
Liên kết skill
https://github.com/danielmiessler/LifeOS/blob/main/LifeOS/install/skills/Shortcuts/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Xây một shortcut trên Mac để đặt máy điều nhiệt phòng khách ở 70 độ, rồi để tôi chạy nó từ terminal.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill xây shortcut một lần qua giao diện máy tính, rồi kiểm tra bằng cách chạy và so sánh đầu ra. Các lần sau chỉ là lệnh dòng lệnh đơn giản, không cần điều khiển màn hình.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
Shortcuts
Turn GUI-only macOS Shortcuts into callable LifeOS automation. Shortcuts reaches Apple-only surfaces (HomeKit/Home, native system actions, app intents) that have no other automation path. Computer use is slow and pixel-fragile, while the shortcuts CLI is fast and deterministic but can only run shortcuts, never build them. So each capability is built once (BuildShortcut) and is plain CLI from then on (RunShortcut, through Tools/Shortcuts.ts). This is CLI-first doctrine applied to the no-API problem.
Ideal State
- Each Apple-only capability is built once as a Shortcut under the exact name its consumers call, and is proven by a
runwhose output matches the spec, never by how the editor looks. - Every later use is plain CLI through
Tools/Shortcuts.tsorshortcuts run, with no pixels and no computer use. - A failed run or missing shortcut is diagnosed against the exact registered names, so a case or whitespace mismatch is caught before anything is rebuilt.
Intent Routing
| Intent | Trigger | File |
|---|---|---|
| BuildShortcut | "build a shortcut", "create a shortcut", "set up the X shortcut" | Intents/BuildShortcut.md |
| RunShortcut | "run the X shortcut", "invoke X", any consumer calling a built shortcut | Intents/RunShortcut.md |
| ListShortcuts | "list shortcuts", "what shortcuts exist", "does X exist" | Intents/ListShortcuts.md |
| File | Read when |
|---|---|
Setup.md |
first-time setup, a worked example of adding your own shortcut, and the read-only proof commands |
Gotchas
- Creation is GUI-only: there is no
shortcuts create. TheshortcutsCLI runs, lists, and views, but cannot author. Never claim a shortcut was "built" via CLI. - Name matching is exact, case and spaces included.
shortcuts run "Casa Set Zone 1 Temp"fails silently-ish (nonzero exit) if the registered name iscasa set zone 1 tempor has a trailing space. Confirm withexistsafter building, register the exact string a consumer expects, and on a nonzerorunwith no clear error, diff the target string againstlistbefore rebuilding anything. - Input arrives on stdin; output is whatever the last action returns. The CLI pipes
--inputto the shortcut's stdin and captures the final action's output on stdout; without a final output action, stdout comes back empty.
Data & Config
The skill keeps no per-user data. Shortcut names belong to the consumer that calls them: a home-control skill, for example, builds its thermostat names from thermostat_shortcut_prefix and thermostat_room lines in its own Config.md. There is no config file for this skill. First-time setup, a worked example and a read-only proof: Setup.md.
The frontmatter evals check (list) proves this skill on its own. A consumer that depends on a particular shortcut name can check it with Tools/Shortcuts.ts exists "<name>", which exits 1 when that name is not registered.
Examples
Example 1: Build the thermostat status shortcut
User: "build the thermostat status shortcut"
→ BuildShortcut, authored through Skill("ComputerUse", "Drive") --app Shortcuts
→ "<prefix> Thermostat Status" exists, reads every thermostat through Home actions,
and `bun Tools/Shortcuts.ts run "<prefix> Thermostat Status"` returns
"Zone 1 21 heating, Zone 2 20 idle"
Example 2: A consumer runs a built shortcut
A home-control skill's thermostat script calls `shortcuts run "<prefix> Set Zone 1 Temp"`
with "21" on stdin → RunShortcut path → deterministic, no computer use
Example 3: Check what's there
User: "do my <prefix> shortcuts exist yet?"
→ ListShortcuts: bun Tools/Shortcuts.ts list | rg "<prefix>"
→ the matching names, or a plain "not built yet"
Câu hỏi thường gặp
Mỗi lần có phải bấm qua màn hình không?
Không. Khi đã xây xong, shortcut chạy từ dòng lệnh mà không cần điều khiển màn hình.
Vì sao shortcut của tôi không chạy?
Thường là vì tên không khớp chính xác, vì tên phân biệt chữ hoa, chữ thường và khoảng trắng.
Nó có thể tiếp cận những gì?
Các khả năng chỉ có trên Apple như thiết bị nhà thông minh và hành động hệ thống gốc.
Chi tiết
Mô tả gốc của tác giả
Bridges macOS Shortcuts.app into LifeOS: build a Shortcut once via computer use, then call it as a CLI to reach Apple-only capabilities like HomeKit. USE WHEN build a shortcut, create a shortcut, macOS shortcut, shortcuts app, run a shortcut, automate a native mac task, HomeKit automation that needs a shortcut, thermostat shortcuts, control home from CLI, wrap an Apple-only action, no API for this app. NOT FOR web automation (Interceptor), shell-scriptable tasks (Bash), devices reachable by API (Home / Network).
repo: danielmiessler/LifeOS
Độ phổ biến
- Sao GitHub
- 20k
- Vị trí xếp hạng
- #10456
- Giấy phép
- MIT
- Cập nhật
- 28/10/2026
Bình luận
- …
Thêm skill từ kho mã này
LifeOS
20kGiúp agent của bạn thiết lập LifeOS, một hệ thống cá nhân ánh xạ trạng thái hiện tại tới trạng thái lý tưởng qua một cuộc phỏng vấn và một bảng điều khiển.
AnnualReports
20kGiúp agent của bạn tìm và so sánh báo cáo an ninh mạng thường niên từ các nhà cung cấp lớn, như xu hướng vi phạm và ransomware, có nguồn cho mọi số liệu.
ApertureOscillation
20kDạy agent của bạn kiểm tra một câu hỏi thiết kế ở phạm vi hẹp và phạm vi rộng, rồi chỉ ra chỗ hai câu trả lời mâu thuẫn trước khi bạn xây dựng.
Aphorisms
20kCho phép agent của bạn tìm, ghép và theo dõi các câu trích dẫn có ghi tác giả từ một bộ sưu tập được chọn lọc, tránh những câu vừa được dùng trong bản tin.
Skill tương tự
knowledge-automation
394kGiúp agent của bạn thiết lập tác vụ định kỳ đưa nội dung mới vào kho Knowledge theo lịch, rồi kiểm tra tác vụ có chạy không.
knowledge-source-ingest
394kGiúp agent của bạn cập nhật Knowledge vault với các mục mới từ kênh chat, nguồn tin hoặc hộp thư, mà không thêm lại những gì đã có.
benchmark
280kGiúp agent của bạn đo tốc độ và hiệu suất của code, hữu ích để đảm bảo mọi thứ nhanh và tìm ra những chỗ chậm.