monitor-setup
Skill1 starsChanged 30 days agoMITView on GitHub
Configure health checks, alerting patterns, and uptime tracking adapted to the project's stack. Use after kickoff or before deployment to add operational hooks.
- Reads credentials
In this repository25 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- audit-projectSkill
- cleanupSkill
- create-skillSkill
- dailySkill
- dependency-checkSkill
- documentSkill
- execute-prpSkill
- ez-project-workflowSkill
- fix-issueSkill
- generate-prpSkill
- housekeepingSkill
- kickoffSkill
- nextSkill
- performanceSkill
- pipelineSkill
- refactorSkill
- retrospectiveSkill
- review-codeSkill
- rollbackSkill
- security-scanSkill
- statusSkill
- tddSkill
- upgrade-statusSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 5 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 9
Read CLAUDE.md / AGENTS.md for stack type
- Very specific: line 11
Check if Discord webhook alerting is configured (env var, examples/discord_alert_pattern.py)
- Distinctive: line 12
Check if logging is structured for monitoring
- Very specific: line 14
Default scope: all ($ARGUMENTS can narrow to health, alerts, or uptime).
- Very specific: line 17
Create or update an endpoint at /health:
- Very specific: line 21
Add src/utils/health.py with helpers (get_uptime, check_db, check_apis).
- Very specific: line 29
Add src/utils/alerts.py with the helper functions.
- Very specific: line 35
Run ruff check and black on new files
- Distinctive: line 36
If an API endpoint was created, show the user a curl test command
- Distinctive: line 37
Update CLAUDE.md / AGENTS.md with a Monitoring section
- Distinctive: line 38
Update README with the health-check URL
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Monitor Setup
Phase 1: Assess current state
- Read CLAUDE.md / AGENTS.md for stack type
- Grep for existing
/healthorhealthcheckendpoints - Check if Discord webhook alerting is configured (env var,
examples/discord_alert_pattern.py) - Check if logging is structured for monitoring
Default scope: all ($ARGUMENTS can narrow to health, alerts, or uptime).
Phase 2: Health check endpoint (if stack = api or ai-agent)
Create or update an endpoint at /health:
status: "healthy",version,uptime- Sub-checks: database connectivity, external API reachability
Add src/utils/health.py with helpers (get_uptime, check_db, check_apis). Add a health-check pattern to examples/.
Phase 3: Alert patterns
Build on examples/discord_alert_pattern.py:
- Levels: INFO / WARNING / ERROR / CRITICAL
- Channels: Discord webhook (primary), loguru file, stdout
- Deduplication: don't spam the same error
Add src/utils/alerts.py with the helper functions.
Phase 4: Uptime (data stack)
Track process start time in memory. Optionally log uptime milestones (1h, 6h, 24h, 7d). On long-running processes, add graceful shutdown logging.
Phase 5: Validate + document
- Run
ruff checkandblackon new files - If an API endpoint was created, show the user a curl test command
- Update CLAUDE.md / AGENTS.md with a Monitoring section
- Update README with the health-check URL
- Commit:
feat: add monitoring setup (<components>)
Rules
- Adapt to the project stack — do not add API endpoints to a data-only project
- Discord webhook URL comes from
.env(never hardcode) - Health checks must be FAST (< 500ms total)
- Alert deduplication is critical — never spam a webhook
- Monitoring code should never crash the main application
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
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.

