tau-coding-agent 0.1.6 → 0.2.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.
Files changed (80) hide show
  1. package/README.md +15 -12
  2. package/extensions/answer.ts +129 -79
  3. package/extensions/branch-term/README.md +7 -0
  4. package/extensions/{branch-term.ts → branch-term/index.ts} +113 -104
  5. package/extensions/btw.ts +17 -2
  6. package/extensions/caffeinate/README.md +5 -0
  7. package/extensions/caffeinate/index.ts +144 -0
  8. package/extensions/fast.ts +292 -0
  9. package/extensions/ghostty.ts +214 -211
  10. package/extensions/git-diff-stats.ts +124 -84
  11. package/extensions/git-pr-status.ts +274 -208
  12. package/extensions/insights.ts +109 -191
  13. package/extensions/loop.ts +149 -145
  14. package/extensions/memory.ts +138 -86
  15. package/extensions/notify.ts +14 -26
  16. package/extensions/openai-verbosity.ts +108 -42
  17. package/extensions/review/fix.ts +15 -6
  18. package/extensions/review/git.ts +93 -103
  19. package/extensions/review/index.ts +60 -62
  20. package/extensions/review/interrupt.ts +117 -0
  21. package/extensions/review/message-queue.ts +45 -12
  22. package/extensions/review/models.ts +79 -3
  23. package/extensions/review/prompts.ts +41 -38
  24. package/extensions/review/review.ts +161 -166
  25. package/extensions/review/runner.ts +139 -147
  26. package/extensions/review/runtime.ts +173 -120
  27. package/extensions/review/triage.ts +41 -44
  28. package/extensions/sandbox/bash.ts +775 -0
  29. package/extensions/sandbox/command.ts +605 -0
  30. package/extensions/sandbox/config.ts +764 -0
  31. package/extensions/sandbox/index.ts +132 -3338
  32. package/extensions/sandbox/permissions/dialog.ts +118 -0
  33. package/extensions/sandbox/permissions/filesystem.ts +559 -0
  34. package/extensions/sandbox/permissions/mach-lookup.ts +186 -0
  35. package/extensions/sandbox/permissions/network.ts +164 -0
  36. package/extensions/sandbox/permissions/unsandboxed.ts +270 -0
  37. package/extensions/sandbox/runtime.ts +616 -0
  38. package/extensions/stash.ts +28 -15
  39. package/extensions/subagent/README.md +73 -0
  40. package/extensions/subagent/index.ts +822 -0
  41. package/extensions/subagent/interrupt.ts +117 -0
  42. package/extensions/subagent/permissions.ts +101 -0
  43. package/extensions/subagent/rpc.ts +177 -0
  44. package/extensions/tool-display-mode.ts +267 -64
  45. package/extensions/usage/index.ts +249 -356
  46. package/extensions/usage/openrouter.ts +10 -2
  47. package/extensions/websearch/README.md +12 -47
  48. package/extensions/websearch/config.ts +5 -2
  49. package/extensions/websearch/index.ts +94 -109
  50. package/extensions/websearch/output.ts +51 -0
  51. package/extensions/websearch/providers/anthropic.pi.ts +27 -44
  52. package/extensions/websearch/providers/gemini.browser.ts +68 -77
  53. package/extensions/websearch/providers/gemini.pi.ts +17 -17
  54. package/extensions/websearch/providers/openai-codex.pi.ts +145 -7
  55. package/extensions/websearch/providers/pi-model.shared.ts +33 -39
  56. package/extensions/websearch/providers/shared.ts +87 -2
  57. package/extensions/websearch/types.ts +0 -3
  58. package/extensions/worktree.ts +132 -172
  59. package/package.json +10 -5
  60. package/skills/browser-tools/SKILL.md +29 -234
  61. package/skills/browser-tools/references/cookies.md +36 -0
  62. package/skills/browser-tools/references/interaction.md +90 -0
  63. package/skills/browser-tools/references/logging.md +34 -0
  64. package/skills/git-clean-history/SKILL.md +6 -6
  65. package/skills/git-commit/SKILL.md +5 -3
  66. package/skills/github-pull-request/SKILL.md +60 -0
  67. package/skills/github-pull-request/references/create.md +40 -0
  68. package/skills/github-pull-request/references/stewardship.md +60 -0
  69. package/skills/oracle/SKILL.md +3 -3
  70. package/skills/oracle/scripts/oracle +10 -1
  71. package/skills/sentry/SKILL.md +15 -185
  72. package/skills/sentry/references/events.md +79 -0
  73. package/skills/sentry/references/issues.md +62 -0
  74. package/skills/sentry/references/logs.md +46 -0
  75. package/skills/update-changelog/SKILL.md +27 -121
  76. package/skills/web-design/SKILL.md +16 -105
  77. package/themes/tau-dark.json +4 -0
  78. package/extensions/openai-fast.ts +0 -229
  79. package/extensions/websearch/providers/openai-codex.browser.ts +0 -77
  80. package/extensions/websearch/providers/openai-codex.shared.ts +0 -123
