Auto reply

From mupengi-bot/mupengism · View interactive version

Auto reply is an AI agent skill from the GitHub repository mupengi-bot/mupengism. Instagram DM 자동응답 시스템. DM 모니터링, 읽기, 답장, 보안 체크(인젝션 거부) 기능. Use when checking Instagram DMs, reading unread messages, replying to DMs, setting up DM monitoring cron jobs, or handling DM auto-reply workflows. Triggers on: 인스타 DM, Instagram DM, DM 확인, DM 답장, DM 자동응답, dm-alert.

How to use this skill

Skill file

Instagram DM Auto-Reply 🐧

v2.js (Internal API) 기반. 브라우저 스냅샷 0회, CDP 쿠키 추출 → Instagram REST API 직접 호출.

전제 조건

스크립트 목록

| 스크립트 | 용도 |

|---------|------|

| scripts/v2.js | DM CLI (inbox, unread, check, read, reply) |

| scripts/auto-reply.js | dm-alert.json 읽고 보안 체크 후 답장 메타데이터 반환 |

| scripts/check-notify.js | 새 DM 알림 체크 (cron용, 상태 파일 기반) |

| scripts/dm-watcher.js | 실시간 DM 감지 데몬 (15초 폴링) |

핵심 워크플로우

1. DM 확인

node scripts/v2.js check        # unread 개수 (가장 가벼움)
node scripts/v2.js unread       # 읽지 않은 DM 목록
node scripts/v2.js inbox        # 전체 DM 목록

2. 메시지 읽기

node scripts/v2.js read "<username>" -l 5

3. 답장

node scripts/v2.js reply "<username>" "메시지 내용"

API 실패 시 JSON에 method: "use_browser" + threadUrl 반환 → browser tool로 fallback.

4. 알림 체크 (cron 연동)

node scripts/check-notify.js

5. 자동응답 플로우

node scripts/auto-reply.js
  1. dm-alert.json 읽기 (dm-watcher가 생성)
  2. 각 DM 보안 체크 실행
  3. 결과 반환: needs_reply / security_alert / skipped
  4. AI가 needs_reply인 DM에 대해 답장 생성 → v2.js reply로 전송

6. 실시간 감지 데몬

node scripts/dm-watcher.js              # 감지만
node scripts/dm-watcher.js --auto-reply  # Discord 알림 포함

15초마다 v2.js check 폴링. 새 DM 감지 시 dm-alert.json 기록 + Discord DM 알림.

보안 체크 (인젝션 거부)

auto-reply.js의 SECURITY_PATTERNS가 다음을 감지:

위협 감지 시 → 답장하지 않고 security_alert 반환. 형님에게 별도 알림.

cron 설정 예시

# 5분마다 DM 체크
- schedule: "*/5 * * * *"
  command: "node /path/to/scripts/check-notify.js"
  systemEvent: true

# 또는 dm-watcher 데몬으로 상시 감시
- schedule: "@reboot"
  command: "node /path/to/scripts/dm-watcher.js --auto-reply"
  background: true

토큰 효율


🐧 Built by 무펭이 — 무펭이즘(Mupengism) 생태계 스킬

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.