Opentrons Labworks Inc
Software for writing protocols and running them on the Opentrons Flex and Opentrons OT-2
翻譯準備中
🏋️ Evidence-based health, fitness & nutrition guidance for adults 50+ | Claude Code Agent with local context management
翻譯準備中
取自儲存庫 README
正在載入完整 README。 以下為已儲存的摘錄。
A Claude Code Agent definition for evidence-based, age-appropriate health, fitness, nutrition, and longevity guidance
for adults 50+. The agent works with local context files only and always recommends confirming advice with a healthcare
professional.檢視完整 README ↗A Claude Code and OpenCode Agent definition for evidence-based, age-appropriate health, fitness, nutrition, and longevity guidance for adults 50+. The agent works with local context files only and always recommends confirming advice with a healthcare professional.
/plugin install over-50s-health@ali5ter) or OpenCode (auto-discovered)This repository contains the agent definition and context templates for distribution. When installed via the plugin system, the agent is managed by Claude Code and your personal context files are stored in your home directory.
agents/
advisor.md # Claude Code agent definition (source)
context/
templates/ # Reference context templates
INITIAL_USER_INFORMATION.md
CLIENT_HEALTH_CONTEXT.md
CLIENT_PREFERENCES.md
SESSION_NOTES.md
SOURCES.md
SESSION_NOTES_ARCHIVE.md # On-demand narrative history
METRICS_LOG.csv # On-demand structured metrics for trend reports
history/ # Per-session history templates
INDEX.md
README.md
.claude-plugin/
plugin.json # Plugin manifest
hooks/
hooks.json # SessionStart, PreToolUse, SubagentStop + Stop hooks
hooks-handlers/
sync-templates.sh # Copies templates from plugin cache to ~/.claude/over-50s-health-advisor/templates/
guard-bash-scope.sh # Agent-scoped PreToolUse hook: scopes the advisor's Bash access
retain-session.sh # SubagentStop + Stop hook: persists session to Hindsight via hindsight-retain.py
check-retain-staleness.sh # SubagentStop + Stop hook: warns when on-disk history is not yet retained
.opencode/
agents/
health/
advisor.md # OpenCode agent definition (auto-discovered)
scripts/
hindsight-retain.py # MCP transport: retains documents into the health bank (idempotent manifest)
backfill-history.sh # One-off: ingest all history into Hindsight
migrate # Migration script for v2.x users
README.md
LICENSE
After installation, your personal context files are stored at:
~/.claude/over-50s-health-advisor/
context/ # Your personal context files (auto-created on first run)
├── INITIAL_USER_INFORMATION.md # core — read every session
├── CLIENT_HEALTH_CONTEXT.md # core — read every session
├── CLIENT_PREFERENCES.md # core — read every session
├── SESSION_NOTES.md # core — read every session (last ~2 entries)
├── SOURCES.md # core — read every session
├── INDEX.md # session index — read on demand
├── history/ # per-session history files
│ └── YYYY/YYYY-MM-DD.md # one file per session
├── METRICS_LOG.csv # analysis — read on demand
└── _legacy/ # pre-v4.0.0 archives (never deleted)
/model if preferredInside Claude Code, run:
/plugin marketplace add ali5ter/claude-plugins
/plugin install over-50s-health@ali5ter
The first time you start a health conversation, the agent automatically creates your context files at
~/.claude/over-50s-health-advisor/context/.
The agent ships project-local and is auto-discovered when OpenCode is opened from this project (or globally from
~/.config/opencode/agents/).
Project-local (recommended — no setup required):
health/advisor appears automatically under .opencode/agents/.Global install (use from any project):
mkdir -p ~/.config/opencode/agents/health
cp .opencode/agents/health/advisor.md ~/.config/opencode/agents/health/advisor.md
From an OpenCode session:
/agent health/advisorFrom Claude Code:
claude --agent over-50s-health:advisor/agent over-50s-health:advisorBoth Claude Code and OpenCode share the same context files:
~/.claude/over-50s-health-advisor/context/
Inside Claude Code, run:
/plugin uninstall over-50s-health@ali5ter
Project-local: nothing to remove — the agent lives in the project directory.
Global:
rm ~/.config/opencode/agents/health/advisor.md
Your personal context files are not removed. To delete them:
rm -rf ~/.claude/over-50s-health-advisor
If you previously installed via ./install.sh, run the migration script from this repo:
./migrate
This removes the old manually-installed agent file. Your context files are preserved. Then install via the appropriate platform commands above.
After installation, context files are automatically created at ~/.claude/over-50s-health-advisor/context/ on your
first conversation.
~/.claude/over-50s-health-advisor/context/INITIAL_USER_INFORMATION.md and CLIENT_PREFERENCES.md
with your information.CLIENT_HEALTH_CONTEXT.md and SESSION_NOTES.md current as new information is shared with the agent.SOURCES.md as a curated reference list (the agent will add sources; you can remove low-quality ones
and add high-quality evidence).METRICS_LOG.csv — a
structured, append-only record of every metric it has logged — instead of re-reading a year of session
notes. See context/README.md for details on METRICS_LOG.csv and SESSION_NOTES_ARCHIVE.md.The agent has Bash for local analysis: reading METRICS_LOG.csv and running your own health export scripts. A
PreToolUse hook (hooks-handlers/guard-bash-scope.sh, registered in hooks/hooks.json) scopes what it can
actually run: destructive commands (rm, mv, sudo, chmod, chown, dd, force-pushes) and network egress
(curl, wget, nc) are denied outright — everything else it allows outright or leaves to the normal permission
prompt.
Claude Code silently ignores hooks: set in a plugin agent's own frontmatter, so this hook is registered in the
plugin's hooks/hooks.json instead, which applies plugin-wide rather than to one agent. It self-scopes by
checking the agent_type field Claude Code passes it and is a no-op outside an active
over-50s-health:advisor session — it has no effect on your other Claude Code sessions.
The advisor can use Hindsight as an optional recall and reflection layer over your local history files. Hindsight must be self-hosted — it is not bundled in this plugin.
health bank configured in HindsightInstall Hindsight on your host machine. See Hindsight docs for installation instructions.
Configure the MCP server for your platform:
Claude Code (user scope):
claude mcp add --scope user hindsight-health <command>
OpenCode (user scope):
opencode mcp add --global hindsight-health <command>
Replace <command> with your Hindsight MCP server command (e.g. the Ollama-based endpoint).
The MCP server is restricted server-side to recall, reflect, and retain tools only.
Enable retention by writing the enable gate to ~/.hindsight/retain.env — the same
persistent-file pattern as the API key, set once and independent of how Claude Code is launched:
echo 'export HINDSIGHT_RETAIN_ENABLED=true' > ~/.hindsight/retain.env
The SubagentStop/Stop hook (hooks-handlers/retain-session.sh) sources that file and, when
enabled, delegates to scripts/hindsight-retain.py, which retains the session's history file into
the health bank over the MCP transport. It fails silently if Hindsight is unreachable. A sibling
hook, check-retain-staleness.sh, warns on session end when on-disk history has not yet been
retained (see Checking staleness below); it is offline and makes no network call.
Backfill existing history (one-time):
./scripts/backfill-history.sh
This ingests all history/ files, CONTEXT_ARCHIVE.md, _legacy/ archives, and
METRICS_LOG.csv rows into the Hindsight health bank. Retention runs over the MCP transport
(scripts/hindsight-retain.py) and keeps a local idempotency manifest at
~/.hindsight/retain-manifest.json; a first run seeds it from the bank, so re-runs skip what is
already present and add nothing new.
Options:
--host HOST — custom Hindsight host (default: 192.168.1.63)--dry-run — show what would be retained without sendingrecall to the Hindsight MCP server, a
small budget, a recent temporal window — querying the Client's recent sessions to surface what is
unresolved. Do not use an unbounded reflect (the slow synthesis call), which can return confident
but wrong facts; reserve reflect for genuine cross-session reasoning. Treat any recall result as a
lead, not a fact — cross-check against the core files. If Hindsight is unavailable, the agent falls
back to reading core files + the two most recent history entries.recall first and notes what
it checked in a History checked: line. If the MCP call fails, it falls back to INDEX.md + Grep.SubagentStop/Stop hooks delegate to hindsight-retain.py, which retains the
session file into the health bank over the MCP transport (skipping it if the manifest already has
it). If unreachable, the file on disk is untouched. A sibling hook, check-retain-staleness.sh,
warns on end when on-disk history is not yet retained.Files are always canonical. Hindsight is a layer on top — if it is unavailable, the agent degrades to the plain-file behaviour with no data loss.
Because retention can miss sessions or metric groups (a session end that never fired, a backfill run
before new sessions existed, a manifest not yet re-seeded), the check-retain-staleness.sh hook makes
that gap observable: on every SubagentStop/Stop it compares the local manifest against the on-disk
history/ files and METRICS_LOG.csv and warns (on stderr, non-blocking) when anything is not yet
retained. It is offline — it reads only the manifest and the local files, making no network call —
so it is safe on every session end. Run it on demand for the full list:
./hooks-handlers/check-retain-staleness.sh --report
The fix for any reported gap is idempotent — re-run ./scripts/backfill-history.sh, which skips what
is already retained and adds only what is missing. The check runs only when HINDSIGHT_RETAIN_ENABLED=true.
reflect on local models (e.g., qwen3.8:27b via Ollama) can produce confident factual errors.
v5.1.0 mitigates this at session start by orienting with a targeted recall instead and treating
the result as a lead to cross-check against the files; reserve reflect for genuine cross-session
synthesis, and always verify figures against the files.The health advisor agent is invoked automatically when you ask a health-related question in Claude Code. You can
also target it directly using the --agent flag:
claude --agent over-50s-health:advisor
This sets the agent as the preferred delegate for the session. Claude Code routes health and wellness queries to it automatically; for anything else, the default assistant responds.
Alternatively, just start Claude Code normally and ask a health question — the agent will activate based on your query.
Invoke from within an OpenCode session:
/agent health/advisor
Or just ask a health question — the agent activates based on your query's topic.
When you send your first message (even just "Hi"), the agent reads your context files and greets you with a brief summary of your current health focus. If context files are missing, it will create them and prompt you to fill in your initial information.
Once you've filled in your initial context files, you can begin interacting with the agent. Here are some ways to start:
Initial Engagement:
Direct Queries:
Specific Requests:
The agent will read your context files, provide evidence-based guidance with citations, and update your context files as you share new information.
The agent can be used hands-free from a phone or tablet using two Claude Code features:
Remote Control — continues a local Claude Code session on any device:
/remote-control to generate a session URL and QR code.Your computer must stay on and the session must remain open. See the Claude Code Remote Control docs for details.
Voice input — speak your queries instead of typing:
Run /voice in your Claude Code session to enable voice input. Hold the spacebar to speak,
release to send. Transcription is free and does not count against rate limits. Responses are
text-only; voice output is not yet available.
Combined, /remote-control and /voice let you speak health queries from your phone while
the agent reads and updates your context files on your computer in the background.
Available on Pro, Max, Team, and Enterprise plans.
MIT License, Copyright (c) 2026 Alister Lewis-Bowen.
--skip-legacy_legacy/