Preface¶
Running OpenCode on devices like SmartPi (ARM64 with often only about 2 GB of free space) commonly leads to problems such as: after starting a new conversation round, the assistant does not remember the previous configuration, troubleshooting conclusions, or in-progress tasks; there is no stable local backup, so an abnormal interruption can easily cause progress loss. Merely pasting chat records into notes takes up space and makes it difficult for the Agent to restore context in a fixed structure.
Below we introduce SmartPi Memory Guardian on SkillHub (package name opencode-lingxin-memory, v1.0.0). It uses the ~/.opencode-memory/ directory to store Markdown files and a JSON index, and synchronizes with remote repositories on Gitee (or GitHub) via Git, providing memory persistence tailored for low-resource environments. SkillHub categorizes it under ai-agent, with approximately 480 downloads and a rating of 100000 (as shown on the platform).
What Is This¶
SmartPi Memory Guardian is an Agent Skill based on a generic SKILL.md: it guides OpenCode-like assistants to read long-term memory and the daily log at the start of a session, and to run a sync script at the end of the session, committing changes to version control and pushing them to the remote.
- Maintainer: The Skill metadata author is
zmrobo; the same package can be installed via the SkillHub namespaceindiv-zhangwei. - Official registration URL: https://api.skillhub.cn/user_a5827f21/opencode-lingxin-memory
Note: This API URL may not return content when fetched directly; the page at https://www.skillhub.cn/skills/user_a5827f21/opencode-lingxin-memory currently displays “Skill not found”. Before installation, you can runskillhub search opencode-lingxinto confirm whether@indiv-zhangwei/opencode-lingxin-memorycan still be resolved. - License: MIT.
Core Features¶
According to _meta.json and SKILL.md in the Skill package, the declared capabilities include:
- Cross-session memory persistence: Long-term content is written to
MEMORY.md, daily content toYYYY-MM-DD.md, with navigation and timelines provided byINDEX.md,memory_index.json, andproject_timeline.json. - Git version control: The memory repository directory initializes a Git repo for easy rollback and comparison.
- Gitee cloud backup sync:
sync.shcommits and synchronizes after a conversation ends (you need to configuregit remoteyourself). - Lightweight design: Metadata indicates at least about 100 MB free space required; target platforms are SmartPi / ARM64, Debian 10, and compatible systems.
- Dependencies:
git,bash; a Gitee or GitHub account is required for the remote.
Installation and Activation¶
Installation has two layers: installing the Skill into the Agent (so the model follows the instructions for operating the memory repository) and deploying the memory repository on the device (install.sh).
1. Install the SkillHub CLI (if not already installed)¶
Check the CLI according to the official SkillHub instructions; if not installed, run the full installation script:
command -v skillhub && skillhub --version
curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash
Docs: https://skillhub.cn/install/skillhub.md
2. Install the Skill into the current Agent’s skills directory¶
When installing, you must use --dir to point to the skills path recognized by the current client; otherwise, it defaults to ./skills/ and may not be loaded. Common path examples:
- Cursor:
~/.cursor/skills/ - Codex:
~/.codex/skills/or.agents/skills/under the project - Claude Code:
~/.claude/skills/
In the 2026-10-22 environment, the following command successfully pulls the Skill package (use the namespace resolved by the CLI):
skillhub install opencode-lingxin-memory --namespace indiv-zhangwei --dir ~/.cursor/skills/
You can also let the Agent install according to SkillHub prompts (the documentation template installs @user_a5827f21/opencode-lingxin-memory; if that namespace fails to resolve, use indiv-zhangwei above).
3. Initialize the memory repository on SmartPi¶
The Skill package includes install.sh, which copies templates to ~/.opencode-memory/ and initializes Git. The example path in SKILL.md is from the author’s environment; in practice, you should enter the installed Skill directory before running:
cd ~/.cursor/skills/@indiv-zhangwei/opencode-lingxin-memory
./install.sh
Configure a Gitee remote and push for the first time:
cd ~/.opencode-memory
git remote add origin https://gitee.com/your-username/repo.git
git push -u origin master
Replace your-username/repo with your own remote; if using GitHub, replace it with the corresponding HTTPS URL.
Typical Usage¶
The following flow comes from the Skill package’s SKILL.md and README.md; replace 2026-04-30.md with the current day’s date file as needed.
Start a new conversation—restore context:
cat ~/.opencode-memory/MEMORY.md
cat ~/.opencode-memory/2026-04-30.md
The README.md also suggests reading ~/.opencode-memory/README.md at the start.
End the conversation—sync memory:
~/.opencode-memory/sync.sh
Daily maintenance (optional):
cd ~/.opencode-memory && git status
grep -r "keyword" ~/.opencode-memory/
du -sh ~/.opencode-memory/
After enabling the Skill, the Agent should actively read/update the above files at appropriate points, rather than relying only on manual cat; manual commands are suitable for troubleshooting or scenarios without Agent involvement.
Use Cases and Notes¶
Who it’s for
- Developers using OpenCode on SmartPi or similar ARM64, Debian devices who need to retain system configurations, resolved issues, and daily work logs across sessions.
- Teams that want off-site backups via Git + Gitee but do not want to deploy heavyweight memory services on the device.
Limitations and cautions
- Page and API status: The registration URL and the SkillHub detail page may temporarily be inaccessible; treat whether
skillhub installsucceeds as the decisive factor. - Space and paths: The example install path
/home/zmrobo/Projectcomes from documentation examples; do not copy it verbatim. The memory repository is fixed at~/.opencode-memory. - Remote and branch:
git push -u origin masterfollows the Skill docs; if the remote’s default branch ismain, adjust according to the repository settings. - Skill vs. memory repository: If you install the Skill but do not run
install.sh,~/.opencode-memorymay not exist and the sync script cannot be used. - With clients like Cursor: This article only lists the skills paths from SkillHub documentation; after installation, you still need to restart or refresh the Skill list per each client’s rules.
Conclusion¶
SmartPi Memory Guardian consolidates “long-term memory + daily logs + Git sync” into a single set of directory conventions and sync.sh, making it suitable for providing cross-session context to OpenCode on low-resource boards. Installation and metadata are governed by SkillHub and the package’s SKILL.md; official registration URL:
https://api.skillhub.cn/user_a5827f21/opencode-lingxin-memory