Sponsor Suno AI Music arrow_forward
Subagent

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
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

  1. Download memory-agent.md from the repository.
  2. Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control.
  3. 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

  1. 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.
  2. 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

  1. Write facts, not interpretations — store numbers and patterns, not opinions
  2. Timestamp everything — every recorded fact includes when it was observed
  3. Rolling window — maintain 90 days of baseline history, archive older data
  4. Compact storage — use structured formats, not prose. This file is read on every invocation
  5. 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:

  1. Create ${CLAUDE_SKILL_DIR}/data/ directory
  2. Create baselines.md with header and empty tables
  3. Create patterns.md with header only
  4. Create alerts-log.md with header only
  5. 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

Browse all skills, subagents, and plugins →

Listing data comes from the public GitHub repository and was last checked in September 2026. Excerpts are © their authors and shared under MIT. This directory is independent and not affiliated with Anthropic or the resource's authors.