memory-bridge-operations
Operate and recover the Hermes-to-repo memory bridge: drift checks, quality gate, bridge commits, push verification, and stash recovery when pre-bridge scripts fail after generating outputs.
Best use case
memory-bridge-operations is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Operate and recover the Hermes-to-repo memory bridge: drift checks, quality gate, bridge commits, push verification, and stash recovery when pre-bridge scripts fail after generating outputs.
Teams using memory-bridge-operations should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/memory-bridge-operations/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How memory-bridge-operations Compares
| Feature / Agent | memory-bridge-operations | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Operate and recover the Hermes-to-repo memory bridge: drift checks, quality gate, bridge commits, push verification, and stash recovery when pre-bridge scripts fail after generating outputs.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Memory Bridge Operations
Use this skill when syncing Hermes memory into a git-tracked repo memory directory such as `.claude/memory/`, especially for scheduled jobs that must run autonomously and report bridge status.
## Standard Workflow
1. Enter the workspace-hub repo checkout (e.g. `$WORKROOT/workspace-hub`, where `$WORKROOT` holds your repo checkouts).
2. Run drift check:
```bash
bash scripts/memory/check-memory-drift.sh
```
- Exit 0: report `No drift — nothing to bridge` and stop.
- Exit 1: capture the drift/missing-entry count and continue.
3. Run the quality gate with auto-fix:
```bash
bash scripts/memory/pre-bridge-quality.sh --fix
```
4. Extract the quality score from `Score: NN/100`.
5. Report updated `.claude/memory/` files and line counts:
```bash
wc -l .claude/memory/agents.md .claude/memory/context.md .claude/memory/claude-auto-memory.md
find .claude/memory/topics -type f | wc -l
find .claude/memory/topics -type f -print0 | xargs -0 wc -l | tail -1
```
6. Verify drift is resolved:
```bash
bash scripts/memory/check-memory-drift.sh
```
7. Verify commit/push:
```bash
git log --oneline -1 --decorate --no-show-signature
git branch -r --contains HEAD
```
## Quality Gate Semantics
- Score `< 50`: abort; do not bridge degenerate memory.
- Score `50-70`: auto-compaction may run before bridging.
- Score `>= 70`: bridge can run directly; `--fix` may still compact files near limits.
## Recovery: pre-bridge stashed valid memory but exited nonzero
Observed pattern:
- `pre-bridge-quality.sh --fix` prints successful bridge generation:
- `agents.md generated`
- `context.md regenerated`
- `claude-auto-memory.md snapshot updated`
- topic files mirrored
- Then it says `Uncommitted changes detected — stashing before pull...` and creates `stash@{0}: On main: pre-bridge-stash`.
- The script exits nonzero after `nothing added to commit but untracked files present`, because unrelated untracked files prevented its internal commit path even though the bridge outputs are in the stash.
Safe recovery:
```bash
git stash list --date=local | head
git stash show --name-only stash@{0}
git checkout stash@{0} -- .claude/memory
bash scripts/memory/check-memory-drift.sh
git commit -m "chore(memory): bridge Hermes memory" -- .claude/memory
git push
bash scripts/memory/check-memory-drift.sh
```
Important constraints:
- Do **not** apply the whole stash; it may contain unrelated generated state, plans, reports, or other agents' work.
- Restore only `.claude/memory` for the memory bridge job.
- Leave unrelated untracked files untouched and mention them only as context.
- Final report should distinguish initial drift count from final verified drift state.
## Reporting Template
```markdown
Memory bridge completed.
- Initial drift check: <in sync|drift detected>
- Initial missing entries: <N>
- Quality score: <NN>/100
- Bridge result: <completed|aborted|recovered from stash>
- Final drift recheck: <in sync|still drifted>
Files updated / final line counts:
| Path | Lines |
|---|---:|
| `.claude/memory/agents.md` | <N> |
| `.claude/memory/context.md` | <N> |
| `.claude/memory/claude-auto-memory.md` | <N> |
| `.claude/memory/topics/` | <N files, total lines> |
Commit / push:
- Commit: `<hash> <subject>`
- Push: <succeeded|failed>; `<remote>` contains HEAD: <yes|no>
```
## Pitfalls
- The script output may be partially successful even when the final exit code is nonzero; inspect stashes before declaring failure.
- Drift count can increase after compaction because compacted memories may expose entries not represented in repo memory yet; report both initial and final verified states when relevant.
- Scheduled jobs cannot ask for clarification. Make a narrow, reversible recovery decision and verify with drift check plus remote containment.Related Skills
hermes-memory-bridge
Architecture and scripts for syncing Hermes memory into git-tracked .claude/memory/ so all machines get context via git pull. Covers quality gate, drift detection, topic mirroring, and cron automation.
bridge-brokerage-market-data-apis
Handle ticker symbol mismatches between brokerage exports and market data APIs
github-issue-lifecycle-operations
Class-level GitHub issue lifecycle operations: issue creation, planning/execution routing, labels, evidence fields, roadmap anchors, closeout races, and visual planning.
gmail-operations
Class-level Gmail and email operations: multi-account setup, OAuth, triage, extraction, archiving, attachments, unsubscribe, and touchbase workflows.
memory-bridge-operation
Manage the Hermes ↔ repo memory sync system — bridge, quality gate, compaction, health checks, and cron
memory-bridge-commit-fallbacks
Fallback procedures when the Hermes ↔ Codex memory bridge writes .Codex/memory outputs but the internal git commit/push path fails because of dirty, stale, or broken submodule state.
agent-memory-bridge
Bidirectional sync between Hermes memory and Codex auto-memory, with licensed machine bootstrap. Use when context parity across agents is needed.
memory-management
Two-tier memory system for decoding workplace shorthand, acronyms, nicknames, and internal language.
agent-cli-delegation-operations
Class-level Codex/Codex/delegate_task agent operations: background execution, stdin/print stalls, plugin IDs, worker patch loops, and fallback routing.
provider-session-quota-operations
Class-level provider/session operations for Codex, Codex, Gemini, Hermes, quotas, audit exporters, readiness dispatch, and utilization scorecards.
state-directory-manager-4-state-file-operations
Sub-skill of state-directory-manager: 4. State File Operations.
git-sync-manager-5-safe-branch-operations
Sub-skill of git-sync-manager: 5. Safe Branch Operations.