From 999cc981c1302aa71d7d38dd71f87d6e91136ba5 Mon Sep 17 00:00:00 2001 From: Edmon Marine Clota Date: Tue, 17 Mar 2026 11:38:07 +0100 Subject: [PATCH] docs: add logout and auth status checking to SKILL.md Document the `optibot logout` command for removing saved credentials and add a section for checking authentication status by inspecting the config file and environment variable. Update allowed-tools in frontmatter to permit the necessary bash commands for status checks. --- skills/optibot/SKILL.md | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/skills/optibot/SKILL.md b/skills/optibot/SKILL.md index a7bac8f..e26f41a 100644 --- a/skills/optibot/SKILL.md +++ b/skills/optibot/SKILL.md @@ -1,7 +1,7 @@ --- name: optibot description: Run AI code reviews with Optibot. Use when the user wants to review code changes, compare branches, review diffs, manage Optibot authentication or API keys, or set up CI/CD integration. -allowed-tools: Bash(optibot *), Bash(which optibot), Bash(npm install -g optibot), Bash(npm install optibot), Bash(npx optibot *) +allowed-tools: Bash(optibot *), Bash(which optibot), Bash(npm install -g optibot), Bash(npm install optibot), Bash(npx optibot *), Bash(cat ~/.optibot/config.json), Bash(test -f ~/.optibot/config.json *), Bash(echo $OPTIBOT_API_KEY) --- # Optibot - AI Code Review from the Terminal @@ -52,6 +52,34 @@ optibot apikey list # See all keys with creation/last-used dates optibot apikey delete ID # Revoke a key by its ID ``` +## Logout + +To remove saved credentials from the local machine: + +```bash +optibot logout +``` + +This deletes the stored token from `~/.optibot/config.json`. After logging out, the user must run `optibot login` or set `OPTIBOT_API_KEY` before running reviews again. + +## Checking Auth Status + +To check whether the user is currently authenticated, verify the config file: + +```bash +test -f ~/.optibot/config.json && cat ~/.optibot/config.json +``` + +If the file exists and contains a valid `apiKey` or `token` field, the user is authenticated. If the file is missing or empty, they need to log in. + +You can also check for the environment variable: + +```bash +echo $OPTIBOT_API_KEY +``` + +If neither the config file nor the environment variable is set, prompt the user to authenticate (see [Authentication](#authentication)). + ## Running Reviews There are three modes. Pick the right one based on what the user wants reviewed.