managing-experiment-lifecycle
Skill này làm gì
Skill này giải thích từng thay đổi trạng thái của một thí nghiệm, chẳng hạn khởi chạy, tạm dừng, đóng băng hoặc kết thúc. Nó dành cho người chạy A/B test cần biết một thay đổi sẽ làm gì trước khi thực hiện.
Khi nào nên dùng
- ✓Khi bạn sẵn sàng khởi chạy một thí nghiệm nháp và muốn biết điều gì xảy ra tiếp theo.
- ✓Khi bạn muốn tạm dừng, tiếp tục hoặc kết thúc một thí nghiệm đang chạy.
- ✓Khi bạn cần ngăn người dùng mới tham gia một bài kiểm thử trong khi các chỉ số của nó vẫn tiếp tục được thu thập.
Liên kết skill
https://github.com/PostHog/posthog/blob/master/products/experiments/skills/managing-experiment-lifecycle/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
“Tạm dừng thí nghiệm đang chạy của tôi lúc này, và cho tôi biết điều gì xảy ra với những người dùng đã tham gia.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill giải thích các điều kiện và tác động của từng hành động, chẳng hạn ai thấy biến thể nào và phân tích bị ảnh hưởng ra sao.
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.
Managing experiment lifecycle
This skill covers experiment state transitions — what each action does, when to use it, and how it affects variant assignment and analysis.
State diagram
draft ──launch──▶ running ──end──▶ stopped ──archive──▶ archived
│ │ ▲ │
│ pause resume ship_variant
│ │ │ (also ends if running)
│ ▼ │
│ paused (flag inactive, still "running" status)
│
├─freeze_exposure──▶ exposure_frozen ──unfreeze_exposure──▶ running
│ (enrollment closed, metrics keep flowing)
Any non-draft state ──reset──▶ draft
Actions and their implications
For each action, the two key questions:
- Who sees what variant? (user perspective)
- Who is in my analysis? (statistical perspective)
Launch (experiment-launch)
Transitions draft → running. Activates the feature flag and sets start_date.
- Preconditions: must be in draft, flag needs 2-20 multivariate variants (no specific key required; the baseline defaults to "control" when present, else the first variant)
- Pre-launch checklist: has at least one metric? Variants correct? Flag implemented in code?
- Variants: users start being bucketed into variants based on the configured split
- Analysis: data collection begins from
start_date
No request body needed.
One optional item worth a single mention at launch, when the change is user-facing and substantial: a
short survey, shown when users finish the experimented flow (e.g. triggered by the form's submit event),
collects qualitative feedback (a rating, an optional comment) alongside the metrics, from day one. Offer it once as setup advice, drop it if declined, and
never let it delay the launch. Do not raise it at end or ship-variant time — there it reads as a gate
on rolling out. → See references/qualitative-feedback.md in [[diagnosing-experiment-health]]
Pause (experiment-pause)
Deactivates the feature flag. Users fall back to the default experience (typically control).
- Preconditions: must be running and not already paused
- Variants: flag is not returned by
/decide— no new exposure events recorded - Analysis: no new data while paused, but existing data is preserved. Experiment stays "running".
No request body. Use experiment-resume to reactivate.
Resume (experiment-resume)
Reactivates the feature flag after a pause. Users are re-bucketed deterministically into the same variants.
- Preconditions: must be paused
- Variants: same assignment as before pause — deterministic bucketing
- Analysis: exposure tracking resumes
No request body.
Freeze exposure (experiment-freeze-exposure)
Stops enrolling new users while everything else keeps going: already-enrolled users keep their variant, metrics keep flowing, and end_date stays null.
Snapshots the already-exposed users into a static cohort and narrows every release condition on the feature flag to that cohort.
Status becomes exposure_frozen.
Use for long-horizon metrics (revenue, LTV, retention, renewals) when the sample is big enough and you want to stop adding users without stopping measurement.
Neither end nor pause fits that job: end stops measurement at end_date, and pause deactivates the flag for everyone.
- Preconditions: must be running (not draft, stopped, paused, or already frozen), flag linked and not deleted, at least one release condition
- Variants: enrolled users keep their variant (deterministic bucketing); new users no longer match the flag
- Analysis: exposures stop growing (a flat exposure curve is expected), but metric data keeps accumulating for enrolled users
Timing: the exposure scan and cohort snapshot run synchronously inside the API call, and duration scales with the number of exposed persons — an experiment with tens of thousands of exposed users can take on the order of tens of seconds. Set expectations with the user, wait for the response, and don't treat a slow call as a failure or retry it.
Not applicable (400) for:
- Group-aggregated experiments — the flag targets groups, not persons, and a person cohort can't freeze group-based matching
- Experiments in a holdout — holdout assignment is evaluated before release conditions, so n
Câu hỏi thường gặp
Đóng băng một thí nghiệm làm gì?
Nó đóng việc ghi danh, nên không có người dùng mới nào tham gia, trong khi các chỉ số từ những người dùng đã có trong bài kiểm thử vẫn tiếp tục chảy về.
Tôi có thể quay lại trạng thái nháp sau khi đã khởi chạy không?
Có. Đặt lại một thí nghiệm không ở trạng thái nháp sẽ đưa nó về nháp, và skill giải thích tác động trước.
Triển khai một biến thể làm gì?
Skill giải thích rằng việc triển khai một biến thể cũng có thể kết thúc một thí nghiệm đang chạy, và điều đó có nghĩa gì với flag.
Chi tiết
Mô tả gốc của tác giả
Guides experiment state transitions: launching, pausing, resuming, freezing/unfreezing exposure, ending, shipping variants, archiving, resetting, duplicating, copying to another project, and migrating a legacy experiment to the new experiments engine. Covers preconditions, implications for variant assignment and analysis, and the decision framework for when to use each action. TRIGGER when: user asks to launch, pause, resume, end, ship, archive, reset, duplicate, or copy an experiment to another project, to freeze/unfreeze exposure (stop enrolling new users while metrics keep flowing, or reope
repo: PostHog/posthog
Độ phổ biến
- Sao GitHub
- 41k
- Vị trí xếp hạng
- #6881
- 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ự
gitcrawl
394kCho phép agent của bạn tìm trong kho lưu trữ issue và pull request GitHub, gom các mục trùng lặp và kiểm tra trạng thái hiện tại trên GitHub.
slacrawl
394kCho phép agent của bạn tìm và đếm tin nhắn trong kho lưu trữ Slack cục bộ, kiểm tra kho đó mới đến mức nào và làm mới khi cần.
goplaces
394kGiúp agent của bạn tìm địa điểm, lấy chi tiết và đánh giá, và xác định tên địa điểm bằng Google Places, với đầu ra JSON cho script.