rea-ci-tests-audit
MOmorluto/rea487k近 7 天新增 7,547 个 star
Use when the user asks to set up, configure, tune, or health-check ThinkRail itself — checking git, gh, JetBrains Central, providers, default and review models, skills from other agents, MCP servers, external editors, projects folder, voice input, appearance, or language — especially right after first launch. Not for onboarding a repository or creating a project's spec graph (use setting-up-a-project), not for pure 'what is / how does ThinkRail work' questions (use about-thinkrail), and not for focused MCP-only edits (use managing-mcp-servers) or building extensions (use making-thinkrail-extensions).
Walk the user through an app-level health check and initial tune-up of ThinkRail after the first-run provider wizard. Keep it fast, grounded in real checks on their machine, and tailored to what they actually want to tune.
~/.thinkrail/config.json (or $THINKRAIL_DATA_DIR/config.json). The running
ThinkRail host holds config.json in memory without watching it; any hand edit is ignored until
restart and silently overwritten on the next Settings save. Read it only to inspect current
values, and give the user the exact Settings › … path for every ThinkRail-owned setting.pi CLI commands (pi login, pi mcp add, pi config, etc.). ThinkRail runs
pi in-process — there is no pi command to invoke.pi files — and confirm every edit first. You may edit
${PI_CODING_AGENT_DIR:-~/.pi/agent}/mcp.json, settings.json, or models.json only after
showing the exact change and getting the user's explicit confirmation. Never write plaintext API
keys or tokens; use ${ENV_VAR} or !command references.read (or cat) on auth.json,
models.json, or mcp.json: models.json can hold saved providers.*.apiKey values and
mcp.json can hold literal header/env secrets, and any raw read leaks them into model context
and the session transcript. Check auth.json only with test -f, extract only allowlisted
top-level names (mcpServers / providers keys) locally in the shell (skipping if no JSON
parser is available), and never dump full env output.Run one compact, read-only inspection first so you report facts rather than guessing. Adapt syntax if the shell is Windows PowerShell.
DATA_DIR="${THINKRAIL_DATA_DIR:-$HOME/.thinkrail}"
PI_DIR="${PI_CODING_AGENT_DIR:-$HOME/.pi/agent}"
echo "DATA_DIR=$DATA_DIR"
echo "PI_DIR=$PI_DIR"
echo "PI_PROVIDER=${PI_PROVIDER:-unset} PI_MODEL=${PI_MODEL:-unset} PI_REASONING_LEVEL=${PI_REASONING_LEVEL:-unset}"
git --version 2>&1 || echo "git: missing"
if command -v gh >/dev/null 2>&1; then
gh --version | head -n 1
gh auth status 2>&1 || true
else
echo "gh: missing"
fi
if command -v central >/dev/null 2>&1; then
central --version 2>&1 || echo "central: installed"
else
echo "central: missing"
fi
echo "editors:"
for b in code idea webstorm pycharm goland rider clion phpstorm rubymine emacs vim; do
command -v "$b" >/dev/null 2>&1 && printf " %s" "$b"
done
echo ""
echo "pi_auth_present=$(test -f "$PI_DIR/auth.json" && echo yes || echo no)"
extract_keys() {
file="$1"; key="$2"
[ -f "$file" ] || { echo "absent"; return; }
if command -v jq >/dev/null 2>&1; then
jq -r --arg k "$key" '(.[$k] // {}) | keys | join(", ")' "$file" 2>/dev/null || echo "unparseable"
elif command -v python3 >/dev/null 2>&1; then
python3 -c 'import json,sys; d=json.load(open(sys.argv[1])); print(", ".join((d.get(sys.argv[2]) or {}).keys()))' "$file" "$key" 2>/dev/null || echo "unparseable"
elif command -v node >/dev/null 2>&1; then
node -e 'const fs=require("fs"),d=JSON.parse(fs.readFileSync(process.argv[1],"utf8"));console.log(Object.keys(d[process.argv[2]]||{}).join(", "))' "$file" "$key" 2>/dev/null || echo "unparseable"
else
echo "present (names skipped)"
fi
}
echo "mcp_servers=$(extract_keys "$PI_DIR/mcp.json" mcpServers)"
echo "custom_providers=$(extract_keys "$PI_DIR/models.json" providers)"
echo "other_agent_skills:"
CLAUDE_DIR="${CLAUDE_CONFIG_DIR:-$HOME/.claude}"
for d in "$CLAUDE_DIR/skills" "${CODEX_HOME:-$HOME/.codex}/skills" "$HOME/.copilot/skills" "${GEMINI_CLI_HOME:-$HOME}/.gemini/skills"; do
[ -d "$d" ] && echo " dir: $d"
done
if [ -f "$CLAUDE_DIR/plugins/installed_plugins.json" ]; then
echo " file: $CLAUDE_DIR/plugins/installed_plugins.json"
fi
true
Then use read (read-only) on whichever of these non-secret files exist:
$DATA_DIR/config.json — inspect defaultModel, defaultEffort, reviewModel, reviewEffort,
agentReviewEnabled, reviewAutoFix, reviewAutoFixRounds, projectsFolder,
otherAgentSkills, theme, themeMode, locale, voiceInputEnabled.$PI_DIR/settings.json — inspect cacheWarming and fallback defaults (if present).Do not call read on $PI_DIR/auth.json, $PI_DIR/mcp.json, or $PI_DIR/models.json.
Show the user a short, scannable report with two parts:
git, active model/provider, detected
editors, existing MCP servers).gh missing or logged out, no review
model set, Claude/Codex skills present on disk while "Skills from other agents" is off, no GUI
editor on PATH, default ~/thinkrail projects folder if they prefer another).Keep this summary brief — a tight bullet list or small table, not a wall of prose.
Use ask_user_question (multiSelect: true) so the user picks which areas to walk through instead
of being dragged through every setting. Include only the areas that are relevant (up to 4 options per
round; combine minor ones naturally):
gh so topbar PRs and /skill:reviewing-a-pr
work.Open in), voice input,
theme, fonts, language, shortcuts.If the user picks nothing or says everything looks good, skip straight to Step 4.
Keep guidance concrete and name the exact Settings › … section for every ThinkRail-owned setting:
pi's models.json).$PI_DIR/models.json
or update cacheWarming in $PI_DIR/settings.json, show the exact JSON diff and confirm before
writing.gh is missing, share the install command for their OS (brew install gh on macOS, package
manager / winget install GitHub.cli on Windows).gh is installed but not logged in, tell them to run gh auth login in a terminal (ThinkRail
uses their own gh credentials), then verify the Connected status in Settings › Integrations.git clone / push uses their existing Git / SSH credentials, not gh..pi/ resources and repo skill aliases (.claude/skills,
.github/skills, .gemini/skills) only load after granting per-project trust.managing-mcp-servers skill for any MCP server additions or troubleshooting.$PI_DIR/mcp.json only after confirming the exact entry with the
user, pin package versions (never @latest), never store plaintext secrets (use ${ENV_VAR} or
!command), and point the user to Settings › MCP servers for OAuth sign-in or repo-server
approvals.~/thinkrail).PATH for code, idea,
webstorm, pycharm, goland, rider, clion, phpstorm, rubymine, emacs, and vim. If
their preferred editor was not detected, explain how to install its shell command (e.g., VS Code's
code command or JetBrains Toolbox shell scripts) or add its bin directory to their login-shell
profile (~/.zprofile / ~/.bash_profile / system PATH on Windows) and restart ThinkRail.
(Note: PATH is managed by ThinkRail from the login shell and cannot be added in Settings ›
Environment.)⌘⇧Space / Ctrl+Shift+Space).⌘? / Ctrl+? for the shortcuts
cheatsheet).pi files you edited (if any), and any Settings › …
toggles left for the user to flip./skill:about-thinkrail /
Ask about ThinkRail in ⌘K / Ctrl+K)./skill:setting-up-a-project (or Start a new project / Open project from Welcome).MOmorluto/rea487k近 7 天新增 7,547 个 star
MOmorluto/rea487k近 7 天新增 7,547 个 star
MAmattpocock/skills338k近 7 天新增 4,314 个 star
MAmattpocock/skills338k近 7 天新增 4,314 个 star
MAmattpocock/skills338k近 7 天新增 4,314 个 star