@@ -1,253 +1,48 @@
1
1
  ---
2
2
  name: browser-tools
3
- description: Interactive browser automation via Chrome DevTools Protocol. Use when you need to interact with web pages, test frontends, or when user interaction with a visible browser is required.
3
+ description: Interactive browser automation via Chrome DevTools Protocol. Use for real-browser frontend testing, dynamic-page interaction, or user selection in a visible browser.
4
4
  ---
5
5
 
6
6
  # Browser Tools
7
7
 
8
- Chrome DevTools Protocol tools for agent-assisted web automation. These tools connect to a Chromium-based browser (Chromium/Chrome) running on `:9222` with remote debugging enabled.
8
+ Tools for interacting with Chromium or Google Chrome over remote debugging at `127.0.0.1:9222`. Ordinary source edits and pages retrievable without browser interaction do not require this skill.
9
9
 
10
- ## Requirements
10
+ ## Setup and session ownership
11
11
 
12
- Chromium or Google Chrome with remote debugging support. The scripts auto-detect common installs; set `BROWSER_TOOLS_BROWSER` or `BROWSER_TOOLS_EXECUTABLE` if auto-detection picks the wrong browser.
12
+ Chromium or Chrome with remote debugging support is required. Scripts auto-detect common macOS and Linux installs. For development in a source checkout, install dependencies with `npm install` at the repository root.
13
13
 
14
- ## Setup
15
-
16
- When hacking on this skill from a source checkout:
17
-
18
- ```bash
19
- npm install
20
- ```
21
-
22
- ## Tools
23
-
24
- Important: Always run commands from this skill directory.
25
-
26
- ### Start Chromium / Chrome
27
-
28
- ```bash
29
- "./scripts/browser-start.js" # Dedicated tool profile
30
- "./scripts/browser-start.js" --profile # Seed from your browser profile (cookies, logins)
31
- "./scripts/browser-start.js" --watch # Start background JSONL logging
32
- "./scripts/browser-start.js" --browser chromium
33
- "./scripts/browser-start.js" --browser chrome
34
- ```
35
-
36
- Launch a browser with remote debugging on `:9222`. Use `--profile` to preserve your authentication state. If a browser is already running on `:9222`, it is reused; launch options like `--browser`, `--executable`, and `--profile` only affect new browser instances.
37
-
38
- If the auto-detection picks the wrong browser, set:
39
-
40
- - `BROWSER_TOOLS_BROWSER=chromium` (or `chrome`)
41
- - `BROWSER_TOOLS_EXECUTABLE=/absolute/path/to/browser`
42
- - `BROWSER_TOOLS_PROFILE_SRC=/absolute/path/to/profile/dir` (optional; useful with `--executable --profile`)
43
-
44
- ### Navigate
45
-
46
- ```bash
47
- "./scripts/browser-nav.js" https://example.com
48
- "./scripts/browser-nav.js" https://example.com --new
49
- ```
50
-
51
- Navigate to URLs. Use `--new` flag to open in a new tab instead of reusing current tab.
52
-
53
- ### Evaluate JavaScript
54
-
55
- ```bash
56
- "./scripts/browser-eval.js" 'document.title'
57
- "./scripts/browser-eval.js" 'document.querySelectorAll("a").length'
58
- "./scripts/browser-eval.js" 'const el = document.querySelector("textarea"); return el?.value'
59
- "./scripts/browser-eval.js" --file ./snippet.js
60
- printf 'return document.title\n' | "./scripts/browser-eval.js" --stdin
61
- ```
62
-
63
- Execute JavaScript in the active tab. Code runs in async context. Expressions and statement bodies are both supported. Use `return` when passing statements or multi-line code.
64
-
65
- ### Screenshot
66
-
67
- ```bash
68
- "./scripts/browser-screenshot.js"
69
- ```
70
-
71
- Capture current viewport and return temporary file path. Use this to visually inspect page state or verify UI changes.
72
-
73
- ### Pick Elements
74
-
75
- ```bash
76
- "./scripts/browser-pick.js" "Click the submit button"
77
- ```
78
-
79
- Use this when the user wants to select specific DOM elements on the page. This launches an interactive picker: click elements to select them, Cmd/Ctrl+Click for multi-select, Enter to finish.
80
-
81
- ### Dismiss cookie banners
82
-
83
- ```bash
84
- "./scripts/browser-dismiss-cookies.js" # Accept cookies
85
- "./scripts/browser-dismiss-cookies.js" --reject # Reject (where possible)
86
- ```
87
-
88
- Run after navigation if cookie dialogs interfere with interaction.
89
-
90
- ### Cookies
91
-
92
- ```bash
93
- "./scripts/browser-cookies.js"
94
- "./scripts/browser-cookies.js" --format=netscape > cookies.txt
95
- ```
96
-
97
- Display all cookies for the current tab including domain, path, httpOnly, and secure flags.
98
-
99
- The `--format=netscape` option outputs cookies in Netscape format for use with curl/wget (`curl -b cookies.txt`).
100
-
101
- ### Extract Page Content
102
-
103
- ```bash
104
- "./scripts/browser-content.js" https://example.com
105
- ```
106
-
107
- Navigate to a URL and extract readable content as markdown. Uses Mozilla Readability for article extraction and Turndown for HTML-to-markdown conversion.
108
-
109
- ### Background logging (console + errors + network)
110
-
111
- Start the watcher:
112
-
113
- ```bash
114
- "./scripts/browser-watch.js"
115
- ```
116
-
117
- Or launch the browser with logging enabled:
118
-
119
- ```bash
120
- "./scripts/browser-start.js" --watch
121
- ```
122
-
123
- Logs are written as JSONL to a temp directory by default:
124
-
125
- - Default: `/tmp/agent-browser-tools/logs/YYYY-MM-DD/<targetId>.jsonl`
126
- - Override: `BROWSER_TOOLS_LOG_ROOT=/some/dir`
127
-
128
- Tail the most recent log:
129
-
130
- ```bash
131
- "./scripts/browser-logs-tail.js" # dump and exit
132
- "./scripts/browser-logs-tail.js" --follow # follow
133
- ```
134
-
135
- Summarize network responses (status codes, failures):
14
+ Run browser commands from this skill directory. All command paths in this skill and its references are relative to this directory, not `references/`.
136
15
 
