Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/jianzhichun/emergenpx agentmods add commands/jianzhichun/emerge/hubWrote 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/jianzhichun/emerge/hub)<a href="https://agentmods.dev/commands/jianzhichun/emerge/hub"><img src="https://agentmods.dev/badge/commands/jianzhichun/emerge/hub/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/jianzhichun/emerge/hub"><img src="https://agentmods.dev/badge/commands/jianzhichun/emerge/hub.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.00013 | $0.00726 |
| Opus 5 | $0.00006 | $0.00363 |
| Sonnet 5 | $0.00003 | $0.00145 |
| Haiku 4.5 | $0.00001 | $0.00073 |
Grade A, and why
hub 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 9d 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 — 62 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Manage the Memory Hub: first-time setup via natural language, or show sync status and resolve conflicts.
First-time setup (when not yet configured)
If icc_hub(action="list") shows configured: false, run the setup flow:
-
Collect information from the user (ask one question at a time):
- Remote URL — the git remote on their self-hosted server, e.g.
user@quasar:repos/emerge-hub.git - Branch name — default
emerge-hub(ask only if they want a custom name) - Author identity —
Name <email>, used for git commits - Which connectors to sync — call
icc_hub(action="list")to show what's available locally; ask the user to pick
- Remote URL — the git remote on their self-hosted server, e.g.
-
Initialize the hub:
icc_hub(action="configure", remote="<url>", author="<name> <<email>>", selected_verticals=["<connector1>", ...], branch="emerge-hub") # omit if using default- On success, the daemon saves config and initialises the git worktree.
- Report the result (
action: "created" / "cloned" / "already_exists").
-
Start the sync agent — tell the user to run this once in a terminal (and keep it running):
python scripts/emerge_sync.py runTip: they can background it with
nohup python scripts/emerge_sync.py run > ~/.emerge/sync.log 2>&1 & -
Verify — call
icc_hub(action="status")and confirmconfigured: true, no pending conflicts.
Ongoing status and conflict resolution
-
Check hub status — call
icc_hub(action="status").- Report: remote, selected connectors, queue depth,
pending_conflicts,awaiting_application.
- Report: remote, selected connectors, queue depth,
-
Pending conflicts — if
pending_conflicts > 0: For each conflict inconflicts:- Show:
connector,file,ours_ts_msvstheirs_ts_ms,ours_success_rateif present. - Ask the operator which version to keep:
- ours — keep local (no file change)
- theirs — overwrite with remote version (applied on next sync cycle)
- skip — leave file as-is, mark resolved
- Call
icc_hub(action="resolve", conflict_id="<id>", resolution="<choice>")for each conflict. - After all resolved: report
awaiting_applicationcount; sync agent applies on its next cycle, or the user can flush immediately:python scripts/emerge_sync.py sync.
- Show:
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.
- 9d ago First seen · 62 lines · 13 tokens per session scan A 2197062575f7
hub is a command published in the GitHub repository jianzhichun/emerge (107 stars, last pushed 4mo ago), licensed MIT. It adds 13 tokens to every session and 726 once invoked, about $0.0001 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-30.
Other commands, from other repositories
context
A project-context command that manages a .context directory containing decision notes, session logs, and history. It helps keep a record of why changes were made across Git branches and commits.
bm
Ask basemind anything about the current codebase — outlines, refs, callers, git history, blame, diffs, docs, memory.
context-load
Carga de contexto al inicio de sesión. Lee estado del workspace, decisiones recientes, último session save y actividad Git para arrancar con el big picture.
cache-invalidate
Invalidación selectiva de capas de caché con rollback seguro.
review-code
Read ALL memory bank code rules + best practices, check the files that changed, and APPLY fixes so they adhere. The active counterpart to /scan (which is read-only). Use after an AI session, before commit, to make changed files compliant.
vouch-propose-from-pr
Distill a merged PR into vouch claim proposals.