FrancyJGLisboa/agent-skills-platform / references/examples/weekly-crm-report
weekly-crm-report
UnverifiedCleans a weekly CRM export and produces a regional sales summary. Activates when the user asks to clean a CRM export, deduplicate sales rows, calculate regional totals, or generate a weekly sales report from a CSV.
| File | Kind | Size |
|---|---|---|
| README.md | markdown | 1.7 KB |
| SKILL.md | skill md | 2.4 KB |
| VERIFICATION.md | markdown | 845 B |
| contracts/data_contract_crm_export/.contract_id | other | 10 B |
| contracts/data_contract_crm_export/code/contract_health.py | script | 386 B |
| discovery.json | config | 2.2 KB |
| evals/golden/case-1/expected.json | config | 126 B |
| evals/golden/case-1/input.csv | other | 62 B |
| evals/golden/case-2/expected.json | config | 129 B |
| evals/golden/case-2/input.csv | other | 46 B |
| evals/golden/case-3/expected.json | config | 106 B |
| evals/golden/case-3/input.csv | other | 39 B |
| evals/weekly-crm-report.eval.md | markdown | 1.8 KB |
| scripts/dependency_health.py | script | 3.9 KB |
| scripts/evolve.pyexecutable | script | 10.2 KB |
| scripts/review_staleness.py | script | 6.2 KB |
| scripts/run_evals.pyexecutable | script | 49.4 KB |
| scripts/run_pipeline.pyexecutable | script | 2.3 KB |
| scripts/schema_drift.py | script | 7.3 KB |
| scripts/skill_document.py | script | 9.8 KB |
| scripts/staleness_check.py | script | 7.5 KB |
| scripts/success_ledger.py | script | 16.5 KB |
scripts/dependency_health.py
View on GitHub#!/usr/bin/env python3
"""
Dependency health check for a skill.
Issues an HTTP HEAD to each declared dependency URL and reports whether the
endpoint is reachable, returning a normal status, or has moved / errored.
Non-HTTP URLs and URLs without a scheme are reported as skipped.
"""
from __future__ import annotations
from urllib.error import HTTPError, URLError
from urllib.request import Request, urlopen
HTTP_TIMEOUT_SECONDS = 10
_USER_AGENT = "agent-skill-staleness-check/1.0"
def check_dependency_health(dependencies: list[dict]) -> list[dict]:
"""
Probe each dependency's URL. Returns a list of issue dicts (level, message,
detail). Status thresholds:
2xx-3xx -> info "healthy"
4xx -> warning "client error / may have moved"
5xx -> error "server error"
URLError, other -> error "unreachable / check failed"
"""
issues: list[dict] = []
for dep in dependencies:
url = dep.get("url", "").strip()
name = dep.get("name", url)
if not url:
issues.append({
"level": "warning",
"message": f"Dependency '{name}' has no URL",
"detail": "Cannot check health without a URL.",
})
continue
if not url.startswith(("http://", "https://")):
issues.append({
"level": "warning",
"message": f"Dependency '{name}' has non-HTTP URL",
"detail": f"Skipping health check for: {url}",
})
continue
try:
req = Request(url, method="HEAD")
req.add_header("User-Agent", _USER_AGENT)
with urlopen(req, timeout=HTTP_TIMEOUT_SECONDS) as resp:
status = resp.status
if 200 <= status < 400:
issues.append({
"level": "info",
"message": f"Dependency '{name}' is healthy",
"detail": f"HTTP {status} from {url}",
})
elif 400 <= status < 500:
issues.append({
"level": "warning",
"message": f"Dependency '{name}' returned client error",
"detail": f"HTTP {status} from {url}. "
"The endpoint may have moved or require authentication.",
})
else:
issues.append({
"level": "error",
"message": f"Dependency '{name}' returned server error",
"detail": f"HTTP {status} from {url}",
})
except HTTPError as exc:
# urlopen RAISES on 4xx/5xx; HTTPError subclasses URLError, so this
# must be caught first or every error status reads as "unreachable".
if 400 <= exc.code < 500:
issues.append({
"level": "warning",
"message": f"Dependency '{name}' returned client error",
"detail": f"HTTP {exc.code} from {url}. "
"The endpoint may have moved or require authentication.",
})
else:
issues.append({
"level": "error",
"message": f"Dependency '{name}' returned server error",
"detail": f"HTTP {exc.code} from {url}",
})
except URLError as exc:
issues.append({
"level": "error",
"message": f"Dependency '{name}' is unreachable",
"detail": f"Failed to connect to {url}: {exc.reason}",
})
except Exception as exc:
issues.append({
"level": "error",
"message": f"Dependency '{name}' check failed",
"detail": f"Error checking {url}: {exc}",
})
return issues
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| deprecation-and-migrationaddyosmani/agent-skillsManages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when migrating a database schema in production, such as renaming or dropping a column without downtime (expand/contract). Use when deciding whether to maintain or sunset existing code. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| performance-optimizationaddyosmani/agent-skillsOptimizes application performance across frontend, backend, queries, and databases. Use when performance requirements exist, when you suspect performance regressions, when Core Web Vitals or load times need improvement, when N+1 query patterns need fixing, or when profiling reveals bottlenecks. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| agent-cost-reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |
| agent-cost-reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |