원클릭으로
shell-bg
Smart background process detection for run_shell_command - prevents long-running services from blocking the conversation.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Smart background process detection for run_shell_command - prevents long-running services from blocking the conversation.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Monitor your social media posts across X, Hacker News, and Reddit. Track engagement (replies, comments, upvotes), generate digests, and auto-reply on supported platforms. Use when user asks to check social media feedback, scan posts, reply to comments, or generate engagement reports.
用于在小红书上发布高质量的 AI 相关岗位招聘帖子。包含自动生成极客风格的招聘封面图和详情图,并提供自动化发布脚本。当用户需要发布招聘信息、寻找 Agent 设计师或其他 AI 领域人才时使用。
| name | shell-bg |
| description | Smart background process detection for run_shell_command - prevents long-running services from blocking the conversation. |
When using run_shell_command, you MUST classify the command before execution.
Commands that process data and exit:
npm run build, make, gcc, tsc, cargo buildnpm test, pytest, jest, go testnode script.js, python process.py (data processing scripts)cp, mv, rm, find, grep, cat, lsnpm install, pip install, apt installgit clone, git pull, git commit&)Commands that start a long-running service or daemon:
npm run dev, npm start, npm run serve, yarn dev, npx vite, npx next devnode server.js, node app.js, node index.js (when context indicates a server)python manage.py runserver, python -m http.server, flask run, uvicorn, gunicornjava -jar *.jar (servers), mvn spring-boot:run, gradle bootRundocker run (without -d), docker compose up (without -d)npm run watch, nodemon, tsc --watch, webpack --watchredis-server, mongod, nginx, caddy runIf you cannot determine from context whether the command is foreground or background:
This command (
xxx) might be a long-running process. Should I run it in the background?
- Background (recommended for servers/daemons): The process runs independently, and we can continue our conversation
- Foreground: Wait for the command to complete before continuing
When running a background command, transform it:
Original: npm run dev
Execute: npm run dev > /dev/null 2>&1 &
BG_PID=$!
sleep 8
echo ""
echo "✓ Process started in background (PID: $BG_PID)"
echo " To stop: kill $BG_PID"
Key rules:
/dev/null to prevent the shell tool from accumulating output& to background the processsleep 8 to allow the process to start and detect early failuresIf the user needs to see startup output (e.g., to verify the server started correctly):
Original: npm run dev
Execute: npm run dev &
BG_PID=$!
sleep 8
echo ""
echo "✓ Process started in background (PID: $BG_PID)"
echo " To stop: kill $BG_PID"
(Without /dev/null redirect, the first 8 seconds of output will be captured)
When asked to stop a background process:
kill <PID>
When asked to check if a process is running:
ps -p <PID> -o pid,command 2>/dev/null || echo "Process not running"
&. It will block the entire conversation indefinitely.sleep duration (default 8s) can be adjusted: use longer (15s) for slow-starting services like Java, shorter (3s) for simple servers.