Skip to main content

setup-browser-cookies

Imports cookies from real browsers into headless sessions for QA testing, enhancing authentication handling in automated tests.

Install this skill

or
0/100

Security score

The setup-browser-cookies skill was audited on May 10, 2026 and we found 97 security issues across 4 threat categories, including 1 high-severity. Review the findings below before installing.

Categories Tested

Security Issues

low line 25

Command substitution pattern

SourceSKILL.md
23
24```bash
25_UPD=$(~/.claude/skills/gstack/bin/gstack-update-check 2>/dev/null || .claude/skills/gstack/bin/gstack-update-check 2>/dev/null || true)
26[ -n "$_UPD" ] && echo "$_UPD" || true
27mkdir -p ~/.gstack/sessions
low line 29

Command substitution pattern

SourceSKILL.md
27mkdir -p ~/.gstack/sessions
28touch ~/.gstack/sessions/"$PPID"
29_SESSIONS=$(find ~/.gstack/sessions -mmin -120 -type f 2>/dev/null | wc -l | tr -d ' ')
30find ~/.gstack/sessions -mmin +120 -type f -exec rm {} + 2>/dev/null || true
31_PROACTIVE=$(~/.claude/skills/gstack/bin/gstack-config get proactive 2>/dev/null || echo "true")
low line 31

Command substitution pattern

SourceSKILL.md
29_SESSIONS=$(find ~/.gstack/sessions -mmin -120 -type f 2>/dev/null | wc -l | tr -d ' ')
30find ~/.gstack/sessions -mmin +120 -type f -exec rm {} + 2>/dev/null || true
31_PROACTIVE=$(~/.claude/skills/gstack/bin/gstack-config get proactive 2>/dev/null || echo "true")
32_PROACTIVE_PROMPTED=$([ -f ~/.gstack/.proactive-prompted ] && echo "yes" || echo "no")
33_BRANCH=$(git branch --show-current 2>/dev/null || echo "unknown")
low line 32

Command substitution pattern

SourceSKILL.md
30find ~/.gstack/sessions -mmin +120 -type f -exec rm {} + 2>/dev/null || true
31_PROACTIVE=$(~/.claude/skills/gstack/bin/gstack-config get proactive 2>/dev/null || echo "true")
32_PROACTIVE_PROMPTED=$([ -f ~/.gstack/.proactive-prompted ] && echo "yes" || echo "no")
33_BRANCH=$(git branch --show-current 2>/dev/null || echo "unknown")
34echo "BRANCH: $_BRANCH"
low line 33

Command substitution pattern

SourceSKILL.md
31_PROACTIVE=$(~/.claude/skills/gstack/bin/gstack-config get proactive 2>/dev/null || echo "true")
32_PROACTIVE_PROMPTED=$([ -f ~/.gstack/.proactive-prompted ] && echo "yes" || echo "no")
33_BRANCH=$(git branch --show-current 2>/dev/null || echo "unknown")
34echo "BRANCH: $_BRANCH"
35_SKILL_PREFIX=$(~/.claude/skills/gstack/bin/gstack-config get skill_prefix 2>/dev/null || echo "false")
low line 35

Command substitution pattern

SourceSKILL.md
33_BRANCH=$(git branch --show-current 2>/dev/null || echo "unknown")
34echo "BRANCH: $_BRANCH"
35_SKILL_PREFIX=$(~/.claude/skills/gstack/bin/gstack-config get skill_prefix 2>/dev/null || echo "false")
36echo "PROACTIVE: $_PROACTIVE"
37echo "PROACTIVE_PROMPTED: $_PROACTIVE_PROMPTED"
low line 42

Command substitution pattern

SourceSKILL.md
40REPO_MODE=${REPO_MODE:-unknown}
41echo "REPO_MODE: $REPO_MODE"
42_LAKE_SEEN=$([ -f ~/.gstack/.completeness-intro-seen ] && echo "yes" || echo "no")
43echo "LAKE_INTRO: $_LAKE_SEEN"
44_TEL=$(~/.claude/skills/gstack/bin/gstack-config get telemetry 2>/dev/null || true)
low line 44

Command substitution pattern

SourceSKILL.md
42_LAKE_SEEN=$([ -f ~/.gstack/.completeness-intro-seen ] && echo "yes" || echo "no")
43echo "LAKE_INTRO: $_LAKE_SEEN"
44_TEL=$(~/.claude/skills/gstack/bin/gstack-config get telemetry 2>/dev/null || true)
45_TEL_PROMPTED=$([ -f ~/.gstack/.telemetry-prompted ] && echo "yes" || echo "no")
46_TEL_START=$(date +%s)
low line 45

Command substitution pattern

SourceSKILL.md
43echo "LAKE_INTRO: $_LAKE_SEEN"
44_TEL=$(~/.claude/skills/gstack/bin/gstack-config get telemetry 2>/dev/null || true)
45_TEL_PROMPTED=$([ -f ~/.gstack/.telemetry-prompted ] && echo "yes" || echo "no")
46_TEL_START=$(date +%s)
47_SESSION_ID="$$-$(date +%s)"
low line 50

Command substitution pattern

SourceSKILL.md
48echo "TELEMETRY: ${_TEL:-off}"
49echo "TEL_PROMPTED: $_TEL_PROMPTED"
50_EXPLAIN_LEVEL=$(~/.claude/skills/gstack/bin/gstack-config get explain_level 2>/dev/null || echo "default")
51if [ "$_EXPLAIN_LEVEL" != "default" ] && [ "$_EXPLAIN_LEVEL" != "terse" ]; then _EXPLAIN_LEVEL="default"; fi
52echo "EXPLAIN_LEVEL: $_EXPLAIN_LEVEL"
low line 53

Command substitution pattern

SourceSKILL.md
51if [ "$_EXPLAIN_LEVEL" != "default" ] && [ "$_EXPLAIN_LEVEL" != "terse" ]; then _EXPLAIN_LEVEL="default"; fi
52echo "EXPLAIN_LEVEL: $_EXPLAIN_LEVEL"
53_QUESTION_TUNING=$(~/.claude/skills/gstack/bin/gstack-config get question_tuning 2>/dev/null || echo "false")
54echo "QUESTION_TUNING: $_QUESTION_TUNING"
55mkdir -p ~/.gstack/analytics
low line 57

Command substitution pattern

SourceSKILL.md
55mkdir -p ~/.gstack/analytics
56if [ "$_TEL" != "off" ]; then
57echo '{"skill":"setup-browser-cookies","ts":"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'","repo":"'$(basename "$(git rev-parse --show-toplevel 2>/dev/null)" 2>/dev/null || echo "unknown")'"}' >> ~/.gstack/analytics/skill-usage.jsonl 2>/dev/null || true
58fi
59for _PF in $(find ~/.gstack/analytics -maxdepth 1 -name '.pending-*' 2>/dev/null); do
low line 59

Command substitution pattern

SourceSKILL.md
57echo '{"skill":"setup-browser-cookies","ts":"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'","repo":"'$(basename "$(git rev-parse --show-toplevel 2>/dev/null)" 2>/dev/null || echo "unknown")'"}' >> ~/.gstack/analytics/skill-usage.jsonl 2>/dev/null || true
58fi
59for _PF in $(find ~/.gstack/analytics -maxdepth 1 -name '.pending-*' 2>/dev/null); do
60 if [ -f "$_PF" ]; then
61 if [ "$_TEL" != "off" ] && [ -x "~/.claude/skills/gstack/bin/gstack-telemetry-log" ]; then
low line 68

Command substitution pattern

SourceSKILL.md
66 break
67done
68eval "$(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)" 2>/dev/null || true
69_LEARN_FILE="${GSTACK_HOME:-$HOME/.gstack}/projects/${SLUG:-unknown}/learnings.jsonl"
70if [ -f "$_LEARN_FILE" ]; then
low line 71

Command substitution pattern

SourceSKILL.md
69_LEARN_FILE="${GSTACK_HOME:-$HOME/.gstack}/projects/${SLUG:-unknown}/learnings.jsonl"
70if [ -f "$_LEARN_FILE" ]; then
71 _LEARN_COUNT=$(wc -l < "$_LEARN_FILE" 2>/dev/null | tr -d ' ')
72 echo "LEARNINGS: $_LEARN_COUNT entries loaded"
73 if [ "$_LEARN_COUNT" -gt 5 ] 2>/dev/null; then
low line 84

Command substitution pattern

SourceSKILL.md
82 _HAS_ROUTING="yes"
83fi
84_ROUTING_DECLINED=$(~/.claude/skills/gstack/bin/gstack-config get routing_declined 2>/dev/null || echo "false")
85echo "HAS_ROUTING: $_HAS_ROUTING"
86echo "ROUTING_DECLINED: $_ROUTING_DECLINED"
low line 95

Command substitution pattern

SourceSKILL.md
93echo "VENDORED_GSTACK: $_VENDORED"
94echo "MODEL_OVERLAY: claude"
95_CHECKPOINT_MODE=$(~/.claude/skills/gstack/bin/gstack-config get checkpoint_mode 2>/dev/null || echo "explicit")
96_CHECKPOINT_PUSH=$(~/.claude/skills/gstack/bin/gstack-config get checkpoint_push 2>/dev/null || echo "false")
97echo "CHECKPOINT_MODE: $_CHECKPOINT_MODE"
low line 96

Command substitution pattern

SourceSKILL.md
94echo "MODEL_OVERLAY: claude"
95_CHECKPOINT_MODE=$(~/.claude/skills/gstack/bin/gstack-config get checkpoint_mode 2>/dev/null || echo "explicit")
96_CHECKPOINT_PUSH=$(~/.claude/skills/gstack/bin/gstack-config get checkpoint_push 2>/dev/null || echo "false")
97echo "CHECKPOINT_MODE: $_CHECKPOINT_MODE"
98echo "CHECKPOINT_PUSH: $_CHECKPOINT_PUSH"
low line 258

Command substitution pattern

SourceSKILL.md
256Always run (regardless of choice):
257```bash
258eval "$(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)" 2>/dev/null || true
259touch ~/.gstack/.vendoring-warned-${SLUG:-unknown}
260```
low line 293

Command substitution pattern

SourceSKILL.md
291_GBRAIN_CONFIG="$HOME/.gbrain/config.json"
292if [ -f "$_GBRAIN_CONFIG" ] && command -v gbrain >/dev/null 2>&1; then
293 _GBRAIN_VERSION_OK=$(gbrain --version 2>/dev/null | grep -c '^gbrain ' || echo 0)
294 if [ "$_GBRAIN_VERSION_OK" -gt 0 ] 2>/dev/null; then
295 _GBRAIN_PIN_PATH=""
low line 296

Command substitution pattern

SourceSKILL.md
294 if [ "$_GBRAIN_VERSION_OK" -gt 0 ] 2>/dev/null; then
295 _GBRAIN_PIN_PATH=""
296 _REPO_TOP=$(git rev-parse --show-toplevel 2>/dev/null || echo "")
297 if [ -n "$_REPO_TOP" ] && [ -f "$_REPO_TOP/.gbrain-source" ]; then
298 _GBRAIN_PIN_PATH="$_REPO_TOP/.gbrain-source"
low line 313

Command substitution pattern

SourceSKILL.md
311fi
312
313_BRAIN_SYNC_MODE=$("$_BRAIN_CONFIG_BIN" get artifacts_sync_mode 2>/dev/null || echo off)
314
315# Detect remote-MCP mode (Path 4 of /setup-gbrain). Local artifacts sync is
low line 321

Command substitution pattern

SourceSKILL.md
319_GBRAIN_MCP_MODE="none"
320if command -v jq >/dev/null 2>&1 && [ -f "$HOME/.claude.json" ]; then
321 _GBRAIN_MCP_TYPE=$(jq -r '.mcpServers.gbrain.type // .mcpServers.gbrain.transport // empty' "$HOME/.claude.json" 2>/dev/null)
322 case "$_GBRAIN_MCP_TYPE" in
323 url|http|sse) _GBRAIN_MCP_MODE="remote-http" ;;
low line 329

Command substitution pattern

SourceSKILL.md
327
328if [ -f "$_BRAIN_REMOTE_FILE" ] && [ ! -d "$_GSTACK_HOME/.git" ] && [ "$_BRAIN_SYNC_MODE" = "off" ]; then
329 _BRAIN_NEW_URL=$(head -1 "$_BRAIN_REMOTE_FILE" 2>/dev/null | tr -d '[:space:]')
330 if [ -n "$_BRAIN_NEW_URL" ]; then
331 echo "ARTIFACTS_SYNC: artifacts repo detected: $_BRAIN_NEW_URL"
low line 341

Command substitution pattern

SourceSKILL.md
339 _BRAIN_DO_PULL=1
340 if [ -f "$_BRAIN_LAST_PULL_FILE" ]; then
341 _BRAIN_LAST=$(cat "$_BRAIN_LAST_PULL_FILE" 2>/dev/null || echo 0)
342 _BRAIN_AGE=$(( _BRAIN_NOW - _BRAIN_LAST ))
343 [ "$_BRAIN_AGE" -lt 86400 ] && _BRAIN_DO_PULL=0
low line 342

Command substitution pattern

SourceSKILL.md
340 if [ -f "$_BRAIN_LAST_PULL_FILE" ]; then
341 _BRAIN_LAST=$(cat "$_BRAIN_LAST_PULL_FILE" 2>/dev/null || echo 0)
342 _BRAIN_AGE=$(( _BRAIN_NOW - _BRAIN_LAST ))
343 [ "$_BRAIN_AGE" -lt 86400 ] && _BRAIN_DO_PULL=0
344 fi
low line 346

Command substitution pattern

SourceSKILL.md
344 fi
345 if [ "$_BRAIN_DO_PULL" = "1" ]; then
346 ( cd "$_GSTACK_HOME" && git fetch origin >/dev/null 2>&1 && git merge --ff-only "origin/$(git rev-parse --abbrev-ref HEAD)" >/dev/null 2>&1 ) || true
347 echo "$_BRAIN_NOW" > "$_BRAIN_LAST_PULL_FILE"
348 fi
low line 355

Command substitution pattern

SourceSKILL.md
353 # Remote-MCP mode: local artifacts sync is a no-op (brain admin's server
354 # pulls from GitHub/GitLab). Show the user this is by design, not broken.
355 _GBRAIN_HOST=$(jq -r '.mcpServers.gbrain.url // empty' "$HOME/.claude.json" 2>/dev/null | sed -E 's|^https?://([^/:]+).*|\1|')
356 echo "ARTIFACTS_SYNC: remote-mode (managed by brain server ${_GBRAIN_HOST:-remote})"
357elif [ -d "$_GSTACK_HOME/.git" ] && [ "$_BRAIN_SYNC_MODE" != "off" ]; then
low line 359

Command substitution pattern

SourceSKILL.md
357elif [ -d "$_GSTACK_HOME/.git" ] && [ "$_BRAIN_SYNC_MODE" != "off" ]; then
358 _BRAIN_QUEUE_DEPTH=0
359 [ -f "$_GSTACK_HOME/.brain-queue.jsonl" ] && _BRAIN_QUEUE_DEPTH=$(wc -l < "$_GSTACK_HOME/.brain-queue.jsonl" | tr -d ' ')
360 _BRAIN_LAST_PUSH="never"
361 [ -f "$_GSTACK_HOME/.brain-last-push" ] && _BRAIN_LAST_PUSH=$(cat "$_GSTACK_HOME/.brain-last-push" 2>/dev/null || echo never)
low line 361

Command substitution pattern

SourceSKILL.md
359 [ -f "$_GSTACK_HOME/.brain-queue.jsonl" ] && _BRAIN_QUEUE_DEPTH=$(wc -l < "$_GSTACK_HOME/.brain-queue.jsonl" | tr -d ' ')
360 _BRAIN_LAST_PUSH="never"
361 [ -f "$_GSTACK_HOME/.brain-last-push" ] && _BRAIN_LAST_PUSH=$(cat "$_GSTACK_HOME/.brain-last-push" 2>/dev/null || echo never)
362 echo "ARTIFACTS_SYNC: mode=$_BRAIN_SYNC_MODE | last_push=$_BRAIN_LAST_PUSH | queue=$_BRAIN_QUEUE_DEPTH"
363else
low line 454

Command substitution pattern

SourceSKILL.md
452```bash
453_TEL_END=$(date +%s)
454_TEL_DUR=$(( _TEL_END - _TEL_START ))
455rm -f ~/.gstack/analytics/.pending-"$_SESSION_ID" 2>/dev/null || true
456# Session timeline: record skill completion (local-only, never sent anywhere)
low line 457

