Ghealth Shared logo

Ghealth Shared

Organization
Google-Health-API
ghealth-shared

Shared prerequisites for all ghealth skills — auth, setup, global flags, command structure

Overview

PublisherGoogle-Health-API
Repositorygoogle-health-cli
Skill nameghealth-shared
Stars
273
Forks
30
Bundled files
Instructions only
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by Google-Health-API on GitHub. Read the source before you install it.

Installation

Install the Ghealth Shared AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/Google-Health-API/google-health-cli/tree/main/skills/ghealth-shared
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Google-Health-API/google-health-cli.git /tmp/google-health-cli
mkdir -p .claude/skills
cp -r /tmp/google-health-cli/skills/ghealth-shared .claude/skills/ghealth-shared
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Ghealth Shared in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Ghealth Shared on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Ghealth Shared is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

ghealth — Shared Prerequisites

Setup

bash
ghealth setup                       # interactive wizard, run once

Six steps: GCP project ID, OAuth client_secret JSON (Desktop application), Health API enable, scope selection, browser-based OAuth, save profile.

Scriptable (skips prompts):

bash
ghealth setup \
  --project-id my-project \
  --client-secret ~/Downloads/client_secret_123.json \
  --scopes-preset readonly \
  --skip-enable-api \
  --no-prompt

Add --non-interactive-auth to skip the browser step and finish later with ghealth auth login --complete <code>.

Files written

All under ~/.config/ghealth/ (override with GHEALTH_CONFIG_DIR):

FileContentsMode
client_secret.jsonYour GCP OAuth client0600
credentials.jsonAccess + refresh tokens (plaintext JSON)0600
pending_auth.jsonIn-progress non-interactive flow state0600
config.tomlActive profile (project, scopes, format)0600

Authentication

MethodUsage
Stored credentialsghealth auth login (default after setup)
Headless (no browser)ghealth auth login --non-interactive → click URL → ghealth auth login --complete <code>
Move tokens between machinesghealth auth export > creds.json → on target: ghealth auth import --file creds.json
Access token (no refresh)export GHEALTH_ACCESS_TOKEN=ya29...
Credential fileexport GHEALTH_CREDENTIALS_FILE=/path/to.json
ADC (GCP envs)Automatic if available

Precedence: env token > credential file > stored > ADC. Refresh tokens are persisted in credentials.json and refreshed automatically (1h access-token lifetime); a 401 from the API force-refreshes once before erroring.

Check: ghealth auth status. Exit codes:

  • 0 — locally configured; does not make a network call. Expired stored tokens still exit 0 — the JSON reports authenticated: false / expired: true
  • 2 — client_secret.json present but no stored tokens (credentials.json missing); run ghealth auth login
  • 5 — no client_secret.json at all; error carries next_steps[] for bootstrap (see below)

Add --validate to verify the access token against Google's tokeninfo endpoint. Without it, env-token / credentials-file modes report configured: true but never claim authenticated: true — presence of a token doesn't prove validity. With --validate, the response includes authenticated, expires_in, and scope from Google.

Bootstrap recipes for agents

Fetch the OAuth client_secret checklist (no failing call needed):

bash
ghealth setup --instructions
# → exit 0, JSON on stdout with status: "instructions" and next_steps[].
# Same six steps an auth error would emit when no client_secret.json is configured:
#   1. Open https://console.cloud.google.com/apis/credentials
#   2. Create or select a Google Cloud project
#   3. Enable the Google Health API
#   4. Create OAuth client ID with Application type: Desktop app
#   5. Download the client_secret JSON
#   6. Run: ghealth setup --client-secret /path/to/client_secret.json

The identical next_steps array is also embedded in every error path where a missing client_secret.json blocks progress: auth login (all modes including --complete), auth status, auth refresh, auth export, setup --no-prompt. Agents should jq -e '.error.next_steps' and relay verbatim.

Fresh install on a workstation (has browser):

bash
ghealth setup    # one interactive run; refresh handles itself afterwards

Fresh install on a headless host (no browser):

bash
ghealth setup --project-id $P --client-secret $CS \
              --scopes-preset readonly --skip-enable-api \
              --no-prompt --non-interactive-auth
# stdout prints status: "setup_pending_auth" + an auth_url on stderr
# human clicks the URL on any browser → URL bar shows ?code=... ; agent copies it
ghealth auth login --complete <code>

Mount tokens into a container / second worker:

bash
# on authenticated host:
ghealth auth export > /secrets/ghealth-creds.json
# in the container (with the same client_secret.json available):
ghealth auth import --file /secrets/ghealth-creds.json

Command Structure

ghealth data <type> <operation> [flags]
ghealth user <subcommand>
ghealth schema <subcommand>
ghealth webhooks <subcommand>

user subcommands: identity, profile get|update, settings get|update, irn-profile, paired-devices list|get --id <id>.

webhooks subcommands: subscribers list|create|update|delete, subscriptions list|create|update|delete --subscriber <id>, verify --url <url>. Requires the cloud-platform scope (ghealth auth login --scopes cloud-platform) and a configured project ID. These are project-level push-notification endpoints; the authenticated identity also needs Health API subscriber IAM permissions on the project.

Global Flags

FlagEffect
--format json|table|csvOutput format (default: json)
-o <file>Write data to file; stdout shows only column schema + 3-row preview (not the data)
--rawBypass response simplification, return original API JSON
--dry-runPrint HTTP request without executing
--profile <name>Use named config profile

list also accepts: --limit N (max total results, default 500), --from, --to, --filter, --page-token (resume from a prior response's nextPageToken), --detail (sleep).

Discovery

bash
ghealth schema types              # All types + supported operations
ghealth schema type <name>        # Fields, parameters for one type
ghealth data <type> --help        # Available operations
ghealth data <type> list --help   # Flags for an operation

Output

  • Responses are simplified by default: flat timestamps with UTC offset, compact source, no empty fields
  • JSON output always has the same shape for every read (list, get, rollup, daily-rollup, reconcile): an object {"dataPoints": [...]}, with optional _hints and nextPageToken. The rows are always under dataPoints — even for rollups and empty results — so json.load(out)["dataPoints"] always works
  • --raw returns the full API response
  • --format csv outputs flat CSV; nested objects are auto-flattened to dot-separated columns (e.g., metricsSummary.caloriesKcal)
  • -o <file> writes data to the file and prints only a summary to stdout (row count, column names, 3-row preview). Use this instead of piping (> file) — piping gives you the file but no schema on stdout
  • Errors always JSON on stderr, exit codes 0-5
  • Timestamps include user's timezone offset (e.g., +01:00)

Frequently asked questions

What does the Ghealth Shared AI skill do?

Shared prerequisites for all ghealth skills — auth, setup, global flags, command structure

Why use Ghealth Shared on TypingMind?

Because you install it once and use it with any model. Ghealth Shared is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Ghealth Shared in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/Google-Health-API/google-health-cli/tree/main/skills/ghealth-shared. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Ghealth Shared?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Ghealth Shared?

As many as you like. As long as a model supports skills, you can use Ghealth Shared with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Ghealth Shared AI skill free?

Yes. It is published on GitHub by Google-Health-API under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