PhD-Zero: Skill for Codex

.agents/skills/memory-manager/SKILL.md

memory-manager is a skill for Codex from TenureAI/PhD-Zero. It costs 99 tokens per session (2,313 once invoked), scanned A, original, MIT.

A long-term memory manager for AI research and development work. It retrieves, records, and promotes useful information from previous tasks and execution history.

In plain words
What is it for?
Use it to restore context after interruptions, keep records of completed work, capture lessons from failures, and share reusable research knowledge.
Why use it?
It helps preserve relevant decisions, procedures, failures, and working context so they can be reused later.

Skill for Codex

Written for Codex: agents/openai.yaml present. Also seen: installed under .agents/ (shared by several agents); mentions Codex.

This is TenureAI/PhD-Zero's own configuration. It tells Codex how to work on PhD-Zero itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything PhD-Zero configures →

Reuse

Borrowing it

Nothing to install: this file belongs to TenureAI/PhD-Zero. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/TenureAI/PhD-Zero/main/.agents/skills/memory-manager/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/TenureAI/PhD-Zero

Made for: Codex.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/tenureai/phd-zero/memory-manager/github.svg)](https://agentmods.dev/skills/tenureai/phd-zero/memory-manager)
Your own site
<a href="https://agentmods.dev/skills/tenureai/phd-zero/memory-manager"><img src="https://agentmods.dev/badge/skills/tenureai/phd-zero/memory-manager/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 memory-manager

Your own site · 80×15
<a href="https://agentmods.dev/skills/tenureai/phd-zero/memory-manager"><img src="https://agentmods.dev/badge/skills/tenureai/phd-zero/memory-manager.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 99 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,313 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.00099 $0.02313
Opus 5.5 $0.00040 $0.00925
Sonnet 5.5 $0.00020 $0.00463
Haiku 4.5 $0.00010 $0.00231

Measured 1mo ago against content hash ad34879eea88, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

memory-manager 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 1mo ago.

The scan reads SKILL.md. This mod also ships 5 executable files (scripts/memory_store.py, scripts/retrieve_local_memory.py, scripts/retrieve_working_state.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.

.agents/skills/memory-manager/SKILL.md · 277 lines

How it starts

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

Memory Manager

Mission

Build compounding capability by turning execution traces into reusable, evidence-linked memory, with retrieval centered on prior experience rather than only current working state.

Load References

Load these files before writing or promoting records:

  1. references/memory-layout.md
  2. references/memory-templates.md
  3. references/sqlite-schema.sql

Memory Types

Manage these layers:

  1. working
    • run-scoped continuity state
    • resume after compaction, interruption, or long waits
  2. episode
    • concrete run case records
    • useful for similar errors, repeated attempts, and local history
  3. procedure
    • highest-priority execution memory
    • default retrieval layer before acting
  4. insight
    • cross-task abstraction, tradeoffs, boundaries, and contradiction handling
  5. persona
    • behavior config only

Working Memory Contract

working must include:

  1. goal
  2. stage
  3. hypothesis
  4. last_action
  5. last_observation
  6. next_step
  7. blockers
  8. evidence_refs
  9. active_action_ids
  10. todo_active
  11. todo_done
  12. todo_blocked

Todo granularity should be task-level (small stages/subtasks), not command-level.

Experience-First Retrieval Policy

Prior experience retrieval is the default. working is important for continuity, but it is not the only retrieval path and should not crowd out reusable experience.

Mandatory retrieval triggers:

  1. every new user turn
  2. every execution batch before acting
  3. every replan
  4. every significant failure or new error signature
  5. every high-resource or irreversible action
  6. every long-action resume or post-poll decision
  7. before final answer or report handoff
  8. when modifying memory-manager or another Memory-related skill/instruction
  9. when compaction markers such as Compact, 压缩, or Summary appear

Default retrieval order:

  1. procedure
    • mandatory before every execution batch
  2. episode
    • mandatory when a similar failure, repeated attempt, or same task type is present
  3. insight
    • mandatory during planning, tradeoff analysis, contradiction handling, or final answer shaping
  4. working
    • mandatory for resume, compaction recovery, long-action reconciliation, and final handoff

Read the full file on GitHub · 277 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. 1mo ago First seen · 277 lines · 99 tokens per session scan A ad34879eea88

Subscribe to this mod's changes

memory-manager is a skill published in the GitHub repository TenureAI/PhD-Zero (53 stars, last pushed 7mo ago), licensed MIT. It adds 99 tokens to every session and 2,313 once invoked, about $0.0004 per session on Opus 5.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 skills, from other repositories

evo-memory

Manages persistent research memory across ideation and experimentation cycles. Maintains two stores: Ideation Memory MI (feasible/unsuccessful directions) and Experimentation Memory ME (reusable strategies for data processing, model training, architecture, debugging). Three evolution mechanisms: IDE (after…

AI4Scientist/nano-scientist · 186 tokens

research-wiki

A persistent research knowledge base for storing papers, ideas, experiments, claims, and the links between them. It keeps this information available across the research process.

AI4Scientist/nano-scientist · 73 tokens

auto-paper-improvement-loop

An automated loop for improving a generated research paper through repeated review, editing, and recompilation. Recompiling rebuilds the paper so changes can be checked in the final document.

AI4Scientist/nano-scientist · 67 tokens

proof-checker

A rigorous proof-checking and repair skill for LaTeX mathematics. LaTeX is a text format commonly used to write mathematical documents.

AI4Scientist/nano-scientist · 90 tokens

citation-audit

Zero-context verification that every bibliographic entry in the paper is real, correctly attributed, and used in a context the cited paper actually supports. Uses a fresh cross-model reviewer with web/DBLP/arXiv lookup to catch hallucinated authors, wrong years, fabricated venues, version mismatches, and wrong-context…

AI4Scientist/nano-scientist · 114 tokens

grant-proposal

A grant-writing workflow that turns research ideas and related literature into structured funding proposals for named national and international grant formats.

AI4Scientist/nano-scientist · 131 tokens