Command substitution pattern

SourceSKILL.md
455rm -f ~/.gstack/analytics/.pending-"$_SESSION_ID" 2>/dev/null || true
456# Session timeline: record skill completion (local-only, never sent anywhere)
457~/.claude/skills/gstack/bin/gstack-timeline-log '{"skill":"SKILL_NAME","event":"completed","branch":"'$(git branch --show-current 2>/dev/null || echo unknown)'","outcome":"OUTCOME","duration_s":"'"$_TEL_DUR"'","session":"'"$_SESSION_ID"'"}' 2>/dev/null || true
458# Local analytics (gated on telemetry setting)
459if [ "$_TEL" != "off" ]; then
low line 460

Command substitution pattern

SourceSKILL.md
458# Local analytics (gated on telemetry setting)
459if [ "$_TEL" != "off" ]; then
460echo '{"skill":"SKILL_NAME","duration_s":"'"$_TEL_DUR"'","outcome":"OUTCOME","browse":"USED_BROWSE","session":"'"$_SESSION_ID"'","ts":"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"}' >> ~/.gstack/analytics/skill-usage.jsonl 2>/dev/null || true
461fi
462# Remote telemetry (opt-in, requires binary)
low line 504

Command substitution pattern

SourceSKILL.md
502
503```bash
504_ROOT=$(git rev-parse --show-toplevel 2>/dev/null)
505B=""
506[ -n "$_ROOT" ] && [ -x "$_ROOT/.claude/skills/gstack/browse/dist/browse" ] && B="$_ROOT/.claude/skills/gstack/browse/dist/browse"
low line 525

Command substitution pattern

SourceSKILL.md
523 tmpfile=$(mktemp)
524 curl -fsSL "https://bun.sh/install" -o "$tmpfile"
525 actual_sha=$(shasum -a 256 "$tmpfile" | awk '{print $1}')
526 if [ "$actual_sha" != "$BUN_INSTALL_SHA" ]; then
527 echo "ERROR: bun install script checksum mismatch" >&2
medium line 524

Curl to non-GitHub URL

SourceSKILL.md
522 BUN_INSTALL_SHA="bab8acfb046aac8c72407bdcce903957665d655d7acaa3e11c7c4616beae68dd"
523 tmpfile=$(mktemp)
524 curl -fsSL "https://bun.sh/install" -o "$tmpfile"
525 actual_sha=$(shasum -a 256 "$tmpfile" | awk '{print $1}')
526 if [ "$actual_sha" != "$BUN_INSTALL_SHA" ]; then
low line 25

Access to home directory dotfiles

SourceSKILL.md
23
24```bash
25_UPD=$(~/.claude/skills/gstack/bin/gstack-update-check 2>/dev/null || .claude/skills/gstack/bin/gstack-update-check 2>/dev/null || true)
26[ -n "$_UPD" ] && echo "$_UPD" || true
27mkdir -p ~/.gstack/sessions
low line 27

Access to home directory dotfiles

SourceSKILL.md
25_UPD=$(~/.claude/skills/gstack/bin/gstack-update-check 2>/dev/null || .claude/skills/gstack/bin/gstack-update-check 2>/dev/null || true)
26[ -n "$_UPD" ] && echo "$_UPD" || true
27mkdir -p ~/.gstack/sessions
28touch ~/.gstack/sessions/"$PPID"
29_SESSIONS=$(find ~/.gstack/sessions -mmin -120 -type f 2>/dev/null | wc -l | tr -d ' ')
low line 28

Access to home directory dotfiles

SourceSKILL.md
26[ -n "$_UPD" ] && echo "$_UPD" || true
27mkdir -p ~/.gstack/sessions
28touch ~/.gstack/sessions/"$PPID"
29_SESSIONS=$(find ~/.gstack/sessions -mmin -120 -type f 2>/dev/null | wc -l | tr -d ' ')
30find ~/.gstack/sessions -mmin +120 -type f -exec rm {} + 2>/dev/null || true
low line 29

Access to home directory dotfiles

SourceSKILL.md
27mkdir -p ~/.gstack/sessions
28touch ~/.gstack/sessions/"$PPID"
29_SESSIONS=$(find ~/.gstack/sessions -mmin -120 -type f 2>/dev/null | wc -l | tr -d ' ')
30find ~/.gstack/sessions -mmin +120 -type f -exec rm {} + 2>/dev/null || true
31_PROACTIVE=$(~/.claude/skills/gstack/bin/gstack-config get proactive 2>/dev/null || echo "true")
low line 30

Access to home directory dotfiles

SourceSKILL.md
28touch ~/.gstack/sessions/"$PPID"
29_SESSIONS=$(find ~/.gstack/sessions -mmin -120 -type f 2>/dev/null | wc -l | tr -d ' ')
30find ~/.gstack/sessions -mmin +120 -type f -exec rm {} + 2>/dev/null || true
31_PROACTIVE=$(~/.claude/skills/gstack/bin/gstack-config get proactive 2>/dev/null || echo "true")
32_PROACTIVE_PROMPTED=$([ -f ~/.gstack/.proactive-prompted ] && echo "yes" || echo "no")
low line 31

Access to home directory dotfiles

SourceSKILL.md
29_SESSIONS=$(find ~/.gstack/sessions -mmin -120 -type f 2>/dev/null | wc -l | tr -d ' ')
30find ~/.gstack/sessions -mmin +120 -type f -exec rm {} + 2>/dev/null || true
31_PROACTIVE=$(~/.claude/skills/gstack/bin/gstack-config get proactive 2>/dev/null || echo "true")
32_PROACTIVE_PROMPTED=$([ -f ~/.gstack/.proactive-prompted ] && echo "yes" || echo "no")
33_BRANCH=$(git branch --show-current 2>/dev/null || echo "unknown")
low line 32

Access to home directory dotfiles

SourceSKILL.md
30find ~/.gstack/sessions -mmin +120 -type f -exec rm {} + 2>/dev/null || true
31_PROACTIVE=$(~/.claude/skills/gstack/bin/gstack-config get proactive 2>/dev/null || echo "true")
32_PROACTIVE_PROMPTED=$([ -f ~/.gstack/.proactive-prompted ] && echo "yes" || echo "no")
33_BRANCH=$(git branch --show-current 2>/dev/null || echo "unknown")
34echo "BRANCH: $_BRANCH"
low line 35

Access to home directory dotfiles

SourceSKILL.md
33_BRANCH=$(git branch --show-current 2>/dev/null || echo "unknown")
34echo "BRANCH: $_BRANCH"
35_SKILL_PREFIX=$(~/.claude/skills/gstack/bin/gstack-config get skill_prefix 2>/dev/null || echo "false")
36echo "PROACTIVE: $_PROACTIVE"
37echo "PROACTIVE_PROMPTED: $_PROACTIVE_PROMPTED"
low line 39

Access to home directory dotfiles

