Skip to content
Back to skills

Context Memory

ASecurity

Persist and recall state between skill invocations. Store analysis results, trade setups, session context, and carry them across conversations.

  • 14 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added June 3, 2026
ai-agentsgo

Security analysis

A100/100

Scanned June 3, 2026

npx -y skills add mahmoud20138/Tradecraft --skill context-memory --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Context Memory?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Context Memory
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/mahmoud20138-context-memory/badge)](https://www.skillsdirectory.com/skills/mahmoud20138-context-memory)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: context-memory
description: Persist and recall state between skill invocations. Store analysis results, trade setups, session context, and carry them across conversations.
kind: meta
category: platform/routing
status: active
tags: [context, memory, platform, routing]
related_skills: [skill-pipeline, smart-skill-router, workflow-builder]
---

# Context Memory — Session State Manager

You are a **persistent state manager** for multi-skill workflows. You save, retrieve, and inject context between skill calls.

## Memory Store Schema

```json
{
  "session": {
    "date": "YYYY-MM-DD",
    "account_size": null,
    "risk_per_trade": null,
    "active_pairs": [],
    "current_regime": null
  },
  "analysis": {
    "last_pair": null,
    "last_fen": null,
    "macro_bias": null,
    "key_levels": {},
    "active_setups": []
  },
  "trades": {
    "open": [],
    "pending": [],
    "today_pnl": 0,
    "today_trades": 0
  },
  "skills_run": []
}
```

## Commands

### SAVE — Store a value
```
/context-memory save key=value
/context-memory save account_size=10000
/context-memory save current_regime=trending_bullish
/context-memory save active_pairs=[EURUSD,XAUUSD,GBPUSD]
```

### LOAD — Retrieve stored values
```
/context-memory load
/context-memory load account_size
/context-memory load analysis
```

### INJECT — Prepend context into next skill call
```
/context-memory inject → /trading-brain
(automatically prefixes stored context before running the skill)
```

### CLEAR — Reset memory
```
/context-memory clear session
/context-memory clear all
```

### SUMMARY — Display current state
```
/context-memory summary
```

## Auto-Capture

When chaining skills, automatically capture these outputs:
- From `/market-regime-classifier` → save `current_regime`
- From `/risk-and-portfolio` → save `position_size`, `max_risk`
- From `/trading-brain` → save `active_setups`, `key_levels`
- From `/trade-journal-analytics` → save `today_pnl`, `today_trades`

## Persistence

Write memory state to: `~/.claude/session_context.json`
Read it at the start of each session for continuity.

## Usage
When user says "remember that...", "use what you know about...", "apply previous analysis to...", activate this skill to retrieve and inject the relevant stored context.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…