cw-debug

cw-debug is a skill for Claude Code from pilot617/awesome-claude-code-plugins. It costs 2 tokens per session (1,974 once invoked), scanned A, original, MIT.

A guided method for investigating production problems in AWS CloudWatch Logs Insights, a tool for searching and analyzing application logs.

In plain words
What is it for?
Searching a chosen log group over a specified time range, filtering by identifiers such as user IDs or request IDs, and narrowing queries as new evidence appears.
Why use it?
It gives the investigation a repeatable structure instead of relying on guesswork when tracing errors, slow requests, or unexpected behavior.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the cw-debug plugin — 1 skill shipped together

Good fit Searching a chosen log group over a specified time range, filtering by identifiers such as user IDs or request IDs, and narrowing queries as new evidence appears.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add pilot617/awesome-claude-code-plugins
Claude Code
/plugin install cw-debug

Made for: Claude Code.

Or install cw-debug, the plugin that ships this one along with the rest of its 1 skill.

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 cw-debug

README.md
[![agentmods](https://agentmods.dev/badge/skills/pilot617/awesome-claude-code-plugins/cw-debug/github.svg)](https://agentmods.dev/skills/pilot617/awesome-claude-code-plugins/cw-debug)
Your own site
<a href="https://agentmods.dev/skills/pilot617/awesome-claude-code-plugins/cw-debug"><img src="https://agentmods.dev/badge/skills/pilot617/awesome-claude-code-plugins/cw-debug/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 cw-debug

Your own site · 80×15
<a href="https://agentmods.dev/skills/pilot617/awesome-claude-code-plugins/cw-debug"><img src="https://agentmods.dev/badge/skills/pilot617/awesome-claude-code-plugins/cw-debug.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,974 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.00002 $0.01974
Opus 5.5 $0.00001 $0.00790
Sonnet 5.5 $0.00000 $0.00395
Haiku 4.5 $0.00000 $0.00197

Measured 3mo ago against content hash 818054308da8, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

cw-debug 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 3mo ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/cw.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

plugins/cw-debug/skills/cw-debug/SKILL.md · 170 lines

How it starts

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

/cw-debug — CloudWatch Log Investigation Skill

You are investigating a production issue using CloudWatch Logs Insights. Follow the structured methodology below, adapting queries based on what you discover in each phase.

Arguments

The user will invoke this skill as:

/cw-debug <log_group> <filter_pattern> <hours_back> <region> "<issue_description>"
  • log_group: The CloudWatch log group path (e.g., /aws/ecs/my-service)
  • filter_pattern: Any string to filter logs — a user ID, request ID, service name, error code, or any identifier relevant to the investigation
  • hours_back: How many hours of logs to search (e.g., 24, 168 for 7 days)
  • region: AWS region (e.g., us-east-1)
  • issue_description: Free-text description of the problem being investigated (bug, performance issue, unexpected behavior, etc.)

Setup

  • Always use .venv/bin/python to run scripts
  • The skill has its own self-contained CloudWatch utility at ${CLAUDE_PLUGIN_ROOT}/skills/cw-debug/scripts/cw.py
  • Do NOT import from cloudwatch_utils.py — use the skill's own module instead
  • To use in inline scripts, add the scripts dir to sys.path then import:
    import sys, os
    sys.path.insert(0, os.path.expanduser("${CLAUDE_PLUGIN_ROOT}/skills/cw-debug/scripts"))
    from cw import CWClient
    
    cw = CWClient(region="{region}")
    results = cw.query("{query}", hours_back={hours_back}, log_group="{log_group}")
    cw.print_table(results)
    
  • Or use the CLI directly:
    .venv/bin/python ${CLAUDE_PLUGIN_ROOT}/skills/cw-debug/scripts/cw.py \
        --region {region} --log-group "{log_group}" --hours {hours_back} \
        --query "fields @timestamp, @message | limit 25"
    
  • Available CWClient methods:
    • cw.query(query_string, hours_back, log_group) — single log group query
    • cw.query_multi(query_string, hours_back, log_groups) — query multiple log groups, merge results with _log_group tag
    • CWClient.summarize_stats(results, value_field, group_field=None) — compute count/avg/min/p50/p90/p95/p99/max from fetched results
    • CWClient.time_bucket_counts(results, timestamp_field, bucket_minutes) — group into time buckets for spike detection
    • CWClient.print_table(results) — ASCII table output
    • CWClient.print_json(results) — JSON output
    • cw.save(results, name) — save to investigations/<name>.csv
  • Refer to ${CLAUDE_PLUGIN_ROOT}/skills/cw-debug/query_library.md for pre-built query templates

Read the full file on GitHub · 170 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 3mo ago First seen · 170 lines · 2 tokens per session scan A 818054308da8

Subscribe to this mod's changes

cw-debug is a skill published in the GitHub repository pilot617/awesome-claude-code-plugins (7 stars, last pushed 8mo ago), licensed MIT. It adds 2 tokens to every session and 1,974 once invoked, about $0.0000 per session on Opus 5.5. 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-08-31.

Related

cw-debug compared with skills from other repositories

cw-debug next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
cw-debugpilot617/awesome-claude-code-pluginsSkill78mo agoMITA2Claude Code
architecture-optimizationwondelai/skillsSkill2.8ktodayMITA226Claude Code
remove-technical-debtwondelai/skillsSkill2.8ktodayMITA224Claude Code, Codex
release-itwondelai/skillsSkill2.8ktodayMITA131Claude Code, Codex
mobile-flows-maestrojohnkozaris/jko-claude-pluginsSkill1125d agoMITA102Claude Code
esp32-expertjohnkozaris/jko-claude-pluginsSkill1125d agoMITA137Claude Code
analyze-github-issueTNT-Likely/honeycombSkill31mo agoMITA166Claude Code