py-stop-local

Stop a local Flask server on port 8080 using PID file or lsof.

1|Updated Jul 31, 2025
One-click install
npx skills add https://github.com/asnar00/miso --skill py-stop-local
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: py-stop-local
Source: https://github.com/asnar00/miso/tree/main/.claude/skills/py-stop-local
Command: npx skills add https://github.com/asnar00/miso --skill py-stop-local

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill provides a reliable way to stop a locally running Flask server, preventing "address already in use" errors and ensuring a clean shutdown. It automates the process of identifying and terminating the server process, saving you from manual lsof and kill commands.

Core Features & Use Cases

  • Clean Server Termination: Stops Flask servers running on port 8080, whether they were started in foreground or background mode.
  • Multiple Stop Methods: Utilizes a dedicated stop.sh script, lsof for process identification, or Ctrl+C for flexibility.
  • Use Case: Before restarting your Flask server with new code, use this skill to ensure the previous instance is fully shut down, avoiding port conflicts and ensuring a fresh start.

Quick Start

Stop the local Python Flask server.

Frequently Asked Questions about py-stop-local

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I stop a Flask server running on port 8080?

Stop a Flask server on port 8080 by using the provided stop.sh script, which terminates the process via PID file or lsof command. This prevents address-already-in-use errors and ensures clean shutdown for both foreground and background instances on macOS or Linux.

What causes 'address already in use' errors with Flask servers?

Address-already-in-use errors occur when a Flask server process remains running on port 8080 after shutdown. Gracefully stopping the previous instance clears the port and allows a fresh server start without conflicts.

Can I stop a Flask server if I don't have a PID file?

Yes, the Skill uses lsof to identify the Flask process on port 8080 when a server.pid file isn't available, providing fallback process identification on macOS and Linux environments.

How do I cleanly restart a Flask development server?

Before restarting Flask with new code, use this Skill to fully shut down the previous instance. Clean termination prevents port conflicts and ensures your updated code runs in a fresh environment.

Does this work for Flask servers running in the background?

Yes, this Skill handles both foreground and background Flask server instances on port 8080, using stop.sh automation or manual port-based termination for graceful shutdown in either mode.