137
16
  ```bash
138
- "./scripts/browser-net-summary.js"
139
- "./scripts/browser-net-summary.js" --file /path/to/log.jsonl
140
- ```
141
-
142
- ### When to Use
143
-
144
- - Testing frontend code in a real browser
145
- - Interacting with pages that require JavaScript
146
- - When user needs to visually see or interact with a page
147
- - Debugging authentication or session issues
148
- - Scraping dynamic content that requires JS execution
149
-
150
- ## Efficiency Guide
151
-
152
- ### DOM Inspection Over Screenshots
153
-
154
- **Don't** lead with screenshots to inspect page state. **Do** prefer parsing the DOM directly first, and use screenshots when you need visual/layout verification:
155
-
156
- ```javascript
157
- // Get page structure
158
- document.body.innerHTML.slice(0, 5000);
159
-
160
- // Find interactive elements
161
- Array.from(document.querySelectorAll('button, input, [role="button"]')).map((e) => ({
162
- id: e.id,
163
- text: e.textContent.trim(),
164
- class: e.className,
165
- }));
166
- ```
167
-
168
- ### Complex Scripts in Single Calls
169
-
170
- Use one eval call for multi-step workflows. `browser-eval.js` supports statement bodies, `return`, and `await`:
171
-
172
- ```javascript
173
- const data = document.querySelector("#target")?.textContent;
174
- const buttons = document.querySelectorAll("button");
175
-
176
- buttons[0]?.click();
177
-
178
- return {
179
- data,
180
- buttonCount: buttons.length,
181
- };
182
- ```
183
-
184
- ### Batch Interactions
185
-
186
- **Don't** make separate calls for each click. **Do** batch them:
187
-
188
- ```javascript
189
- const actions = ["btn1", "btn2", "btn3"];
190
- actions.forEach((id) => document.getElementById(id)?.click());
191
- return "Done";
192
- ```
193
-
194
- ### Typing/Input Sequences
195
-
196
- For normal form inputs, set the value and dispatch events in one call:
197
-
198
- ```javascript
199
- const input = document.querySelector('input[name="email"]');
200
- if (!input) return "Input not found";
201
-
202
- input.value = "user@example.com";
203
- input.dispatchEvent(new Event("input", { bubbles: true }));
204
- input.dispatchEvent(new Event("change", { bubbles: true }));
205
-
206
- document.querySelector('button[type="submit"]')?.click();
207
- return "Submitted";
208
- ```
209
-
210
- ### Reading App/Game State
211
-
212
- Extract structured state in one call:
213
-
214
- ```javascript
215
- const state = {
216
- score: document.querySelector(".score")?.textContent,
217
- status: document.querySelector(".status")?.className,
218
- items: Array.from(document.querySelectorAll(".item")).map((el) => ({
219
- text: el.textContent,
220
- active: el.classList.contains("active"),
221
- })),
222
- };
223
- return state;
17
+ "./scripts/browser-start.js" # Dedicated tool profile
18
+ "./scripts/browser-start.js" --profile # Seed cookies/logins from your browser profile
19
+ "./scripts/browser-start.js" --browser chromium # Or chrome
20
+ "./scripts/browser-start.js" --executable /path/to/browser
224
21
  ```
