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

Apache-2.0Auto-check passedBackend & APIs

Install Ghealth Shared

skills CLI
$ npx skills add Google-Health-API/google-health-cli --skill ghealth-shared -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Google-Health-API/google-health-cli ghealth-shared --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Google-Health-API/google-health-cli.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/ghealth-shared .claude/skills/ghealth-shared && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
ghealth-shared
GitHub stars
266
Token cost
~1.7k tokens
SKILL.md length
584 words
Files
1
Skills in repo
2
Repo updated
First seen
Licence
Apache-2.0

At a glance

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

  • Backend & APIs work in your project
  • SKILL.md covers Setup, Files written, Authentication and Bootstrap recipes for agents, plus 4 more sections
  • Calls jq; reaches console.cloud.google.com; needs GHEALTH_ACCESS_TOKEN

What it does

Ghealth Shared is an agent skill from Google-Health-API/google-health-cli. Shared prerequisites for all ghealth skills — auth, setup, global flags, command structure

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Backend & APIs. It works with Google Cloud. The repository describes itself as: Google Health CLI — one command-line tool for the Google Health API. Includes AI agent skills. The licence is Apache-2.0.

When your agent uses it

  • Backend & APIs work in your project

Example prompts

  • “/ghealth-shared”

Requirements

  • A credential in GHEALTH_ACCESS_TOKEN

What it can do on your machine

Read from SKILL.md and the folder at commit 9cf0274. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • jq

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • console.cloud.google.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • GHEALTH_ACCESS_TOKEN

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Ghealth Shared loads about 1.7k tokens when it runs. Until then it costs about 26 tokens; SKILL.md has 584 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~26
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Google-Health-API/google-health-cli at commit 9cf0274, republished under its Apache-2.0 licence (© Google-Health-API). 584 words, ~1,717 tokens.

Download SKILL.mdSave it as .claude/skills/ghealth-shared/SKILL.md (or your agent's skills folder).
name
ghealth-shared
description
Shared prerequisites for all ghealth skills — auth, setup, global flags, command structure

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
Show full SKILL.md (252 more words)Show less

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)

© Google-Health-API, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/ghealth-shared of Google-Health-API/google-health-cli.

Open the folder on GitHubat commit 9cf0274

Compare with similar skills

Ghealth Shared next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Ghealth Shared compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Ghealth Shared this skillGoogle-Health-API/google-health-cli266—~1.7kAutomated safety check: PassApache-2.0
Windmill Trigger Type Checklistwindmill-labs/windmill18k—~4.7kAutomated safety check: PassCustom licence
Polylith Base CreationDavidVujic/python-polylith554—~757Automated safety check: PassMIT
Liveapi ServiceGoogleCloudPlatform/vertex-ai-samples792—~1.2kAutomated safety check: PassApache-2.0
Serverless IntegrationsDataDog/dd-trace-js837—~1.1kAutomated safety check: PassCustom licence
Interactive Loginyc-software/qm15k—~635Automated safety check: PassMIT

Similar skills

  • Windmill Trigger Type Checklist

    windmill-labs/windmill

    Checklist of every backend, frontend, CLI and capture change needed to add a new TriggerCrud-based trigger type, such as Azure, GCP or Kafka, to Windmill.

    18k GitHub stars~4.7k tokensUpdated today
    Backend & APIsAuto-check passed
  • Polylith Base Creation

    DavidVujic/python-polylith

    Create a Polylith base with poly create base — the entry point of a deployable application (HTTP API, CLI, message-queue consumer, AWS Lambda handler, GCP Cloud Function, scheduled job).

    554 GitHub stars~757 tokensUpdated 6 days ago
    Backend & APIsAuto-check passed
  • Liveapi Service

    GoogleCloudPlatform/vertex-ai-samples

    Generates a LiveAPI client service class in the user's chosen programming language.

    792 GitHub stars~1.2k tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Serverless Integrations

    DataDog/dd-trace-js

    Official

    A skill your agent uses when adding, modifying, debugging, or reviewing dd-trace-js serverless platform integrations that create root invocation spans for AWS Lambda, Azure Functions, Google Cloud…

    837 GitHub stars~1.1k tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Interactive Login

    yc-software/qm

    Log a CLI in with a browser/device-code flow (aws sso, gh, glab, gcloud, …) and save the result to the keychain so later commands can request it through execute.credentials.

    15k GitHub stars~635 tokensUpdated today
    Backend & APIsAuto-check passed
  • GCP Cloud Run

    davila7/claude-code-templates

    Specialized skill for building production-ready serverless applications on GCP.

    33k GitHub starsUsed in 7 repos~1.7k tokens
    Backend & APIsAuto-check passed

More from Google-Health-API/google-health-cli

  • Ghealth

    Google-Health-API/google-health-cli

    Query Google Health API v4 — steps, heart rate, exercise, sleep, weight, SpO2, HRV, ECG, blood glucose, nutrition, and 40 total data types

    266 GitHub stars~2.3k tokensUpdated 3 mo ago
    Auto-check passed

Works with

Categories

Questions about Ghealth Shared

What does Ghealth Shared do?

Shared prerequisites for all ghealth skills — auth, setup, global flags, command structure. Ghealth Shared is an agent skill from Google-Health-API/google-health-cli.

When should I use Ghealth Shared?

Ghealth Shared fits situations like: backend & APIs work in your project.

How do I install Ghealth Shared in Claude Code?

Run `npx skills add Google-Health-API/google-health-cli --skill ghealth-shared -a claude-code`. Or copy the skill folder (skills/ghealth-shared in Google-Health-API/google-health-cli) into .claude/skills/ghealth-shared in your project. Claude Code loads it when a task matches its description.

How do I install Ghealth Shared in Codex?

Run `npx skills add Google-Health-API/google-health-cli --skill ghealth-shared -a codex`. Or copy the skill folder (skills/ghealth-shared in Google-Health-API/google-health-cli) into .agents/skills/ghealth-shared in your project. Codex loads it when a task matches its description.

Can I use Ghealth Shared in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Google-Health-API/google-health-cli --skill ghealth-shared -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ghealth-shared, .gemini/skills/ghealth-shared, .github/skills/ghealth-shared and .opencode/skills/ghealth-shared in your project.

What does Ghealth Shared need to run?

Going by SKILL.md and its folder, Ghealth Shared needs the command-line tools its instructions call (jq) and credentials named GHEALTH_ACCESS_TOKEN. Our summary lists: A credential in GHEALTH_ACCESS_TOKEN.

Does Ghealth Shared access the network?

SKILL.md names 1 domain. In commands or code: console.cloud.google.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Ghealth Shared safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Ghealth Shared use?

Ghealth Shared is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Ghealth Shared use?

About 1.7k tokens (SKILL.md is roughly 6.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Ghealth Shared?

Skills that share tags, products or a category with Ghealth Shared: Windmill Trigger Type Checklist (windmill-labs/windmill, 18k stars), Polylith Base Creation (DavidVujic/python-polylith, 554 stars), Liveapi Service (GoogleCloudPlatform/vertex-ai-samples, 792 stars) and Serverless Integrations (DataDog/dd-trace-js, 837 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Ghealth Shared?

Google-Health-API (a GitHub organization) maintains it in Google-Health-API/google-health-cli, which has 266 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on July 10, 2026.

Source: Google-Health-API/google-health-cli on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.