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.
curl -O https://raw.githubusercontent.com/go-to-k/cdkd/main/.claude/skills/cleanup/SKILL.mdgit clone --depth 1 https://github.com/go-to-k/cdkdWrote 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.
[](https://agentmods.dev/skills/go-to-k/cdkd/cleanup)<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="Measured on agentmods" height="20"></a>- NVIDIA SkillSpector warn
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.
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00027 | $0.03843 |
| Opus 5 | $0.00014 | $0.01921 |
| Sonnet 5 | $0.00005 | $0.00769 |
| Haiku 4.5 | $0.00003 | $0.00384 |
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 yesterday.
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.
How it starts
The opening of the file, as written. The whole thing — 139 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 cdkd integration test stack name prefixes
- NEVER deletes resources that don't match a known cdkd naming pattern
- Always shows what will be deleted and uses
AskUserQuestionfor confirmation before deleting anything - Default mode is detect-only (no deletion)
Arguments
stack-name-prefix: Filter by specific stack name prefix (e.g.,EcrStack,LambdaStack). If not specified, scan all known cdkd test stack prefixes.--detect-only: Only list leftover resources, don't delete (this is the default)
Steps
-
Determine stack name prefixes to scan:
- If a prefix is given, use that
- Otherwise, discover all integration test stack names by running synth or reading
bin/app.tsin eachtests/integration/*/directory. Look for the CDK construct ID (second argument tonew *Stack(app, '<id>'))
-
Resolve region and account: Scan
us-east-1,ap-northeast-1, ANDus-west-2— the benchmark suite (docs/benchmarks.md) runs its CFn/cdkd variant stacks inus-west-2, and its leftovers (billed PROVISIONED Kinesis streams, ~130 Lambda log groups) went unnoticed for a month because this skill only scanned the first two regions (2026-07-31 sweep). Additionally, derive extra regions dynamically from the state-bucket key layout (aws s3 lsthe bucket recursively and collect the distinct{region}path segments) so a fixture pinned to an unusual region is not missed. Resolve account ID viaaws sts get-caller-identity. IAM is global so only needs one query. -
Check S3 state:
aws s3 ls s3://cdkd-state-{accountId}-us-east-1/stacks/ --region us-east-1
3.5. Bulk-sweep orphaned deployment-event stores (issue #885 follow-up): since the
deployment-events feature (#820), 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).
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.
- yesterday Changed · +7 lines 5577220545ea
- 8d ago First seen · 132 lines · 27 tokens per session scan A fbb9324ef9d3
cleanup is a skill published in the GitHub repository go-to-k/cdkd (135 stars, last pushed today), licensed Apache-2.0. It adds 27 tokens to every session and 3,843 once invoked, about $0.0001 per session on Opus 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.
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.
aws-cdk-development
AWS Cloud Development Kit (CDK) expert for building cloud infrastructure with TypeScript/Python. Use when creating CDK stacks, defining CDK constructs, implementing infrastructure as code, or when the user mentions CDK, CloudFormation, IaC, cdk synth, cdk deploy, or wants to define AWS infrastructure programmatically.…
aws-agentic-ai
AWS Bedrock AgentCore comprehensive expert for deploying and managing AI agents at scale. Use when working with any AgentCore service including Gateway, Runtime, Memory, Identity, Code Interpreter, Browser, Observability, Agent Registry, or Evaluations. Covers agent deployment, MCP tool integration, credential…
aws-cdk-discipline
AWS infrastructure policy for fermi-agentcore - all changes through CDK committed to main, Fermi AWS access is read-only verification.
iam-policy-validator
Validate the IAM policies in a CloudFormation template against AWS IAM Access Analyzer before deploying, using the cfn-policy-validator CLI. Use when reviewing or gating a CloudFormation (or CDK-synthesized) template that defines IAM identity or resource policies, when asked to check a template for policy errors…
aws-bedrock-ai
WORKFLOW SKILL — Amazon Bedrock and AWS AI design: foundation model selection, knowledge bases (RAG), agents for bedrock, guardrails, provisioned throughput, batch inference, fine-tuning, KMS, VPC endpoints, regional GA, and per-provider licensing.