Initial commit

This commit is contained in:
Zhongwei Li
2025-11-30 09:03:11 +08:00
commit 4aff69d9a9
61 changed files with 7343 additions and 0 deletions

54
commands/browser.md Normal file
View File

@@ -0,0 +1,54 @@
---
description: Start/restart the Browser MCP server for automated web operations
---
# Browser MCP Server Management
Start or restart the Browser MCP server for automated web operations.
## Task
Restart the Browser MCP server on port 9222. If already running, stop it first to ensure new environment settings are loaded.
## Steps
1. Stop any existing Browser MCP server processes:
```bash
pkill -f "ts-node browser-server.ts" || true
```
2. Wait for clean shutdown:
```bash
sleep 2
```
3. Start the server in the background:
```bash
cd orchestra/mcp-servers && npm run browser &
```
4. Wait for startup and verify:
```bash
sleep 3 && curl -s http://localhost:9222/health | jq
```
5. Show usage instructions:
```
✅ Browser MCP server is running on http://localhost:9222
👁️ Browser mode: GUI visible (set BROWSER_HEADLESS=true for headless mode)
Quick test:
./orchestra/mcp-servers/browser-helper.sh init
./orchestra/mcp-servers/browser-helper.sh navigate https://example.com
./orchestra/mcp-servers/browser-helper.sh screenshot example.png true
./orchestra/mcp-servers/browser-helper.sh close
See: orchestra/agents/skills/web-browse.md for full documentation
```
## Notes
- The server always restarts to pick up new .env settings
- All browser operations are logged to artifacts/browser/{sessionId}/
- Rate limits: 10 navigations, 50 clicks, 30 inputs per session
- Default port: 9222 (Chrome DevTools Protocol standard port)
- Default mode: GUI visible (browser window opens automatically)
- To stop: `pkill -f "ts-node browser-server.ts"`

View File

@@ -0,0 +1,77 @@
---
description: Run the Orchestra Plugin setup script to install all MCP servers and dependencies
---
# Orchestra Plugin Setup
Run the complete setup script to install all MCP servers, dependencies, and configure the Orchestra Plugin environment.
## Task
Execute the Orchestra setup script to install:
- Node.js dependencies (Express, Playwright, TypeScript)
- Playwright Chromium browser
- Python virtual environment and packages (elevenlabs, requests)
- Configure hooks and permissions (.claude/settings.json with auto-approve)
- Install safety guard hook (blocks dangerous operations only)
- Create necessary directories (artifacts, etc.)
## Steps
1. Check if setup.sh exists and is executable:
```bash
if [ ! -f "./setup.sh" ]; then
echo "❌ setup.sh not found. Please ensure you're in the Orchestra repository root."
exit 1
fi
```
2. Make setup.sh executable if needed:
```bash
chmod +x ./setup.sh
```
3. Run the setup script:
```bash
./setup.sh
```
4. After completion, show next steps:
```
✅ Orchestra Plugin setup completed!
Next steps:
1. Edit .env file to add your API keys (if not done already)
2. Restart Claude Code to activate all features
3. Start coding - Orchestra will automatically enhance your workflow!
Available features:
- /browser - Start Browser MCP server
- /screenshot - Capture web screenshots
- 11 specialized AI agents (Riley, Skye, Finn, Eden, Kai, Leo, Iris, Nova, Mina, Theo, Blake) coordinated by main Claude Code
- Automated quality gates (before_task, before_pr, before_merge, before_deploy, after_deploy)
- Multi-agent orchestration with parallel execution
```
## Notes
- This command should be run once after cloning the Orchestra repository
- The setup script checks for prerequisites (Node.js 18+, Python 3.8+)
- All hooks automatically skip if tools aren't installed (no errors)
- Environment variables can be configured later in the .env file
- Only GITHUB_TOKEN is required; all other tokens are optional
- The script creates symlinks for hooks and slash commands
- Browser server can be started separately with `/browser` command
## Auto-Approval & Safety
The setup creates `.claude/settings.json` with:
- `"permissions.allow": ["*"]` - Auto-approve all tools (no confirmation dialogs)
- Safety guard hook (`hooks/user-prompt-submit.sh`) blocks dangerous operations:
- `rm -rf /`, system file modifications
- `sudo shutdown/reboot`
- `git push --force`
- Database drops (`DROP DATABASE/TABLE`)
- And more...
This enables autonomous operation while preventing destructive actions.

56
commands/screenshot.md Normal file
View File

@@ -0,0 +1,56 @@
---
description: Capture screenshots from browser automation
---
# Take Screenshot
Capture a screenshot of a web page using the Browser MCP server.
## Task
Navigate to a specified URL and take a full-page screenshot, saving it to the artifacts directory.
## Steps
1. Ask the user for the URL if not provided in the command arguments
2. Check if Browser MCP server is running:
```bash
curl -s http://localhost:3030/health
```
If not running, tell the user to run `/browser` first
3. Generate a unique filename based on the URL (e.g., `example-com-{timestamp}.png`)
4. Execute the screenshot workflow:
```bash
cd orchestra/mcp-servers
# Initialize browser
./browser-helper.sh init
# Navigate to URL
./browser-helper.sh navigate {URL}
# Wait for page load
sleep 2
# Take full-page screenshot
./browser-helper.sh screenshot {filename}.png true
# Close browser
./browser-helper.sh close
```
5. Show the screenshot path to the user and offer to open it
## Example Usage
```
User: /screenshot https://example.com
Assistant: Taking screenshot of https://example.com...
✅ Screenshot saved to: artifacts/browser/{sessionId}/example-com-1234567890.png
```
## Notes
- Requires Browser MCP server to be running (use `/browser` to start)
- Screenshots are saved to artifacts/browser/{sessionId}/
- Full-page screenshots capture the entire page, not just the viewport