slashdev 0.1.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.gitmodules +3 -0
- package/CLAUDE.md +87 -0
- package/README.md +158 -21
- package/bin/check-setup.js +27 -0
- package/claude-skills/agentswarm/SKILL.md +479 -0
- package/claude-skills/bug-diagnosis/SKILL.md +34 -0
- package/claude-skills/code-review/SKILL.md +26 -0
- package/claude-skills/frontend-design/LICENSE.txt +177 -0
- package/claude-skills/frontend-design/SKILL.md +42 -0
- package/claude-skills/pr-description/SKILL.md +35 -0
- package/claude-skills/scope-estimate/SKILL.md +37 -0
- package/hooks/post-response.sh +242 -0
- package/package.json +11 -3
- package/skills/front-end-design/prompts/system.md +37 -0
- package/skills/front-end-testing/prompts/system.md +66 -0
- package/skills/github-manager/prompts/system.md +79 -0
- package/skills/product-expert/prompts/system.md +52 -0
- package/skills/server-admin/prompts/system.md +39 -0
- package/src/auth/index.js +115 -0
- package/src/cli.js +188 -18
- package/src/commands/setup-internals.js +137 -0
- package/src/commands/setup.js +104 -0
- package/src/commands/update.js +60 -0
- package/src/connections/index.js +449 -0
- package/src/connections/providers/github.js +71 -0
- package/src/connections/providers/servers.js +175 -0
- package/src/connections/registry.js +21 -0
- package/src/core/claude.js +78 -0
- package/src/core/codebase.js +119 -0
- package/src/core/config.js +110 -0
- package/src/index.js +8 -1
- package/src/info.js +54 -21
- package/src/skills/index.js +252 -0
- package/src/utils/ssh-keys.js +67 -0
- package/vendor/gstack/.env.example +5 -0
- package/vendor/gstack/autoplan/SKILL.md +1116 -0
- package/vendor/gstack/browse/SKILL.md +538 -0
- package/vendor/gstack/canary/SKILL.md +587 -0
- package/vendor/gstack/careful/SKILL.md +59 -0
- package/vendor/gstack/codex/SKILL.md +862 -0
- package/vendor/gstack/connect-chrome/SKILL.md +549 -0
- package/vendor/gstack/cso/ACKNOWLEDGEMENTS.md +14 -0
- package/vendor/gstack/cso/SKILL.md +929 -0
- package/vendor/gstack/design-consultation/SKILL.md +962 -0
- package/vendor/gstack/design-review/SKILL.md +1314 -0
- package/vendor/gstack/design-shotgun/SKILL.md +730 -0
- package/vendor/gstack/document-release/SKILL.md +718 -0
- package/vendor/gstack/freeze/SKILL.md +82 -0
- package/vendor/gstack/gstack-upgrade/SKILL.md +232 -0
- package/vendor/gstack/guard/SKILL.md +82 -0
- package/vendor/gstack/investigate/SKILL.md +504 -0
- package/vendor/gstack/land-and-deploy/SKILL.md +1367 -0
- package/vendor/gstack/office-hours/SKILL.md +1317 -0
- package/vendor/gstack/plan-ceo-review/SKILL.md +1537 -0
- package/vendor/gstack/plan-design-review/SKILL.md +1227 -0
- package/vendor/gstack/plan-eng-review/SKILL.md +1120 -0
- package/vendor/gstack/qa/SKILL.md +1136 -0
- package/vendor/gstack/qa/references/issue-taxonomy.md +85 -0
- package/vendor/gstack/qa/templates/qa-report-template.md +126 -0
- package/vendor/gstack/qa-only/SKILL.md +726 -0
- package/vendor/gstack/retro/SKILL.md +1197 -0
- package/vendor/gstack/review/SKILL.md +1138 -0
- package/vendor/gstack/review/TODOS-format.md +62 -0
- package/vendor/gstack/review/checklist.md +220 -0
- package/vendor/gstack/review/design-checklist.md +132 -0
- package/vendor/gstack/review/greptile-triage.md +220 -0
- package/vendor/gstack/setup-browser-cookies/SKILL.md +348 -0
- package/vendor/gstack/setup-deploy/SKILL.md +528 -0
- package/vendor/gstack/ship/SKILL.md +1931 -0
- package/vendor/gstack/unfreeze/SKILL.md +40 -0
|
@@ -0,0 +1,348 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: setup-browser-cookies
|
|
3
|
+
preamble-tier: 1
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
description: |
|
|
6
|
+
Import cookies from your real Chromium browser into the headless browse session.
|
|
7
|
+
Opens an interactive picker UI where you select which cookie domains to import.
|
|
8
|
+
Use before QA testing authenticated pages. Use when asked to "import cookies",
|
|
9
|
+
"login to the site", or "authenticate the browser".
|
|
10
|
+
allowed-tools:
|
|
11
|
+
- Bash
|
|
12
|
+
- Read
|
|
13
|
+
- AskUserQuestion
|
|
14
|
+
---
|
|
15
|
+
<!-- AUTO-GENERATED from SKILL.md.tmpl — do not edit directly -->
|
|
16
|
+
<!-- Regenerate: bun run gen:skill-docs -->
|
|
17
|
+
|
|
18
|
+
## Preamble (run first)
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
_UPD=$(~/.claude/skills/gstack/bin/gstack-update-check 2>/dev/null || .claude/skills/gstack/bin/gstack-update-check 2>/dev/null || true)
|
|
22
|
+
[ -n "$_UPD" ] && echo "$_UPD" || true
|
|
23
|
+
mkdir -p ~/.gstack/sessions
|
|
24
|
+
touch ~/.gstack/sessions/"$PPID"
|
|
25
|
+
_SESSIONS=$(find ~/.gstack/sessions -mmin -120 -type f 2>/dev/null | wc -l | tr -d ' ')
|
|
26
|
+
find ~/.gstack/sessions -mmin +120 -type f -delete 2>/dev/null || true
|
|
27
|
+
_CONTRIB=$(~/.claude/skills/gstack/bin/gstack-config get gstack_contributor 2>/dev/null || true)
|
|
28
|
+
_PROACTIVE=$(~/.claude/skills/gstack/bin/gstack-config get proactive 2>/dev/null || echo "true")
|
|
29
|
+
_PROACTIVE_PROMPTED=$([ -f ~/.gstack/.proactive-prompted ] && echo "yes" || echo "no")
|
|
30
|
+
_BRANCH=$(git branch --show-current 2>/dev/null || echo "unknown")
|
|
31
|
+
echo "BRANCH: $_BRANCH"
|
|
32
|
+
_SKILL_PREFIX=$(~/.claude/skills/gstack/bin/gstack-config get skill_prefix 2>/dev/null || echo "false")
|
|
33
|
+
echo "PROACTIVE: $_PROACTIVE"
|
|
34
|
+
echo "PROACTIVE_PROMPTED: $_PROACTIVE_PROMPTED"
|
|
35
|
+
echo "SKILL_PREFIX: $_SKILL_PREFIX"
|
|
36
|
+
source <(~/.claude/skills/gstack/bin/gstack-repo-mode 2>/dev/null) || true
|
|
37
|
+
REPO_MODE=${REPO_MODE:-unknown}
|
|
38
|
+
echo "REPO_MODE: $REPO_MODE"
|
|
39
|
+
_LAKE_SEEN=$([ -f ~/.gstack/.completeness-intro-seen ] && echo "yes" || echo "no")
|
|
40
|
+
echo "LAKE_INTRO: $_LAKE_SEEN"
|
|
41
|
+
_TEL=$(~/.claude/skills/gstack/bin/gstack-config get telemetry 2>/dev/null || true)
|
|
42
|
+
_TEL_PROMPTED=$([ -f ~/.gstack/.telemetry-prompted ] && echo "yes" || echo "no")
|
|
43
|
+
_TEL_START=$(date +%s)
|
|
44
|
+
_SESSION_ID="$$-$(date +%s)"
|
|
45
|
+
echo "TELEMETRY: ${_TEL:-off}"
|
|
46
|
+
echo "TEL_PROMPTED: $_TEL_PROMPTED"
|
|
47
|
+
mkdir -p ~/.gstack/analytics
|
|
48
|
+
echo '{"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
|
|
49
|
+
# zsh-compatible: use find instead of glob to avoid NOMATCH error
|
|
50
|
+
for _PF in $(find ~/.gstack/analytics -maxdepth 1 -name '.pending-*' 2>/dev/null); do
|
|
51
|
+
if [ -f "$_PF" ]; then
|
|
52
|
+
if [ "$_TEL" != "off" ] && [ -x "~/.claude/skills/gstack/bin/gstack-telemetry-log" ]; then
|
|
53
|
+
~/.claude/skills/gstack/bin/gstack-telemetry-log --event-type skill_run --skill _pending_finalize --outcome unknown --session-id "$_SESSION_ID" 2>/dev/null || true
|
|
54
|
+
fi
|
|
55
|
+
rm -f "$_PF" 2>/dev/null || true
|
|
56
|
+
fi
|
|
57
|
+
break
|
|
58
|
+
done
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
If `PROACTIVE` is `"false"`, do not proactively suggest gstack skills AND do not
|
|
62
|
+
auto-invoke skills based on conversation context. Only run skills the user explicitly
|
|
63
|
+
types (e.g., /qa, /ship). If you would have auto-invoked a skill, instead briefly say:
|
|
64
|
+
"I think /skillname might help here — want me to run it?" and wait for confirmation.
|
|
65
|
+
The user opted out of proactive behavior.
|
|
66
|
+
|
|
67
|
+
If `SKILL_PREFIX` is `"true"`, the user has namespaced skill names. When suggesting
|
|
68
|
+
or invoking other gstack skills, use the `/gstack-` prefix (e.g., `/gstack-qa` instead
|
|
69
|
+
of `/qa`, `/gstack-ship` instead of `/ship`). Disk paths are unaffected — always use
|
|
70
|
+
`~/.claude/skills/gstack/[skill-name]/SKILL.md` for reading skill files.
|
|
71
|
+
|
|
72
|
+
If 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). If `JUST_UPGRADED <from> <to>`: tell user "Running gstack v{to} (just updated!)" and continue.
|
|
73
|
+
|
|
74
|
+
If `LAKE_INTRO` is `no`: Before continuing, introduce the Completeness Principle.
|
|
75
|
+
Tell the user: "gstack follows the **Boil the Lake** principle — always do the complete
|
|
76
|
+
thing when AI makes the marginal cost near-zero. Read more: https://garryslist.org/posts/boil-the-ocean"
|
|
77
|
+
Then offer to open the essay in their default browser:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
open https://garryslist.org/posts/boil-the-ocean
|
|
81
|
+
touch ~/.gstack/.completeness-intro-seen
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Only run `open` if the user says yes. Always run `touch` to mark as seen. This only happens once.
|
|
85
|
+
|
|
86
|
+
If `TEL_PROMPTED` is `no` AND `LAKE_INTRO` is `yes`: After the lake intro is handled,
|
|
87
|
+
ask the user about telemetry. Use AskUserQuestion:
|
|
88
|
+
|
|
89
|
+
> Help gstack get better! Community mode shares usage data (which skills you use, how long
|
|
90
|
+
> they take, crash info) with a stable device ID so we can track trends and fix bugs faster.
|
|
91
|
+
> No code, file paths, or repo names are ever sent.
|
|
92
|
+
> Change anytime with `gstack-config set telemetry off`.
|
|
93
|
+
|
|
94
|
+
Options:
|
|
95
|
+
- A) Help gstack get better! (recommended)
|
|
96
|
+
- B) No thanks
|
|
97
|
+
|
|
98
|
+
If A: run `~/.claude/skills/gstack/bin/gstack-config set telemetry community`
|
|
99
|
+
|
|
100
|
+
If B: ask a follow-up AskUserQuestion:
|
|
101
|
+
|
|
102
|
+
> How about anonymous mode? We just learn that *someone* used gstack — no unique ID,
|
|
103
|
+
> no way to connect sessions. Just a counter that helps us know if anyone's out there.
|
|
104
|
+
|
|
105
|
+
Options:
|
|
106
|
+
- A) Sure, anonymous is fine
|
|
107
|
+
- B) No thanks, fully off
|
|
108
|
+
|
|
109
|
+
If B→A: run `~/.claude/skills/gstack/bin/gstack-config set telemetry anonymous`
|
|
110
|
+
If B→B: run `~/.claude/skills/gstack/bin/gstack-config set telemetry off`
|
|
111
|
+
|
|
112
|
+
Always run:
|
|
113
|
+
```bash
|
|
114
|
+
touch ~/.gstack/.telemetry-prompted
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
This only happens once. If `TEL_PROMPTED` is `yes`, skip this entirely.
|
|
118
|
+
|
|
119
|
+
If `PROACTIVE_PROMPTED` is `no` AND `TEL_PROMPTED` is `yes`: After telemetry is handled,
|
|
120
|
+
ask the user about proactive behavior. Use AskUserQuestion:
|
|
121
|
+
|
|
122
|
+
> gstack can proactively figure out when you might need a skill while you work —
|
|
123
|
+
> like suggesting /qa when you say "does this work?" or /investigate when you hit
|
|
124
|
+
> a bug. We recommend keeping this on — it speeds up every part of your workflow.
|
|
125
|
+
|
|
126
|
+
Options:
|
|
127
|
+
- A) Keep it on (recommended)
|
|
128
|
+
- B) Turn it off — I'll type /commands myself
|
|
129
|
+
|
|
130
|
+
If A: run `~/.claude/skills/gstack/bin/gstack-config set proactive true`
|
|
131
|
+
If B: run `~/.claude/skills/gstack/bin/gstack-config set proactive false`
|
|
132
|
+
|
|
133
|
+
Always run:
|
|
134
|
+
```bash
|
|
135
|
+
touch ~/.gstack/.proactive-prompted
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
This only happens once. If `PROACTIVE_PROMPTED` is `yes`, skip this entirely.
|
|
139
|
+
|
|
140
|
+
## Voice
|
|
141
|
+
|
|
142
|
+
**Tone:** direct, concrete, sharp, never corporate, never academic. Sound like a builder, not a consultant. Name the file, the function, the command. No filler, no throat-clearing.
|
|
143
|
+
|
|
144
|
+
**Writing rules:** No em dashes (use commas, periods, "..."). No AI vocabulary (delve, crucial, robust, comprehensive, nuanced, etc.). Short paragraphs. End with what to do.
|
|
145
|
+
|
|
146
|
+
The user always has context you don't. Cross-model agreement is a recommendation, not a decision — the user decides.
|
|
147
|
+
|
|
148
|
+
## Contributor Mode
|
|
149
|
+
|
|
150
|
+
If `_CONTRIB` is `true`: you are in **contributor mode**. At the end of each major workflow step, rate your gstack experience 0-10. If not a 10 and there's an actionable bug or improvement — file a field report.
|
|
151
|
+
|
|
152
|
+
**File only:** gstack tooling bugs where the input was reasonable but gstack failed. **Skip:** user app bugs, network errors, auth failures on user's site.
|
|
153
|
+
|
|
154
|
+
**To file:** write `~/.gstack/contributor-logs/{slug}.md`:
|
|
155
|
+
```
|
|
156
|
+
# {Title}
|
|
157
|
+
**What I tried:** {action} | **What happened:** {result} | **Rating:** {0-10}
|
|
158
|
+
## Repro
|
|
159
|
+
1. {step}
|
|
160
|
+
## What would make this a 10
|
|
161
|
+
{one sentence}
|
|
162
|
+
**Date:** {YYYY-MM-DD} | **Version:** {version} | **Skill:** /{skill}
|
|
163
|
+
```
|
|
164
|
+
Slug: lowercase hyphens, max 60 chars. Skip if exists. Max 3/session. File inline, don't stop.
|
|
165
|
+
|
|
166
|
+
## Completion Status Protocol
|
|
167
|
+
|
|
168
|
+
When completing a skill workflow, report status using one of:
|
|
169
|
+
- **DONE** — All steps completed successfully. Evidence provided for each claim.
|
|
170
|
+
- **DONE_WITH_CONCERNS** — Completed, but with issues the user should know about. List each concern.
|
|
171
|
+
- **BLOCKED** — Cannot proceed. State what is blocking and what was tried.
|
|
172
|
+
- **NEEDS_CONTEXT** — Missing information required to continue. State exactly what you need.
|
|
173
|
+
|
|
174
|
+
### Escalation
|
|
175
|
+
|
|
176
|
+
It is always OK to stop and say "this is too hard for me" or "I'm not confident in this result."
|
|
177
|
+
|
|
178
|
+
Bad work is worse than no work. You will not be penalized for escalating.
|
|
179
|
+
- If you have attempted a task 3 times without success, STOP and escalate.
|
|
180
|
+
- If you are uncertain about a security-sensitive change, STOP and escalate.
|
|
181
|
+
- If the scope of work exceeds what you can verify, STOP and escalate.
|
|
182
|
+
|
|
183
|
+
Escalation format:
|
|
184
|
+
```
|
|
185
|
+
STATUS: BLOCKED | NEEDS_CONTEXT
|
|
186
|
+
REASON: [1-2 sentences]
|
|
187
|
+
ATTEMPTED: [what you tried]
|
|
188
|
+
RECOMMENDATION: [what the user should do next]
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
## Telemetry (run last)
|
|
192
|
+
|
|
193
|
+
After the skill workflow completes (success, error, or abort), log the telemetry event.
|
|
194
|
+
Determine the skill name from the `name:` field in this file's YAML frontmatter.
|
|
195
|
+
Determine the outcome from the workflow result (success if completed normally, error
|
|
196
|
+
if it failed, abort if the user interrupted).
|
|
197
|
+
|
|
198
|
+
**PLAN MODE EXCEPTION — ALWAYS RUN:** This command writes telemetry to
|
|
199
|
+
`~/.gstack/analytics/` (user config directory, not project files). The skill
|
|
200
|
+
preamble already writes to the same directory — this is the same pattern.
|
|
201
|
+
Skipping this command loses session duration and outcome data.
|
|
202
|
+
|
|
203
|
+
Run this bash:
|
|
204
|
+
|
|
205
|
+
```bash
|
|
206
|
+
_TEL_END=$(date +%s)
|
|
207
|
+
_TEL_DUR=$(( _TEL_END - _TEL_START ))
|
|
208
|
+
rm -f ~/.gstack/analytics/.pending-"$_SESSION_ID" 2>/dev/null || true
|
|
209
|
+
# Local analytics (always available, no binary needed)
|
|
210
|
+
echo '{"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
|
|
211
|
+
# Remote telemetry (opt-in, requires binary)
|
|
212
|
+
if [ "$_TEL" != "off" ] && [ -x ~/.claude/skills/gstack/bin/gstack-telemetry-log ]; then
|
|
213
|
+
~/.claude/skills/gstack/bin/gstack-telemetry-log \
|
|
214
|
+
--skill "SKILL_NAME" --duration "$_TEL_DUR" --outcome "OUTCOME" \
|
|
215
|
+
--used-browse "USED_BROWSE" --session-id "$_SESSION_ID" 2>/dev/null &
|
|
216
|
+
fi
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
Replace `SKILL_NAME` with the actual skill name from frontmatter, `OUTCOME` with
|
|
220
|
+
success/error/abort, and `USED_BROWSE` with true/false based on whether `$B` was used.
|
|
221
|
+
If you cannot determine the outcome, use "unknown". The local JSONL always logs. The
|
|
222
|
+
remote binary only runs if telemetry is not off and the binary exists.
|
|
223
|
+
|
|
224
|
+
## Plan Status Footer
|
|
225
|
+
|
|
226
|
+
When you are in plan mode and about to call ExitPlanMode:
|
|
227
|
+
|
|
228
|
+
1. Check if the plan file already has a `## GSTACK REVIEW REPORT` section.
|
|
229
|
+
2. If it DOES — skip (a review skill already wrote a richer report).
|
|
230
|
+
3. If it does NOT — run this command:
|
|
231
|
+
|
|
232
|
+
\`\`\`bash
|
|
233
|
+
~/.claude/skills/gstack/bin/gstack-review-read
|
|
234
|
+
\`\`\`
|
|
235
|
+
|
|
236
|
+
Then write a `## GSTACK REVIEW REPORT` section to the end of the plan file:
|
|
237
|
+
|
|
238
|
+
- If the output contains review entries (JSONL lines before `---CONFIG---`): format the
|
|
239
|
+
standard report table with runs/status/findings per skill, same format as the review
|
|
240
|
+
skills use.
|
|
241
|
+
- If the output is `NO_REVIEWS` or empty: write this placeholder table:
|
|
242
|
+
|
|
243
|
+
\`\`\`markdown
|
|
244
|
+
## GSTACK REVIEW REPORT
|
|
245
|
+
|
|
246
|
+
| Review | Trigger | Why | Runs | Status | Findings |
|
|
247
|
+
|--------|---------|-----|------|--------|----------|
|
|
248
|
+
| CEO Review | \`/plan-ceo-review\` | Scope & strategy | 0 | — | — |
|
|
249
|
+
| Codex Review | \`/codex review\` | Independent 2nd opinion | 0 | — | — |
|
|
250
|
+
| Eng Review | \`/plan-eng-review\` | Architecture & tests (required) | 0 | — | — |
|
|
251
|
+
| Design Review | \`/plan-design-review\` | UI/UX gaps | 0 | — | — |
|
|
252
|
+
|
|
253
|
+
**VERDICT:** NO REVIEWS YET — run \`/autoplan\` for full review pipeline, or individual reviews above.
|
|
254
|
+
\`\`\`
|
|
255
|
+
|
|
256
|
+
**PLAN MODE EXCEPTION — ALWAYS RUN:** This writes to the plan file, which is the one
|
|
257
|
+
file you are allowed to edit in plan mode. The plan file review report is part of the
|
|
258
|
+
plan's living status.
|
|
259
|
+
|
|
260
|
+
# Setup Browser Cookies
|
|
261
|
+
|
|
262
|
+
Import logged-in sessions from your real Chromium browser into the headless browse session.
|
|
263
|
+
|
|
264
|
+
## CDP mode check
|
|
265
|
+
|
|
266
|
+
First, check if browse is already connected to the user's real browser:
|
|
267
|
+
```bash
|
|
268
|
+
$B status 2>/dev/null | grep -q "Mode: cdp" && echo "CDP_MODE=true" || echo "CDP_MODE=false"
|
|
269
|
+
```
|
|
270
|
+
If `CDP_MODE=true`: tell the user "Not needed — you're connected to your real browser via CDP. Your cookies and sessions are already available." and stop. No cookie import needed.
|
|
271
|
+
|
|
272
|
+
## How it works
|
|
273
|
+
|
|
274
|
+
1. Find the browse binary
|
|
275
|
+
2. Run `cookie-import-browser` to detect installed browsers and open the picker UI
|
|
276
|
+
3. User selects which cookie domains to import in their browser
|
|
277
|
+
4. Cookies are decrypted and loaded into the Playwright session
|
|
278
|
+
|
|
279
|
+
## Steps
|
|
280
|
+
|
|
281
|
+
### 1. Find the browse binary
|
|
282
|
+
|
|
283
|
+
## SETUP (run this check BEFORE any browse command)
|
|
284
|
+
|
|
285
|
+
```bash
|
|
286
|
+
_ROOT=$(git rev-parse --show-toplevel 2>/dev/null)
|
|
287
|
+
B=""
|
|
288
|
+
[ -n "$_ROOT" ] && [ -x "$_ROOT/.claude/skills/gstack/browse/dist/browse" ] && B="$_ROOT/.claude/skills/gstack/browse/dist/browse"
|
|
289
|
+
[ -z "$B" ] && B=~/.claude/skills/gstack/browse/dist/browse
|
|
290
|
+
if [ -x "$B" ]; then
|
|
291
|
+
echo "READY: $B"
|
|
292
|
+
else
|
|
293
|
+
echo "NEEDS_SETUP"
|
|
294
|
+
fi
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
If `NEEDS_SETUP`:
|
|
298
|
+
1. Tell the user: "gstack browse needs a one-time build (~10 seconds). OK to proceed?" Then STOP and wait.
|
|
299
|
+
2. Run: `cd <SKILL_DIR> && ./setup`
|
|
300
|
+
3. If `bun` is not installed:
|
|
301
|
+
```bash
|
|
302
|
+
if ! command -v bun >/dev/null 2>&1; then
|
|
303
|
+
curl -fsSL https://bun.sh/install | BUN_VERSION=1.3.10 bash
|
|
304
|
+
fi
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
### 2. Open the cookie picker
|
|
308
|
+
|
|
309
|
+
```bash
|
|
310
|
+
$B cookie-import-browser
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
This auto-detects installed Chromium browsers and opens
|
|
314
|
+
an interactive picker UI in your default browser where you can:
|
|
315
|
+
- Switch between installed browsers
|
|
316
|
+
- Search domains
|
|
317
|
+
- Click "+" to import a domain's cookies
|
|
318
|
+
- Click trash to remove imported cookies
|
|
319
|
+
|
|
320
|
+
Tell the user: **"Cookie picker opened — select the domains you want to import in your browser, then tell me when you're done."**
|
|
321
|
+
|
|
322
|
+
### 3. Direct import (alternative)
|
|
323
|
+
|
|
324
|
+
If the user specifies a domain directly (e.g., `/setup-browser-cookies github.com`), skip the UI:
|
|
325
|
+
|
|
326
|
+
```bash
|
|
327
|
+
$B cookie-import-browser comet --domain github.com
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
Replace `comet` with the appropriate browser if specified.
|
|
331
|
+
|
|
332
|
+
### 4. Verify
|
|
333
|
+
|
|
334
|
+
After the user confirms they're done:
|
|
335
|
+
|
|
336
|
+
```bash
|
|
337
|
+
$B cookies
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
Show the user a summary of imported cookies (domain counts).
|
|
341
|
+
|
|
342
|
+
## Notes
|
|
343
|
+
|
|
344
|
+
- On macOS, the first import per browser may trigger a Keychain dialog — click "Allow" / "Always Allow"
|
|
345
|
+
- On Linux, `v11` cookies may require `secret-tool`/libsecret access; `v10` cookies use Chromium's standard fallback key
|
|
346
|
+
- Cookie picker is served on the same port as the browse server (no extra process)
|
|
347
|
+
- Only domain names and cookie counts are shown in the UI — no cookie values are exposed
|
|
348
|
+
- The browse session persists cookies between commands, so imported cookies work immediately
|