SourceSKILL.md
37echo "PROACTIVE_PROMPTED: $_PROACTIVE_PROMPTED"
38echo "SKILL_PREFIX: $_SKILL_PREFIX"
39source <(~/.claude/skills/gstack/bin/gstack-repo-mode 2>/dev/null) || true
40REPO_MODE=${REPO_MODE:-unknown}
41echo "REPO_MODE: $REPO_MODE"
low line 42

Access to home directory dotfiles

SourceSKILL.md
40REPO_MODE=${REPO_MODE:-unknown}
41echo "REPO_MODE: $REPO_MODE"
42_LAKE_SEEN=$([ -f ~/.gstack/.completeness-intro-seen ] && echo "yes" || echo "no")
43echo "LAKE_INTRO: $_LAKE_SEEN"
44_TEL=$(~/.claude/skills/gstack/bin/gstack-config get telemetry 2>/dev/null || true)
low line 44

Access to home directory dotfiles

SourceSKILL.md
42_LAKE_SEEN=$([ -f ~/.gstack/.completeness-intro-seen ] && echo "yes" || echo "no")
43echo "LAKE_INTRO: $_LAKE_SEEN"
44_TEL=$(~/.claude/skills/gstack/bin/gstack-config get telemetry 2>/dev/null || true)
45_TEL_PROMPTED=$([ -f ~/.gstack/.telemetry-prompted ] && echo "yes" || echo "no")
46_TEL_START=$(date +%s)
low line 45

Access to home directory dotfiles

SourceSKILL.md
43echo "LAKE_INTRO: $_LAKE_SEEN"
44_TEL=$(~/.claude/skills/gstack/bin/gstack-config get telemetry 2>/dev/null || true)
45_TEL_PROMPTED=$([ -f ~/.gstack/.telemetry-prompted ] && echo "yes" || echo "no")
46_TEL_START=$(date +%s)
47_SESSION_ID="$$-$(date +%s)"
low line 50

Access to home directory dotfiles

SourceSKILL.md
48echo "TELEMETRY: ${_TEL:-off}"
49echo "TEL_PROMPTED: $_TEL_PROMPTED"
50_EXPLAIN_LEVEL=$(~/.claude/skills/gstack/bin/gstack-config get explain_level 2>/dev/null || echo "default")
51if [ "$_EXPLAIN_LEVEL" != "default" ] && [ "$_EXPLAIN_LEVEL" != "terse" ]; then _EXPLAIN_LEVEL="default"; fi
52echo "EXPLAIN_LEVEL: $_EXPLAIN_LEVEL"
low line 53

Access to home directory dotfiles

SourceSKILL.md
51if [ "$_EXPLAIN_LEVEL" != "default" ] && [ "$_EXPLAIN_LEVEL" != "terse" ]; then _EXPLAIN_LEVEL="default"; fi
52echo "EXPLAIN_LEVEL: $_EXPLAIN_LEVEL"
53_QUESTION_TUNING=$(~/.claude/skills/gstack/bin/gstack-config get question_tuning 2>/dev/null || echo "false")
54echo "QUESTION_TUNING: $_QUESTION_TUNING"
55mkdir -p ~/.gstack/analytics
low line 55

Access to home directory dotfiles

SourceSKILL.md
53_QUESTION_TUNING=$(~/.claude/skills/gstack/bin/gstack-config get question_tuning 2>/dev/null || echo "false")
54echo "QUESTION_TUNING: $_QUESTION_TUNING"
55mkdir -p ~/.gstack/analytics
56if [ "$_TEL" != "off" ]; then
57echo '{"skill":"setup-browser-cookies","ts":"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'","repo":"'$(basename "$(git rev-parse --show-toplevel 2>/dev/null)" 2>/dev/null || echo "unknown")'"}' >> ~/.gstack/analytics/skill-usage.jsonl 2>/dev/null || true
low line 57

Access to home directory dotfiles

SourceSKILL.md
55mkdir -p ~/.gstack/analytics
56if [ "$_TEL" != "off" ]; then
57echo '{"skill":"setup-browser-cookies","ts":"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'","repo":"'$(basename "$(git rev-parse --show-toplevel 2>/dev/null)" 2>/dev/null || echo "unknown")'"}' >> ~/.gstack/analytics/skill-usage.jsonl 2>/dev/null || true
58fi
59for _PF in $(find ~/.gstack/analytics -maxdepth 1 -name '.pending-*' 2>/dev/null); do
low line 59

Access to home directory dotfiles

SourceSKILL.md
57echo '{"skill":"setup-browser-cookies","ts":"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'","repo":"'$(basename "$(git rev-parse --show-toplevel 2>/dev/null)" 2>/dev/null || echo "unknown")'"}' >> ~/.gstack/analytics/skill-usage.jsonl 2>/dev/null || true
58fi
59for _PF in $(find ~/.gstack/analytics -maxdepth 1 -name '.pending-*' 2>/dev/null); do
60 if [ -f "$_PF" ]; then
61 if [ "$_TEL" != "off" ] && [ -x "~/.claude/skills/gstack/bin/gstack-telemetry-log" ]; then
low line 61

Access to home directory dotfiles

SourceSKILL.md
59for _PF in $(find ~/.gstack/analytics -maxdepth 1 -name '.pending-*' 2>/dev/null); do
60 if [ -f "$_PF" ]; then
61 if [ "$_TEL" != "off" ] && [ -x "~/.claude/skills/gstack/bin/gstack-telemetry-log" ]; then
62 ~/.claude/skills/gstack/bin/gstack-telemetry-log --event-type skill_run --skill _pending_finalize --outcome unknown --session-id "$_SESSION_ID" 2>/dev/null || true
63 fi
low line 62

Access to home directory dotfiles

SourceSKILL.md
60 if [ -f "$_PF" ]; then
61 if [ "$_TEL" != "off" ] && [ -x "~/.claude/skills/gstack/bin/gstack-telemetry-log" ]; then
62 ~/.claude/skills/gstack/bin/gstack-telemetry-log --event-type skill_run --skill _pending_finalize --outcome unknown --session-id "$_SESSION_ID" 2>/dev/null || true
63 fi
64 rm -f "$_PF" 2>/dev/null || true
low line 68

