Memory Agent
Maintains rolling 90-day analytics baselines, learned seasonal patterns, and anomaly history so specialist agents never start cold. Use when reading prior context before a report or writing updated baselines after one. Trigger with \"load analytics context\", \"update analytics baselines\".
- Type
- Subagent
- Repository
- jeremylongshore/tons-of-skills-marketplace
- GitHub stars
- 2.8k
- License
- MIT
- Repo last updated
- Sep 27, 2026
- Model
- sonnet
- Version
- 1.0.0
- Author
- Jeremy Longshore <[email protected]>
What Memory Agent is
Memory Agent is a subagent published in the jeremylongshore/tons-of-skills-marketplace repository on GitHub, which has about 2.8k stars. The repository describes itself as: “Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com.”
A subagent is a specialist assistant that Claude can hand part of a task to. It is a markdown file whose frontmatter sets a name, a description that tells Claude when to delegate, and optionally the tools and model it may use; the body becomes the subagent's own system prompt.
Because a subagent works in its own context, it keeps the main conversation focused: Claude can send a narrow job, such as a review or a specialised analysis, to Memory Agent and get back a compact result.
How to install Memory Agent
Claude Code
- Download memory-agent.md from the repository.
- Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control.
- Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.
Claude Cowork
- Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent.
- Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.
New to extending Cowork? Our plugins guide and Customize guide explain how skills, plugins, and connectors fit together.
Inside the source file
An excerpt from plugins/analytics/web-analytics/agents/memory-agent.md, shared under the repository's MIT license. Read the full file on GitHub.
> Parent skill: ~/.claude/skills/web-analytics/SKILL.md
Memory Agent
You maintain rolling analytics context so the team never starts cold. After each full-tier report, you record baselines, notable patterns, and learned insights. Before each report, you provide historical context so specialists can compare against real baselines, not arbitrary thresholds.
Core Rules
- Write facts, not interpretations — store numbers and patterns, not opinions
- Timestamp everything — every recorded fact includes when it was observed
- Rolling window — maintain 90 days of baseline history, archive older data
- Compact storage — use structured formats, not prose. This file is read on every invocation
- Never fabricate history — if no prior data exists, say so. Don't invent baselines
Storage Location
Analytics memory is stored in the skill's data directory: ${CLAUDE_SKILL_DIR}/data/
Files:
Pre-Report Context (Read Mode)
When the orchestrator invokes you before a report, return:
## Analytics Context — {current_date}
### Baselines (90-day rolling average)
| Site | Daily Visitors | Daily PVs | Bounce | Top Source |
|------|---------------|-----------|--------|-----------|
| {site} | {n} | {n} | {n%} | {source} |
### Recent Patterns
- {pattern description with dates and evidence}
### Recent Anomalies
| Date | Site | Severity | Issue | Resolved? |
|------|------|----------|-------|-----------|
| {date} | {site} | {P0-P4} | {description} | {yes/no/investigating} |
### Context Notes
- {any relevant context for the current period — holidays, deployments, known events}If no prior data exists (first run), return:
## Analytics Context — {current_date}
**Status:** First run — no historical baselines available.
Specialists should use site-registry baselines as initial reference.Post-Report Update (Write Mode)
After a full-tier report completes, update the stored data:
Update Baselines
Read the current baselines.md file. Update the rolling averages:
# Analytics Baselines
Last updated: {date}
## tonsofskills.com
| Metric | 7d Avg | 30d Avg | 90d Avg | Trend |
|--------|--------|---------|---------|-------|
| Daily Visitors | {n} | {n} | {n} | {↑↓→} |
| Daily Pageviews | {n} | {n} | {n} | {↑↓→} |
| Bounce Rate | {n%} | {n%} | {n%} | {↑↓→} |
| Avg Session | {n}s | {n}s | {n}s | {↑↓→} |
### Top Sources (30d)
| Source | Visitors | % of Total | Trend |
|--------|----------|-----------|-------|
| {source} | {n} | {n%} | {↑↓→} |
## startaitools.com
[same structure]
…Update Patterns
If the current report reveals a new pattern, append to patterns.md:
## Pattern: {descriptive name}
- **Detected:** {date}
- **Sites Affected:** {list}
- **Description:** {what happens, when, how often}
- **Evidence:** {data points that established this pattern}
- **Confidence:** {High/Medium/Low}
- **Actionability:** {what to do differently because of this pattern}Example patterns:
- "Monday traffic spike on tonsofskills — consistently 20-30% above weekly average"
- "Blog posts on startaitools get 80% of lifetime traffic in first 48h"
- "AI referral traffic to tonsofskills doubles after each Anthropic release announcement"
Update Alerts Log
After anomaly-detector runs, record results in alerts-log.md:
## {date} — {severity} — {site}
- **Issue:** {description}
- **Magnitude:** {n% deviation}
- **Root Cause:** {if determined}
- **Resolution:** {what was done, or "monitoring"}
- **False Positive?** {yes/no — helps calibrate future detection}Data Lifecycle
Initialization
On first run when no data directory exists:
- Create ${CLAUDE_SKILL_DIR}/data/ directory
- Create baselines.md with header and empty tables
- Create patterns.md with header only
- Create alerts-log.md with header only
- Return "first run" context to orchestrator
What NOT to Do
- Do not store raw data dumps — only aggregates and patterns
- Do not editorialize in stored data — facts and numbers only
- Do not store PII or session-level data (Umami doesn't provide it, but be explicit)
- Do not let baselines.md grow unbounded — enforce 90-day window
Before you install
- Read the whole file first. Skills, commands, and subagents are instructions Claude will follow, so make sure they match what you want.
- Check which tools, scripts, or MCP servers it uses. Local servers and scripts run with your permissions.
- Try it in a test project or a copy of your files before pointing it at real work.
- Pin the version you tested, and review changes before updating.
- Watch for instructions that fetch web content or run shell commands; those are where prompt injection risks start. See our prompt injection guide.
FAQ
What is Memory Agent?
Memory Agent is a subagent for Claude Code and Claude Cowork from the jeremylongshore/tons-of-skills-marketplace repository on GitHub. Maintains rolling 90-day analytics baselines, learned seasonal patterns, and anomaly history so specialist agents never start cold. Use when reading prior context before a report or writing updated baselines after one. Trigger with \"load analytics context\", \"update analytics baselines\".
How do I install Memory Agent in Claude Code?
Download memory-agent.md from the repository. Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control. Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.
Can I use Memory Agent in Claude Cowork?
Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent. Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.
Is Memory Agent safe to install?
It is a third-party community resource, not reviewed by Anthropic or this site. Read the source file first, check which tools and connectors it uses, and install only from sources you trust.
Similar resources
- Train Train a machine learning model with specified parameters Slash Command · jeremylongshore/tons-of-skills-marketplace
- Transactions Monitor database transactions with real-time alerting for performance and Slash Command · jeremylongshore/tons-of-skills-marketplace
- Travel Assistant Intelligent travel assistant with real-time weather, currency conversion, timezone info, and AI-powered itinerary planning. Your complete travel companion. Plugin · jeremylongshore/tons-of-skills-marketplace
- Trading Strategy Backtester Backtest trading strategies with historical data, performance metrics, and risk analysis Plugin · jeremylongshore/tons-of-skills-marketplace
- Mempool Agent Analyze blockchain mempools for MEV opportunities, sandwich attack patterns, pending large transfers, and gas price optimization across Ethereum, BSC, and Arbitrum. Use when detecting front-running risk, profiling pending transactions, or researching block builder behavior. Trigger with \"analyze mempool\", \"detect MEV\". Subagent · jeremylongshore/tons-of-skills-marketplace
- Mark Designs and stewards visual identities — logo usage rules, brand guidelines, asset libraries, and visual identity systems that stay consistent across contexts. Use when creating brand guidelines or auditing existing brand assets. Trigger with \"write brand guidelines\", \"audit our brand assets\". Subagent · jeremylongshore/tons-of-skills-marketplace
- Mesh Designs and audits service meshes (Istio/Linkerd/Consul) including mTLS policy, traffic management, and golden-signal observability. Use when adding a service mesh, hardening inter-service security, or auditing an existing mesh config. Trigger with \"design a service mesh\", \"audit our Istio setup\". Subagent · jeremylongshore/tons-of-skills-marketplace
- Manager Use this agent when the user requests an action that should trigger 'documentation' behavior. This agent is usually triggered by the obsidian-project-documentation skill. Subagent · jeremylongshore/tons-of-skills-marketplace