# Local agent instructions

## Grok research assistance

- The local `grok` command is installed and authenticated. Use Grok as a supplementary research tool when it materially improves the answer, especially for current X/Twitter posts, threads, account activity, reactions, and emerging information that ordinary web search may miss.
- For read-only automated research, prefer:
  `grok -p '<prompt>' --output-format json --max-turns 6 --permission-mode dontAsk --cwd /tmp`
- Explicitly tell Grok to use X/Twitter search when needed. Ask for dates, handles, direct `x.com/.../status/...` URLs, and a clear separation of retrieved facts from inference. Include relevant account or date constraints in the prompt.
- Preserve and verify returned URLs/citations. Treat Grok output as research input, not sole authority; corroborate important or high-stakes claims with primary sources.
- Keep research calls read-only and targeted. Do not use `--always-approve` for simple research. Avoid redundant calls because Grok can consume subscription/API quota and incur cost.
- Grok writes sessions under `~/.grok`; restricted environments may require permission for that directory and network access.
- If CLI behavior changes, re-check `grok --help`, `grok inspect`, and `grok models`. Official references: https://docs.x.ai/build/overview and https://docs.x.ai/developers/tools/x-search.
