signals
它能做什么
本技能说明如何使用 HogQL 查询,读取 PostHog 从你的产品数据中生成的原始信号。适合希望在精选收件箱之外,直接搜索或统计信号的分析师。
适用场景
- ✓当你想按含义而非精确文字搜索 PostHog 信号时。
- ✓当你想找出促成某份特定报告的所有信号时。
- ✓当你想列出或统计项目中各类信号的时候。
技能链接
https://github.com/PostHog/posthog/blob/master/products/signals/skills/signals/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请找出促成这份报告的所有原始信号,并列出它们的类型。”
每周 5 个新技能,1 分钟读完。
工作原理
它会说明,信号存储在一个嵌入表中,可以使用 HogQL 进行语义搜索、分组和列表查询。若要浏览报告,应先使用收件箱技能。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Querying Signals
What Are Signals?
Signals are automated observations that PostHog generates by monitoring a customer's product data across multiple sources — error tracking, web analytics, experiments, session replay, and more. Each signal is a short natural-language description of something noteworthy (e.g. "Error rate spiked 3× on /checkout").
Signals are grouped into Signal Reports. When a report accumulates enough weight it gets summarized and assessed for actionability. A signal report represents a cluster of related observations that together describe a meaningful issue or trend.
Signals and their embeddings are stored in the document_embeddings ClickHouse table, queryable via HogQL through the posthog:execute-sql MCP tool. They may provide a useful way to semantically query for recent things that happened in the user's product.
When to use this skill vs. inbox-exploration
The two skills cover different layers of the same product:
inbox-exploration— curated report layer via dedicated MCP tools (inbox-reports-list,inbox-reports-retrieve,inbox-source-configs-list,inbox-source-configs-retrieve). Use for "what's in my inbox?", "what's actionable?", filtering reports by status / source / suggested reviewer, looking up a specific report by ID or URL.- This skill (
signals) — raw signal layer via HogQL ondocument_embeddings. Use when the curated report layer is not enough: semantic search over signal text, fetching every signal that contributed to a specific report, listing what kinds of signals exist, or any ad-hoc analytics that the report tools don't expose.
The typical pattern is to start with inbox-exploration, get a report_id or a sense of the area the user cares about, then drop into this skill when the user wants to see the raw observations.
Table and Column Reference
The HogQL table alias is document_embeddings. HogQL automatically constrains queries to the current team — you never need to filter on team_id. Key columns for signals:
| Column | Type | Description |
|---|---|---|
product |
String | Product bucket — always 'signals' for signals |
document_type |
String | Document type — always 'signal' for signals |
model_name |
String | Embedding model — always 'text-embedding-3-small-1536' |
document_id |
String | Unique signal ID (UUID) |
timestamp |
DateTime64(3) | When the signal was created |
inserted_at |
DateTime64(3) | When this row version was inserted (used for deduplication and soft deletes) |
content |
String | The signal description text |
metadata |
String | JSON string with report_id, source info, weight, deleted flag, etc |
embedding |
Array(Float64) | 1536-dimensional embedding vector |
Mandatory Filters
Every signals query MUST include all four of these filters. Missing any of them can cause the query to fail with an invalid model error, return wrong data, or trigger unnecessarily expensive scans:
WHERE model_name = 'text-embedding-3-small-1536'
AND product = 'signals'
AND document_type = 'signal'
AND timestamp >= now() - INTERVAL 30 DAY
The model_name filter is especially critical — the HogQL engine uses it to route to the correct underlying ClickHouse table. If the WHERE model_name = ... equality filter is missing or uses an unknown model, the query will fail with an "Invalid model name" error (you cannot use IN or other expressions here).
The product and document_type filters are equally important — the same model contains data from multiple products (e.g. error tracking, AI memory). Without these filters you will get unrelated data mixed in.
The timestamp filter is required for performance — the table is partitioned by week and has a 3-month TTL. Always include a time bound using now() - INTERVAL N DAY (or WEEK, MONTH, etc.). Default to 30 days unless you have a reason to look further back. Gene
常见问题
什么是信号?
信号是关于你产品的一条简短的自动观察,例如错误率的激增,多个信号合在一起构成一份报告。
什么时候应改用收件箱技能?
如果要列出报告、筛选报告或查找某一份报告,请使用收件箱技能。本技能用于获取原始信号数据。
我需要了解 SQL 吗?
需要。查询使用 HogQL 编写,它是一种类 SQL 语言。
详情
作者的原始描述
How to query the document_embeddings table for raw signal data using HogQL. Use when you need to perform semantic search over signals, fetch every signal that contributed to a specific report, or list signal types. For browsing the curated report layer (the Inbox) — listing reports, filtering by status/source, drilling into a single report by ID — use the `inbox-exploration` skill first; drop into this skill afterwards if the user wants the underlying observations.
repo: PostHog/posthog
热度
- GitHub 星标
- 41k
- 排名
- #6950
- 许可证
- —
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
depot-ci
41k帮你的智能体设置并运行 Depot CI 工作流(GitHub Actions 的替代方案),包括迁移现有工作流和读取运行日志。
depot-container-builds
41k帮你的智能体在 Depot 的远程构建器上构建 Docker 镜像,包括多平台镜像、推送到镜像仓库,以及修复构建失败。
depot-github-runners
41k帮你的智能体把 GitHub Actions 任务迁移到 Depot 托管的运行器上,选择运行器规格和标签,并排查运行器设置问题。
editing-agents-md
41k帮你的智能体判断某条规则应写入 AGENTS.md 还是 CLAUDE.md,并以不会让文件臃肿的方式写下,确保规则真正生效。