Use when managing a business's online review replies (Google, TripAdvisor, and more) via the starreview CLI - list unanswered reviews, draft replies in the o...
---
name: starreview
description: Use when managing a business's online review replies (Google, TripAdvisor, and more) via the starreview CLI - list unanswered reviews, draft replies in the owner's voice, submit them for the owner's approval, and report review KPIs. Requires STARREVIEW_API_KEY. The agent drafts; the human approves; StarReview publishes.
---
# StarReview agent CLI
StarReview drafts and submits review replies for local businesses. You (the agent) draft and submit; the owner's decision governs publishing; StarReview publishes. You can never post a reply yourself - no command for it exists.
## Setup
```bash
npm install -g @starreview/cli # or: npx @starreview/cli <command>
export STARREVIEW_API_KEY=sragt_...
```
The owner creates the key in their StarReview settings (Einstellungen -> Agent-Zugang) at https://www.starreview.ch/. The key covers ALL businesses the owner manages. No key yet? The `info` and `check` commands work without one - use `check` to show the owner their current response rate before they sign up.
Every command prints ONE JSON document to stdout. Success prints the payload; failure prints `{ "error": "<code>", "message": "..." }` with a non-zero exit. Parse stdout, branch on exit code.
## Workflow
```bash
starreview stats --days 30 # optional: how are the reviews doing
starreview reviews --limit 10 # unanswered reviews, each with .provider
starreview review <reviewId> # full text, language, existing drafts
starreview draft <reviewId> # StarReview drafts variants (owner's voice)
starreview submit <reviewId> --variant 1 # commit a draft for approval
starreview submit <reviewId> --variant 1 --text "..." # commit with your edit
starreview submit <reviewId> --text "..." # your OWN reply (always waits for a human)
```
- `reviews` accepts `--business <id>` (see multi-business below), `--location <id>`, `--provider <slug>`, `--limit <n<=50>`.
- `submit --post-at <ISO>`: StarReview will not post before that time.
- `draft` costs the owner nothing; only a PUBLISHED reply is billed (CHF 0.50).
## Multi-business
The key identifies the OWNER. If they manage several businesses, list-type commands return a picker instead of doing the work:
```json
{ "businesses": [{ "businessId": "...", "name": "..." }], "hint": "..." }
```
Check for this shape (`businesses` + `hint`) before treating a response as the answer, then re-run with `--business <id>`. Review-keyed commands (`review`, `draft`, `submit`) never return a picker - the review pins the business.
## Platforms are open-ended
Every review carries `provider` (`google`, `tripadvisor`, ...). The value set GROWS as StarReview activates platforms - never hardcode it, never reject an unknown value. What differs per platform is only the post-submit outcome, always signaled in the response itself:
- `autoScheduled: true` - the reply rides the owner's standing consent (unedited StarReview draft, positive review, consented business); StarReview posts it.
- `submitted: true` without scheduling - the reply waits in the owner's approval queue.
- `awaitingManualPost: true` + `platformListingUrl` - approved reply on a platform with no reply API (e.g. TripAdvisor): the OWNER posts it through that link. A distinct SUCCESS, not a failure - do not retry.
## Honesty rules (do not violate)
- Never claim a reply was posted. Say it was submitted for the owner's approval (or auto-scheduled on their standing consent when `autoScheduled` is true).
- Never present `awaitingManualPost` as posted; give the owner the link instead.
- Negative and sensitive reviews always wait for a human; every draft passes a sentiment check.
## Error codes
Refusals (do NOT blind-retry): `forbidden`, `posting_paywall` (owner must subscribe), `review_not_pending` (refresh the list), `free_quota_exhausted`, `not_editable`, `already_processed` (treat as success), `business_not_connected` (send the owner to onboarding).
Failures/limits: `missing_api_key` / `unauthorized` (fix the key), `invalid_arguments`, `not_found`, `variant_not_found` (re-run `draft`), `rate_limited_per_minute` (back off >=60s), `daily_draft_cap_exceeded` (stop for the day), `db_error` / `internal_error` (retry with backoff), `network_error`.
Rate limits: 20 calls/min per key; drafting ~25/day per business. Public: 10 calls/min per IP, `check` results cached ~30 days - never repeat for the same place.
## Compatibility promise
Changes are additive-only: new commands, optional flags, response fields, and `provider` values may appear in any minor version; nothing existing is removed or changes meaning without a MAJOR version bump. An agent written against this document keeps working.
don't have the plugin yet? install it then click "run inline in claude" again.
added explicit inputs section for api key and rate limits, broke procedure into numbered steps with clear input/output per command, extracted decision points for multi-business picker and platform-specific post outcomes, documented all error codes with retry guidance, added edge cases for empty results and draft cap exhaustion, clarified output contract with json structures per command, specified outcome signals for each workflow stage.
draft and submit review replies for local businesses. you draft and submit; the owner approves; starreview publishes. you cannot post replies yourself (no command exists for it).
use this skill when managing a business's online review presence across multiple platforms (google, tripadvisor, etc). you list unanswered reviews, generate reply drafts in the owner's voice, submit them for the owner's explicit approval, and track review metrics. the owner always controls publishing. starreview handles the actual post via their API or sends you a manual post link for platforms without APIs.
starreview CLI
npm install -g @starreview/cli or use npx @starreview/cli <command>STARREVIEW_API_KEY=sragt_... (owner creates this in starreview.ch settings under Einstellungen -> Agent-Zugang)info and check commands work without a key; use check to show the owner their current response rate before they sign uprate limits and quotas
check results cached ~30 days (do not repeat for the same location)external connection: starreview API
STARREVIEW_API_KEY{ "error": "<code>", "message": "..." } with non-zero exit codeprovider values) in minor versions; nothing existing is removed or changes meaning without a MAJOR version bumplist review stats (optional)
starreview stats --days 30fetch unanswered reviews
starreview reviews --limit 10 [--business <id>] [--location <id>] [--provider <slug>]reviewId, provider, rating, text, createdAtbusinesses + hint fields, you have a multi-business picker (see decision points); re-run with --business <id>retrieve full review details
starreview review <reviewId>generate reply draft(s)
starreview draft <reviewId>variants array (typically 2-3 reply options), each with variantId, text, sentiment analysisdaily_draft_cap_exceeded - stop for the daysubmit reply for approval
starreview submit <reviewId> --variant <n> OR starreview submit <reviewId> --text "..." OR starreview submit <reviewId> --variant <n> --text "..." [--post-at submitted: true, autoScheduled: true (if auto-posting on standing consent), or awaitingManualPost: true + platformListingUrl (manual platforms)awaitingManualPost: true + platformListingUrl - this is success, not failure; owner posts via the linkalready_processed error means reply was already submitted; treat as success (idempotent)interpret post-submit outcome
autoScheduled: true: starreview is posting the reply automatically (unedited draft, positive review, owner has standing consent); tell owner it will post at scheduled timesubmitted: true (no scheduling): reply is in owner's approval queue; owner must review and approve in starreview UI before postingawaitingManualPost: true: platform has no API (e.g. tripadvisor); owner must post via the platformListingUrl provided; this is not a system failuremulti-business handling
businesses (array of objects with businessId, name) + hint field, the owner manages multiple businesses--business <businessId>review, draft, submit) never return a picker (the review pins the business)api key present?
STARREVIEW_API_KEY is set and valid: proceed with authenticated commands (draft, submit, stats, full reviews list)STARREVIEW_API_KEY is missing or invalid: error missing_api_key or unauthorized; check env var, regenerate key in starreview.ch settingsinfo and check commands work without a key (useful for pre-signup diagnostics)platform-specific post outcome
autoScheduled: true: reply posts automatically; only inform, do not ask for additional actionsubmitted: true (no auto-scheduling): reply waits in owner's queue; ask owner to review and approve in starreview UIawaitingManualPost: true: platform has no reply API; display platformListingUrl and ask owner to post manually via that linkautoScheduled: true; always say "submitted for approval" otherwiseerror classification
forbidden, posting_paywall (owner must subscribe), review_not_pending (refresh the list), free_quota_exhausted, not_editable, business_not_connected (send owner to onboarding)missing_api_key, unauthorized (regenerate key)rate_limited_per_minute (back off 60+ seconds), db_error, internal_error, network_errorinvalid_arguments, not_found, variant_not_found (re-run draft), daily_draft_cap_exceeded (stop for the day)draft cap exhausted
daily_draft_cap_exceeded: the owner has hit ~25 drafts/day for this businessplatform growth
provider field values (e.g. google, tripadvisor) grow as starreview adds platformsall commands output exactly one JSON document to stdout. parse it as follows:
success response
{ "data": <payload>, ... } or direct payload (varies by command)reviews: array of review objects with reviewId, provider, rating, text, createdAt, businessId, locationreview: single review object with fullText, language, sentiment, provider, existingDrafts (if any), platform-specific fieldsdraft: object with variants array, each containing variantId, text, sentimentsubmit: object with submitted: true, optionally autoScheduled: true or awaitingManualPost: true + platformListingUrl, postId (if auto-posted), scheduledAt (if delayed)stats: object with reviewCount, responseRate, avgRating, sentimentBreakdown (counts by sentiment)check: object with business name, location, response rate, review count (cached ~30 days)error response
{ "error": "<code>", "message": "<human-readable text>" }no response / timeout
the user (owner) knows the skill worked when:
review list displayed: you show a list of unanswered reviews with counts and providers (e.g. "3 google, 2 tripadvisor")
draft(s) generated: you display 2-3 reply variants in the owner's voice, each labeled with sentiment and the variantId
reply submitted: after submit succeeds:
autoScheduled: true: message "your reply will post automatically on [date]"submitted: true: message "reply submitted to your approval queue; review it in starreview"awaitingManualPost: true: message "reply ready; post it here: [platformListingUrl]"no false claims: you never say "posted" unless autoScheduled: true; you always distinguish between "submitted for approval" and "auto-posted"
error handling transparent: on refusal errors (e.g. posting_paywall), you explain what the owner must do (subscribe, reconnect platform, etc.) without retrying blindly
multi-business flows work: if the owner manages multiple businesses, you show the picker and re-run with the chosen business id without error
rate limits respected: if you hit 20 calls/min, you wait 60+ seconds before the next batch and inform the owner of the pause
original author: starreview team at clawhub