discord-agent-fleet

discord-agent-fleet is a skill for Claude Code from bam-bam-2/solo-skills. It costs 60 tokens per session (2,429 once invoked), scanned B, original, MIT.

A setup guide for running several always-on conversational AI bots in Discord on a remote computer. It covers shared code, stored conversations and long-term memory, plus issues that can stop the bots from restarting.

In plain words
What is it for?
Use it to operate separate Discord bots for knowledge, study and community tasks. It helps manage their folders, Python environment, saved conversations, memory files and automatic startup.
Why use it?
It helps avoid losing bot availability or memory after a crash, reboot or power-saving event. It also explains how configuration changes take effect and how access is limited.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Codex.

Part of the solo-skills plugin — 26 skills shipped together

Good fit Use it to operate separate Discord bots for knowledge, study and community tasks. It helps manage their folders, Python environment, saved conversations, memory files and automatic startup.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/bam-bam-2/solo-skills/discord-agent-fleet
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add bam-bam-2/solo-skills --skill discord-agent-fleet
Clone the repo
git clone --depth 1 https://github.com/bam-bam-2/solo-skills

Made for: Claude Code.

Or install solo-skills, the plugin that ships this one along with the rest of its 26 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for discord-agent-fleet

README.md
[![agentmods](https://agentmods.dev/badge/skills/bam-bam-2/solo-skills/discord-agent-fleet/github.svg)](https://agentmods.dev/skills/bam-bam-2/solo-skills/discord-agent-fleet)
Your own site
<a href="https://agentmods.dev/skills/bam-bam-2/solo-skills/discord-agent-fleet"><img src="https://agentmods.dev/badge/skills/bam-bam-2/solo-skills/discord-agent-fleet/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for discord-agent-fleet

Your own site · 80×15
<a href="https://agentmods.dev/skills/bam-bam-2/solo-skills/discord-agent-fleet"><img src="https://agentmods.dev/badge/skills/bam-bam-2/solo-skills/discord-agent-fleet.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 60 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,429 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 4 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 108
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • medium Rogue Agent · line 41
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
  • medium Rogue Agent · line 69
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
  • medium Privilege Escalation · line 44
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00060 $0.02429
Opus 5 $0.00030 $0.01215
Sonnet 5 $0.00012 $0.00486
Haiku 4.5 $0.00006 $0.00243

Measured 13d ago against content hash fbcd154e06ea, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade B, and why

discord-agent-fleet scanned grade B with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 13d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

- 근본 해결은 `sudo pmset -a lowpowermode 0` 인데 비번 없는 sudo 가 안 걸려 있어 SSH 로는 못 한다. 사용자가 직접 쳐야 한다.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

2. **스크립트에서도 env 를 보강한다** (수동 실행 대비). `subprocess.run(..., env=_tool_env())` 로 `/opt/homebrew/bin` 을 PATH 앞에 끼운다.
skills/discord-agent-fleet/SKILL.md · 123 lines

How it starts

The opening of the file, as written. The whole thing — 123 lines — stays where its author put it; the contents beside it link to each section on GitHub.

원격 머신 에이전트 무리

사용자의 원격 머신(ssh remote-host)에 대화형 디스코드 봇이 셋 상주한다. 전부 같은 뼈대를 쓴다.

폴더 아는 것 launchd
지식봇 ~/Projects/<프로젝트>/ 지식봇 8기수 기록 + 원자료 55개 com.bambam.daolab-agent
스터디봇 ~/Projects/<프로젝트>/ 지피터스 글 2,000건 + 지난 아티클 + 사용자 스킬·메모리 com.bambam.gpters-agent
커뮤니티봇 ~/Projects/<프로젝트>/discord_bot/ 커뮤니티 커뮤니티 운영(길드·슬래시명령 등) com.getback.bamnyangi

파이썬은 셋 다 ~/Projects/<프로젝트>/.venv/bin/python 를 공유한다. 서버는 ai공작실(1492202577700458797) 하나. 허용 계정은 사용자 483902030243692546, 커뮤니티 1407565803242520586.

공통 뼈대

  • bot.py — 디스코드 게이트웨이. DM은 전체 지식, 공개 채널은 멘션받을 때만
  • answer.py — 인격+기억+자료를 조립해 LLM 호출
  • store.py — 단기 대화를 SQLite 에 영구 저장 (재시작·재부팅에도 유지)
  • persona.md — 인격·말투. 매 응답마다 읽으므로 고치면 재시작 없이 반영
  • memory.md — 장기기억. 응답에 MEMORY: 줄을 쓰면 자동 적립

기억이 두 층이라는 게 핵심이다. 단기(대명사 받기) + 장기(세션 끊어도 남는 사실). 초기화는 단기만 끊고 장기는 남긴다.

⚠️ 이 기기의 함정 세 가지

1. 저전력 모드가 KeepAlive 자동 재시작을 막는다

원격 머신에 lowpowermode = 1 이 켜져 있으면, 프로세스가 죽어도 launchd 가 되살리지 않는다.

state = not running
pended nondemand spawn = inefficient

"요청 없이 스스로 재기동하는 건 비효율적"이라며 무기한 보류한다. plist 에 KeepAlive 가 제대로 있어도 소용없고 ProcessType 을 바꿔도 안 통한다. 40초를 기다려도 안 풀리는 걸 실측했다.

  • 배포·재시작할 때는 항상 launchctl kickstart -k 를 명시적으로 쓴다. bootstrap 만으로는 프로세스가 안 뜬다. kickstart 는 명시적 요청이라 보류 정책을 우회한다.
  • 근본 해결은 sudo pmset -a lowpowermode 0 인데 비번 없는 sudo 가 안 걸려 있어 SSH 로는 못 한다. 사용자가 직접 쳐야 한다.
  • 이건 지식봇만의 문제가 아니라 이 기기의 모든 launchd 상주 작업에 적용된다.

2. CLAUDE.md 가 모든 CLI 호출에 자동으로 딸려간다

claude CLI 는 실행 디렉터리에 CLAUDE.md 가 없으면 상위 폴더로 거슬러 올라가며 찾아서 프롬프트에 넣는다.

커뮤니티봇가 호출당 14만 토큰을 쓰던 원인이 이거였다. 밤집사가 실제로 만드는 프롬프트는 4,766자인데, discord_bot/ 한 칸 위의 ~/Projects/<프로젝트>/CLAUDE.md(당시 170KB)가 매번 통째로 붙고 있었다. 2026-08-16 에 밤알바생·옛 작업이력을 docs/CLAUDE-archive-*.md 로 옮겨 1만 4천 자(92% 감소) 로 줄였다.

  • 새 봇을 만들 때는 subprocesscwd 를 그 봇 폴더로 고정하고, 그 폴더에 큰 CLAUDE.md 를 두지 않는다
  • 토큰이 예상보다 크면 프롬프트 코드부터 의심하지 말고 상위 폴더의 CLAUDE.md 크기를 먼저 재라
  • ~/.claude/CLAUDE.md(전역, 약 5KB)는 항상 붙는다. 이건 어쩔 수 없다

Read the full file on GitHub · 123 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 13d ago First seen · 123 lines · 60 tokens per session scan B fbcd154e06ea

Subscribe to this mod's changes

discord-agent-fleet is a skill published in the GitHub repository bam-bam-2/solo-skills (363 stars, last pushed 9d ago), licensed MIT. It adds 60 tokens to every session and 2,429 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it B with 2 findings (asks for root, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.