Codex永久记忆

    1

    Store and audit explicit cross-session user rules locally, with readable Markdown records, provenance, and a tamper-evident change ledger.

    Free

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    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

    FieldResult
    Actionadd
    Pathrecords/react-styling-policy.md
    Stable IDMEM-20261104164252-b52199
    Kind / scopepreference / project
    Record SHA-2563c11ee6308e3ff8a93c44cb1c235a70b696a2a9f7d50f076762eb471c719c50b

    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 --json to 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-only changes.jsonl audit 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.md and 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 --json and 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. 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. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 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

    Terminal / Shell
    Read Files
    Write Files

    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.

    Listed13 days ago

    What's inside

    Frequently Asked Questions

    The skill first reads a compact local index and loads only records relevant to the current task. Explicit durable rules are stored as Markdown records, so later sessions can retrieve them without keeping every preference in the active prompt. Current prompts and higher-priority instructions still take precedence.

    The release includes SKILL.md, a Python 3 memory helper, record-schema and recovery references, and agent display metadata. It is offered free of charge and stores data locally; no cloud database or external account is required for normal use.

    No. Records and the audit ledger are local files under ~/.codex/persistent-memory by default. A user can also provide another local root for isolated testing or project-specific use.

    The skill instructions prohibit storing credentials, and memoryctl.py rejects content matching common private-key, API-key, token, and credential-assignment patterns. This is a defensive safeguard, not a complete data-loss-prevention system, so users should still avoid pasting secrets.

    Use Python 3 with an agent that can access local files, such as Codex CLI or Codex desktop. Windows and Unix-style paths are supported. No browser, network connection, or cloud service is required for normal operation.

    A system prompt is always present and can become bloated or lose important details. This skill keeps explicit durable rules in searchable local records, adds provenance, preserves update and revocation history, and can verify record hashes and the change chain.

    New in Agents & Orchestration

    Free