225
22
 
226
- ### Waiting for Updates
23
+ - An existing browser on `:9222` is reused. `--browser`, `--executable`, and `--profile` affect only new instances. Do not kill or restart a user's browser to apply launch options.
24
+ - New instances use `~/.cache/browser-tools`. `--profile` syncs the source profile into that dedicated directory, excluding session/tab files. It does not operate directly on the source profile, but can overwrite tool-profile state. Use it when existing authentication is needed, not as a routine reset.
25
+ - Preserve the user's tabs, drafts, and authentication. Open a new tab rather than navigating an unrelated one. Check the target URL before acting. Close only tabs you created and no longer need, not user-owned tabs or the reused browser.
227
26
 
228
- If DOM updates after actions, wait inside the same eval call:
27
+ Environment overrides:
229
28
 
230
- ```javascript
231
- document.querySelector("#submit")?.click();
232
- await new Promise((resolve) => setTimeout(resolve, 500));
29
+ | Variable | Purpose |
30
+ | --------------------------- | ---------------------------------------------------------------------------------------------------------------- |
31
+ | `BROWSER_TOOLS_BROWSER` | `chromium` or `chrome` selection |
32
+ | `BROWSER_TOOLS_EXECUTABLE` | Explicit browser executable path |
33
+ | `BROWSER_TOOLS_PROFILE_SRC` | Source profile directory for `--profile`. With a custom executable in auto mode, set this or select `--browser`. |
34
+ | `BROWSER_TOOLS_LOG_ROOT` | Watcher log directory. See the logging reference before enabling capture. |
233
35
 
234
- return {
235
- status: document.querySelector(".status")?.textContent,
236
- };
237
- ```
238
-
239
- ### Investigate Before Interacting
36
+ ## Task router
240
37
 
241
- Always start by understanding the page structure:
38
+ Read only the reference needed for the task before running its commands.
242
39
 
243
- ```javascript
244
- return {
245
- title: document.title,
246
- forms: document.forms.length,
247
- buttons: document.querySelectorAll("button").length,
248
- inputs: document.querySelectorAll("input").length,
249
- mainContent: document.body.innerHTML.slice(0, 3000),
250
- };
251
- ```
40
+ | Task | Read | Scripts |
41
+ | ----------------------------------------------------------------- | ---------------------------------------- | ------------------------------------------------------------------------------------------------ |
42
+ | Navigate, inspect DOM, interact, or wait for app state | [Interaction](references/interaction.md) | `browser-nav.js`, `browser-eval.js` |
43
+ | Verify appearance or let the user select elements | [Interaction](references/interaction.md) | `browser-screenshot.js`, `browser-pick.js` |
44
+ | Extract readable content that needs a browser | [Interaction](references/interaction.md) | `browser-content.js` |
45
+ | Diagnose console errors or network activity | [Logging](references/logging.md) | `browser-watch.js`, `browser-logs-tail.js`, `browser-net-summary.js`, `browser-start.js --watch` |
46
+ | Handle blocking consent dialogs or inspect/export session cookies | [Cookies](references/cookies.md) | `browser-dismiss-cookies.js`, `browser-cookies.js` |
252
47
 
