Getting it into your agent
This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.
/plugin marketplace add zhangfengcdt/memoir/plugin install memoirWrote 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.
[](https://agentmods.dev/commands/zhangfengcdt/memoir/push)<a href="https://agentmods.dev/commands/zhangfengcdt/memoir/push"><img src="https://agentmods.dev/badge/commands/zhangfengcdt/memoir/push/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.
<a href="https://agentmods.dev/commands/zhangfengcdt/memoir/push"><img src="https://agentmods.dev/badge/commands/zhangfengcdt/memoir/push.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00040 | $0.01221 |
| Opus 5.5 | $0.00016 | $0.00488 |
| Sonnet 5.5 | $0.00008 | $0.00244 |
| Haiku 4.5 | $0.00004 | $0.00122 |
Grade A, and why
push 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 12d ago.
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.
How it starts
The opening of the file, as written. The whole thing — 56 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Push this repo's memoir branches to memoir cloud. Current state (JSON from the backing script):
!bash "${CLAUDE_PLUGIN_ROOT}/scripts/push-cmd.sh" plan 2>&1
Arguments passed by the user (may be empty): $ARGUMENTS. --force means: a branch the cloud has moved ahead of is overwritten (its cloud tip is kept locally under refs/memoir/backup/<branch> first). Without it, such a branch is pushed under another name to merge by hand.
Every call below is bash "${CLAUDE_PLUGIN_ROOT}/scripts/push-cmd.sh" <subcommand> …. Never run memoir yourself. Never print an API key.
Step 0 — Triage
- Output starts with
ERROR:or is not JSON: reply[mode=error]and the message. Stop. branchesis empty: reply[mode=nothing]— "No memoir branch to push." (mentionskipped_mergedif non-empty). Stop.
Step 1 — Log in if needed
If logged_in is false and remote is null, first ask with AskUserQuestion (header "Memoir cloud") how to proceed. This question is where the user's permission for an agent account is captured; never create one without it:
Create an agent account for this repo (Recommended)— "No login is needed. The cloud provisions a throwaway account that owns one store for this repo; the token stays with this repo's memoir store. The store is capped (5 branches, 2,000 memories per branch) and deleted after 30 idle days;memoir claimlater moves it into your own account." On yes, runlogin-agent. Onlogged_infalse in its answer, report itserrorand fall through to the browser login below. Otherwise reportagent account <handle> owns <address> (capped at <limits.branches> branches, <limits.keys> memories per branch; deleted after <idle_days> idle days —memoir claimmoves it to your account), treat the store as linked, and go to Step 3.Sign in with my own account— the browser login below.
Browser login (also when logged_in is false but remote is set):
- Run
login-start. Ifstartedis true, tell the user: "Open and enter to approve this machine", then runlogin-wait 240(one Bash call; it returns as soon as the approval lands). - If
startedis false, orlogin-waitreportslogged_in: false: ask with AskUserQuestion (header "Memoir login") whether to paste an API key. On yes, ask for the key (they may paste it as the Other text), then runlogin-keywith the key on stdin:printf '%s' '<key>' | bash … login-key. Never repeat the key back. - Still not logged in: reply
[mode=error]with "Not logged in to memoir cloud; runmemoir loginin a terminal." Stop.
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.
- 12d ago Changed · +5 lines c06bbdf43cf3
- 15d ago First seen · 51 lines · 40 tokens per session scan A 6c46a7778a3a
push is a command published in the GitHub repository zhangfengcdt/memoir (625 stars, last pushed today), licensed Apache-2.0. It adds 40 tokens to every session and 1,221 once invoked, about $0.0002 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-10-12.
Other commands, from other repositories
merge-conflict-analysis
You are analyzing merge conflicts for PR #${{ pr-number }}.
release-notes
Generate consistent, well-structured release notes from git history. Triggered on release tags following semver patterns (v..) to produce categorized changelog with breaking changes, features, fixes, and contributor attribution.
commit
A command that examines staged Git changes and proposes a commit message using the Conventional Commits format, such as feat, fix, or docs. Git is a tool for tracking changes to code.
repo-audit
Audit a codebase (local or remote GitHub/GitLab) against architecture principles and requirements, surfacing drift, risk, and missing decisions.
pr
Handle the full workflow from current branch state to an open, CI-monitored pull request.
release-plan
A release-planning command for a software change. It documents the release scope, rollback plan, gradual or full rollout, and monitoring before waiting for human approval.