Access to home directory dotfiles

SourceSKILL.md
66 break
67done
68eval "$(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)" 2>/dev/null || true
69_LEARN_FILE="${GSTACK_HOME:-$HOME/.gstack}/projects/${SLUG:-unknown}/learnings.jsonl"
70if [ -f "$_LEARN_FILE" ]; then
low line 74

Access to home directory dotfiles

SourceSKILL.md
72 echo "LEARNINGS: $_LEARN_COUNT entries loaded"
73 if [ "$_LEARN_COUNT" -gt 5 ] 2>/dev/null; then
74 ~/.claude/skills/gstack/bin/gstack-learnings-search --limit 3 2>/dev/null || true
75 fi
76else
low line 79

Access to home directory dotfiles

SourceSKILL.md
77 echo "LEARNINGS: 0"
78fi
79~/.claude/skills/gstack/bin/gstack-timeline-log '{"skill":"setup-browser-cookies","event":"started","branch":"'"$_BRANCH"'","session":"'"$_SESSION_ID"'"}' 2>/dev/null &
80_HAS_ROUTING="no"
81if [ -f CLAUDE.md ] && grep -q "## Skill routing" CLAUDE.md 2>/dev/null; then
low line 84

Access to home directory dotfiles

SourceSKILL.md
82 _HAS_ROUTING="yes"
83fi
84_ROUTING_DECLINED=$(~/.claude/skills/gstack/bin/gstack-config get routing_declined 2>/dev/null || echo "false")
85echo "HAS_ROUTING: $_HAS_ROUTING"
86echo "ROUTING_DECLINED: $_ROUTING_DECLINED"
low line 95

Access to home directory dotfiles

SourceSKILL.md
93echo "VENDORED_GSTACK: $_VENDORED"
94echo "MODEL_OVERLAY: claude"
95_CHECKPOINT_MODE=$(~/.claude/skills/gstack/bin/gstack-config get checkpoint_mode 2>/dev/null || echo "explicit")
96_CHECKPOINT_PUSH=$(~/.claude/skills/gstack/bin/gstack-config get checkpoint_push 2>/dev/null || echo "false")
97echo "CHECKPOINT_MODE: $_CHECKPOINT_MODE"
low line 96

Access to home directory dotfiles

SourceSKILL.md
94echo "MODEL_OVERLAY: claude"
95_CHECKPOINT_MODE=$(~/.claude/skills/gstack/bin/gstack-config get checkpoint_mode 2>/dev/null || echo "explicit")
96_CHECKPOINT_PUSH=$(~/.claude/skills/gstack/bin/gstack-config get checkpoint_push 2>/dev/null || echo "false")
97echo "CHECKPOINT_MODE: $_CHECKPOINT_MODE"
98echo "CHECKPOINT_PUSH: $_CHECKPOINT_PUSH"
medium line 104

Access to home directory dotfiles

SourceSKILL.md
102## Plan Mode Safe Operations
103
104In plan mode, allowed because they inform the plan: `$B`, `$D`, `codex exec`/`codex review`, writes to `~/.gstack/`, writes to the plan file, and `open` for generated artifacts.
105
106## Skill Invocation During Plan Mode
medium line 112

Access to home directory dotfiles

SourceSKILL.md
110If `PROACTIVE` is `"false"`, do not auto-invoke or proactively suggest skills. If a skill seems useful, ask: "I think /skillname might help here — want me to run it?"
111
112If `SKILL_PREFIX` is `"true"`, suggest/invoke `/gstack-*` names. Disk paths stay `~/.claude/skills/gstack/[skill-name]/SKILL.md`.
113
114If output shows `UPGRADE_AVAILABLE <old> <new>`: read `~/.claude/skills/gstack/gstack-upgrade/SKILL.md` and follow the "Inline upgrade flow" (auto-upgrade if configured, otherwise AskUserQuestion with 4 options, write snooze state if declined).
medium line 114

Access to home directory dotfiles

SourceSKILL.md
112If `SKILL_PREFIX` is `"true"`, suggest/invoke `/gstack-*` names. Disk paths stay `~/.claude/skills/gstack/[skill-name]/SKILL.md`.
113
114If output shows `UPGRADE_AVAILABLE <old> <new>`: read `~/.claude/skills/gstack/gstack-upgrade/SKILL.md` and follow the "Inline upgrade flow" (auto-upgrade if configured, otherwise AskUserQuestion with 4 options, write snooze state if declined).
115
116If output shows `JUST_UPGRADED <from> <to>`: print "Running gstack v{to} (just updated!)". If `SPAWNED_SESSION` is true, skip feature discovery.
medium line 119

Access to home directory dotfiles

SourceSKILL.md
117
118Feature discovery, max one prompt per session:
119- Missing `~/.claude/skills/gstack/.feature-prompted-continuous-checkpoint`: AskUserQuestion for Continuous checkpoint auto-commits. If accepted, run `~/.claude/skills/gstack/bin/gstack-config set checkpoint_mode continuous`. Always touch marker.
120- Missing `~/.claude/skills/gstack/.feature-prompted-model-overlay`: inform "Model overlays are active. MODEL_OVERLAY shows the patch." Always touch marker.
121
medium line 120

Access to home directory dotfiles

SourceSKILL.md
118Feature discovery, max one prompt per session:
119- Missing `~/.claude/skills/gstack/.feature-prompted-continuous-checkpoint`: AskUserQuestion for Continuous checkpoint auto-commits. If accepted, run `~/.claude/skills/gstack/bin/gstack-config set checkpoint_mode continuous`. Always touch marker.
120- Missing `~/.claude/skills/gstack/.feature-prompted-model-overlay`: inform "Model overlays are active. MODEL_OVERLAY shows the patch." Always touch marker.
121
122After upgrade prompts, continue workflow.
medium line 133

