enterprise-agent-ops/SKILL.md
Operate long-lived agent workloads with observability, security boundaries, and lifecycle management. Updated June 2026 with trace-level monitoring, OpenTelemetry, drift detection, and cost attribution.
npx skillsauth add lidge-jun/cli-jaw-skills enterprise-agent-opsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill for cloud-hosted or continuously running agent systems that need operational controls beyond single CLI sessions.
| Phase | Actions | Controls | |-------|---------|----------| | Start | Deploy artifact, inject secrets, warm caches | Health check gate before accepting traffic | | Run | Process tasks, handle tool calls, manage state | Hard timeout per task, retry budget | | Pause | Graceful drain, checkpoint state | Preserve in-flight context for resume | | Stop | Flush logs, archive traces, release resources | Confirm all async work settled | | Restart | Roll back to last-known-good on repeated failures | Automatic restart with exponential backoff |
Modern agent observability requires trace-level visibility — not just request/response logging.
What to capture per agent step:
Recommended stack:
# OpenTelemetry trace example for an agent step
from opentelemetry import trace
tracer = trace.get_tracer("agent.ops")
with tracer.start_as_current_span("agent.tool_call") as span:
span.set_attribute("agent.model", "claude-sonnet-4-6")
span.set_attribute("agent.tool", tool_name)
span.set_attribute("agent.tokens.input", input_tokens)
span.set_attribute("agent.tokens.output", output_tokens)
span.set_attribute("agent.cost_usd", step_cost)
result = execute_tool(tool_name, tool_input)
span.set_attribute("agent.tool.success", result.success)
| Metric | Description | Target | |--------|-------------|--------| | Task success rate | % of tasks completed without error | > 95% | | Hallucination rate | % of outputs flagged as incorrect/fabricated | < 2% | | Task completion score | Semantic evaluation of output quality (LLM-as-judge) | > 0.85 |
| Metric | Description | Alert Threshold | |--------|-------------|-----------------| | Mean retries per task | Average retry attempts before success/failure | > 2.0 | | Time to recovery | From failure detection to resolution | > 15 min | | P95 task latency | 95th percentile end-to-end task duration | > 5 min | | Error rate by class | Breakdown: auth / rate-limit / timeout / tool-error / model-error | Any class > 5% |
| Metric | Description | | |--------|-------------|---| | Cost per successful task | Total API spend / successful completions | Track trend | | Cost per step | Token cost attributed to each agent reasoning step | Detect inefficiency | | Budget burn rate | Projected spend vs. budget at current consumption | Alert at 80% |
Agent behavior can drift silently due to model updates, prompt changes, or data shifts.
Detection methods:
# Simple drift detection: compare output distributions
def detect_drift(recent_metrics: list[float], baseline_metrics: list[float], threshold: float = 2.0) -> bool:
"""Alert if recent metrics deviate from baseline by more than threshold standard deviations."""
import statistics
baseline_mean = statistics.mean(baseline_metrics)
baseline_stdev = statistics.stdev(baseline_metrics) or 0.01
recent_mean = statistics.mean(recent_metrics)
z_score = abs(recent_mean - baseline_mean) / baseline_stdev
return z_score > threshold
When failure spikes:
For known failure classes, implement automated recovery:
REMEDIATION_MAP = {
"rate_limit": lambda: backoff_and_retry(multiplier=2),
"model_overloaded": lambda: failover_to_secondary_model(),
"tool_timeout": lambda: retry_with_extended_timeout(),
"budget_exceeded": lambda: pause_and_alert_ops(),
"auth_expired": lambda: refresh_credentials_and_retry(),
}
| Platform | Use Case | Notes | |----------|----------|-------| | PM2 | Process management for Node.js agents | Cluster mode for multi-instance | | systemd | Linux service management | Restart policies, journal logging | | Docker / K8s | Container orchestration | Resource limits, health probes | | CI/CD | Deployment pipeline | Gate on regression tests + cost projections | | Feature flags | Gradual rollout / kill switch | LaunchDarkly, Unleash, or custom |
Production agent ops follows a continuous improvement cycle:
Each cycle iteration should be tracked with a timestamp, evidence, and measurable improvement.
tools
Use only on the Codex CLI for native image generation or image editing without an API key. Save final PNG files under ~/.cli-jaw/uploads, report web-ready absolute-path markdown, and send to Telegram or Discord only when explicitly requested.
tools
Ranked repository structure map via `cli-jaw map`. Use for codebase overview, structure map, symbol overview, unfamiliar codebase exploration, architecture orientation. Triggers: repo map, structure map, codebase overview, 와꾸, project structure, unfamiliar code.
tools
cli-jaw Design workspace: create, preview, run, and export design pages from the right sidebar. Covers panel UX, direct-write workflow, artifact lifecycle, wireframe generation, design system, and Open Design adapter.
development
MUST USE for infrastructure and delivery work — container builds, deploy pipelines, Kubernetes, Infrastructure as Code, SRE foundations, edge/serverless, ML infrastructure. Triggers: Dockerfile, K8s manifests, CI/CD pipeline, Terraform/IaC, release/deploy, devops/infra/deploy or release_cd task_tags.