跳到正文
TakoAPI
返回技能列表

port-check

由 rogue-agent1 提供

Coding Agents & IDEs
493下载量由 clawskills.sh 提供
0浏览量
0 个赞登录后即可为这个技能点赞
—暂无评分
你的评分

简介

Check if services are responding on given host:port pairs.

描述

该技能的功能

Checks whether services are responding on specified host:port pairs. Supports both TCP connectivity and HTTP status verification, with a configurable timeout. Exits with a non-zero code if any target is down, making it scriptable.

Combines TCP and HTTP checks into a single command so you don't have to switch between nc and curl manually.

何时使用

  • Confirming a local dev server is up before running tests
  • Checking if a database port is accessible after a deploy
  • Verifying SSH is reachable on a home network device
  • Diagnosing which service in a stack failed to start
  • Monitoring an API endpoint for HTTP 200 responses

示例工作流

输入

User asks: 'Are my database and web server up?'

智能体
  1. 1

    Run port-check against localhost:5432 and localhost:3000

  2. 2

    Attempt TCP connection to each target within the timeout window

  3. 3

    Optionally request HTTP status with --http flag

  4. 4

    Report open or closed status for each host:port pair

  5. 5

    Exit with code 1 if any target fails to respond

输出

localhost:5432 — open, localhost:3000 — open

安装

clawhub install rogue-agent1/port-check

运行 CLI 命令,或把这段提示词粘贴到 Claude Code、Cursor、Codex 或你在用的任意编程智能体里。

链接