<< All versions
Skill v1.0.0
currentLLM-judged scan95/100alaliqing/claude-paper/webui
──Details
PublishedOctober 23, 2026 at 07:39 PM
Content Hashsha256:9bc692188e03d5a0...
Git SHA0af55d0daeae
──Files
Files (1 file, 3.6 KB)
SKILL.md3.6 KBactive
SKILL.md · 135 lines · 3.6 KB
version: "1.0.0" name: webui description: Start the Claude Paper web viewer to browse and study papers disable-model-invocation: false allowed-tools: Bash
Start Web UI
This skill starts the Claude Paper web viewer using the production Nuxt.js server.
Step 1: Check and Install Dependencies (First Run Only)
Check if web dependencies are installed (with corruption check):
bash
cd "${CLAUDE_PLUGIN_ROOT}/src/web"if [ ! -d "node_modules" ]; thenecho "First run - installing web dependencies..."npm ciecho "Web dependencies installed!"elif [ ! -f "node_modules/.package-lock.json" ] || [ ! -d "node_modules/nuxt" ]; thenecho "ERROR: node_modules is corrupted, performing clean install..."rm -rf node_modulesnpm ciecho "Web dependencies installed!"elseecho "Dependencies already installed"fi
Step 2: Build Production Server (auto-rebuilds on plugin update)
Build if needed or if plugin version changed:
bash
cd ${CLAUDE_PLUGIN_ROOT}/src/webPLUGIN_VERSION=$(node -e "console.log(require('${CLAUDE_PLUGIN_ROOT}/.claude-plugin/plugin.json').version)")BUILD_VERSION=""if [ -f ".output/.build-version" ]; thenBUILD_VERSION=$(cat ".output/.build-version")fiif [ ! -f ".output/server/index.mjs" ] || [ "$PLUGIN_VERSION" != "$BUILD_VERSION" ]; thenecho "Building production server (v${PLUGIN_VERSION})..."npm run buildecho "$PLUGIN_VERSION" > .output/.build-versionecho "Build complete!"elseecho "Production build is up to date (v${BUILD_VERSION})"fi
Step 3: Check Port Availability
Ensure port 5815 is available (with version check restart):
bash
# Get version info for comparisonPLUGIN_VERSION=$(node -e "console.log(require('${CLAUDE_PLUGIN_ROOT}/.claude-plugin/plugin.json').version)")BUILD_VERSION=""if [ -f ".output/.build-version" ]; thenBUILD_VERSION=$(cat ".output/.build-version")fiif lsof -i :5815 > /dev/null 2>&1; thenecho "INFO: Port 5815 is already in use"PID_FILE="/tmp/claude-paper-webui.pid"if [ -f "$PID_FILE" ] && kill -0 $(cat "$PID_FILE") 2>/dev/null; then# Check version match - restart if plugin was updatedif [ "$PLUGIN_VERSION" = "$BUILD_VERSION" ]; thenecho "Claude Paper web UI is already running (version ${PLUGIN_VERSION})"echo "Access it at: http://localhost:5815"exit 0elseecho "Version mismatch: running ${BUILD_VERSION}, need ${PLUGIN_VERSION}"echo "Stopping old server..."kill $(cat "$PID_FILE") 2>/dev/nullsleep 2rm -f "$PID_FILE"echo "Old server stopped, will restart with new version"fielseecho "ERROR: Port 5815 is occupied by another process"exit 1fifi
Step 4: Start Production Server
Start the server in background:
bash
HOST=127.0.0.1 PORT=5815 node .output/server/index.mjs &SERVER_PID=$!# Save PID for later cleanupecho $SERVER_PID > /tmp/claude-paper-webui.pidecho "Server PID: $SERVER_PID"
Step 5: Verify Server Health
Wait for server to be ready:
bash
timeout=10while [ $timeout -gt 0 ]; doif curl -s http://localhost:5815/api/papers > /dev/null 2>&1; thenecho "Server is ready!"breakfisleep 1timeout=$((timeout - 1))doneif [ $timeout -eq 0 ]; thenecho "ERROR: Server failed to start properly"kill $SERVER_PID 2>/dev/nullrm -f /tmp/claude-paper-webui.pidexit 1fi
Step 6: Inform User
Tell the user the web viewer is available and provide cleanup instructions:
Claude Paper web UI is now running!Access it at: http://localhost:5815To stop the server, run:kill $(cat /tmp/claude-paper-webui.pid)