@sailfish-ai/autofix
v0.1.1
Published
Sailfish Autofix — Universal installer for AI coding agents. Installs the Autofix skill and MCP server across Claude Code, Cursor, Codex, Copilot, OpenCode, Windsurf, Gemini CLI, Goose, and 30+ more.
Maintainers
Readme
@sailfish-ai/autofix
Standalone installer for Sailfish Autofix — enables AI-powered bug fixing across AI coding agents without the desktop app.
Quick Start
npx @sailfish-ai/autofix setupThis single command will:
- Open your browser to authenticate with Sailfish
- Detect which AI coding agents are installed on your machine
- Install the Autofix skill and MCP server for each detected agent
Once setup is complete, open any supported agent and use /autofix <issue-id> to investigate and fix issues.
Prerequisites
- Node.js >= 18.0.0
- A Sailfish account (sign up at app.sailfish.ai)
- At least one supported AI coding agent installed
Installation
Option A: One-command setup (recommended)
No global install needed — npx runs it directly:
npx @sailfish-ai/autofix setupOption B: Install globally
npm install -g @sailfish-ai/autofix
sailfish-autofix setupOption C: From the Sailfish web app
Click "Fix with CLI" on any issue page to get a one-liner with an embedded auth token:
npx @sailfish-ai/autofix setup --token <token>Option D: Via Agent Skills
If your tool supports the Agent Skills standard:
npx skills add @sailfish-ai/autofixNote: This installs only the skill. Run npx @sailfish-ai/autofix setup separately to configure authentication and the MCP server.
Supported Agents
| Agent | Skill Location | MCP Config Location |
|-------|---------------|---------------------|
| Claude Code | ~/.claude/skills/ | ~/.claude.json |
| Cursor | ~/.cursor/skills/ | ~/.cursor/mcp.json |
| Codex (OpenAI) | ~/.codex/skills/ | ~/.codex/config.toml |
| GitHub Copilot | ~/.agents/skills/ | ~/.vscode/mcp.json |
| OpenCode | ~/.agents/skills/ | ~/.config/opencode/config.json |
| Windsurf | ~/.windsurf/skills/ | ~/.windsurf/mcp.json |
| Gemini CLI | ~/.gemini/skills/ | ~/.gemini/settings.json |
| Goose | ~/.agents/skills/ | ~/.config/goose/config.yaml |
| Generic (Agent Skills) | ~/.agents/skills/ | Manual MCP setup |
All agents also get a copy at ~/.agents/skills/sailfish-autofix/ (cross-client convention).
Commands
setup — All-in-one install
npx @sailfish-ai/autofix setup [options]Authenticates, detects agents, and installs the skill + MCP server configuration.
| Option | Description |
|--------|-------------|
| --token <token> | Use a pre-authenticated token from the Sailfish web app |
| --global | Install skill globally for all projects (default: true) |
| --agents <list> | Comma-separated list of agents to configure (e.g. claude-code,cursor) |
| -y, --yes | Skip confirmation prompts |
uninstall — Clean removal
npx @sailfish-ai/autofix uninstall [options]Removes all installed skills, MCP configurations, and optionally credentials.
| Option | Description |
|--------|-------------|
| --keep-credentials | Keep authentication credentials (only remove skill + MCP config) |
| -y, --yes | Skip confirmation prompts |
login — Authenticate
npx @sailfish-ai/autofix login [options]Opens your browser to sign in via OAuth. Credentials are stored at ~/.sailfish/credentials.json.
| Option | Description |
|--------|-------------|
| --token <token> | Exchange a short-lived token instead of browser flow |
logout — Remove credentials
npx @sailfish-ai/autofix logoutstatus — Show current state
npx @sailfish-ai/autofix statusDisplays authentication status and which agents have the skill and MCP server installed.
doctor — Diagnose issues
npx @sailfish-ai/autofix doctorChecks credentials, backend connectivity, and agent installations. Suggests fixes for any issues found. If credentials are expired, doctor will attempt to re-authenticate automatically.
serve — Run MCP server
npx @sailfish-ai/autofix serveStarts the MCP server in STDIO mode. This command is used internally by agent configurations — you don't need to run it manually.
How It Works
The package installs two things for each detected agent:
Agent Skill (
SKILL.md) — A workflow file following the Agent Skills open standard. It tells the AI agent how to investigate and fix issues using Sailfish telemetry data.MCP Server — A Model Context Protocol server that provides 12 tools for accessing telemetry:
| Tool | Description | |------|-------------| |
autofix_get_issue_exceptions| Fetch exception details, stack traces, occurrence counts | |autofix_get_backend_logs| Server-side logs for a recording session | |autofix_get_frontend_logs| Browser console logs | |autofix_get_network_request_logs| HTTP request/response logs | |autofix_get_network_hops| Service-to-service call chain (distributed tracing) | |autofix_get_print_statements| stdout/print output | |autofix_get_user_actions| User interaction events (clicks, navigation) | |autofix_get_frontend_display_data| Frontend display state snapshots | |autofix_update_issue_status| Report fix progress back to Sailfish | |autofix_create_pull_request| Create a PR via GitHub/Bitbucket integration | |autofix_clone_repos| Clone company repos locally |
Credentials & Authentication
Credentials are stored at ~/.sailfish/credentials.json with mode 0600 (owner read/write only).
The MCP server reads credentials via the SAILFISH_JWT_FILE environment variable, which is set automatically in agent configurations.
Coexistence with Desktop App
This package works alongside the Sailfish desktop app (Veritas). They use compatible credential formats but separate configuration paths:
- Desktop app: writes MCP config as
sailfishTelemetry/sailfishEnterprise - Standalone CLI: writes MCP config as
sailfishAutofix - Both can coexist in the same agent configuration
Troubleshooting
"No supported agents detected"
The installer checks for known config directories and binaries. If your agent isn't detected:
npx @sailfish-ai/autofix setup --agents claude-code"Credentials expired"
npx @sailfish-ai/autofix login"Cannot reach backend"
Run npx @sailfish-ai/autofix doctor to diagnose connectivity issues. Ensure you can reach https://api.sailfish.ai from your network.
Verify installation
npx @sailfish-ai/autofix statusShows which agents have the skill and MCP server installed. All entries should show skill and mcp.
License
MIT