Access to home directory dotfiles

SourceSKILL.md
131
132If A: leave `explain_level` unset (defaults to `default`).
133If B: run `~/.claude/skills/gstack/bin/gstack-config set explain_level terse`.
134
135Always run (regardless of choice):
low line 137

Access to home directory dotfiles

SourceSKILL.md
135Always run (regardless of choice):
136```bash
137rm -f ~/.gstack/.writing-style-prompt-pending
138touch ~/.gstack/.writing-style-prompted
139```
low line 138

Access to home directory dotfiles

SourceSKILL.md
136```bash
137rm -f ~/.gstack/.writing-style-prompt-pending
138touch ~/.gstack/.writing-style-prompted
139```
140
low line 147

Access to home directory dotfiles

SourceSKILL.md
145```bash
146open https://garryslist.org/posts/boil-the-ocean
147touch ~/.gstack/.completeness-intro-seen
148```
149
medium line 160

Access to home directory dotfiles

SourceSKILL.md
158- B) No thanks
159
160If A: run `~/.claude/skills/gstack/bin/gstack-config set telemetry community`
161
162If B: ask follow-up:
medium line 170

Access to home directory dotfiles

SourceSKILL.md
168- B) No thanks, fully off
169
170If B→A: run `~/.claude/skills/gstack/bin/gstack-config set telemetry anonymous`
171If B→B: run `~/.claude/skills/gstack/bin/gstack-config set telemetry off`
172
medium line 171

Access to home directory dotfiles

SourceSKILL.md
169
170If B→A: run `~/.claude/skills/gstack/bin/gstack-config set telemetry anonymous`
171If B→B: run `~/.claude/skills/gstack/bin/gstack-config set telemetry off`
172
173Always run:
low line 175

Access to home directory dotfiles

SourceSKILL.md
173Always run:
174```bash
175touch ~/.gstack/.telemetry-prompted
176```
177
medium line 188

Access to home directory dotfiles

SourceSKILL.md
186- B) Turn it off — I'll type /commands myself
187
188If A: run `~/.claude/skills/gstack/bin/gstack-config set proactive true`
189If B: run `~/.claude/skills/gstack/bin/gstack-config set proactive false`
190
medium line 189

Access to home directory dotfiles

SourceSKILL.md
187
188If A: run `~/.claude/skills/gstack/bin/gstack-config set proactive true`
189If B: run `~/.claude/skills/gstack/bin/gstack-config set proactive false`
190
191Always run:
low line 193

Access to home directory dotfiles

SourceSKILL.md
191Always run:
192```bash
193touch ~/.gstack/.proactive-prompted
194```
195
medium line 234

Access to home directory dotfiles

SourceSKILL.md
232Then commit the change: `git add CLAUDE.md && git commit -m "chore: add gstack skill routing rules to CLAUDE.md"`
233
234If B: run `~/.claude/skills/gstack/bin/gstack-config set routing_declined true` and say they can re-enable with `gstack-config set routing_declined false`.
235
236This only happens once per project. Skip if `HAS_ROUTING` is `yes` or `ROUTING_DECLINED` is `true`.
medium line 238

Access to home directory dotfiles

SourceSKILL.md
236This only happens once per project. Skip if `HAS_ROUTING` is `yes` or `ROUTING_DECLINED` is `true`.
237
238If `VENDORED_GSTACK` is `yes`, warn once via AskUserQuestion unless `~/.gstack/.vendoring-warned-$SLUG` exists:
239
240> This project has gstack vendored in `.claude/skills/gstack/`. Vendoring is deprecated.
medium line 250

Access to home directory dotfiles

SourceSKILL.md
2481. Run `git rm -r .claude/skills/gstack/`
2492. Run `echo '.claude/skills/gstack/' >> .gitignore`
2503. Run `~/.claude/skills/gstack/bin/gstack-team-init required` (or `optional`)
2514. Run `git add .claude/ .gitignore CLAUDE.md && git commit -m "chore: migrate gstack from vendored to team mode"`
2525. Tell the user: "Done. Each developer now runs: `cd ~/.claude/skills/gstack && ./setup --team`"
medium line 252

Access to home directory dotfiles

SourceSKILL.md
2503. Run `~/.claude/skills/gstack/bin/gstack-team-init required` (or `optional`)
2514. Run `git add .claude/ .gitignore CLAUDE.md && git commit -m "chore: migrate gstack from vendored to team mode"`
2525. Tell the user: "Done. Each developer now runs: `cd ~/.claude/skills/gstack && ./setup --team`"
253
254If B: say "OK, you're on your own to keep the vendored copy up to date."
low line 258

Access to home directory dotfiles

SourceSKILL.md
256Always run (regardless of choice):
257```bash
258eval "$(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)" 2>/dev/null || true
259touch ~/.gstack/.vendoring-warned-${SLUG:-unknown}
260```
low line 259

Access to home directory dotfiles

SourceSKILL.md
257```bash
258eval "$(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)" 2>/dev/null || true
259touch ~/.gstack/.vendoring-warned-${SLUG:-unknown}
260```
261
low line 282

Access to home directory dotfiles

SourceSKILL.md
280 _BRAIN_REMOTE_FILE="$HOME/.gstack-brain-remote.txt"
281fi
282_BRAIN_SYNC_BIN="~/.claude/skills/gstack/bin/gstack-brain-sync"
283_BRAIN_CONFIG_BIN="~/.claude/skills/gstack/bin/gstack-config"
284
low line 283

Access to home directory dotfiles

SourceSKILL.md
281fi
282_BRAIN_SYNC_BIN="~/.claude/skills/gstack/bin/gstack-brain-sync"
283_BRAIN_CONFIG_BIN="~/.claude/skills/gstack/bin/gstack-config"
284
285# /sync-gbrain context-load: teach the agent to use gbrain when it's available.
medium line 387

Access to home directory dotfiles

