---
name: atlantic-site-monitor
description: Monitor atlanticsail.net availability and evolve checking parameters based on history.
version: 1.0.0
author: Hermes Agent
category: devops
---
# Atlantic Sail Site Monitor Skill

This skill performs a health check on https://atlanticsail.net/ and logs the result.
It adapts its behavior (timeout, retry count) based on recent failures to improve robustness without modifying the core skill.

## How It Works

1. **Configuration**  
   Reads `config.json` in the skill directory (created if missing) with fields:
   - `timeout_seconds` (default: 10)
   - `max_retries` (default: 2)
   - `failure_threshold` (default: 2) – consecutive failures to trigger escalation

2. **Check Procedure**  
   - Attempt to fetch the site with given timeout.
   - On failure (non-200 or exception), retry up to `max_retries`.
   - Log each attempt to `logs/check_YYYY-MM-DD.log` (relative to skill directory).
   - If all retries fail, mark as failure; otherwise success.

3. **Evolution Logic**  
   After each run, the skill reviews the last 7 days of logs:
   - If ≥ `failure_threshold` consecutive failures, it increases `timeout_seconds` by 5s (up to 30s) and/or increments `max_retries` by 1 (up to 5).
   - If 7 consecutive successes, it gradually decreases timeout/retries towards defaults to avoid over-provisioning.
   - Updates `config.json` for the next invocation.

4. **Logging**  
   Each log entry includes: timestamp, attempt number, status code or error, final outcome.
   Example: `2026-05-09T12:00:00Z | attempt 1/2 | status=200 | outcome=SUCCESS`

## Usage

Load the skill in a Hermes session:
```
/skill atlantic-site-monitor
```
Then follow the prompts or invoke the check directly via the provided script.

## Script

A helper script `check_site.py` is included in the skill's `scripts/` directory. It can be run independently:
```bash
python3 scripts/check_site.py
```

## Evolution Notes

- The skill never modifies its own `SKILL.md`; evolution is confined to `config.json` and logs within the skill directory.
- This allows the agent to improve its monitoring strategy over time based on actual observed conditions while keeping the core procedure stable.
- To reset evolution, delete `config.json`; defaults will be restored on next run.

---
## Steps to Perform a Check

1. Ensure you have Python 3 and internet access.
2. Load this skill: `/skill atlantic-site-monitor`
3. The skill will guide you to run the check script or you can execute it manually:
   ```bash
   python3 ~/.hermes/skills/devops/atlantic-site-monitor/scripts/check_site.py
   ```
4. Review the latest log file under `logs/` for results.
5. On subsequent runs, the skill will automatically adjust parameters based on recent history.

---
## Troubleshooting

- **No internet**: Verify connectivity; the skill will log connection errors.
- **Persistent failures**: Check if the site is truly down or if blocking/rate limiting occurs.
- **Config not updating**: Ensure the skill directory is writable.

---
## Example Log Output

```
=== ATLANTIC SITE MONITOR LOG ===
2026-05-09T12:00:00Z | attempt 1/2 | status=200 | outcome=SUCCESS
2026-05-09T12:05:00Z | attempt 1/2 | status=502 | outcome=RETRY
2026-05-09T12:05:05Z | attempt 2/2 | status=502 | outcome=FAILURE
Consecutive failures: 2 → increasing timeout to 15s
=== END LOG ===
```