Skip to content
Back to skills

Hq Whoami

ASecurity

Show current HQ Cognito identity and session expiry.

  • 98 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 19, 2026
toolsgobash

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned November 26, 2026

npx -y skills add indigoai-us/hq-core --skill hq-whoami --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Hq Whoami?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Hq Whoami
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/indigoai-us-hq-whoami/badge)](https://www.skillsdirectory.com/skills/indigoai-us-hq-whoami)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: hq-whoami
description: Show current HQ Cognito identity and session expiry.
allowed-tools: Bash(hq:*), Bash(jq:*), Bash(cat:*), Bash(date:*), Bash(test:*)
---

# /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.

2. **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.

3. **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.

4. **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

- Reads identity and expiry through `hq whoami --json`; never prints token fields.
- Pool: shared HQ Identity.
- Does not refresh the token; for that, run `/hq-login` (it auto-refreshes
  if expired).

## See also

- `/hq-login` — sign in or refresh
- `/hq-logout` — sign out

Files in this skill

  • SKILL.md1.2 KB
  • agents/openai.yaml119 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in tools →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.