253
- Then target specific elements based on what you find.
48
+ Choose DOM inspection for structure and values, screenshots for visual questions, and the picker when the user wants to identify elements. Batch only steps whose intermediate results do not need inspection. Verify observable outcomes rather than equating a click or elapsed delay with success.
@@ -0,0 +1,36 @@
1
+ # Consent dialogs and cookies
2
+
3
+ Run commands from the browser-tools skill root. These scripts act on the selected tab. Confirm the URL before changing consent or accessing session data.
4
+
5
+ ## Blocking consent dialogs
6
+
7
+ ```bash
8
+ "./scripts/browser-dismiss-cookies.js" # Accept cookies
9
+ "./scripts/browser-dismiss-cookies.js" --reject # Reject where possible
10
+ ```
11
+
12
+ Use only when a cookie dialog blocks the task, not automatically after every navigation. Honor the user's consent preference. The default accepts cookies, so do not use it as a neutral close operation. If the choice is consequential and unspecified, clarify it rather than granting consent silently.
13
+
14
+ The script uses heuristic selectors and text matches across the page and likely consent frames. Inspect an ambiguous dialog directly instead of trusting a generic match. Verify the resulting dialog state and consent choice. A reported click is not proof that consent was saved, and “no dialog found” does not prove none exists. Do not add fixed sleeps as a substitute for observing the dialog or its dismissal.
15
+
16
+ ## Inspect or export cookies
17
+
18
+ ```bash
19
+ "./scripts/browser-cookies.js"
20
+ ```
21
+
22
+ Prints cookies for the current tab, including values, domain, path, httpOnly, and secure flags. This exposes session secrets. Inspect only when needed for the authorized task. Do not paste cookie values into reports, logs, source control, or unrelated services.
23
+
24
+ `--format=netscape` produces cookie-file output for curl/wget. If the task requires authenticated retrieval outside the browser, keep the export private and temporary:
25
+
26
+ ```bash
27
+ (
28
+ umask 077
29
+ cookie_file=$(mktemp) || exit 1
30
+ trap 'rm -f "$cookie_file"' EXIT
31
+ "./scripts/browser-cookies.js" --format=netscape > "$cookie_file" || exit 1
32
+ curl -b "$cookie_file" https://example.com/protected-page
33
+ )
34
+ ```
35
+
36
+ Replace the URL with the authorized destination. The subshell owns the cookie file until the request completes, then removes it. The export still contains credentials. Do not clear cookies, log out, or reset the user's profile as diagnostic cleanup.
@@ -0,0 +1,90 @@
1
+ # Browser interaction
2
+
3
+ Run commands from the browser-tools skill root, not this reference directory. Scripts select the visible, focused page, falling back to the last HTTP(S) page and then the last page. Confirm `location.href` before acting, especially with multiple tabs open.
4
+
5
+ ## Navigate and inspect
6
+
7
+ ```bash
8
+ "./scripts/browser-nav.js" https://example.com --new # Preserve unrelated tabs
9
+ "./scripts/browser-nav.js" https://example.com # Reuse the selected tab
10
+ "./scripts/browser-eval.js" '({ url: location.href, title: document.title })'
11
+ "./scripts/browser-screenshot.js"
12
+ ```
13
+
14
+ Navigation waits for `DOMContentLoaded`, not application readiness. Screenshots capture the current viewport and print a temporary image path to open with the image-reading tool.
15
+
16
+ Inspect what the task needs: DOM for text, controls, and structured state; screenshots for layout, styling, occlusion, and visual verification. Neither must always come first. Identify the intended target and its current state before changing it. Avoid broad HTML dumps when a focused query answers the question.
17
+
18
+ ## Evaluate JavaScript
19
+
20
+ ```bash
21
+ "./scripts/browser-eval.js" 'document.title'
22
+ "./scripts/browser-eval.js" 'const el = document.querySelector("textarea"); return el?.value'
23
+ "./scripts/browser-eval.js" --file ./snippet.js
24
+ printf 'return document.title\n' | "./scripts/browser-eval.js" --stdin
25
+ ```
26
+
27
+ Code runs in the page's async context. Expressions and statement bodies are supported, including `await`. Use an explicit `return` for statements or multi-line bodies. Objects and arrays print as JSON. The page context is not a Puppeteer `page` object or a Node environment. `./snippet.js` is a file you supply relative to the skill root.
28
+
29
+ Batch related reads or independent, reversible interactions when no intermediate decision or verification is needed. Separate actions when navigation, validation, asynchronous updates, or consequential effects could change the next step. Do not batch clicks blindly or report success just because a handler was invoked. Apply the user's authorization to submissions and other external changes.
30
+
31
+ For an ordinary input, setting a value and dispatching events can be done together:
32
+
33
+ ```javascript
34
+ const input = document.querySelector('input[name="email"]');
35
+ if (!input) throw new Error("Email input not found");
36
+ input.value = "user@example.com";
37
+ input.dispatchEvent(new Event("input", { bubbles: true }));
38
+ input.dispatchEvent(new Event("change", { bubbles: true }));
39
+ return { value: input.value };
40
+ ```
41
+
42
+ This does not submit the form or prove the app accepted the value. Controlled inputs and custom widgets may need different handling. Synthetic events also do not prove real keyboard or pointer behavior. Inspect the app's response before proceeding and use real user interaction when that is the contract being tested.
43
+
44
+ ## Wait for observable readiness
45
+
46
+ After an action, wait for the relevant state: a result appears, validation completes, a loading indicator clears, or a known request finishes. Use a bounded wait with an explicit failure, not a fixed sleep followed by an assumed success. For a DOM-driven app, adapt the selector and readiness predicate to the page:
47
+
48
+ ```javascript
49
+ return await new Promise((resolve, reject) => {
50
+ const observer = new MutationObserver(check);
51
+ const timeout = setTimeout(() => {
52
+ observer.disconnect();
53
+ reject(new Error("Results did not become ready within 10 seconds"));
54
+ }, 10000);
55
+
56
+ function check() {
57
+ const result = document.querySelector('#results[data-state="ready"]');
58
+ if (!result) return;
59
+ observer.disconnect();
60
+ clearTimeout(timeout);
61
+ resolve({ text: result.textContent });
62
+ }
63
+
64
+ observer.observe(document.documentElement, {
65
+ subtree: true,
66
+ childList: true,
67
+ attributes: true,
68
+ characterData: true,
69
+ });
70
+ check();
71
+ });
72
+ ```
73
+
74
+ The timeout is a failure bound, not the readiness signal. Tie readiness to the action just performed so stale results cannot satisfy it. If the action navigates, inspect the new document in a subsequent call rather than expecting an in-page eval to survive navigation.
75
+
76
+ ## User-selected elements
77
+
78
+ ```bash
79
+ "./scripts/browser-pick.js" "Click the submit button"
80
+ ```
81
+
82
+ Use the picker when the user wants to select specific DOM elements. It requires a visible page and an available user, not a headless workflow. A normal click selects and finishes. Cmd/Ctrl+Click collects multiple selections, Enter finishes them, and Escape cancels with `null`. Treat cancellation as cancellation, not a successful empty selection. Let the user make the selection rather than simulating it.
83
+
84
+ ## Readable page content
85
+
86
+ ```bash
87
+ "./scripts/browser-content.js" https://example.com
88
+ ```
89
+
90
+ This navigates the selected tab and extracts Markdown using Mozilla Readability and Turndown, with a main-content fallback. Use a task-owned tab to preserve user work. It is not a read-only snapshot of the current DOM, and extraction does not guarantee the requested app state finished loading. Verify the final URL and relevant content. For pages that do not need browser interaction, fetch the supplied URL directly instead.
@@ -0,0 +1,34 @@
1
+ # Browser logging
2
+
3
+ Run commands from the browser-tools skill root. The watcher records console output, page errors/crashes, navigation, and network request/response/failure metadata as JSONL. It attaches to all existing pages and new pages, not just the active tab. Enable it only when that browser-wide capture is appropriate. URLs and console messages can contain credentials or personal data. Keep logs local and redact sensitive material before sharing.
4
+
5
+ ## Start capture
6
+
7
+ ```bash
8
+ "./scripts/browser-watch.js" # Foreground watcher
9
+ "./scripts/browser-start.js" --watch # Launch/reuse browser and start a detached watcher
10
+ ```
11
+
12
+ Prefer the foreground watcher when you need to own its lifetime. Start capture before reproducing the problem and wait for the watcher's startup confirmation. It cannot recover events from before attachment.
13
+
14
+ Default log paths on macOS/Linux:
15
+
16
+ - `/tmp/agent-browser-tools/logs/YYYY-MM-DD/<targetId>.jsonl`
17
+ - Override the root with `BROWSER_TOOLS_LOG_ROOT=/some/dir` for both capture and readers.
18
+ - The date directory is chosen when the watcher starts.
19
+
20
+ One watcher per log root is tracked by `.watch.pid`. If one already exists, it is reused rather than replaced. Keep track of whether you started it. Stop your foreground watcher with Ctrl+C when done. For a detached watcher, inspect the PID file under that log root and verify it still identifies the watcher you started before sending SIGTERM. Do not stop someone else's watcher or the browser. Retain only logs the task needs and remove your temporary logs when no longer needed.
21
+
22
+ ## Read capture
23
+
24
+ ```bash
25
+ "./scripts/browser-logs-tail.js" # Dump latest log and exit
26
+ "./scripts/browser-logs-tail.js" --file /path/to/log.jsonl
27
+ "./scripts/browser-logs-tail.js" --file /path/to/log.jsonl --follow
28
+ "./scripts/browser-net-summary.js"
29
+ "./scripts/browser-net-summary.js" --file /path/to/log.jsonl
30
+ ```
31
+
32
+ Without `--file`, readers choose the most recently modified JSONL file in the newest dated directory. That may belong to another tab. Use `target.attached` or `page.navigated` URLs to identify the task's capture, then pass its file explicitly. `--follow` follows that chosen file, not whichever tab becomes active later. Stop the follow process when finished.
33
+
34
+ The network summary reports request/response totals, status counts, and up to ten failures. It does not prove application success, include response bodies, or replace examination of relevant log records. Correlate the observed failure with the reproduction and visible app state.
@@ -1,9 +1,9 @@
1
1
  ---
