agentleFS
IgorGanapolskyIgorGanapolsky/ThumbGate/skills/configure-analytics/SKILL.md

configure-analytics

Skill30 starsChanged 8 months agoMITView on GitHub

Repeatable skill for setting up Plausible, PostHog, and GA4 analytics keys in both local .env and Railway production environment variables. Plausible API key: - Navigate to https://plausible.io/settings/api-keys - If no key exists, create one named "thumbgate-railway-prod" - Copy the key value PostHog project API key: - Navigate to https://us.posthog.com/settings/project#variables - Copy the "Project API Key" (starts with phc_) GA4 Measurement ID: - Navigate to https://analytics.google.com - Select the ThumbGate property (or create one: Admin → Create Property) - Go to…

  • Reads credentials

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 3 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    After rotating any analytics API key

    line 9
  2. Distinctive:

    After creating a new GA4 property

    line 10
  3. Very specific:

    If no key exists, create one named "thumbgate-railway-prod"

    line 23
  4. Very specific:

    If no ThumbGate property exists, skip — Plausible is primary

    line 34
  5. Very specific:

    Write/update repo/.env with:

    line 38
  6. Very specific:

    If Railway CLI auth works, set variables with railway variables set.

    line 54
  7. Very specific:

    If Railway CLI reports invalid_grant, use the GitHub PR/deploy path and the Railway dashboard in Chrome.

    line 55
  8. Distinctive:

    Add/update each key-value pair

    line 63

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Skill: Configure Analytics

Repeatable skill for setting up Plausible, PostHog, and GA4 analytics keys in both local .env and Railway production environment variables.

When to use

  • New session notices analytics env vars are missing
  • After rotating any analytics API key
  • After creating a new GA4 property

Prerequisites

  • Chrome logged into: plausible.io, us.posthog.com, analytics.google.com
  • Railway MCP authenticated OR Chrome logged into railway.com

Steps

1. Gather keys from dashboards

Plausible API key:

PostHog project API key:

GA4 Measurement ID:

  • Navigate to https://analytics.google.com
  • Select the ThumbGate property (or create one: Admin → Create Property)
  • Go to Data Streams → Web stream → copy Measurement ID (format: G-XXXXXXXXXX)
  • If no ThumbGate property exists, skip — Plausible is primary

2. Set local .env

Write/update repo/.env with:

PLAUSIBLE_API_KEY=<key>
PLAUSIBLE_SITE_ID=thumbgate-production.up.railway.app
POSTHOG_API_KEY=<phc_key>
THUMBGATE_GA_MEASUREMENT_ID=<G-ID or leave commented>

3. Set Railway production vars

Option A — Railway CLI or GitHub deploy variables (preferred):

gh secret list --repo IgorGanapolsky/ThumbGate
gh variable list --repo IgorGanapolsky/ThumbGate

If Railway CLI auth works, set variables with railway variables set. If Railway CLI reports invalid_grant, use the GitHub PR/deploy path and the Railway dashboard in Chrome. Do not direct-push to main; use a focused branch, PR, required checks, and branch-protected merge.

Option B — Chrome (if MCP not authenticated):

  • Navigate to railway.com dashboard
  • Click into the ThumbGate project → production service
  • Go to Variables tab
  • Add/update each key-value pair
  • Railway auto-redeploys on variable change

4. Verify

# Local: run Plausible poller
npm run social:poll:plausible

# Production: check instrumentation scripts and health
curl -fsS https://thumbgate.ai/health
curl -fsS https://thumbgate.ai/checkout/pro | grep -E 'plausible|posthog|G-[A-Z0-9]+'

Current values (last updated 2026-05-26)

  • Plausible site: thumbgate-production.up.railway.app
  • PostHog project: US Cloud, project ID 299775
  • GA4: use THUMBGATE_GA_MEASUREMENT_ID when present; do not assume the dashboard is export-ready without provider credentials.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.