返回提示词目录第 1174 页

开源项目无遥测增长指标搭建

利用公开及仓库可见数据设计开源项目增长指标,提供采集命令、每周归档方案与数据偏差说明。

完整提示词

<context>
Open-source projects can measure adoption well without adding telemetry to the software. Public and owner-visible sources include: GitHub traffic (views, unique visitors, clones, top referrers and popular paths), which is kept for only 14 days and needs push access, so it must be archived on a schedule; release asset download counts; registry download statistics (the npm downloads API, PyPI statistics through public services or the public BigQuery dataset, crates.io, Docker Hub pulls); Homebrew's public install analytics; the dependents ("Used by") graph; stars over time; issues, pull requests and their authors; and cookie-free website analytics. CHAOSS defines community metrics such as time to first response and new contributors. Stars are a weak signal: millions of fake stars have been identified, three in four developers still look at the count, and promotion raises stars far more than contributors. Adding default-on telemetry for growth has caused backlash and reversals in established projects.
</context>

<task>
<project>
{{project}}
</project>
Goal: {{goal}}.

If you cannot tell where the project is distributed or whether the user can read its traffic data, ask and stop.

1. **North-star and inputs.** Propose one north-star metric tied to {{goal}} that can be measured from public or owner-visible data (for example weekly downloads of the latest major version, or monthly new issue authors who are not maintainers), and four to six input metrics that move it. Explain why each is a leading or lagging signal.
2. **Metric definitions.** For each metric: exact definition, source, granularity, known distortions (mirrors and CI inflate downloads; bots inflate clones; AI-generated issues inflate activity; stars can be bought) and how to correct for them.
3. **Collection.** For each source available to this project, give the exact command or API call to collect it, for example `gh api repos/OWNER/REPO/traffic/views`, `.../traffic/clones`, `.../traffic/popular/referrers`, `.../traffic/popular/paths`, the releases endpoint summing each asset's `download_count`, the npm downloads range endpoint, and the Homebrew analytics JSON. Mark any endpoint you are not sure of as [CHECK] and point to its documentation.
4. **Weekly archive.** Design a small archive: a scheduled job (for example a GitHub Actions workflow on a weekly cron using a fine-grained token with the repository permission the traffic API requires; the default workflow token may not be enough, so tell the user to check the API documentation) that appends each week's numbers to a CSV in a separate branch or repository. Give the CSV columns. Say what it must never collect (personal data about visitors or users).
5. **What not to track.** List metrics to drop or demote (raw star totals as a goal, follower counts, total clones), and say why.
</task>

<constraints>
- No telemetry in the software, no tracking pixels in READMEs, no scraping personal data of stargazers or users.
- Do not invent current values; leave a column for the user to fill.
- Commands are for the user to run; do not claim you ran them.
</constraints>

<output_format>
## North-star and inputs
## Metric definitions
| Metric | Definition | Source | Leading or lagging | Distortions |
## Collection
Commands and endpoints, per source.
## Weekly archive
Job outline and CSV columns.
## What not to track
</output_format>

可替换内容

  • {{project}}
  • {{goal}}
  • [CHECK]

分类与标签

编程开发、开源项目、增长指标、接口采集、自动归档、隐私保护

前往 AI 图片创作