2
2
  name: git-clean-history
3
- description: "Reimplement the current Git branch on a fresh branch off `main` with a clean, narrative-quality commit history."
3
+ description: "Rebuild the current branch from `main` on a fresh branch with a clean, narrative commit history."
4
4
  ---
5
5
 
6
- # Git Rebase
6
+ # Git Clean History
7
7
 
8
8
  Use this skill to reimplement the current branch on a new branch with a clean, narrative-quality git commit history suitable for reviewer comprehension.
9
9
 
@@ -31,13 +31,13 @@ Use this skill to reimplement the current branch on a new branch with a clean, n
31
31
  - Each commit must:
32
32
  - Introduce a single coherent idea
33
33
  - Include a clear commit message and description
34
- - Follow best practices for the message as outlined by the `git-commit` skill
35
- - **Use `git commit --no-verify` for all intermediate commits**
36
- - Pre-commit hooks check tests, types, and imports that may not pass until the full implementation is complete; do not waste time fixing issues in intermediate commits that will be resolved by later commits
34
+ - Follow the repository's commit-message conventions
35
+ - **Use `git commit --no-verify` for all intermediate commits while cleaning history.**
36
+ - Pre-commit hooks check tests, types, and imports that may not pass until the full implementation is complete. Do not spend time fixing intermediate issues that later commits in the reconstruction will resolve.
37
37
 
