Setup
On first use, read setup.md for integration guidelines.
When to Use
User needs website traffic data from Plausible. Agent queries visitors, pageviews, referrers, goals, and custom events through the Plausible API.
Architecture
Memory lives in ~/plausible/. See memory-template.md for structure.
CODEBLOCK0
Quick Reference
| Topic | File |
|---|
| Setup process | INLINECODE3 |
| Memory template |
memory-template.md |
Core Rules
1. API Key from Environment
API key comes from
PLAUSIBLE_API_KEY environment variable. Never hardcode or ask user to paste keys in chat.
2. Site ID Required
Every query needs a site_id (domain). Check memory.md for configured sites before asking.
3. Time Periods
Default to
30d unless user specifies. Valid periods:
day,
7d,
30d,
month,
6mo,
12mo,
custom (requires date/date_range).
4. Metrics Available
| Metric | Description |
|---|
| INLINECODE14 | Unique visitors |
| INLINECODE15 |
Total sessions |
|
pageviews | Total page views |
|
views_per_visit | Pages per session |
|
bounce_rate | Single-page visits % |
|
visit_duration | Avg session length (seconds) |
|
events | Custom event count |
|
conversion_rate | Goal conversion % (requires goal filter) |
5. Breakdown Dimensions
| Dimension | Description |
|---|
| INLINECODE22 | Pages |
| INLINECODE23 |
Custom events |
|
visit:source | Traffic sources |
|
visit:referrer | Full referrer URLs |
|
visit:utm_source | UTM source |
|
visit:utm_medium | UTM medium |
|
visit:utm_campaign | UTM campaign |
|
visit:device | Desktop/Mobile/Tablet |
|
visit:browser | Browser name |
|
visit:os | Operating system |
|
visit:country | Country code |
|
visit:city | City name |
6. Filters Syntax
Filters use format:
dimension==value or
dimension!=value. Multiple filters with
; (AND).
CODEBLOCK1
7. Rate Limits
600 requests/hour per API key. Cache results in memory when doing multiple queries.
Common Traps
- - Forgetting site_id → API returns 400
- Using wrong date format for custom range → use INLINECODE37
- Requesting
conversion_rate without goal filter → returns null - Querying breakdown without metrics → defaults to visitors only
External Endpoints
| Endpoint | Data Sent | Purpose |
|---|
| https://plausible.io/api/v1/stats/realtime/visitors | siteid | Realtime count |
| https://plausible.io/api/v1/stats/aggregate |
siteid, metrics, period, filters | Aggregate stats |
| https://plausible.io/api/v1/stats/timeseries | site_id, metrics, period, interval | Time series |
| https://plausible.io/api/v1/stats/breakdown | site_id, property, metrics, filters | Breakdown by dimension |
Self-hosted instances use custom base URL from memory.md.
No other data is sent externally.
Security & Privacy
Data that leaves your machine:
- - Site ID (domain) and query parameters sent to Plausible API
- API key sent as Bearer token
Data that stays local:
- - Query results cached in memory
- Site configurations in ~/plausible/
This skill does NOT:
- - Store API keys in plain text (uses environment variable)
- Send user data beyond what's needed for queries
- Access files outside ~/plausible/
Trust
By using this skill, your site analytics queries are sent to Plausible (plausible.io or your self-hosted instance).
Only install if you trust Plausible with your domain data.
Related Skills
Install with
clawhub install <slug> if user confirms:
- -
analytics — general analytics guidance - INLINECODE41 — alternative privacy analytics
- INLINECODE42 — product analytics
Feedback
- - If useful: INLINECODE43
- Stay updated: INLINECODE44
技能名称:Plausible
设置
首次使用时,请阅读 setup.md 了解集成指南。
使用时机
当用户需要来自 Plausible 的网站流量数据时使用。助手通过 Plausible API 查询访客、页面浏览量、引荐来源、目标和自定义事件。
架构
数据存储在 ~/plausible/ 目录下。结构请参考 memory-template.md。
~/plausible/
├── memory.md # 站点 + 偏好设置(不存储密钥)
└── queries/ # 已保存的查询模板(可选)
快速参考
memory-template.md |
核心规则
1. 从环境变量获取 API 密钥
API 密钥来自 PLAUSIBLE
APIKEY 环境变量。切勿硬编码或要求用户在聊天中粘贴密钥。
2. 需要站点 ID
每次查询都需要 site_id(域名)。在询问前先检查 memory.md 中已配置的站点。
3. 时间段
除非用户指定,默认使用 30d。有效时间段:day、7d、30d、month、6mo、12mo、custom(需要 date/date_range)。
4. 可用指标
总会话数 |
| pageviews | 总页面浏览量 |
| views
pervisit | 每次会话浏览页数 |
| bounce_rate | 单页访问占比 |
| visit_duration | 平均会话时长(秒) |
| events | 自定义事件计数 |
| conversion_rate | 目标转化率(需要目标过滤器) |
5. 细分维度
| 维度 | 描述 |
|---|
| event:page | 页面 |
| event:name |
自定义事件 |
| visit:source | 流量来源 |
| visit:referrer | 完整引荐来源 URL |
| visit:utm_source | UTM 来源 |
| visit:utm_medium | UTM 媒介 |
| visit:utm_campaign | UTM 活动 |
| visit:device | 桌面端/移动端/平板端 |
| visit:browser | 浏览器名称 |
| visit:os | 操作系统 |
| visit:country | 国家代码 |
| visit:city | 城市名称 |
6. 过滤器语法
过滤器格式:dimension==value 或 dimension!=value。多个过滤器用 ; 连接(AND 逻辑)。
visit:source==Google
event:page==/pricing;visit:country==US
7. 速率限制
每个 API 密钥每小时 600 次请求。执行多个查询时,将结果缓存在内存中。
常见陷阱
- - 忘记 siteid → API 返回 400 错误
- 自定义范围使用错误日期格式 → 应使用 YYYY-MM-DD
- 查询 conversionrate 但未设置目标过滤器 → 返回 null
- 查询细分数据时未指定指标 → 默认仅返回访客数
外部端点
| 端点 | 发送数据 | 用途 |
|---|
| https://plausible.io/api/v1/stats/realtime/visitors | siteid | 实时访客数 |
| https://plausible.io/api/v1/stats/aggregate |
siteid, metrics, period, filters | 聚合统计 |
| https://plausible.io/api/v1/stats/timeseries | site_id, metrics, period, interval | 时间序列 |
| https://plausible.io/api/v1/stats/breakdown | site_id, property, metrics, filters | 按维度细分 |
自托管实例使用 memory.md 中的自定义基础 URL。
不会向外部发送其他数据。
安全与隐私
离开您机器的数据:
- - 站点 ID(域名)和查询参数发送至 Plausible API
- API 密钥作为 Bearer 令牌发送
保留在本地数据:
- - 查询结果缓存在内存中
- 站点配置存储在 ~/plausible/
此技能不会:
- - 以明文存储 API 密钥(使用环境变量)
- 发送超出查询所需的用户数据
- 访问 ~/plausible/ 以外的文件
信任
使用此技能,您的站点分析查询将发送至 Plausible(plausible.io 或您的自托管实例)。
仅当您信任 Plausible 处理您的域名数据时才安装。
相关技能
如果用户确认,使用 clawhub install 安装:
- - analytics — 通用分析指南
- umami — 替代隐私分析工具
- mixpanel — 产品分析工具
反馈
- - 如果觉得有用:clawhub star plausible
- 保持更新:clawhub sync