GrepBoard/Manuals
47 manuals ·

AI 34

Hands-on manuals for AI tools: the exact commands, prompts and output, tested and dated.

  1. "maximum context length" error but tiktoken says it fits

    tiktoken counts 73,878 tokens but the API says 249,114. Estimate the full request offline: system, tools, schema, history and reserved output.

    Ubuntu 24.04 · Python 3.12 · tiktoken 0.14.0 · OpenAI docs as of 2026-10 (no API calls)
  2. Block dangerous commands with a Claude Code hook

    Inspect each Bash command Claude Code is about to run with a PreToolUse hook, and block rm -rf or force pushes with exit code 2, via a settings file and script.

    Claude Code 2.1.302 · Ubuntu 24.04 · jq 1.7
  3. Check stop_reason to Tell If a Claude Response Was Cut Off

    If json.loads fails on a reply cut off mid-string, read stop_reason first. A Python check for max_tokens truncation, and how to raise the limit or continue.

    Python 3.12.3 · Claude Messages API docs as of 2026-10 · checked against sample response JSON
  4. Check Whether robots.txt Blocks AI Crawlers with Python

    Blocking GPTBot doesn't block every AI bot. Parse robots.txt with Python and print an allow/block table for training, search and user-request crawlers.

    Python 3.12.3 (urllib.robotparser) · OpenAI and Anthropic docs checked 2026-10-19
  5. Claude Code 429 and Rate Limit Errors: Usage Limit or Outage?

    Tell a usage limit from a throttle, a key problem or an outage by the exact message: `Request rejected (429)`, `You've hit your session limit` and more.

    Claude Code official docs · 2026-10 (installed version 2.1.302)
  6. Claude Code settings.local.json allow rule not applied

    Claude Code still asks despite a Bash allow rule in settings.local.json. Check loaded files, rule syntax, compound commands and deny precedence via claude -p.

    Claude Code 2.1.302 · Ubuntu 24.04 · run 2026-10-19
  7. Claude Code subagent missing from the list or never called

    When a subagent in .claude/agents is not listed or never delegated to, check the file location, frontmatter, debug log and restart conditions in this order.

    Claude Code 2.1.302 · Ubuntu 24.04
  8. Connect an MCP server to Claude Code and diagnose "not connected"

    Add a one-tool stdio MCP server to Claude Code at project scope and read the symptoms of pending approval, a bad command path, broken .mcp.json and stdout logs.

    Claude Code 2.1.302 · Node.js · @modelcontextprotocol/sdk 1.32.1 · Ubuntu 24.04
  9. Convert Figma designs to code with Claude Code

    Connect Figma's official remote MCP server to Claude Code and generate code that reflects design tokens and layout from selected frame links.

    Claude Code · Figma remote MCP · 2026-10 docs
  10. Count AI Crawler Requests in an Nginx Access Log

    Count GPTBot, ClaudeBot and PerplexityBot hits by User-Agent, check robots.txt status, then verify the source IPs against the vendors' published lists.

    GNU awk 5.2.1 · Nginx combined-format sample log · jq 1.7 · vendor docs as of 2026-10
  11. Create an SEO content brief with AI

    Create an SEO brief from a query and reader profile. Review the prompt and actual output, check intent, evidence and links, then compare variations.

    GPT-6.1 (Codex CLI) · 2026-10-19
  12. Fix "user cancelled MCP tool call" in codex exec

    When codex exec cancels MCP tool calls right away, drop the config keys that do nothing, approve per server or tool with approval_mode, and keep the sandbox on.

    Codex CLI 0.163.0 · Ubuntu 24.04 · Node 24 (config checks reproduced; real tool calls per issue #24135)
  13. Fix a .mcp.json server stuck on "Pending approval"

    Approve or reject a .mcp.json server that claude mcp list shows as ⏸ Pending approval, and see where local, project and user scope store servers and which wins.

    Claude Code 2.1.302 · Ubuntu 24.04 · setting keys per Claude Code docs · 2026-10
  14. Fix Claude Code Action 403 permission errors

    When Claude Code Action fails with 403 Resource not accessible by integration, check the token type, permissions block, repo defaults, then fork PRs.

    claude-code-action v1 official docs · actionlint 1.7.12 · 2026-10
  15. Fix Codex CLI "exceeded retry limit, last status: 401"

    When Codex CLI reconnects five times and ends in 401 Unauthorized, check which credentials it is using, then log out and sign in again in the right order.

    Codex CLI 0.163.0 · Ubuntu 24.04 · Node 24 (tested without logging in)
  16. Fix Codex CLI approval policy and sandbox settings

    Check what Codex CLI's approval_policy and sandbox_mode accept today, fix the untrusted error, replace --full-auto, and cut down per-command approval prompts.

    Codex CLI 0.163.0 · Ubuntu 24.04 · Node 24
  17. Fix common Claude Code errors by message

    Match a Claude Code error — Invalid API key, Not logged in, 529, connection refused, certificate errors — to its cause and fix it with env vars and settings.

    Claude Code 2.1.302 · Ubuntu 24.04
  18. Fix Gemini CLI 429 "No capacity available for model"

    Tell a Gemini CLI 429 quota error from a server capacity error by its message, then switch models with /model, move to an API key, and set a retry interval.

    Gemini CLI 0.64.0 bundled source · official docs · 2026-10
  19. Fix Gemini CLI install and login errors

    Install Gemini CLI, check the version, and work through common login blockers: auth errors, the org-subscription check, CI_ variables, and debug mode.

    Gemini CLI 0.64.0 · Node.js 24.22 · Ubuntu 24.04
  20. Fix Gemini's answer format with system instructions and examples

    When Gemini's answer format changes between runs, put the rules in a system instruction, add two or three examples with an Output: prefix, then re-run to check.

    Gemini API docs · 2026-10
  21. Get Claude's proofreading as a table of changes only

    Asking Claude to fix a document rewrites all of it. Get only the changed spans as a table, then check by script that every Original cell is in the document.

    claude-sonnet-5-5 · Claude Code 2.1.302 · Ubuntu 24.04 · run 2026-10-19
  22. Give Codex your repository rules with AGENTS.md

    Put an AGENTS.md in your repository so Codex reads build commands and rules first. Covers the read order, AGENTS.override.md and the 32 KiB size limit.

    Codex CLI 0.163.0 · Ubuntu 24.04 · official docs as of 2026-10
  23. Maintain a consistent character across AI image generations

    Generate consistent character images across multiple scenes using fixed descriptive prompts, Midjourney reference parameters, and Diffusers LoRA finetuning.

    Midjourney v6 · Hugging Face Diffusers
  24. Make Claude quote its sources, then check the quotes with grep

    Ask Claude for a summary with a verbatim quote per sentence, confirm each quote exists in the source with grep -F, and re-ask only for the ones that fail.

    claude-sonnet-5-5 · Claude Code 2.1.302 · Ubuntu 24.04 · run on 2026-10-19
  25. Pass arguments to a Claude Code custom slash command

    Put $ARGUMENTS, $0, $1 or named arguments in a .claude/commands markdown file, then check how quoted values and missing arguments are substituted.

    Claude Code 2.1.302 · Ubuntu 24.04
  26. Recompute the averages and rates an AI stated from a CSV

    Take an AI's mean, median and rates back as JSON, then recompute the same keys with pandas. Covers a rounding tolerance and re-asking only wrong figures.

    claude-sonnet-5-5 · Claude Code 2.1.302 · Python 3.12.3 · pandas 3.0.6 · Ubuntu 24.04 · run 2026-10-19
  27. Retry Gemini API 429 and 503 Errors with Backoff

    429 RESOURCE_EXHAUSTED and 503 UNAVAILABLE need different handling. A Python retry function with backoff and jitter, tested on a fake server.

    Ubuntu 24.04 · Python 3.12.3 (stdlib) · tested against a local fake server · error classes per Gemini API docs, 2026-10
  28. Run codex exec non-interactively in CI

    Defaults and flags for codex exec in CI: sandbox and approval, --json, -o, --output-schema, stdin waits, CI auth, and the MCP tool-call cancellation limit.

    Codex CLI 0.163.0 · Ubuntu 24.04 · Node 24 · only the parts that work without login were tested · 2026-10
  29. Show the model and context usage in the Claude Code status line

    Build a status line that shows the model name and context usage below the prompt: stdin JSON, the settings.json entry, null handling and re-run triggers.

    Claude Code 2.1.302 · Ubuntu 24.04 · bash 5.2 · jq 1.7 · script run directly, on-screen behavior per the official docs
  30. Split ChatGPT custom instructions, memory and projects

    Compare the scope of ChatGPT custom instructions, memory and projects in one table, then see what to put in each, with example text and how to delete memory.

    ChatGPT · per OpenAI Help Center · 2026-10
  31. Summarize a Too-Long Claude Chat and Hand It to a New One

    When a chat hits its length limit, ask for a handoff note, check its numbers against the original with grep, then paste it into a new chat and keep going.

    claude-sonnet-5-5 · Claude Code 2.1.302 (claude -p) · Ubuntu 24.04 · 2026-10-19 · claude.ai UI per official help pages
  32. Tell a stray print() from "MCP error -32000: Connection closed"

    Reproduce three ways a print() in a Python stdio MCP server behaves, see what actually causes MCP error -32000, and move the logging to stderr.

    Claude Code 2.1.302 · Python 3.12.3 · mcp 2.3.0 · @modelcontextprotocol/sdk 1.32.1 · Node.js 24 · Ubuntu 24.04
  33. Verify an AI answer's citations with Crossref and PubMed

    Check the DOIs in an AI answer on Crossref for existence, title, author and year, then read the PubMed abstract to confirm the paper supports the claim.

    Claude Code 2.1.302 · claude-sonnet-5-5 · curl · Python 3 (2026-10-19)
  34. Where Gemini CLI reads settings.json and which file wins

    Find where Gemini CLI reads settings.json, which of the user, project and system files overrides which, and why a project's settings can be ignored entirely.

    Gemini CLI 0.64.0 · Ubuntu 24.04 · Node 24