
Description
Top up the local data cache with new data, without deleting anything. Use when the user wants to bring the cache up to date, pull the latest days, sync recent data, or top up the cache. The lighter, non-destructive sibling of refresh-cache – offered as an alternative there.
SKILL.md
Update the data cache
Pulls a fresh 60-day window into the local data lake, incrementally – it only fetches days that aren't already on disk. Nothing is deleted. Safe to run any time; already-synced customers pay milliseconds, a fresh or partial lake pays for whatever's missing.
If the data looks wrong rather than just behind (stale numbers that don't move, a bad prior pull, schema drift), use the refresh-cache skill instead – this flow won't fix corrupted or malformed local data, only fill gaps.
Output discipline
This is housekeeping. Be terse. Announce, run, stop. Don't narrate the script output line-by-line – the script prints its own progress.
Steps
- Resolve the plugin root. Every bash snippet below assumes
$plugin_rootis set in that shell invocation; re-run this line whenever you start a new shell:plugin_root="${CLAUDE_PLUGIN_ROOT:-${CURSOR_PLUGIN_ROOT:-<plugin-root>}}" plugin_python="${AGENTIC_ANALYTICS_VENV:-${AGENTIC_ANALYTICS_DATA_DIR:-$HOME/.local/share/agentic-analytics}/venv}/bin/python" [ -x "$plugin_python" ] || plugin_python="python3"<plugin-root>is the plugin's install directory – the directory two levels above this SKILL.md file. In a dev checkout of the source repo that'splugin/.$plugin_pythonis the plugin's isolated venv (created by the init flow at$AGENTIC_ANALYTICS_DATA_DIR/venv, default~/.local/share/agentic-analytics/venv); it falls back topython3if the venv doesn't exist yet. - Announce. Output verbatim:
Updating the local cache. Nothing will be deleted – only missing days are pulled.
- Load bucket config. Read
${XDG_CONFIG_HOME:-~/.config}/agentic-analytics/bucket.json. It contains:bucket– S3 bucket holding the customer's DPL events.profile– AWS profile to authenticate with.cache_dir– a slug identifying the customer's data (e.g.acme).
If the file is missing, tell the user to run the init flow first (/agentic-analytics:initon harnesses with slash commands, or "set up agentic analytics" in chat) and stop. Do not guess values. - Pull a fresh 60 days. Same window the staircase report targets.
pull_parsely_dpl.pyis incremental and idempotent: it checks the lake for each day's parquet partition and only fetches what's missing. It also rebuilds thedpl_eventscatalog view.read target_start target_end < <(python3 -c " from datetime import date, timedelta start = date.today() - timedelta(days=60) end = date.today() - timedelta(days=1) print(start.strftime('%Y-%m-%d'), end.strftime('%Y-%m-%d')) ") "$plugin_python" "$plugin_root/scripts/db/pull_parsely_dpl.py" \ --bucket <bucket> [--site <site>] \ --start "$target_start" --end "$target_end" \ [--profile <profile>]
Substitute<bucket>and<profile>with the values held from step 2. Omit--siteto update all sites; pass--site <site>to limit the pull to one site. Do NOT add|| truehere – unlike the report path, a failed pull is the headline result of this flow; surface it. - Report done. One short line: "Cache updated. Next report run uses the latest data."
If the pull failed (auth lapse, S3 error), say so plainly. Nothing was deleted, so whatever was already cached is still there and usable – the failure only means new data wasn't added this time.
Notes
- Only the currently configured customer's DPL data is affected.
- The DuckDB catalog view (
dpl_events) is rebuilt after the pull so it reflects any newly-synced partitions. - This flow never deletes local files. If you suspect the local cache itself is corrupted or inconsistent (not just behind), use refresh-cache instead.
More skills from the agentic-analytics repository
View all 7 skillsclear-configs
remove local agentic analytics configuration files
Jul 24AWSConfigurationOperationsconversions-report
generate conversion attribution reports
May 23AnalyticsReportingSalesgetting-started
set up agentic-analytics plugin
Jul 24AnalyticsDocumentationReferenceidentify-employees
filter internal employee traffic from reports
Jul 24AnalyticsData CleaningOperationsrefresh-cache
clear and rebuild local data cache
Jul 24CachingDebuggingPerformancestaircase-report
generate staircase audience relationship reports
Jul 24AnalyticsCustomer SuccessReporting
More from Automattic
View publisherannotate
collect visual feedback with browser annotation tools
studio
May 6FrontendProductivityUX CopyUX Designblock-content
write editable WordPress block markup
studio
May 27Block EditorCSSHTMLWordPresshosting-plans-helper
provide WordPress.com hosting plan information
studio
Jul 2PricingReferenceWordPressliberate
migrate websites to WordPress
studio
Jul 9CMSMigrationWeb DevelopmentWordPressneed-for-speed
run frontend performance audits for WordPress sites
studio
May 6AuditFrontendPerformanceWordPressplugin-recommendations
recommend WordPress plugins for site features
studio
May 27Content CreationPlugin DevelopmentWordPress