- Home
- Skills
- Agents & Orchestration
- Codex永久记忆
Codex永久记忆
Store and audit explicit cross-session user rules locally, with readable Markdown records, provenance, and a tamper-evident change ledger.
Free
Works with the AI Agents you already use
Codex永久记忆
Example session with this skill installed
Remember this as a durable project preference: use Tailwind CSS for styling and prefer functional components over class components in React. Save it as 'react-styling-policy'.
- Read your context and instructions
- Compiled the codex
Memory record saved
| Field | Result |
|---|---|
| Action | add |
| Path | records/react-styling-policy.md |
| Stable ID | MEM-20261104164252-b52199 |
| Kind / scope | preference / project |
| Record SHA-256 | 3c11ee6308e3ff8a93c44cb1c235a70b696a2a9f7d50f076762eb471c719c50b |
Stored rule
Use Tailwind CSS for styling and prefer functional components over class components in React projects.
Why it was written
The user explicitly requested durable project storage. The source, tags, stable ID, timestamps, and before/after hashes were recorded in the audit ledger.
{
"ok": true,
"active": 1,
"revoked": 0,
"invalid": 0,
"events": 1,
"legacy_unsealed_events": 0,
"hash_chain_ok": true,
"record_hashes_ok": true,
"index_ok": true,
"errors": []
}
Next steps
- Ask the agent to search for “React styling policy” in a later session.
- Ask it to update the same record if the project changes direction.
- Run
python scripts/memoryctl.py verify --jsonto recheck integrity after maintenance or recovery.
Connects securely to your tools. The creator never sees your data.
About this skill
Codex永久记忆
Long conversations lose important context: the agent forgets a project’s coding standards, repeats resolved corrections, or cannot explain why an old rule is still active. Codex永久记忆 provides a controlled, local memory layer for explicit user-approved instructions, preferences, source-selection rules, and stable facts.
Why use it
- Durable: Rules survive new sessions without permanently bloating every prompt.
- Auditable: Each write, update, and revocation is recorded in a chained change ledger.
- Focused: The agent first searches the index and loads only records relevant to the current task.
- Controlled: Writes happen only after an explicit request to remember, update, revoke, search, or audit memory.
- Private by default: Records stay in
~/.codex/persistent-memory; no cloud database or account is required. - Safer: Secrets such as passwords, API keys, tokens, and private keys are rejected by the local helper and explicitly prohibited by the instructions.
What it does
- Stores human-readable Markdown records with stable IDs, scope, provenance, tags, and timestamps.
- Maintains
INDEX.md,sources.md, and an append-onlychanges.jsonlaudit log. - Searches existing records before writing to reduce duplicates and conflicting rules.
- Updates a record in place while preserving its stable ID and historical snapshots.
- Revokes obsolete rules without erasing the audit trail.
- Verifies record hashes, the index, and the change hash chain.
- Provides a recovery guide that preserves evidence when integrity checks fail.
Practical workflows
- At the start of a relevant session, read
INDEX.mdand load only the matching records. - When the user explicitly establishes a durable rule, search first, then create or update the narrowest applicable scope.
- When an instruction changes, update the same record and explain the change in the audit reason.
- When a rule is no longer valid, revoke it instead of deleting history.
- After batch maintenance or recovery, run
python scripts/memoryctl.py verify --jsonand require the integrity checks to pass.
The current prompt and higher-priority instructions always override stored memory. Memory clarifies durable user intent; it never expands authorization for purchases, deletion, account changes, publishing, or other consequential actions.
Compatibility
Requires Python 3 and an agent capable of reading and writing local files, such as Codex CLI or the Codex desktop app. Windows and Unix-style paths are supported. No external database, browser, or network connection is required for normal use.
Known limitations
Integrity hashes detect accidental drift and obvious tampering; they are not cryptographic identity authentication. Someone who controls the entire memory directory can recompute the chain. Store the published package SHA-256 or an independent version record when stronger provenance is required.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Agents & Orchestration.
Requires Python 3. Not for sensitive secrets. Does not provide cryptographic identity authentication; local users can modify the hash chain.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed 13 days ago
- Free with an Agensi account
- Software
Python 3
Permissions
Reads and writes only the local memory store under ~/.codex/persistent-memory (or a user-supplied root) and uses a local Python terminal command to maintain and verify Markdown records and the audit ledger. No browser, network, or external service access is required.