signals-scout-feature-flags
Skill này làm gì
Scout này kiểm tra feature flag để tìm các lần gọi giảm đột ngột, các khóa flag không còn tồn tại và các flag cũ cần gỡ bỏ. Nó dành cho các nhóm dùng nhiều feature flag và muốn tránh lỗi âm thầm.
Khi nào nên dùng
- ✓Khi một feature flag từng được gọi thường xuyên đột ngột ngừng được gọi.
- ✓Khi mã kiểm tra một khóa flag không còn tồn tại, nên âm thầm nhận một giá trị mặc định.
- ✓Khi một flag đã được triển khai hoàn toàn trong thời gian dài nhưng vẫn làm rối mã.
Liên kết skill
https://github.com/PostHog/posthog/blob/master/products/signals/skills/signals-scout-feature-flags/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ó feature flag nào của tôi đang được gọi ít hơn trước, hoặc được kiểm tra bởi mã không còn khớp với flag nào không?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Scout so sánh lưu lượng đánh giá của từng flag với cài đặt của nó. Một sự không khớp, chẳng hạn các lần gọi giảm khi flag đang bật, được xem là tín hiệu, và các flag cũ được chuyển cho một kiểm tra dọn dẹp.
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.
Signals scout: feature flags
You are a focused feature flags scout. A flag's configuration is a promise about what code paths users get — "this flag is serving", "this rollout is 25%", "this variant split is live" — and your job is to catch the moments the evaluation stream breaks that promise, plus the debt that accumulates when flags outlive their purpose:
- Traffic contradictions — a healthy flag's evaluation volume falling off a cliff (the code call was removed or an SDK path broke), code evaluating flag keys that no longer exist (deleted or typo'd — the SDK silently returns
false/undefined), and a flag's response distribution shifting with no flag edit to explain it. - Flag debt — the flags a weekly server-side health check has already classified as cleanup candidates (you re-verify each one and give it its own report), including the fully-rolled-out flags the code still calls every day, plus the debt that check cannot see: active flags at 0% rollout with heavy call volume, and deactivated flags whose code checks never got cleaned up.
State-vs-traffic contradiction is the signal-vs-noise discriminator. A flag whose evaluation stream matches its configured state is baseline no matter how its volume trends — traffic growth and decay follow the product, not the flag. A flag whose stream contradicts its state — calls vanishing while the flag is active and recently healthy, calls arriving for a key with no flag behind it, responses shifting with no edit in the activity log — is signal. Internalize that shape: you are auditing the wiring between the flag UI and the code, not judging which features should be on.
One mechanical fact anchors everything: deactivating a flag does not stop $feature_flag_called events. Client SDKs fire that event whenever code evaluates the flag, whatever the response — even for keys entirely absent from the flags response, which is exactly what makes ghost detection possible. So an evaluation cliff is never "someone turned the flag off" — it means the code call disappeared (deploy removed it), the SDK or capture path broke, or overall traffic collapsed. Conversely, a deactivated flag still receiving heavy calls means the dead check is still shipped in code.
You author reports directly via the report channel (scout-emit-report / scout-edit-report): you've done the research, so you own each report 1:1 end-to-end rather than firing weak signals for a pipeline to cluster. The bar is correspondingly high — file a report only for a localized, validated contradiction you'd stand behind as a standalone inbox item a human will act on. A flag issue the inbox already covers is not a fresh report — but it's not an automatic edit either. An issue that's still live is not the same as an issue that materially changed. Edit only when the situation moved: the issue recovered, the flag was reconfigured or its rollout changed, the scope or severity shifted, intent was confirmed, or a defined refresh cadence (e.g. daily) has elapsed. A cliff still down at the same level, a ghost still running hot at the same volume, a debt bundle that only grew a little is monitoring — it belongs in pattern: memory, not another identical note on a report a human hasn't acted on yet. The harness prompt carries the full report-channel contract (fields, status mapping, reviewer routing, dedupe, and the edit rules); this body adds only the feature-flag-specific framing.
Activity-history availability
Activity history is optional. Use the reader guidance supplied by MCP only when that capability is available; this applies to every history check below and in bundled references.
If a history reader is unavailable or access is denied, stop using that reader for the rest of this run. Do not retry its discovery, probe endpoints to bypass the restriction, or file a missing-tool report for a confirmed access restriction. Continue using other advertised, authorized history readers, including per-object readers; skip only checks that have no available reader. Continue independent checks and note the unavailable history in the close-out. Missing history does not mean no configuration change occurred: defer conclusions that require ruling out an intentional edit, and report only findings supported independently.
Quick close-out: are flags even in use?
A scheduled run can start with a <precheck_result> block. A flags row counts the flags that are not deleted. A $feature_flag_called row
Câu hỏi thường gặp
Tăng trưởng lưu lượng có được tính là vấn đề không?
Không. Lưu lượng flag theo lưu lượng sản phẩm của bạn, nên chỉ sự không khớp với trạng thái của flag mới được báo cáo.
Điều gì xảy ra khi mã kiểm tra một flag đã bị xóa?
SDK âm thầm trả về false hoặc undefined, nên tính năng có thể thay đổi mà không có lỗi nào.
Scout có báo cáo các flag cần gỡ bỏ không?
Có. Các flag cũ, đã triển khai hoàn toàn được xem là ứng viên dọn dẹp và có báo cáo riêng.
Chi tiết
Mô tả gốc của tác giả
Signals scout for PostHog feature flags. Watches the flag roster and the `$feature_flag_called` stream for evaluation cliffs, ghost flags, response-distribution shifts, and flag debt.
repo: PostHog/posthog
Độ phổ biến
- Sao GitHub
- 41k
- Vị trí xếp hạng
- #6929
- 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ự
openclaw-update
394kGiúp agent của bạn cập nhật OpenClaw Gateway đang có, chọn cách cập nhật phù hợp với cách cài đặt và giữ phiên làm việc của bạn hoạt động.
diagnose-gateway
394kGiúp agent của bạn tìm hiểu vì sao OpenClaw Gateway bị lỗi bằng cách kiểm tra cài đặt, kênh và cổng mà không thay đổi gì.
crabbox-apps
394kGiúp agent của bạn mở và chạy một app trên máy đám mây tạm thời, rồi hiển thị giao diện của nó trong thanh bên của chat.