date-ranges
Skill244 starsChanged 43 days agoMITView on GitHub
How to specify date ranges in `get_ga4_data` and how to structure period-over-period comparisons.
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
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
- Very specific: line 80
Do not use date_range_end: "today" when comparing to a prior complete period
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 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
Date Ranges
How to specify date ranges in get_ga4_data and how to structure
period-over-period comparisons.
Valid formats
date_range_start / date_range_end accept:
"YYYY-MM-DD" — absolute date, e.g. "2024-01-15"
"today" — current day (partial — use carefully)
"yesterday" — last complete day
"NdaysAgo" — N days back from today, e.g. "7daysAgo", "30daysAgo", "90daysAgo"NdaysAgo excludes today. 7daysAgo to yesterday = last 7 complete days.
Common windows
| Window | start | end |
| Last 7 days | 7daysAgo | yesterday |
| Last 28 days | 28daysAgo | yesterday |
| Last 90 days | 90daysAgo | yesterday |
| This month | YYYY-MM-01 | today |
| Last month | YYYY-MM-01 (prior) | YYYY-MM-last-day (prior) |
| Year to date | YYYY-01-01 | yesterday |
Period-over-period comparison
The GA4 Data API does not support multi-period in a single call. Run two
separate get_ga4_data calls, then compare the results.
Example: week-over-week
Call 1 — this week:
date_range_start: "7daysAgo"
date_range_end: "yesterday"Call 2 — last week:
date_range_start: "14daysAgo"
date_range_end: "8daysAgo"Example: year-over-year for July
Call 1 — this year:
date_range_start: "2025-07-01"
date_range_end: "2025-07-31"Call 2 — last year:
date_range_start: "2024-07-01"
date_range_end: "2024-07-31"Then compute the delta: (current - prior) / prior * 100 for each metric.
Partial-day reads
today includes only the hours elapsed so far. Comparing today to yesterday
is misleading — yesterday is a full day, today is partial.
For intra-day analysis, use today for both start and end and note the
IST hours covered in your interpretation.
Common mistakes
"last7days"is NOT valid — use"7daysAgo""last-week"is NOT valid — use absolute dates orNdaysAgo- Do not use
date_range_end: "today"when comparing to a prior complete period "0daysAgo"= today (same as"today")
In this repository21 other files it gives its agents.
- AGENTS.mdAGENTS.md
- docs/llms-full.txtllms.txt
- docs/llms.txtllms.txt
- llms.txtllms.txt
- ga4-analyticsSkill
- ai-referral-analysisSkill
- attribution-scopeSkill
- bot-traffic-detectionSkill
- channel-acquisitionSkill
- common-metric-namesSkill
- compatible-combinationsSkill
- content-performanceSkill
- custom-dimensionsSkill
- ecommerce-analysisSkill
- filter-structuresSkill
- ga4-limitationsSkill
- gcp-setupSkill
- geo-device-segmentationSkill
- gcp-setupSkill
- traffic-diagnosisSkill
- ua-to-ga4Skill
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.

