agentleFS
nitaybznitaybz/ginnie-agents/.claude/skills/logs/SKILL.md

logs

Skill18 starsChanged 3 months agoMITView on GitHub

Tail, search, or download logs for the listener and individual agents. Use when the user says "show logs", "tail logs", "what did agent X do", "search logs for X", "download logs", or is debugging agent behavior.

  • Reads credentials

6 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 6 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Ask if unclear. Default to: pm2 logs ginnie-agents-listener --lines 50 --nostream if user just says "show logs".

    line 20

“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Logs

Two log surfaces:

  • Listener logs — what the framework process did. PM2 manages these.
  • Agent logs — per-agent run output. Written to agents/<n>/logs/ when invoking run.sh. Live container output is captured by PM2's listener log when the runner spawns a container.

Step 1 — Decide what the user actually wants

Common asks:

  • "Why did the agent not respond to me at 3pm?" → listener logs filtered by agent + timeframe
  • "Show me what the agent thought during the morning routine" → agent's recent run log
  • "Search for errors" → grep across listener log
  • "Download today's logs" → file dump

Ask if unclear. Default to: pm2 logs ginnie-agents-listener --lines 50 --nostream if user just says "show logs".

Step 2 — Listener tail

pm2 logs ginnie-agents-listener --lines 100 --nostream

Filter by agent name:

pm2 logs ginnie-agents-listener --lines 500 --nostream | grep -E '\[<agent_name>\]'

Filter by time (last N minutes):

pm2 logs ginnie-agents-listener --lines 1000 --nostream | awk -v cutoff="$(date -v-30M '+%Y-%m-%d %H:%M' 2>/dev/null || date -d '30 minutes ago' '+%Y-%m-%d %H:%M')" '$0 >= cutoff'

-v-30M is macOS BSD date; the GNU fallback is date -d '30 minutes ago'.

Step 3 — Agent run logs

Agents that use the manual run.sh wrapper produce dated files:

ls -lt agents/<n>/logs/
cat agents/<n>/logs/$(date +%Y-%m-%d).log

For agents triggered through Slack (the typical path), look at PM2 logs filtered by the agent name — the agent's stderr is streamed there.

Step 4 — Search

# Across listener
pm2 logs ginnie-agents-listener --lines 5000 --nostream | grep -iE '<pattern>'

# Across agent run logs
grep -rinE '<pattern>' agents/*/logs/ | head -50

For multi-line patterns or structured search, dump to a file first:

pm2 logs ginnie-agents-listener --lines 10000 --nostream > /tmp/listener.log

Step 5 — Download

User wants to share logs (with you, with someone else)?

# Listener last 24h
pm2 logs ginnie-agents-listener --lines 50000 --nostream > /tmp/listener-$(date +%Y%m%d).log

# Specific agent's run logs
tar -czf /tmp/<agent>-logs-$(date +%Y%m%d).tar.gz agents/<agent>/logs/

Tell the user the file path and approximate size. Do not paste sensitive content (Slack tokens, API keys) in the chat — review before sharing.

Step 6 — Common diagnostics

SymptomWhere to look
Agent didn't respond to a Slack messageListener log around the message timestamp; look for [@mention] or [DM] lines for that agent
Container exited with non-zero codeListener log line Container exited with code <N> — preceding lines show stderr from the container
Routine didn't fireListener log at expected fire time — look for [scheduler] <agent>: firing "<id>"
Auth failureListener log near startup: start failed: not_authed or invalid_auth → token in agents/<n>/credentials.json is bad; regenerate from Slack app's OAuth & Permissions page
Memory hook rejected commitOutput of last commit attempt; usually rules.md exceeds 200 lines or episodes/X.md is shrinking

Step 7 — Cleanup

PM2 logs grow unbounded by default. To rotate:

pm2 install pm2-logrotate
pm2 set pm2-logrotate:max_size 100M
pm2 set pm2-logrotate:retain 14

Per-agent run logs in agents/<n>/logs/ are gitignored but never auto-truncated. Suggest the user rotate them periodically:

find agents/*/logs -name '*.log' -mtime +30 -delete

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.