Official agent skill

New Event Source

by aws in aws/aws-lambda-dotnet

Add a new AWS event source attribute (e.g., Kinesis, Kafka, MQ) to the Lambda .NET Annotations framework, including the attribute class, source generator integration, CloudFormation writer, unit…

OfficialApache-2.0Auto-check passedTesting & QA

Install New Event Source

skills CLI
$ npx skills add aws/aws-lambda-dotnet --skill new-event-source -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install aws/aws-lambda-dotnet new-event-source --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/aws/aws-lambda-dotnet.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/new-event-source .claude/skills/new-event-source && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
new-event-source
GitHub stars
1.7k
Token cost
~3k tokens
SKILL.md length
854 words
Files
1
Skills in repo
1
Repo updated
First seen
Licence
Apache-2.0

At a glance

Add a new AWS event source attribute (e.g., Kinesis, Kafka, MQ) to the Lambda .NET Annotations framework, including the attribute class, source generator integration, CloudFormation writer, unit…

  • Works in 12 steps: Create the Event Attribute Class → Register Type Full Names → Create the Attribute Builder → …
  • Tasks that involve Infrastructure as code
  • SKILL.md covers Prerequisites, Reference Examples, Steps and File Map Summary, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

New Event Source is an agent skill from aws/aws-lambda-dotnet, published by the product's own GitHub organization. Add a new AWS event source attribute (e.g., Kinesis, Kafka, MQ) to the Lambda .NET Annotations framework, including the attribute class, source generator integration, CloudFormation writer, unit tests, writer tests, source generator tests, and integration tests

Its SKILL.md is about 3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Testing & QA, covering Infrastructure as code, Event-driven systems and Unit testing. It works with Amazon Web Services, AWS CloudFormation, AWS Lambda and Apache Kafka. The repository describes itself as: Libraries, samples and tools to help .NET Core developers develop AWS Lambda functions. The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Infrastructure as code
  • Tasks that involve Event-driven systems
  • Tasks that involve Unit testing

Example prompts

  • “/new-event-source”

Workflow steps

12 steps, taken from the step headings in SKILL.md.

  1. Create the Event Attribute Class
  2. Register Type Full Names
  3. Create the Attribute Builder
  4. Register in AttributeModelBuilder
  5. Register in EventTypeBuilder
  6. Add DiagnosticDescriptor
  7. Add Validation in LambdaFunctionValidator
  8. Add Dependency Check
  9. Check SyntaxReceiver
  10. Add CloudFormation Writer Logic
  11. Create Attribute Unit Tests
  12. Create CloudFormation Writer Tests

What it can do on your machine

Read from SKILL.md and the folder at commit f16d07b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are csharp).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

New Event Source loads about 3k tokens when it runs. Until then it costs about 70 tokens; SKILL.md has 854 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~70
When it runs · the whole SKILL.md, loaded when a task matches
~3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from aws/aws-lambda-dotnet at commit f16d07b, republished under its Apache-2.0 licence (© aws). 854 words, ~2,951 tokens.