38
38
  6. **Verify correctness**
39
39
  - Confirm the final state exactly matches the source branch
40
- - Run the final commit **without** `--no-verify` to ensure all checks pass
40
+ - Run the final commit **without** `--no-verify`, and ensure the repository's required checks pass
41
41
 
42
42
  ### Rules
43
43
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: git-commit
3
- description: "Commit changes with an emphasis on tidiness and reviewability: small, focused commits, with clear rationale in messages."
3
+ description: "Propose commit messages and create small, focused commits with clear rationale."
4
4
  ---
5
5
 
6
6
  # Git Commit
@@ -11,7 +11,6 @@ Use this skill as the playbook for producing reviewable commits and a clean, con
11
11
 
12
12
  1. Check what files have changed
13
13
  2. If there are no changes to commit, inform the user and stop
14
- 3. If there are unstaged changes, stage relevant hunks or files with `git add -p` or `git add`
15
14
 
16
15
  Rules:
17
16
 
@@ -44,7 +43,10 @@ Rules:
44
43
 
45
44
  ## Phase 3: Commit
46
45
 
47
- 1. Commit staged changes with `git commit`
46
+ Only proceed when the user requested a commit. For message-only requests, return the proposed message and stop.
47
+
48
+ 1. If there are unstaged changes, stage relevant hunks or files with `git add -p` or `git add`
49
+ 2. Commit staged changes with `git commit`
48
50
 
49
51
  Rules:
50
52
 