SourceSKILL.md
385```
386
387If A/B and `~/.gstack/.git` is missing, ask whether to run `gstack-artifacts-init`. Do not block the skill.
388
389At skill END before telemetry:
low line 392

Access to home directory dotfiles

SourceSKILL.md
390
391```bash
392"~/.claude/skills/gstack/bin/gstack-brain-sync" --discover-new 2>/dev/null || true
393"~/.claude/skills/gstack/bin/gstack-brain-sync" --once 2>/dev/null || true
394```
low line 393

Access to home directory dotfiles

SourceSKILL.md
391```bash
392"~/.claude/skills/gstack/bin/gstack-brain-sync" --discover-new 2>/dev/null || true
393"~/.claude/skills/gstack/bin/gstack-brain-sync" --once 2>/dev/null || true
394```
395
low line 438

Access to home directory dotfiles

SourceSKILL.md
436
437```bash
438~/.claude/skills/gstack/bin/gstack-learnings-log '{"skill":"SKILL_NAME","type":"operational","key":"SHORT_KEY","insight":"DESCRIPTION","confidence":N,"source":"observed"}'
439```
440
medium line 448

Access to home directory dotfiles

SourceSKILL.md
446
447**PLAN MODE EXCEPTION — ALWAYS RUN:** This command writes telemetry to
448`~/.gstack/analytics/`, matching preamble analytics writes.
449
450Run this bash:
low line 455

Access to home directory dotfiles

SourceSKILL.md
453_TEL_END=$(date +%s)
454_TEL_DUR=$(( _TEL_END - _TEL_START ))
455rm -f ~/.gstack/analytics/.pending-"$_SESSION_ID" 2>/dev/null || true
456# Session timeline: record skill completion (local-only, never sent anywhere)
457~/.claude/skills/gstack/bin/gstack-timeline-log '{"skill":"SKILL_NAME","event":"completed","branch":"'$(git branch --show-current 2>/dev/null || echo unknown)'","outcome":"OUTCOME","duration_s":"'"$_TEL_DUR"'","session":"'"$_SESSION_ID"'"}' 2>/dev/null || true
low line 457

Access to home directory dotfiles

SourceSKILL.md
455rm -f ~/.gstack/analytics/.pending-"$_SESSION_ID" 2>/dev/null || true
456# Session timeline: record skill completion (local-only, never sent anywhere)
457~/.claude/skills/gstack/bin/gstack-timeline-log '{"skill":"SKILL_NAME","event":"completed","branch":"'$(git branch --show-current 2>/dev/null || echo unknown)'","outcome":"OUTCOME","duration_s":"'"$_TEL_DUR"'","session":"'"$_SESSION_ID"'"}' 2>/dev/null || true
458# Local analytics (gated on telemetry setting)
459if [ "$_TEL" != "off" ]; then
low line 460

Access to home directory dotfiles

SourceSKILL.md
458# Local analytics (gated on telemetry setting)
459if [ "$_TEL" != "off" ]; then
460echo '{"skill":"SKILL_NAME","duration_s":"'"$_TEL_DUR"'","outcome":"OUTCOME","browse":"USED_BROWSE","session":"'"$_SESSION_ID"'","ts":"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"}' >> ~/.gstack/analytics/skill-usage.jsonl 2>/dev/null || true
461fi
462# Remote telemetry (opt-in, requires binary)
low line 463

Access to home directory dotfiles

SourceSKILL.md
461fi
462# Remote telemetry (opt-in, requires binary)
463if [ "$_TEL" != "off" ] && [ -x ~/.claude/skills/gstack/bin/gstack-telemetry-log ]; then
464 ~/.claude/skills/gstack/bin/gstack-telemetry-log \
465 --skill "SKILL_NAME" --duration "$_TEL_DUR" --outcome "OUTCOME" \
low line 464

Access to home directory dotfiles

SourceSKILL.md
462# Remote telemetry (opt-in, requires binary)
463if [ "$_TEL" != "off" ] && [ -x ~/.claude/skills/gstack/bin/gstack-telemetry-log ]; then
464 ~/.claude/skills/gstack/bin/gstack-telemetry-log \
465 --skill "SKILL_NAME" --duration "$_TEL_DUR" --outcome "OUTCOME" \
466 --used-browse "USED_BROWSE" --session-id "$_SESSION_ID" 2>/dev/null &
medium line 474

Access to home directory dotfiles

SourceSKILL.md
472## Plan Status Footer
473
474In plan mode before ExitPlanMode: if the plan file lacks `## GSTACK REVIEW REPORT`, run `~/.claude/skills/gstack/bin/gstack-review-read` and append the standard runs/status/findings table. With `NO_REVIEWS` or empty, append a 5-row placeholder with verdict "NO REVIEWS YET — run `/autoplan`". If a richer report exists, skip.
475
476PLAN MODE EXCEPTION — always allowed (it's the plan file).
high line 108

Urgency-based manipulation

SourceSKILL.md
106## Skill Invocation During Plan Mode
107
108If the user invokes a skill in plan mode, the skill takes precedence over generic plan mode behavior. **Treat the skill file as executable instructions, not reference.** Follow it step by step starting from Step 0; the first AskUserQuestion is the workflow entering plan mode, not a violation of it. AskUserQuestion (any variant — `mcp__*__AskUserQuestion` or native; see "AskUserQuestion Format → Tool resolution") satisfies plan mode's end-of-turn requirement. If no variant is callable, the skill is BLOCKED — stop and report `BLOCKED — AskUserQuestion unavailable` per the AskUserQuestion Format rule. At a STOP point, stop immediately. Do not continue the workflow or call ExitPlanMode there. Commands marked "PLAN MODE EXCEPTION — ALWAYS RUN" execute. Call ExitPlanMode only after the skill workflow completes, or if the user tells you to cancel the skill or leave plan mode.
109
110If `PROACTIVE` is `"false"`, do not auto-invoke or proactively suggest skills. If a skill seems useful, ask: "I think /skillname might help here — want me to run it?"
Scanned on May 10, 2026
View Security Dashboard
Installation guide →