cdkd: Skill for Claude Code

.claude/skills/cleanup/SKILL.md

cleanup is a skill for Claude Code from go-to-k/cdkd. It costs 27 tokens per session (3,385 once invoked), scanned A, original, Apache-2.0.

A detector for AWS resources left behind by cdkd integration tests. It only considers resources whose names match known cdkd test-stack patterns, and detection is the default mode.

In plain words
What is it for?
Use it to scan supported AWS regions for leftover integration-test resources, optionally filter by a stack-name prefix, and—after confirmation—delete matching resources.
Why use it?
It helps find unused test resources that may remain in an AWS account and continue to incur costs or clutter.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: names the AskUserQuestion tool; positional $N argument.

This is go-to-k/cdkd's own configuration. It tells Claude Code how to work on cdkd itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything cdkd configures →

View source ↗ go-to-k/cdkd
Reuse

Borrowing it

Nothing to install: this file belongs to go-to-k/cdkd. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/go-to-k/cdkd/main/.claude/skills/cleanup/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/go-to-k/cdkd

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 cleanup

README.md
[![agentmods](https://agentmods.dev/badge/skills/go-to-k/cdkd/cleanup/github.svg)](https://agentmods.dev/skills/go-to-k/cdkd/cleanup)
Your own site
<a href="https://agentmods.dev/skills/go-to-k/cdkd/cleanup"><img src="https://agentmods.dev/badge/skills/go-to-k/cdkd/cleanup/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 cleanup

Your own site · 80×15
<a href="https://agentmods.dev/skills/go-to-k/cdkd/cleanup"><img src="https://agentmods.dev/badge/skills/go-to-k/cdkd/cleanup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 27 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,385 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Tool Misuse · line 63
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
How audits are shown
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.00027 $0.03385
Opus 5.5 $0.00011 $0.01354
Sonnet 5.5 $0.00005 $0.00677
Haiku 4.5 $0.00003 $0.00338

Measured 15d ago against content hash 4ebc090537f0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

cleanup 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 15d 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.

.claude/skills/cleanup/SKILL.md · 147 lines

How it starts

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

Leftover Resource Cleanup

Detect and optionally delete AWS resources left behind by cdkd integration tests.

Safety

  • ONLY targets resources whose names match a cdkd integ stack prefix; NEVER one that does not match a known cdkd naming pattern.
  • Always show what will be deleted and confirm via AskUserQuestion first.
  • Detect-only is the DEFAULT.

Arguments

  • stack-name-prefix: one prefix (e.g. EcrStack); absent, scan all known cdkd test stack prefixes.
  • --detect-only: list only, the default.

Steps

  1. Determine stack name prefixes to scan: the given prefix, else discover every integ stack name by synthesizing or reading bin/app.ts in each tests/integration/*/ — the construct ID is the second argument to new *Stack(app, '<id>').

  2. Resolve region and account: scan us-east-1, ap-northeast-1 AND us-west-2 — the benchmark suite runs its variant stacks in the third, and its leftovers (billed PROVISIONED Kinesis streams, Lambda log groups) are invisible to a two-region scan. Derive any further regions from the state-bucket key layout (aws s3 ls recursively, collect the distinct {region} segments) so a fixture pinned elsewhere is not missed. Account id via aws sts get-caller-identity; IAM is global, so one query.

  3. Check S3 state: aws s3 ls s3://cdkd-state-{accountId}/cdkd/ --recursive --region us-east-1 | grep state.json (also the legacy cdkd-state-{accountId}-{region} bucket if it exists)

3.5. Bulk-sweep orphaned deployment-event stores: cdkd destroy / cdkd state destroy removes state.json but, unless --purge-events was passed, INTENTIONALLY leaves the cdkd/{stack}/{region}/deployments/ event store behind (post-mortem history). After a long integ campaign those orphaned event stores accumulate across dozens of already-destroyed stacks, so aws s3 ls .../cdkd/ is never empty even when there are no real state / resource leaks. This step bulk-removes them. Safety: only a prefix that has a deployments/ child AND NO state.json under any region is an orphan — a prefix that still has a state.json is an ACTIVE (deployed, not destroyed) stack and MUST be left untouched (its deployments/ is live history).

Read the full file on GitHub · 147 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. 15d ago Changed · +1 lines 4ebc090537f0
  2. 1mo ago Changed 89284c6ab235
  3. 1mo ago Changed · +8 lines 22487ad80ec5
  4. 1mo ago Changed · -1 lines 3fd03840082f
  5. 1mo ago Changed · +7 lines 5577220545ea
  6. 2mo ago First seen · 132 lines · 27 tokens per session scan A fbb9324ef9d3

Subscribe to this mod's changes

cleanup is a skill published in the GitHub repository go-to-k/cdkd (156 stars, last pushed today), licensed Apache-2.0. It adds 27 tokens to every session and 3,385 once invoked, about $0.0001 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-30.

Related

Other skills, from other repositories

aws-cdk-mcp-server-mcp

AWS Cloud Development Kit (CDK) best practices, infrastructure as code patterns, and security compliance with CDK Nag.

Friz-zy/ai-capability-registry · 33 tokens

aws-serverless-patterns

AWS Lambda, API Gateway, DynamoDB, Step Functions, EventBridge patterns and best practices. Use when building or reviewing serverless backends, CDK infrastructure, or Lambda functions.

seandkendall/kiro-config · 43 tokens

aws-diagram-html

Generate a polished, self-contained HTML architecture diagram (inline SVG) with real official AWS Architecture Icons, hand-routed orthogonal connectors that never cross or overlap, numbered flow steps, and an observability panel. Triggers when the user asks for a nice looking diagram, an HTML diagram, a diagram to…

seandkendall/kiro-config · 83 tokens

aws-diagram-png

Generate AWS architecture diagrams as PNG images with real AWS icons using the awslabs/diagram-as-code (awsdac) CLI. Triggers when user wants a PNG diagram, architecture image, or visual export of AWS infrastructure. Produces publication-ready diagrams following AWS architecture guidelines.

seandkendall/kiro-config · 61 tokens

cognito-email-migration

Runbook for migrating an existing Cognito User Pool from default emails to a custom CustomEmailSender Lambda. Use when an existing app needs to switch from the default Cognito verification / password-reset / MFA emails to brand-matched HTML emails sent via SES.

seandkendall/kiro-config · 57 tokens

deploy-on-aws

Deploy applications to AWS via deploy.sh. Triggers on phrases like: deploy to AWS, deploy.sh, build me a deploy script, host on AWS, run this on AWS, AWS architecture, estimate AWS cost, generate infrastructure. Analyzes any codebase and deploys to optimal AWS services.

seandkendall/kiro-config · 65 tokens