goatcounter-analytics
Skill2 starsChanged 2 months agoMITView on GitHub
Query GoatCounter visitor analytics for Terraria Fetcher site.
- Reads credentials
- Sends data out
In this repository58 other files it gives its agents.
- ad-hoc-script-verificationSkill
- architecture-diagramSkill
- blocked-page-recoverySkill
- cadquery-enclosure-designSkill
- canonical-thumbnailSkill
- circuit-designSkill
- competitor-news-monitorSkill
- component-alternativesSkill
- debugging-hermes-tui-commandsSkill
- docker-container-update-checkSkill
- document-to-action-itemsSkill
- docxSkill
- email-inbox-triageSkill
- embedded-porting-patternsSkill
- ephemeral-file-sharingSkill
- excalidrawSkill
- flash-game-researchSkill
- flutter-android-buildSkill
- flutter-content-renderingSkill
- github-code-reviewSkill
- githubSkill
- google-oauth-file-pollSkill
- grounded-citationsSkill
- hermes-agent-skill-authoringSkill
- hermes-gateway-slash-commandSkill
- hermes-gateway-supervisionSkill
- jellyseerr-watch-suggestionsSkill
- maintained-fork-publishingSkill
- meeting-action-itemsSkill
- native-mcpSkill
- obsidian-mapsSkill
- pdf-flattenSkill
- pdfSkill
- pdf-surgical-editsSkill
- planSkill
- product-price-monitorSkill
- psp-developmentSkill
- psp-homebrew-testingSkill
- psp-prx-plugin-maintenanceSkill
- python-debugpySkill
- python-webapp-patternsSkill
- reddit-readingSkill
- retro-fansiteSkill
- reverse-proxy-websocket-debuggingSkill
- rss-feedsSkill
- simplify-codeSkill
- sketchSkill
- skit-thumbnailSkill
- spikeSkill
- subagent-driven-developmentSkill
- test-driven-developmentSkill
- usb-device-enumerationSkill
- weekly-review-planningSkill
- wiki-media-asset-pipelineSkill
- windows-c-build-toolchainSkill
- windows-crash-forensicsSkill
- writing-plansSkill
- yt-dlp-anti-botSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 3 are distinctive, and 1 is 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.
1
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
- Distinctive: line 27
All API calls need a bearer token, scoped to this GoatCounter account.
- Distinctive: line 37
The token is a secret: Never print it in full in output, logs, or commit it to a repo.
- Distinctive: line 104
All 5 pages carry the tracking snippet (verified live 2026-09-08):
- Very specific: line 112
If a new HTML page is added to the site, it needs this tag added before </head> to be tracked:
≈ “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.
Files
GoatCounter Analytics — Terraria Fetcher
This site (https://example.github.io/my-site/) has GoatCounter
visitor analytics wired in via a script tag on every page. Numbers can be
pulled programmatically instead of opening the dashboard manually.
- Dashboard (human-readable): https://mysite.goatcounter.com
- Site code:
mysite - Privacy: no cookies, no personal data collected, GDPR-safe by default
Auth
All API calls need a bearer token, scoped to this GoatCounter account.
Authorization: Bearer <TOKEN>Get/rotate a token at https://mysite.goatcounter.com/settings/api (read-only "Read statistics" scope is enough for reporting; do not request write scopes unless you actually need to create/modify sites).
The token is a secret. Never print it in full in output, logs, or commit it to a repo. Store it in whatever secret store this agent has available (env var, credential file) and reference it by name.
Token stored at: /path/to/.env as GOATCOUNTER_TOKEN
Base URL
https://mysite.goatcounter.com/api/v0Common calls
1. Verify the token / get account info
curl -s -H "Authorization: Bearer $GOATCOUNTER_TOKEN" \
"https://mysite.goatcounter.com/api/v0/me"2. Pageviews per path over a date range
curl -s -H "Authorization: Bearer $GOATCOUNTER_TOKEN" \
"https://mysite.goatcounter.com/api/v0/stats/hits?start=2026-09-01&end=2026-09-08"Returns one entry per path with a count (total hits in range) and a daily
breakdown. This is the main endpoint for "how many visitors did we get."
Note: dates are interpreted in the account's configured timezone
(UTC), so a hit near midnight may land on a different day than
expected in UTC.
3. List of paths tracked
curl -s -H "Authorization: Bearer $GOATCOUNTER_TOKEN" \
"https://mysite.goatcounter.com/api/v0/paths"4. Detailed stats for one page (browser/OS/referrer breakdown)
curl -s -H "Authorization: Bearer $GOATCOUNTER_TOKEN" \
"https://mysite.goatcounter.com/api/v0/stats/{page}/{id}"{id} comes from the path_id field returned by the /stats/hits call.
5. Send a pageview from a backend (not needed for this site — the
JS snippet already does this client-side; use only if tracking a non-browser event)
curl -s -X POST -H "Authorization: Bearer $GOATCOUNTER_TOKEN" \
-H "Content-Type: application/json" \
-d '{"no_dnt":true,"hits":[{"path":"/some/path"}]}' \
"https://mysite.goatcounter.com/api/v0/count"Quick "how many visitors this week" recipe
START=$(date -d '7 days ago' +%F)
END=$(date +%F)
curl -s -H "Authorization: Bearer $GOATCOUNTER_TOKEN" \
"https://mysite.goatcounter.com/api/v0/stats/hits?start=$START&end=$END" \
| jq '[.hits[] | {path: .path, count: .count}]'Pages tracked on this site
All 5 pages carry the tracking snippet (verified live 2026-09-08):
/terraria-fetcher/(index.html)/terraria-fetcher/tree.html/terraria-fetcher/compare.html/terraria-fetcher/bosses.html/terraria-fetcher/fetcher.html
If a new HTML page is added to the site, it needs this tag added before
</head> to be tracked:
<script data-goatcounter="https://mysite.goatcounter.com/count" async src="//gc.zgo.at/count.js"></script>Gotchas
/api/v0/stats/totalis not a real endpoint — use/api/v0/stats/hitsand sum/inspect thecountfields instead.- Requests from bots, headless browsers, and plain
curlagainst the site itself do not register as visits — the counter only fires from thecount.jsscript running in an actual browser tab. - Rate limits apply to the public API; the
/api/v0/countbackend endpoint has a higher limit than the JS-facing/countendpoint.
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
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.

