ds-agent-retention

ds-agent-retention is an agent for Claude Code from Dataslayer-AI/Marketing-skills. It costs 37 tokens per session (953 once invoked), scanned A, original, MIT.

A data-gathering helper for subscription health, cancellations, and failed payments, using Stripe and optionally an internal database.

In plain words
What is it for?
Use it to retrieve active subscription details, cancellation reasons, and recent failed-charge records for further analysis.
Why use it?
It collects retention data in a consistent structure without adding interpretation or recommendations.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter; mentions subagents.

Part of the dataslayer-marketing-skills plugin — 10 skills, 4 agents shipped together

Good fit Use it to retrieve active subscription details, cancellation reasons, and recent failed-charge records for further analysis.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/dataslayer-ai/marketing-skills/ds-agent-retention
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/Dataslayer-AI/Marketing-skills

Made for: Claude Code.

Or install dataslayer-marketing-skills, the plugin that ships this one along with the rest of its 10 skills, 4 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ds-agent-retention

README.md
[![agentmods](https://agentmods.dev/badge/agents/dataslayer-ai/marketing-skills/ds-agent-retention/github.svg)](https://agentmods.dev/agents/dataslayer-ai/marketing-skills/ds-agent-retention)
Your own site
<a href="https://agentmods.dev/agents/dataslayer-ai/marketing-skills/ds-agent-retention"><img src="https://agentmods.dev/badge/agents/dataslayer-ai/marketing-skills/ds-agent-retention/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ds-agent-retention

Your own site · 80×15
<a href="https://agentmods.dev/agents/dataslayer-ai/marketing-skills/ds-agent-retention"><img src="https://agentmods.dev/badge/agents/dataslayer-ai/marketing-skills/ds-agent-retention.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 37 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 953 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00037 $0.00953
Opus 5 $0.00018 $0.00477
Sonnet 5 $0.00007 $0.00191
Haiku 4.5 $0.00004 $0.00095

Measured 10d ago against content hash f14e8f288b29, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

ds-agent-retention scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/ds-agent-retention.md · 115 lines

How it starts

The opening of the file, as written. The whole thing — 115 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Retention subagent

You are a retention analyst. You have one job: fetch account health and retention data via Dataslayer MCP and return a concise structured findings object. You do not write full reports.

Data to fetch

Default if not specified: last 60 days for cancellations, last 30 days for failed charges.

Via Dataslayer MCP — Stripe (primary source):

Important: use subscription_plan_amount (base currency), not subscription_plan_amount_eur — mixed currencies cause errors.

Important: avoid subscription_cancellation_feedback as a dimension — it causes 502 errors. Use subscription_cancellation_reason only.

Active subscriptions:

  • subscription_status, subscription_plan_name, subscription_plan_interval, subscription_count, subscription_plan_amount Group by: status, plan_name, plan_interval Date range: current month

Cancellations (last 60 days):

  • subscription_cancellation_reason, subscription_plan_name, subscription_count, subscription_plan_amount Group by: cancellation_reason, plan_name

Failed charges (last 30 days):

  • charge_failure_code, charge_failure_message, charge_amount, customer_id, customer_email, date

Process data with ds_utils

After fetching, process through ds_utils. Do not write inline scripts. The orchestrator provides the absolute path to ds_utils.py in its prompt — use that path. If not provided, fall back to scripts/ds_utils.py.

# Calculate MRR from active subscriptions (yearly ÷ 12 automatic)
python <ds_utils_path> process-stripe-subs <active_subs_file>
# Output: total_mrr, active_subscriptions, by_plan

# Analyze payment failures — auto-detects column names (MCP Title Case),
# filters for failed charges, groups by customer, finds repeat offenders
python <ds_utils_path> process-stripe-charges <charges_file>
# Output: failed_charges, failure_rate, repeat_failures[], mrr_at_risk, status

# Validate
python <ds_utils_path> validate <file> stripe

The process-stripe-charges command handles everything that was previously done manually: filtering for failed charges (failure_code != "--"), grouping by customer, identifying repeat offenders (3+), and calculating failure rate with benchmark assessment (Green/Amber/Red).

Read the full file on GitHub · 115 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 115 lines · 37 tokens per session scan A f14e8f288b29

Subscribe to this mod's changes

ds-agent-retention is an agent published in the GitHub repository Dataslayer-AI/Marketing-skills (22 stars, last pushed 5mo ago), licensed MIT. It adds 37 tokens to every session and 953 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

bug-investigator

Use this agent to investigate a single failing E2E test. Performs read-only deep-dive using DOM snapshots, network traces, console output, and screenshots to produce a structured diagnosis. Never modifies code. Examples: Context: A test failure needs root cause analysis. user: 'Investigate why the checkout test at…

kaizen-yutani/playwright-autopilot · 0 tokens

Demonstrate

Agent for demonstrating VS Code features.

microsoft/vscode · 10 tokens

playwright-test-generator

Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.

microsoft/playwright · 151 tokens

AVM Owner Triage

Triage open GitHub issues across the Azure Verified Modules (AVM) repos an owner maintains. Splits the backlog into a Copilot-delegatable pile and a human pile, produces a report with a delegation ratio, and never comments or assigns without explicit user approval.

github/awesome-copilot · 61 tokens

Ultimate Transparent Thinking Beast Mode

Agent "Ultimate Transparent Thinking Beast Mode" from github/awesome-copilot, covering quantum cognitive architecture, phase 2: adversarial intelligence & red-team analysis, phase 3: implementation & iterative refinement and phase 4: comprehensive verification & completion.

github/awesome-copilot · 11 tokens

Context7-Expert

Expert in latest library versions, best practices, and correct syntax using up-to-date documentation.

github/awesome-copilot · 22 tokens