New skills covering 10 categories: **Security & Audit**: 007 (STRIDE/PASTA/OWASP), cred-omega (secrets management) **AI Personas**: Karpathy, Hinton, Sutskever, LeCun (4 sub-skills), Altman, Musk, Gates, Jobs, Buffett **Multi-agent Orchestration**: agent-orchestrator, task-intelligence, multi-advisor **Code Analysis**: matematico-tao (Terence Tao-inspired mathematical code analysis) **Social & Messaging**: Instagram Graph API, Telegram Bot, WhatsApp Cloud API, social-orchestrator **Image Generation**: AI Studio (Gemini), Stability AI, ComfyUI Gateway, image-studio router **Brazilian Domain**: 6 auction specialist modules, 2 legal advisors, auctioneers data scraper **Product & Growth**: design, invention, monetization, analytics, growth engine **DevOps & LLM Ops**: Docker/CI-CD/AWS, RAG/embeddings/fine-tuning **Skill Governance**: installer, sentinel auditor, context management Each skill includes: - Standardized YAML frontmatter (name, description, risk, source, tags, tools) - Structured sections (Overview, When to Use, How it Works, Best Practices) - Python scripts and reference documentation where applicable - Cross-platform compatibility (Claude Code, Antigravity, Cursor, Gemini CLI, Codex CLI) Co-authored-by: ProgramadorBrasil <214873561+ProgramadorBrasil@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
70 lines
1.5 KiB
Python
70 lines
1.5 KiB
Python
"""
|
|
Configurações e thresholds para o Claude Monitor.
|
|
"""
|
|
|
|
# Thresholds de alerta
|
|
THRESHOLDS = {
|
|
"cpu": {
|
|
"ok": 60,
|
|
"warning": 85,
|
|
# acima de warning = critical
|
|
},
|
|
"ram_percent": {
|
|
"ok": 70,
|
|
"warning": 85,
|
|
},
|
|
"browsers_ram_gb": {
|
|
"ok": 3.0,
|
|
"warning": 6.0,
|
|
},
|
|
"browsers_processes": {
|
|
"ok": 30,
|
|
"warning": 60,
|
|
},
|
|
"disk_free_percent": {
|
|
"critical_below": 10,
|
|
"warning_below": 15,
|
|
},
|
|
"network_latency_ms": {
|
|
"ok": 200,
|
|
"warning": 500,
|
|
},
|
|
}
|
|
|
|
# Nomes de processos de browser conhecidos
|
|
BROWSER_NAMES = ["chrome", "msedge", "firefox", "brave", "opera", "vivaldi"]
|
|
|
|
# Nomes de processos do Claude Code
|
|
CLAUDE_NAMES = ["claude"]
|
|
|
|
# Endpoint para teste de latência
|
|
API_ENDPOINT = "api.anthropic.com"
|
|
|
|
# Monitor defaults
|
|
MONITOR_DEFAULTS = {
|
|
"interval": 30,
|
|
"duration": 300,
|
|
"alert_cpu": 80,
|
|
"alert_ram": 85,
|
|
}
|
|
|
|
|
|
def classify(value, metric_name):
|
|
"""Classifica um valor como 'ok', 'warning' ou 'critical'."""
|
|
t = THRESHOLDS.get(metric_name, {})
|
|
|
|
# Métricas onde "abaixo" é ruim (disco livre)
|
|
if "critical_below" in t:
|
|
if value < t["critical_below"]:
|
|
return "critical"
|
|
elif value < t["warning_below"]:
|
|
return "warning"
|
|
return "ok"
|
|
|
|
# Métricas onde "acima" é ruim (CPU, RAM, latência)
|
|
if value <= t.get("ok", 999999):
|
|
return "ok"
|
|
elif value <= t.get("warning", 999999):
|
|
return "warning"
|
|
return "critical"
|