p7-monitoring

p7-monitoring is a command for Claude Code from jonase47/ccpr. It costs 0 tokens per session (1,514 once invoked), scanned A, original, MIT.

A production monitoring setup that configures measurements, logs, alerts, and rollback checks. Rollback means returning to an earlier working version after a failed release.

In plain words
What is it for?
Use it to set up alerting, logging, performance monitoring, and tests of the rollback plan for a deployed system.
Why use it?
It helps the team notice failures and security events early and check that the recovery procedure works before an emergency.

Command for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter. Also seen: reads .claude/ paths.

Good fit Use it to set up alerting, logging, performance monitoring, and tests of the rollback plan for a deployed system.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/jonase47/ccpr/p7-monitoring
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/jonase47/ccpr

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for p7-monitoring

README.md
[![agentmods](https://agentmods.dev/badge/commands/jonase47/ccpr/p7-monitoring/github.svg)](https://agentmods.dev/commands/jonase47/ccpr/p7-monitoring)
Your own site
<a href="https://agentmods.dev/commands/jonase47/ccpr/p7-monitoring"><img src="https://agentmods.dev/badge/commands/jonase47/ccpr/p7-monitoring/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for p7-monitoring

Your own site · 80×15
<a href="https://agentmods.dev/commands/jonase47/ccpr/p7-monitoring"><img src="https://agentmods.dev/badge/commands/jonase47/ccpr/p7-monitoring.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,514 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.01514
Opus 5 $0.00000 $0.00757
Sonnet 5 $0.00000 $0.00303
Haiku 4.5 $0.00000 $0.00151

Measured 5d ago against content hash 21e183e6053c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

p7-monitoring scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/p7-monitoring.md · 127 lines

How it starts

The opening of the file, as written. The whole thing — 127 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/p7-monitoring – Set Up Monitoring & Test Rollback Plan

Sets up production monitoring completely, configures alerting rules, and tests the rollback plan. The goal is a system that reports problems early and where a rollback works smoothly in an emergency.

Argument: $ARGUMENTS = [Focus, e.g. "Alerting", "Logging", "Performance", "complete"]

If provided: Focus the setup on the specified area. If not provided: Read INFRASTRUCTURE.md and set up all monitoring components completely. If any context is missing, ask about the monitoring infrastructure in use.

Execution

1. Read Context

Read the following files (if available):

  • INFRASTRUCTURE.md (monitoring concept, alerting strategy, chosen tools)
  • DEPLOYMENT_LOG.md (current deployment status – monitoring builds on this)
  • SECURITY.md (security-relevant events that must be monitored)
  • FEATURES.md (which critical features should be monitored especially closely)

2. Delegation to DevOps Agent (Lead)

Delegate monitoring setup to the devops agent:

Set up production monitoring. Focus (if specified): $ARGUMENTS Monitoring concept from INFRASTRUCTURE.md: [Apply tools, metrics, alerting strategy]

A. Application Performance Monitoring (APM)

  • Response time metrics: P50, P95, P99 for all critical endpoints
  • Error rate: percentage of failed requests per endpoint
  • Throughput: requests per second / minute
  • Database queries: enable slow query logging (define threshold)

B. Infrastructure Monitoring

  • CPU usage: warning at X%, critical at Y%
  • RAM usage: warning and critical thresholds
  • Disk space: warning at 80%, critical at 90%
  • Network: unusual traffic (potential DDoS signals)

C. Uptime & Health Checks

  • External uptime monitor: checks every N minutes from outside whether the application is reachable
  • Health endpoint (/health): returns database connection, external services, and version
  • Alerting on outage: immediate notification on downtime

D. Logging

  • Central log aggregation system configured (according to INFRASTRUCTURE.md)
  • Log level for production: INFO for normal events, WARN for irregularities, ERROR for failures
  • Structured logging (JSON) for machine-readable evaluation
  • Log retention: how long are logs kept?
  • Security logs: failed logins, unusual access attempts logged separately

E. Alerting Rules Define concrete alerting rules with threshold, channel, and escalation:

Metric Threshold Channel Escalate after
Uptime outage > 1 min SMS + Slack immediately
Error rate > 5% over 5 min Slack 15 min: SMS
Response time P99 > 5s Slack 30 min: SMS
CPU > 85% over 10 min Slack
Disk > 80% Slack

F. Test Rollback Plan Execute a rollback test (on staging or with a controlled procedure):

  • Run through the rollback procedure once completely
  • Measure time: how long does a complete rollback take?
  • Check database state: is the state after rollback consistent?
  • Document the test result in MONITORING.md

Read the full file on GitHub · 127 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago Changed 21e183e6053c
  2. 8d ago First seen · 127 lines · 0 tokens per session scan A 439b2854dd40

Subscribe to this mod's changes

p7-monitoring is a command published in the GitHub repository jonase47/ccpr (1 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,514 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.