working-with-skills
Skill này làm gì
Skill này đưa ra các quy tắc thực tế để tạo, đọc và chỉnh sửa skill PostHog dùng chung mà không lãng phí công sức. Skill dành cho người và agent duy trì các skill lớn có nhiều tệp.
Khi nào nên dùng
- ✓Khi bạn chuẩn bị tạo, chỉnh sửa hoặc cập nhật một skill PostHog dùng chung.
- ✓Khi một thay đổi skill bị từ chối và bạn cần hiểu lý do.
- ✓Khi một skill lớn có nhiều tệp đi kèm và bạn chỉ cần thay đổi một phần của nó.
Liên kết skill
https://github.com/PostHog/posthog/blob/master/products/skills/skills/working-with-skills/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
“Cập nhật riêng một phần trong skill báo cáo lớn của chúng tôi mà không viết lại toàn bộ.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill cho biết nên chọn công cụ nào cho từng loại thay đổi, chẳng hạn một chỉnh sửa nhỏ có mục tiêu thay vì viết lại toàn bộ, và cách tránh ghi đè lên thay đổi gần đây của người khác. Skill khuyên đọc skill trước để lấy phiên bản hiện tại.
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.
Working with PostHog skills
This skill teaches agents how to use the skill-* MCP tools well — minimum
context, minimum round-trips, minimum mistakes. If you are not yet familiar with
the tool surface itself, read the skills-store skill first for the catalog.
This document is about how to choose between the tools and how to scale the
workflow when skills get big.
Operating principles
- Progressive disclosure is non-negotiable. Lists return descriptions, get returns body + manifest, file-get returns one file. Never preload bundled files "just in case" — every preloaded script is wasted context for the actual task.
- Pick the smallest write primitive that does the job. A targeted
editsorfile_editsis cheaper, safer, and clearer in version history than a full body or full bundle replacement. - Reads are cheap; concurrent overwrites are not. Always have a recent
versionfromskill-get(or from the response of the previous write) before calling any write tool, and pass it asbase_version. - Authoring follows the Agent Skills spec.
Keep
namekebab-case, descriptions trigger-rich, body short, bulky material in bundled files.
Decision tree: which tool do I call?
Need to know what's available?
└─► skill-list (names + descriptions only)
Need to use / inspect a specific skill?
└─► skill-get (body + file manifest, NO file contents)
└─► skill-file-get (one file, on demand, only as referenced)
Authoring a brand new skill?
└─► skill-create (body + all initial files in one call)
Editing an existing skill?
├─ Body change?
│ ├─ Substantial rewrite ............. update(body=...)
│ └─ Surgical tweak .................. update(edits=[{old, new}, ...])
├─ Bundled file content change?
│ └─ update(file_edits=[{path, edits:[...]}, ...])
├─ Add / remove / rename a file?
│ ├─ Add ............................. skill-file-create
│ ├─ Delete .......................... skill-file-delete
│ └─ Rename .......................... skill-file-rename
└─ Wholesale bundle reset (rare!) ....... update(files=[...]) # replaces ALL files
Renaming the skill itself?
└─► skill-rename (keeps versions, files, and owners)
Want a fork as the starting point?
└─► skill-duplicate (then update the copy)
Done with a skill entirely?
└─► skill-archive (hides ALL versions; cannot be undone)
If you find yourself reaching for update(body=...) plus a sprawling files=[...]
to change one paragraph and one script, stop — that's two narrower calls
(update(edits=[...]) plus update(file_edits=[...])) or even a single
update carrying both edits and file_edits.
Discover before you fetch
posthog:skill-list
{ "search": "fractal" }
skill-list is the right tool to "find a skill" — it returns names and
descriptions only. Reading the descriptions is the entire point: pick the right
skill before pulling any body. If search doesn't narrow it enough, list
without it and scan, but do not start fetching candidate bodies blindly.
skill-get should be called once per skill per task, not per question.
Cache the body in your working memory; fetch again only if you suspect the
skill changed under you (e.g. a 409 on write — see "Concurrency" below).
Reading a large skill efficiently
Big skills (long body, many bundled files) are the case where lazy loading matters most.
skill-get(skill_name=...)— readbody+files[]manifest.- Scan the body's table of contents / headings. The body should already tell you which file goes with which task — that's why bodies stay short and reference files by path.
- For each file the body explicitly points at for the current task, call
skill-file-get(file_path=...). Skip everything else. - If the body references "see scripts/X for the rare case Y" and you are not
in case Y, do not fetch
scripts/X.
When in doubt, fewer files. You can always fetch one more on the next turn.
Authoring a new skill
Use a single skill-create call with body and initial files — the
skill lands at version: 1 complete. Do not create the skill empty and then
make N follow-up skill-file-create calls; that's N extra versions and N
extra round-trips for no benefit.
posthog:skill-create
{
"nam
Câu hỏi thường gặp
Vì sao tránh viết lại toàn bộ skill?
Chỉnh sửa nhỏ, có mục tiêu an toàn hơn và dễ xem xét hơn trong lịch sử phiên bản.
Nếu hai người cùng chỉnh sửa một skill thì sao?
Skill có kiểm tra phiên bản, nên một thay đổi gần đây sẽ không bị ghi đè một cách âm thầm.
Skill có giải thích định dạng skill không?
Có. Nó tuân theo đặc tả Agent Skills, giúp tên gọi đơn giản và mô tả rõ ràng.
Chi tiết
Mô tả gốc của tác giả
Best practices for agents managing PostHog skills via the MCP `skill-*` tools — how to discover, read, create, update, and refactor skills efficiently, especially large skills with many bundled files. Use whenever you are about to call any `skill-*` tool, asked to author or edit a shared skill, or troubleshoot why a skill write was rejected. Also use when asked what skills are good for or how to shape one (project hub, runbook, catalog, handover, daily driver). Pairs with `skills-store` (which covers the raw tool surface) by adding the decision-tree, efficiency, pattern, and pitfall guidance.
repo: PostHog/posthog
Độ phổ biến
- Sao GitHub
- 41k
- Vị trí xếp hạng
- #6953
- Giấy phép
- —
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
depot-ci
41kGiúp agent của bạn thiết lập và chạy quy trình Depot CI, một lựa chọn thay thế GitHub Actions, gồm chuyển các quy trình hiện có và đọc nhật ký chạy.
depot-container-builds
41kGiúp agent của bạn build image Docker trên các builder từ xa của Depot, gồm image đa nền tảng, đẩy lên registry và sửa lỗi build.
depot-github-runners
41kGiúp agent của bạn chuyển các job GitHub Actions sang runner do Depot quản lý, chọn kích thước và nhãn runner, và xử lý lỗi thiết lập runner.
editing-agents-md
41kGiúp agent của bạn quyết định một quy tắc nên nằm trong file AGENTS.md hay CLAUDE.md, và viết sao cho quy tắc được tuân thủ mà file không bị phình to.
Skill tương tự
add-model-provider
394kGiúp agent của bạn kết nối nhà cung cấp mô hình AI mới với OpenClaw bằng lệnh an toàn, giữ API key khỏi văn bản thuần và chạy thử.
acp-router
394kGiúp agent của bạn gửi một tác vụ đến trợ lý lập trình như Claude Code hoặc Cursor qua OpenClaw, để công việc chạy ngay trong công cụ đó.
browser-automation
394kHướng dẫn agent của bạn điều khiển trang web từng bước, gồm đăng nhập, tab và cách khôi phục khi trang ngừng phản hồi.