xiaohongshu
xiaohongshu
agent-browser-upstream
Safely sync navigator's agent-browser fork with upstream vercel-labs/agent-browser, analyze changes, and generate integration documentation
Full skill instructions
Manages the process of keeping navigator's agent-browser fork in sync with the upstream vercel-labs/agent-browser repository.
| Skill | Purpose |
|---|---|
| upstream-evaluation | Decision frameworks for what to adopt/skip/adapt |
| docs/architecture/DESIGN.md | Navigator's design philosophy and conventions |
Workflow: Use upstream-evaluation skill for the "what and why" decisions, then return here for the "how" execution.
None required - the skill auto-manages everything:
.agent-browser/repo/ doesn't exist, the script clones the fork automaticallyAGENT_BROWSER_LOCAL env var to use an existing local clone insteadThe .agent-browser/ directory is gitignored and contains:
repo/ — Git clone of the forkanalysis/<sha>/ — Generated artifacts (jq-able JSON, diffs)Phase 1: Check Status (fetch, compare)
↓
Phase 2: Analyze Changes (categorize commits)
↓
Phase 3: Evaluate Changes ← uses upstream-evaluation skill
↓
Phase 4: Write Integration Docs + Create Issue
↓
Phase 5: User Review & Confirmation
↓
Phase 6: Execute Merge (ONLY after user confirms)
CRITICAL: Never merge without completing phases 3-5 first. Phase 3 MUST use the
upstream-evaluationskill to apply Navigator's design frameworks.
Run the analysis script (handles everything automatically)
bun run .claude/skills/agent-browser-upstream/scripts/analyze-upstream.ts --format summary
The script will:
.agent-browser/ if missingOr check manually
cd .agent-browser/repo
# Current fork version
git describe --tags origin/main 2>/dev/null || git rev-parse --short origin/main
# Latest upstream version
git describe --tags upstream/main 2>/dev/null || git rev-parse --short upstream/main
# Divergence
git log --oneline origin/main..upstream/main
If no commits in divergence → STOP with "Fork is up to date with upstream"
If commits exist → CONTINUE to Phase 2 (never skip to merge)
Run analysis script
bun run .claude/skills/agent-browser-upstream/scripts/analyze-upstream.ts \
--repo "$REPO_PATH" \
--base origin/main \
--target upstream/main
Review commit categories The script outputs JSON with commits categorized as:
breaking - API changes, removed exportsadditive - New features, new exportsfix - Bug fixesdocs - Documentation onlychore - Build, deps, toolingIdentify key files changed Focus on these files for navigator impact:
src/protocol.ts - MCP protocol definitionssrc/browser.ts - Browser control APIsrc/index.ts - Public exportssrc/cli/ - CLI commands (may inform navigator CLI)Present a summary table:
| Category | Count | Key Changes |
|---|---|---|
| Breaking | N | List significant ones |
| Additive | N | List new features |
| Fix | N | List relevant fixes |
REQUIRED — Even for "clean" updates with 0 breaking changes.
Use /agent-browser:integrate-changes, which:
The 2025-01-20 v0.6.0 sync skipped evaluation because "0 breaking changes" was treated as a green light. This caused:
The upstream-evaluation skill produces:
Review evaluation output
Do NOT proceed to merge until analyst complete
Map upstream changes to navigator usage
Check which navigator files import from agent-browser:
grep -r "@outfitter/agent-browser" packages/*/src --include="*.ts" -l
Cross-reference with changed APIs
For each breaking change, check if navigator uses it:
# Example: if upstream changed BrowserOptions
grep -r "BrowserOptions" packages/*/src --include="*.ts"
Flag breaking changes
Create a list:
packages/server/src/browser.ts:42packages/core/src/types.ts:18Identify required navigator changes
For each breaking change, document:
If breaking changes exist → STOP and confirm with user before proceeding
Determine version
VERSION=$(git describe --tags upstream/main 2>/dev/null || echo "v$(date +%Y.%m.%d)")
Create version directory
mkdir -p docs/_upstream/$VERSION
Generate changes.md Raw changelog with all commits and diffs.
Generate integration.md
Use template from references/integration-template.md:
Generate status.md Tracking checklist:
## Implementation Status
- [ ] Merge upstream into fork
- [ ] Update navigator bun.lock
- [ ] Apply breaking change fixes
- [ ] Run navigator tests
- [ ] Update navigator CHANGELOG
Update index
Add entry to docs/_upstream/README.md
Create GitHub issue (optional, recommended for breaking changes) The integration doc is the issue — its frontmatter has title/labels:
bun run .claude/skills/agent-browser-upstream/scripts/create-issue.ts \
docs/_upstream/$VERSION/integration.md
Or use the command: /agent-browser:issue docs/_upstream/$VERSION/integration.md
REQUIRES USER CONFIRMATION - Do not proceed without explicit approval from Phase 5 docs review
Merge upstream into fork
cd /path/to/navigator/.agent-browser/repo # Always use absolute path
git checkout main
git merge upstream/main --no-edit
Resolve conflicts if any
Push to fork
git push origin main
Create fork release tag
# Determine tag version: <upstream-version>-nav.<patch>
# e.g., v0.6.0-nav.1, v0.6.0-nav.2
VERSION="v0.6.0-nav.1" # Adjust based on upstream version
git tag -a "$VERSION" -m "Navigator fork release: synced with upstream
Upstream: vercel-labs/agent-browser <upstream-tag>
Navigator tracking: <issue-url>"
git push origin "$VERSION"
Update navigator's package.json
cd /path/to/navigator # Back to navigator root
# Update packages/server/package.json to reference the tag:
# "@outfitter/agent-browser": "github:outfitter-dev/agent-browser#v0.6.0-nav.1"
Force refresh bun lockfile (required for GitHub deps)
cd /path/to/navigator
rm bun.lock
bun install
Why? Bun caches GitHub commit SHAs. Without removing the lockfile,
bun installmay not fetch the new tag even after pushing.
Verify lockfile updated
grep "agent-browser" bun.lock
# Should show the new tag: #v0.6.0-nav.1
Run navigator tests
bun run typecheck
bun test
Update integration docs
docs/_upstream/<version>/integration.mdIf tests fail → STOP and document failures, do not commit
The fork uses <upstream-version>-nav.<patch> tags:
| Tag | Meaning |
|---|---|
v0.6.0-nav.1 | First navigator release based on upstream v0.6.0 |
v0.6.0-nav.2 | Second navigator release (e.g., hotfix to fork) |
v0.7.0-nav.1 | First navigator release based on upstream v0.7.0 |
Benefits:
github:outfitter-dev/agent-browser#v0.6.0-nav.1When upstream changes a function signature:
When upstream adds a useful feature:
When upstream changes a type definition:
# Run analysis (auto-clones if needed)
bun run .claude/skills/agent-browser-upstream/scripts/analyze-upstream.ts --format summary
# Generate diff artifacts (for incremental context loading)
bun run .claude/skills/agent-browser-upstream/scripts/generate-diff.ts
# Check current versions
cd .agent-browser/repo && git describe --tags origin/main upstream/main
# View pending changes
cd .agent-browser/repo && git log --oneline origin/main..upstream/main
# Diff specific file
cd .agent-browser/repo && git diff origin/main..upstream/main -- src/protocol.ts
# Read analysis artifacts incrementally
cat .agent-browser/analysis/<sha>/summary.json # Start here
jq '.counts' .agent-browser/analysis/<sha>/summary.json
cat .agent-browser/analysis/<sha>/by-category/breaking.json
| Location | Purpose |
|---|---|
.agent-browser/repo/ | Local clone of the fork (gitignored) |
.agent-browser/analysis/<sha>/ | Generated artifacts for specific upstream SHA |
docs/_upstream/README.md | Index of all integration docs |
docs/_upstream/<version>/integration.md | Version-specific integration plan |
references/integration-template.md | Template for integration docs (also the issue) |
scripts/generate-diff.ts | Generates jq-able artifacts for agents |
scripts/analyze-upstream.ts | Analyzes commits between refs |
scripts/create-issue.ts | Creates GitHub issue from integration doc |
| Variable | Purpose | Default |
|---|---|---|
AGENT_BROWSER_LOCAL | Override repo path | .agent-browser/repo/ in navigator root |
Symptom: After pushing new tag to fork, bun install still shows old commit SHA.
Cause: Bun caches GitHub dependencies by commit SHA. Even with a new tag, it may reuse the cached resolution.
Fix:
cd /path/to/navigator
rm bun.lock
bun install
grep "agent-browser" bun.lock # Verify new tag/commit
Symptom: gh commands target wrong repo (e.g., upstream instead of navigator).
Cause: Working directory is .agent-browser/repo/ (the fork clone) instead of navigator root.
Fix: Always use absolute paths:
# WRONG - relative path, may be in wrong directory
cd .agent-browser/repo && git push
# RIGHT - absolute path
cd /Users/you/project/navigator/.agent-browser/repo && git push
# For navigator commands, go back to root
cd /Users/you/project/navigator && gh issue create
Symptom: git tag fails with "tag already exists".
Fix: Increment the patch number:
# If v0.6.0-nav.1 exists, use v0.6.0-nav.2
git tag -a "v0.6.0-nav.2" -m "..."
Symptom: git log origin/main..upstream/main still shows commits after merge.
Cause: Origin wasn't pushed.
Fix:
cd .agent-browser/repo
git push origin main
git log --oneline origin/main..upstream/main # Should be empty
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience