memory-guardian
Skill10 starsChanged 8 months agoApache-2.0View on GitHub
WSL2 memory safety and scaling guardrails for Claude Code sessions and parallel agents.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- zad111ak-ai/hermes-agent-skillstheir own version, first seen Jul 18, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- zad111ak-ai/hermes-agent-skills★ 7same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository131 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .claude/commands/monitoring/agents.mdAGENTS.md
- .claude/skills/gstack/AGENTS.mdAGENTS.md
- .claude/agents/CLAUDE.mdCLAUDE.md
- .claude/commands/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- .claude/skills/agentic-orchestration/CLAUDE.mdCLAUDE.md
- .claude/skills/cacos/CLAUDE.mdCLAUDE.md
- .claude/skills/CLAUDE.mdCLAUDE.md
- .claude/skills/frankx-daily-execution/CLAUDE.mdCLAUDE.md
- .claude/skills/gstack/CLAUDE.mdCLAUDE.md
- .claude/skills/memory-guardian/CLAUDE.mdCLAUDE.md
- .claude/skills/newsletter/CLAUDE.mdCLAUDE.md
- .claude/skills/oci-services-expert/CLAUDE.mdCLAUDE.md
- .claude/skills/oracle-ai-architect/CLAUDE.mdCLAUDE.md
- .claude/skills/oracle-diagram-generator/CLAUDE.mdCLAUDE.md
- .claude/skills/research/CLAUDE.mdCLAUDE.md
- .claude/skills/swarm-advanced/CLAUDE.mdCLAUDE.md
- docs/CLAUDE.mdCLAUDE.md
- drafts/CLAUDE.mdCLAUDE.md
- hub-generator/CLAUDE.mdCLAUDE.md
- instances/CLAUDE.mdCLAUDE.md
- mcp-servers/CLAUDE.mdCLAUDE.md
- outputs/CLAUDE.mdCLAUDE.md
- scripts/CLAUDE.mdCLAUDE.md
- skills/CLAUDE.mdCLAUDE.md
- templates/CLAUDE.mdCLAUDE.md
- workflows/CLAUDE.mdCLAUDE.md
- acos-metaSkill
- agentic-jujutsuSkill
- agentic-orchestrationSkill
- AI Architect NewsletterSkill
- ai-architectureSkill
- algorithmic-artSkill
- apod-to-shortSkill
- arxiv-space-paper-to-briefSkill
- book-publishingSkill
- brand-guidelinesSkill
- brand-voiceSkill
- cacosSkill
- canvas-designSkill
- Claude SDK ExpertSkill
- cosmic-mythic-overlaySkill
- creator-productivitySkill
- descript-operatorSkill
- doc-coauthoringSkill
- docxSkill
- excellence-book-writingSkill
- Framer ExpertSkill
- frankx-brandSkill
- FrankX Daily Execution SystemSkill
- frontend-designSkill
- game-developmentSkill
- github-code-reviewSkill
- github-multi-repoSkill
- github-project-managementSkill
- github-release-managementSkill
- github-workflow-automationSkill
- Greek PhilosopherSkill
- grok-harnessSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 5 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Before spawning 3+ parallel Task agents
- Very specific: line 13
Before running npm run build or other memory-heavy operations
- Distinctive: line 14
When SessionStart hook reports WARNING or CRITICAL memory status
- Distinctive: line 15
When user mentions running multiple CC instances
- Distinctive: line 31
Prefer sequential over parallel work
- Very specific: line 32
Avoid npm run build alongside agents
- Distinctive: line 42
Always run the memory check before:
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Memory Guardian Skill
Purpose
Monitors WSL2 memory usage and enforces safe scaling limits for Claude Code instances and parallel agents.
When This Skill Activates
- Before spawning 3+ parallel Task agents
- Before running
npm run buildor other memory-heavy operations - When SessionStart hook reports WARNING or CRITICAL memory status
- When user mentions running multiple CC instances
Memory Check Command
free -m | awk '/^Mem:/{printf "RAM: %dMB/%dMB (%d%%)\n", $3, $2, $3*100/$2} /^Swap:/{if($3>0) printf "Swap: %dMB/%dMB\n", $3, $2}'Scaling Rules
Green Zone (< 75% RAM usage)
- Parallel Task agents: up to 4
- Background builds: safe
- No restrictions
Yellow Zone (75-89% RAM usage)
- Parallel Task agents: max 2
- Prefer sequential over parallel work
- Avoid
npm run buildalongside agents - Warn user: "Memory pressure is high. Limiting parallel agents to 2."
Red Zone (>= 90% RAM usage)
- Parallel Task agents: max 1 (or 0 — work sequentially)
- NO background builds
- Suggest user close other CC instances
- Warn user: "Memory critically low. Working sequentially to prevent WSL crash."
Before Heavy Operations
Always run the memory check before:
- Spawning 3+ parallel Task subagents
- Running production builds (
npm run build) - Starting dev server + agents simultaneously
WSL Configuration Reference
- Host: 16GB RAM
- WSL limit: 12GB (
C:\Users\Frank\.wslconfig) - Swap: 12GB
- Per CC instance: ~500MB + ~100-150MB per MCP server
- Safe concurrent CC instances: 4-5
- autoMemoryReclaim: dropcache (aggressive)
Recovery If Memory Is Critical
# Check what's using memory
ps aux --sort=-%mem | head -20
# Kill any orphaned node processes from old CC sessions
pkill -f "node.*claude" 2>/dev/null
# Force kernel to drop caches (non-destructive)
echo 1 | sudo tee /proc/sys/vm/drop_caches 2>/dev/nullIntegration
- Hook:
.claude/hooks/memory-check.shruns on SessionStart - Statusline: Memory percentage visible if hook fires warning
- Self-enforcing: CC reads this skill and self-limits before scaling
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

