agent-instructions
Use when writing project instructions for a coding agent (CLAUDE.md, AGENTS.md, or equivalent). Covers what belongs in them, what does not, structure, and…
Use when defining AWS infrastructure with the CDK. Covers construct design, stack organization, environment configuration, testing infrastructure code, and safe deployment.
$ npx -y skills add nimadorostkar/Claude-Skills-collection --skill aws-cdk --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/aws-cdkContext preview
The summary Claude sees to decide when to auto-load this skill.
Use when defining AWS infrastructure with the CDK. Covers construct design, stack organization, environment configuration, testing infrastructure code, and safe deployment.
name: aws-cdk description: Use when defining AWS infrastructure with the CDK. Covers construct design, stack organization, environment configuration, testing infrastructure code, and safe deployment. metadata: category: devops version: 1.0.0 tags: [aws, cdk, iac, typescript, cloudformation]
Define AWS infrastructure in a real programming language without losing the reviewability of a plan. The CDK's power — abstraction, loops, conditionals — is also its risk: a small code change can generate a large and destructive CloudFormation diff.
1. **Organize stacks by lifecycle** — Things that change together belong together. A stack containing both the VPC (changes yearly) and the application (changes daily) makes every deploy risk the network. 2. **Prefer L2 constructs** — They apply sensible defaults, including encryption and least-privilege IAM. Drop to L1 only for properties L2 does not expose. 3. **Build L3 patterns for repeated shapes** — A `MonitoredLambda` construct that always adds an alarm, a log group with retention, and a dead-letter queue removes an entire category of oversight. 4. **Test the synthesized template** — Snapshot tests catch unintended diffs; fine-grained assertions verify specific properties (encryption on, public access off). 5. **Read `cdk diff` before every deploy** — It shows resource replacements. A replaced RDS instance is a new, empty RDS instance. 6. **Deploy through a pipeline** — Not from a laptop with admin credentials.
**An L3 construct that makes the right thing the default:**
export interface MonitoredFunctionProps extends NodejsFunctionProps {
readonly alarmTopic: ITopic;
}
/** A Lambda that cannot be deployed without an alarm, a DLQ, and log retention. */
export class MonitoredFunction extends Construct {
public readonly fn: NodejsFunction;
constructor(scope: Construct, id: string, props: MonitoredFunctionProps) {
super(scope, id);
const dlq = new Queue(this, "Dlq", { retentionPeriod: Duration.days(14) });
this.fn = new NodejsFunction(this, "Fn", {
runtime: Runtime.NODEJS_22_X,
architecture: Architecture.ARM_64, // cheaper and faster
logRetention: RetentionDays.ONE_MONTH, // otherwise logs are kept forever, billed forever
deadLetterQueue: dlq,
tracing: Tracing.ACTIVE,
...props,
});
this.fn.metricErrors({ period: Duration.minutes(5) })
.createAlarm(this, "ErrorAlarm", {
threshold: 1,
evaluationPeriods: 2,
treatMissingData: TreatMissingData.NOT_BREACHING,
})
.addAlarmAction(new SnsAction(props.alarmTopic));
}
}**Assertions that fail the build on a security regression:**
test("uploads bucket is encrypted and blocks public access", () => {
const template = Template.fromStack(new StorageStack(new App(), "Test"));
template.hasResourceProperties("AWS::S3::Bucket", {
BucketEncryption: Match.objectLike({
ServerSideEncryptionConfiguration: Match.anyValue(),
}),
PublicAccessBlockConfiguration: {
BlockPublicAcls: true,
BlockPublicPolicy: true,
IgnorePublicAcls: true,
RestrictPublicBuckets: true,
},
});
});A curated library of 137 production-grade skills for Claude and other AI coding agents. Every skill follows one structure, speaks with one voice, and earns its place by changing what the agent does.
Repo: nimadorostkar/Claude-Skills-collection
Use when writing project instructions for a coding agent (CLAUDE.md, AGENTS.md, or equivalent). Covers what belongs in them, what does not, structure, and…
Use when an agent needs state that survives a session or a context compaction. Covers what to persist, file-based memory, structuring notes for retrieval, and…
Use when automating agent behavior with lifecycle hooks. Covers hook events, deterministic enforcement of rules the model should not be trusted to remember,…
Use when packaging skills, commands, hooks, and MCP servers into a distributable plugin. Covers manifest structure, bundling, versioning, testing, and…
Use when writing a new skill for an AI agent. Covers scoping, description writing for reliable triggering, progressive disclosure, and the difference between a…
Use when reviewing or improving an existing agent skill. Covers triggering accuracy, content quality, redundancy with the base model, and measuring whether the…