Hq whoami

From indigoai-us/hq-core · View interactive version

Hq whoami is an AI agent skill from the GitHub repository indigoai-us/hq-core. Show current HQ Cognito identity and session expiry.

How to use this skill

Skill file

/hq-whoami — HQ Cognito identity

One-liner status: who is signed into the local HQ Cognito session, and how

long the cached access token has left. Read-only — touches nothing.

Steps

  1. Probe — test -f ~/.hq/cognito-tokens.json. If absent, print

"Not signed in. Run /hq-login." and exit 0.

  1. Status — hq whoami --json for cached identity. Inspect .authenticated; exit 0 alone does not prove a valid session.

If false, hint that /hq-login can refresh or sign in.

  1. Identity and expiry — use the identity fields and .sessionExpiresAt from

hq whoami --json. Use .sessionExpiring as the renewal hint. If expiry is null,

report that it is unavailable; do not read the token file.

  1. Format — collapse to one line:

signed in as <email> (sub <id-prefix>…) — expires in <Xh Ym>.

If expired: signed in as <email> — token EXPIRED, run /hq-login.

Notes

if expired).

See also

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.