memory-management

A guide to managing memory safely and efficiently in C++, including RAII, smart pointers, custom allocators, memory pools, and leak detection.

In plain words
What is it for?
Use it when designing, reviewing, or debugging C++ code that allocates and releases memory.
Why use it?
It helps reduce errors such as memory leaks and unsafe handling of dynamically allocated data.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/pluginagentmarketplace/custom-plugin-cpp/memory-management
Any agent
npx skills add pluginagentmarketplace/custom-plugin-cpp --skill memory-management
Clone the repo
git clone --depth 1 https://github.com/pluginagentmarketplace/custom-plugin-cpp

Made for: Claude Code, Codex.

Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,066 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin unknown 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 $0.00034 $0.02066
Opus 5 $0.00017 $0.01033
Sonnet 5 $0.00007 $0.00413
Haiku 4.5 $0.00003 $0.00207

Measured yesterday against content hash 754e37634b81, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

memory-management 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 yesterday.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/leak_detector.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/memory-management/SKILL.md · 348 lines

The source is not reproduced here

No licence file

A repository with no LICENSE is all rights reserved by default, so the body is not copied here. The metadata, the measurements and the link are.

Read it on GitHub

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. yesterday First seen · 348 lines · 34 tokens per session scan A 754e37634b81

Subscribe to this mod's changes

memory-management is a skill published in the GitHub repository pluginagentmarketplace/custom-plugin-cpp (6 stars, last pushed 7mo ago), with no licence file. It adds 34 tokens to every session and 2,066 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-31.

Related

Other skills, from other repositories

reading-metaskill

当用户想养成阅读习惯、问「读什么书/怎么读」「如何学习新领域/怎么入门某学科」时调用。 核心理念: 阅读是终极元技能; 读你所爱直到爱上阅读, 没有读完义务; 读原著与经典优先; 以教促学; 每天1-2小时即可进入极少数人行列。 不适用于: 具体某本书的书评、考试备考资料选择。 Triggers: 阅读/读书/怎么学习/入门/原著/书单/reading/how to learn.

kangarooking/cangjie-skill · 139 tokens

coach

Learning telemetry, strategy, and schedule — retention stats, calibration, grader audit, n-of-1 experiments, HTML dashboard. Use for "how am I doing", weekly check-ins, strategy questions, auditing the grader, or adjusting how Engram teaches.

nagisanzenin/engram · 53 tokens

drawio-skill

Use when user requests diagrams, flowcharts, architecture charts, or visualizations. Also use proactively when explaining systems with 3+ components, complex data flows, or relationships that benefit from visual representation. Generates .drawio XML files and exports to PNG/SVG/PDF locally using the native draw.io…

ranxi2001/zero2Agent · 68 tokens

learning-notes-automation

学习笔记自动化:视频/播客转录 → 知识点提取 → 闪卡生成 → 知识图谱更新。触发词:学习笔记、闪卡、Anki、知识提取、视频学习.

chubbyguan/chubbyskills · 58 tokens

learn

Learn any topic properly — first-principles curriculum, generation-first tutoring, verified free recall, FSRS scheduling. Use when the user wants to learn, understand, study, or continue studying something.

nagisanzenin/engram · 42 tokens

chinese-quotes-fix

Check and fix Chinese quote pairing in Markdown files generated by ClaudeCode or other agents, while preserving Markdown syntax and protected blocks.

ranxi2001/zero2Agent · 32 tokens