@@ -0,0 +1,60 @@
1
+ ---
2
+ name: github-pull-request
3
+ description: "Create and steward GitHub PRs. Use when opening a PR, monitoring CI, handling review feedback, resolving conflicts, or getting a PR ready to merge."
4
+ ---
5
+
6
+ # GitHub Pull Request
7
+
8
+ Create or steward a GitHub pull request through CI and review. Once requested, continue routine stewardship under the checkpoints below. Repository instructions and explicit user direction take precedence. Requests for copy, analysis, a proposal, or status-only monitoring do not authorize commits, pushes, PR creation, or publishing metadata changes.
9
+
10
+ ## Task router
11
+
12
+ | Request | Route |
13
+ | --------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
14
+ | Open a PR | [Create a PR](references/create.md): discover conventions, audit the branch, create and verify, then steward. Resume an existing open PR for the branch instead of creating a duplicate. |
15
+ | Monitor or steward an existing PR | [Existing-PR stewardship](references/stewardship.md): start with its live state, current head, CI, and feedback. Do not repeat creation phases or create another PR. |
16
+ | Analyze status, assess feedback, or draft copy only | Use the relevant reference for context, then return the requested analysis or copy without publishing or changing code/history. |
17
+
18
+ ## Authorization
19
+
20
+ “Explicit” means explicitly requested or done manually by the user. Autonomous actions below remain limited to the authorized task. Only clearly identified bots or GitHub Apps count as automated reviewers; otherwise treat feedback as human.
21
+
22
+ | Action | Default |
23
+ | --------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
24
+ | Determine the branch, base, title, body, and commonly used descriptive labels | Autonomous |
25
+ | Commit, push, and open the PR | Autonomous once requested; draft by default |
26
+ | Make small factual PR metadata updates | Autonomous, while preserving user edits |
27
+ | Monitor CI, pending checks, and automated reviews | Autonomous |
28
+ | Request or re-request automated reviewers | Autonomous when the repository workflow calls for it |
29
+ | Rerun clearly flaky or infrastructure-failed checks | Autonomous |
30
+ | Fix small, confident, in-scope CI or automated-review findings | Autonomous |
31
+ | Reply to and resolve automated findings | Autonomous when fixed, already addressed, invalid, low-value, or out of scope |
32
+ | Resolve trivial conflicts and update the PR branch | Autonomous; use `--force-with-lease` when needed |
33
+ | Handle findings or changes that are large, uncertain, architectural, or scope-expanding | Checkpoint: assess and wait |
34
+ | Change an existing PR's base, close or reopen it, or resolve nontrivial conflicts | Checkpoint: explain and wait |
35
+ | Mark ready for review | Explicit |
36
+ | Apply review/readiness or automation-triggering labels | Explicit |
37
+ | Request human reviewers | Explicit |
38
+ | Address, reply to, or resolve human feedback | Checkpoint: assess and wait |
39
+ | Enable auto-merge or merge | Explicit |
40
+ | Delete the merged remote PR branch | Autonomous when safe |
41
+ | Update the base branch after merge | Explicit |
42
+
43
+ For human feedback, investigate and recommend an action, but do not edit, reply, or resolve without explicit direction. Authorization to make a code fix does not itself authorize replying or resolving. For large or uncertain automated findings, assess with the user and leave the feedback untouched.
44
+
45
+ ## Completion, readiness, and merge boundaries
46
+
47
+ For authorized stewardship, continue until the current-stage readiness criteria are met or a checkpoint/blocker requires user input. A bounded analysis or copy request ends with that requested output, not publication.
48
+
49
+ Report that a draft appears ready when:
50
+
51
+ - the branch is mergeable and based correctly
52
+ - current-stage checks passed on the current head, with none pending
53
+ - current-stage automated reviews are complete, with no unresolved threads
54
+ - the title and body describe the final scope
55
+
56
+ Never infer success from command errors, missing status, or results for an earlier head. Track the new head after every push. Treat live PR metadata as authoritative and preserve user-supplied or approved copy.
57
+
58
+ Never mark ready automatically. If the user does, continue stewardship for newly triggered checks and reviews. Later invocations resume the current PR. Report when repository approval rules are satisfied. Enable auto-merge or merge only when explicit, using the requested or repository-standard strategy.
59
+
60
+ After merge, delete the remote PR branch unless another open PR targets it. Do not delete the local branch or update the base branch unless requested.
@@ -0,0 +1,40 @@
1
+ # Create a PR
2
+
3
+ Use this route when PR creation is requested, subject to the [authorization matrix](../SKILL.md#authorization). For copy or analysis alone, use only the relevant reading and drafting steps. Do not stage, commit, push, or publish as a side effect.
4
+
5
+ ## Discover conventions
6
+
7
+ 1. Confirm GitHub CLI availability and authentication.
8
+ 2. Read repository instructions, contribution docs, local PR guidance, and every applicable template.
9
+ 3. Identify the repository, default and current branches, remote, related issues, and any stacked PR.
10
+ 4. Inspect recent relevant human-authored PRs for conventions, preferring the user's own when comparably relevant; exclude bots and one-offs.
11
+ 5. Resume any open PR associated with the current branch through [stewardship](stewardship.md) instead of creating a duplicate.
12
+
13
+ Repository evidence outranks generic advice. If conventions appear ambiguous, ask before proceeding.
14
+
15
+ ## Audit the branch
16
+
17
+ 1. Fetch the intended base branch.
18
+ 2. Inspect the working tree, commits, and complete base-to-head diff. Confirm one coherent change free of unrelated, sensitive, temporary, or accidental content.
19
+ 3. For a stacked PR, verify the exact commits and diff against its parent branch.
20
+ 4. Check changelog, generated-file, test, commit-hook, and commit-signing requirements.
21
+ 5. If on the default branch, create a correctly named branch. Otherwise rename it before its initial push when required.
22
+ 6. Use the `git-commit` skill for new commits. Do not rewrite commits merely for cleanup; base rebases follow the [conflict rules](stewardship.md#ci-and-conflicts).
23
+
24
+ If the changes belong in separate PRs, stop and explain why.
25
+
26
+ ## Create and verify
27
+
28
+ - Match the repository's PR title style. For a single commit, consider its title as a starting point.
29
+ - Follow local PR instructions and retain required template sections. Use `N/A` when inapplicable unless conventions allow omission.
30
+ - Focus the body on what changed, why, the approach, and meaningful trade-offs.
31
+ - Omit boilerplate Summary, Testing, Demo, or file-inventory sections unless the repository or change requires them.
32
+ - A simple issue reference such as `Closes #123` may be the complete body.
33
+ - Preserve user-supplied or approved copy. Append nothing to copy supplied exactly.
34
+ - Pass the body through a temporary Markdown file, never inline escaped newlines.
35
+ - Apply descriptive labels only when commonly used on comparable PRs. Review/readiness or automation-triggering labels still require explicit authorization.
36
+ - Never push the default branch. Push the PR branch and set its upstream.
37
+ - Create with an explicit base, head, title, and `--body-file`. Use `--draft` unless requested otherwise.
38
+ - Re-fetch the live PR and verify its repository, branches, metadata, draft state, and rendered body. Ensure it has no literal `\n` sequences or stale placeholders.
39
+
40
+ Continue with [CI and review stewardship](stewardship.md), stopping at the root skill's [readiness and merge checkpoints](../SKILL.md#completion-readiness-and-merge-boundaries).