Download SKILL.mdSave it as .claude/skills/new-event-source/SKILL.md (or your agent's skills folder).
name
new-event-source
description
Add a new AWS event source attribute (e.g., Kinesis, Kafka, MQ) to the Lambda .NET Annotations framework, including the attribute class, source generator integration, CloudFormation writer, unit tests, writer tests, source generator tests, and integration tests

Adding a New Event Source to Lambda Annotations

This skill guides you through adding a complete new event source attribute to the AWS Lambda .NET Annotations framework. Use this when a user asks to add support for a new AWS event source like Kinesis, Kafka, MQ, etc.

Prerequisites

Before starting, gather from the user:

  1. Service name (e.g., "Kinesis", "Kafka", "MQ")
  2. Primary resource identifier (e.g., stream ARN, topic ARN, broker ARN)
  3. CloudFormation event type string (e.g., "Kinesis", "MSK", "MQ")
  4. Event class name from the corresponding Amazon.Lambda.*Events NuGet package (e.g., KinesisEvent)
  5. Optional properties the attribute should support (e.g., BatchSize, StartingPosition, Filters)
  6. Whether @ references use Fn::GetAtt or Ref — event source mappings use Fn::GetAtt, subscriptions use Ref

Reference Examples

Read these files to understand existing patterns before creating new ones:

  • SNS (simplest, subscription-based): Libraries/src/Amazon.Lambda.Annotations/SNS/SNSEventAttribute.cs
  • SQS (event source mapping with batching): Libraries/src/Amazon.Lambda.Annotations/SQS/SQSEventAttribute.cs
  • DynamoDB (stream-based): Libraries/src/Amazon.Lambda.Annotations/DynamoDB/DynamoDBEventAttribute.cs
  • S3 (notification-based): Libraries/src/Amazon.Lambda.Annotations/S3/S3EventAttribute.cs

Steps

Step 1: Create the Event Attribute Class

Create: Libraries/src/Amazon.Lambda.Annotations/{ServiceName}/{ServiceName}EventAttribute.cs

Key patterns:

  • Add copyright header: // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + // SPDX-License-Identifier: Apache-2.0
  • Inherit from Attribute with [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] (use AllowMultiple = false for event types where multiple triggers on the same function don't make sense, e.g., Schedule events)
  • Constructor takes the primary resource identifier as a required string parameter
  • All optional properties use nullable backing fields with Is<PropertyName>Set internal properties
  • Include auto-derived ResourceName property (strips @ prefix or extracts name from ARN)
  • Include internal List<string> Validate() method with all validation rules
  • Use Regex("^[a-zA-Z0-9]+$") for ResourceName validation
Step 2: Register Type Full Names

Modify: Libraries/src/Amazon.Lambda.Annotations.SourceGenerator/TypeFullNames.cs

Add constants:

csharp
public const string {ServiceName}EventAttribute = "Amazon.Lambda.Annotations.{ServiceName}.{ServiceName}EventAttribute";
public const string {ServiceName}Event = "Amazon.Lambda.{ServiceName}Events.{ServiceName}Event";

Also add to EventType enum if needed in Libraries/src/Amazon.Lambda.Annotations.SourceGenerator/Models/EventType.cs.

Step 3: Create the Attribute Builder

Create: Libraries/src/Amazon.Lambda.Annotations.SourceGenerator/Models/Attributes/{ServiceName}EventAttributeBuilder.cs

Extracts attribute data from Roslyn AttributeData. Use consistent else if chaining. Reference: SNSEventAttributeBuilder.cs.

Step 4: Register in AttributeModelBuilder

Modify: Libraries/src/Amazon.Lambda.Annotations.SourceGenerator/Models/Attributes/AttributeModelBuilder.cs

Add else if block for the new attribute type after the existing event attribute blocks.

Step 5: Register in EventTypeBuilder

Modify: Libraries/src/Amazon.Lambda.Annotations.SourceGenerator/Models/EventTypeBuilder.cs

Add else if block mapping the attribute to the EventType enum value.

Step 6: Add DiagnosticDescriptor

Modify: Libraries/src/Amazon.Lambda.Annotations.SourceGenerator/Diagnostics/DiagnosticDescriptors.cs

Add descriptor with the next available AWSLambda0XXX ID for invalid attribute validation errors.

Modify: Libraries/src/Amazon.Lambda.Annotations.SourceGenerator/Diagnostics/AnalyzerReleases.Unshipped.md — add the new diagnostic ID.

Step 7: Add Validation in LambdaFunctionValidator

Modify: Libraries/src/Amazon.Lambda.Annotations.SourceGenerator/Validation/LambdaFunctionValidator.cs

  1. Add Validate{ServiceName}Events() call in ValidateFunction method
  2. Create private Validate{ServiceName}Events() method that validates:
    • Attribute properties via Validate() method
    • Method parameters (first must be event type, optional second is ILambdaContext)
    • Return type (usually void or Task)
Step 8: Add Dependency Check

Modify: Libraries/src/Amazon.Lambda.Annotations.SourceGenerator/Validation/LambdaFunctionValidator.cs

In ValidateDependencies, add check for Amazon.Lambda.{ServiceName}Events NuGet package.

Step 9: Check SyntaxReceiver

Check: Libraries/src/Amazon.Lambda.Annotations.SourceGenerator/SyntaxReceiver.cs

Add the new attribute name if the SyntaxReceiver filters by attribute name strings.

Step 10: Add CloudFormation Writer Logic

Modify: Libraries/src/Amazon.Lambda.Annotations.SourceGenerator/Writers/CloudFormationWriter.cs

  1. Add case AttributeModel<{ServiceName}EventAttribute> in the event processing switch
  2. Create Process{ServiceName}Attribute() method that writes CF template properties
    • Event source mappings (SQS, DynamoDB, Kinesis): use Fn::GetAtt for @ references
    • Subscription events (SNS): use Ref for @ references
    • Track synced properties in metadata
Step 11: Create Attribute Unit Tests

Create: Libraries/test/Amazon.Lambda.Annotations.SourceGenerators.Tests/{ServiceName}EventAttributeTests.cs

Cover: constructor, defaults, property tracking, ResourceName derivation, all validation paths. Reference: SQSEventAttributeTests.cs, DynamoDBEventAttributeTests.cs, SNSEventAttributeTests.cs.

Show full SKILL.md (351 more words)Show less
Step 12: Create CloudFormation Writer Tests

Create: Libraries/test/Amazon.Lambda.Annotations.SourceGenerators.Tests/WriterTests/{ServiceName}EventsTests.cs

This is a partial class CloudFormationWriterTests. Include tests for:

  1. Verify{ServiceName}EventAttributes_AreCorrectlyApplied — Theory with JSON/YAML and property combinations
  2. Verify{ServiceName}EventProperties_AreSyncedCorrectly — Synced properties update when attributes change
  3. SwitchBetweenArnAndRef_For{Resource} — ARN to @ reference switching
  4. Verify{Resource}CanBeSet_FromCloudFormationParameter — CF Parameters handling
  5. VerifyManuallySet{ServiceName}EventProperties_ArePreserved — Hand-edited template preservation

Reference: SQSEventsTests.cs, DynamoDBEventsTests.cs, SNSEventsTests.cs.

Step 13: Create Valid Event Examples + Source Generator Test

Create: Libraries/test/TestServerlessApp/{ServiceName}EventExamples/Valid{ServiceName}Events.cs.txt Create: Libraries/test/Amazon.Lambda.Annotations.SourceGenerators.Tests/Snapshots/{ServiceName}/ (generated handler snapshots) Create: Libraries/test/Amazon.Lambda.Annotations.SourceGenerators.Tests/Snapshots/ServerlessTemplates/{serviceName}Events.template Modify: Libraries/test/Amazon.Lambda.Annotations.SourceGenerators.Tests/SourceGeneratorTests.cs — add VerifyValid{ServiceName}Events() test

Step 14: Create Invalid Event Examples + Source Generator Test

Create: Libraries/test/TestServerlessApp/{ServiceName}EventExamples/Invalid{ServiceName}Events.cs.error

Cover: invalid property values, invalid params, invalid return type, multiple events, invalid ARN, invalid resource name.

Modify: Libraries/test/Amazon.Lambda.Annotations.SourceGenerators.Tests/SourceGeneratorTests.cs — add VerifyInvalid{ServiceName}Events_ThrowsCompilationErrors() test with diagnostic assertions including line spans.

Step 15: Create Generated Code Snapshots

Create: Libraries/test/Amazon.Lambda.Annotations.SourceGenerators.Tests/Snapshots/{ServiceName}/

Tip: Run the source generator once to get actual output, then use as snapshot.

Step 16: Create Integration Test

Create: Libraries/test/TestServerlessApp.IntegrationTests/{ServiceName}EventSourceMapping.cs Modify: Libraries/test/TestServerlessApp.IntegrationTests/IntegrationTestContextFixture.cs — resource lookup Modify: Libraries/test/TestServerlessApp.IntegrationTests/DeploymentScript.ps1 — if needed

Step 17: Update AnalyzerReleases.Unshipped.md

Modify: Libraries/src/Amazon.Lambda.Annotations.SourceGenerator/Diagnostics/AnalyzerReleases.Unshipped.md

File Map Summary

ActionFile Path
Createsrc/Amazon.Lambda.Annotations/{ServiceName}/{ServiceName}EventAttribute.cs
Modifysrc/Amazon.Lambda.Annotations.SourceGenerator/TypeFullNames.cs
Createsrc/Amazon.Lambda.Annotations.SourceGenerator/Models/Attributes/{ServiceName}EventAttributeBuilder.cs
Modifysrc/Amazon.Lambda.Annotations.SourceGenerator/Models/Attributes/AttributeModelBuilder.cs
Modifysrc/Amazon.Lambda.Annotations.SourceGenerator/Models/EventTypeBuilder.cs
Modifysrc/Amazon.Lambda.Annotations.SourceGenerator/Diagnostics/DiagnosticDescriptors.cs
Modifysrc/Amazon.Lambda.Annotations.SourceGenerator/Validation/LambdaFunctionValidator.cs
Modifysrc/Amazon.Lambda.Annotations.SourceGenerator/SyntaxReceiver.cs
Modifysrc/Amazon.Lambda.Annotations.SourceGenerator/Writers/CloudFormationWriter.cs
Modifysrc/Amazon.Lambda.Annotations.SourceGenerator/Diagnostics/AnalyzerReleases.Unshipped.md
Createtest/Amazon.Lambda.Annotations.SourceGenerators.Tests/{ServiceName}EventAttributeTests.cs
Createtest/Amazon.Lambda.Annotations.SourceGenerators.Tests/WriterTests/{ServiceName}EventsTests.cs
Createtest/TestServerlessApp/{ServiceName}EventExamples/Valid{ServiceName}Events.cs.txt
Createtest/TestServerlessApp/{ServiceName}EventExamples/Invalid{ServiceName}Events.cs.error
Createtest/Amazon.Lambda.Annotations.SourceGenerators.Tests/Snapshots/{ServiceName}/
Createtest/Amazon.Lambda.Annotations.SourceGenerators.Tests/Snapshots/ServerlessTemplates/{serviceName}Events.template
Modifytest/Amazon.Lambda.Annotations.SourceGenerators.Tests/SourceGeneratorTests.cs
Createtest/TestServerlessApp.IntegrationTests/{ServiceName}EventSourceMapping.cs
Modifytest/TestServerlessApp.IntegrationTests/IntegrationTestContextFixture.cs

Important Conventions

  • Copyright header on every new .cs file
  • Consistent else if chaining in attribute builders (never if then if for the same loop)
  • Both JSON and YAML template formats must be tested in writer tests
  • Invalid event test spans must reference exact line numbers in the .cs.error file
  • .cs.txt extension for valid test files (prevents deployment)
  • .cs.error extension for invalid test files (prevents compilation)
  • Use enums instead of strings when you need to represent a fixed, known set of constants that do not change frequently (e.g., StartingPosition, AuthType, HttpApiVersion). Enums provide compile-time type safety, eliminate the need for manual string validation in the Validate() method, and prevent invalid values from being set. In attribute builders, enum values come through Roslyn's AttributeData as their underlying int value and must be cast accordingly (e.g., (MyEnum)(int)pair.Value.Value). When writing enum values to CloudFormation templates, use .ToString() to convert back to the string representation.

© aws, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/new-event-source of aws/aws-lambda-dotnet.

Open the folder on GitHubat commit f16d07b

Compare with similar skills

New Event Source next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

New Event Source compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
New Event Source this skillaws/aws-lambda-dotnet1.7k—~3kAutomated safety check: PassApache-2.0
Msk Operationsaws/tools-for-devops-agent102—~6.6kAutomated safety check: PassApache-2.0
AWS Advisordiegosouzapw/awesome-omni-skills159—~4.3kAutomated safety check: PassMIT
AWS Cloud Advisortech-leads-club/agent-skills7k—~2.1kAutomated safety check: PassCC-BY-4.0
Review Testshashicorp/terraform-provider-aws11k—~908Automated safety check: PassMPL-2.0
Review Tests Helpershashicorp/terraform-provider-aws11k—~994Automated safety check: PassMPL-2.0

Similar skills

  • Msk Operations

    aws/tools-for-devops-agent

    Official

    Amazon MSK Provisioned operations, troubleshooting, and health assessment for Standard and Express brokers.

    102 GitHub stars~6.6k tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • AWS Advisor

    diegosouzapw/awesome-omni-skills

    AWS Advisor workflow skill. An agent skill from diegosouzapw/awesome-omni-skills.

    159 GitHub stars~4.3k tokensUpdated 3 mo ago
    DevOps & CloudAuto-check passed
  • AWS Cloud Advisor

    tech-leads-club/agent-skills

    Answers AWS architecture, security and service-selection questions by searching AWS documentation through MCP tools first, then adapting advice to your stack and team.

    7k GitHub stars~2.1k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Review Tests

    hashicorp/terraform-provider-aws

    Official

    Review Terraform AWS Provider acceptance and unit test basics: required basic and disappears tests, TestAcc naming, TestCase essentials (PreCheck/ErrorCheck/ProtoV5ProviderFactories/CheckDestroy)…

    11k GitHub stars~908 tokensUpdated today
    Testing & QAAuto-check passed
  • Review Tests Helpers

    hashicorp/terraform-provider-aws

    Official

    Review Terraform AWS Provider test helpers: Exists/Destroy check functions, exportstest.go wiring, create.Error wrapping, data source tests, list resource tests (querycheck + Terraform version…

    11k GitHub stars~994 tokensUpdated today
    Testing & QAAuto-check passed
  • AWS Serverless Eda

    zxkane/aws-skills

    AWS serverless and event-driven architecture expert based on Well-Architected Framework.

    367 GitHub starsUsed in 4 repos~3.2k tokens
    Backend & APIsAuto-check passed

Questions about New Event Source

What does New Event Source do?

Add a new AWS event source attribute (e.g., Kinesis, Kafka, MQ) to the Lambda .NET Annotations framework, including the attribute class, source generator integration, CloudFormation writer, unit…. New Event Source is an agent skill from aws/aws-lambda-dotnet, published by the product's own GitHub organization.

When should I use New Event Source?

New Event Source fits situations like: tasks that involve Infrastructure as code; tasks that involve Event-driven systems; tasks that involve Unit testing.

How do I install New Event Source in Claude Code?

Run `npx skills add aws/aws-lambda-dotnet --skill new-event-source -a claude-code`. Or copy the skill folder (.agents/skills/new-event-source in aws/aws-lambda-dotnet) into .claude/skills/new-event-source in your project. Claude Code loads it when a task matches its description.

How do I install New Event Source in Codex?

Run `npx skills add aws/aws-lambda-dotnet --skill new-event-source -a codex`. Or copy the skill folder (.agents/skills/new-event-source in aws/aws-lambda-dotnet) into .agents/skills/new-event-source in your project. Codex loads it when a task matches its description.

Can I use New Event Source in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add aws/aws-lambda-dotnet --skill new-event-source -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/new-event-source, .gemini/skills/new-event-source, .github/skills/new-event-source and .opencode/skills/new-event-source in your project.

What does New Event Source need to run?

SKILL.md names no scripts, command-line tools or credentials: New Event Source is instructions for the agent only.

Does New Event Source access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is New Event Source safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does New Event Source use?

New Event Source is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does New Event Source use?

About 3k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to New Event Source?

Skills that share tags, products or a category with New Event Source: Msk Operations (aws/tools-for-devops-agent, 102 stars), AWS Advisor (diegosouzapw/awesome-omni-skills, 159 stars), AWS Cloud Advisor (tech-leads-club/agent-skills, 7k stars) and Review Tests (hashicorp/terraform-provider-aws, 11k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains New Event Source?

aws (a GitHub organization, an official publisher) maintains it in aws/aws-lambda-dotnet, which has 1,661 GitHub stars. The repository was last updated on October 9, 2026.

Source: aws/aws-lambda-dotnet on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.