Repository navigation
feat(docs): ship an Agent Skill for building Lambda functions with Powertools - #8745
Merged
Merged
Conversation
…wertools SKILL.md with the essential patterns and the project rules, one reference per utility generated from the docs with examples inlined, a Claude Code plugin marketplace in this repository, a docs page with install steps for Claude Code and agentskills.io-compatible agents, and a test that fails when the references drift from the docs.
No .claude/skills symlink, so contributors working on the library do not get user-facing guidance loaded; the skill says so in its description; references are marked as generated for GitHub and ignored by ripgrep.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #8745 +/- ##
========================================
Coverage 97.00% 97.00%
========================================
Files 321 321
Lines 16415 16415
Branches 1482 1482
========================================
Hits 15924 15924
Misses 350 350
Partials 141 141 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Issue number: closes #8744
Summary
Changes
.agents/skills/building-lambda-functions-with-powertools-python/SKILL.md: when to use the skill, the essential patterns (Logger/Tracer/Metrics on a handler, REST API with Event Handler, idempotent handler, partial batch failures, parameters and secrets, typed events and parsing), the rules fromdocs/adrthat apply to people using the library, testing hints, and a table pointing to one reference per utility.references/: 27 files generated from the documentation pages byscripts/build_agent_skill_references.py. The generator resolves the--8<--snippet includes so every example is inlined, flattens content tabs and admonitions into plain Markdown, drops the "Testing your code" and "FAQ" sections, and removes mkdocs-only syntax.tests/functional/test_agent_skill_references.pyruns the generator in--checkmode so the references cannot drift from the docs..claude/skills/entry in this repository on purpose: the skill is for people using the library, and a contributor opening this repo with an agent should getAGENTS.md, not user-facing guidance. The skill says so in its description. Users get it through the plugin ornpx skills add, which read.agents/skills/.linguist-generatedin.gitattributes(collapsed in GitHub diffs) and listed in a root.ignoreso ripgrep and similar tools skip them;AGENTS.mdsays they are generated and thatdocs/is the source..claude-plugin/marketplace.jsonat the root and.agents/.claude-plugin/plugin.json, soclaude plugin marketplace add aws-powertools/powertools-lambda-pythonandclaude plugin install powertools-lambda-python@aws-powertoolswork from this repository.docs/getting-started/coding-agent-skills.md(in the nav after Installation) with the install steps for Claude Code, for agents following agentskills.io (npx skills add aws-powertools/powertools-lambda-python) and manually; one line in the README..markdownlintignoreexcludes the generated references;.gitleaks.tomlallowlists them, because sample event ids copied from the examples (an SQSSenderId) look like access keys to gitleaks.Not in scope, as decided in the issue: nothing is bundled in the wheel or the Lambda layer, and no separate repository. The references add about 1.4 MB of Markdown to the repository, loaded by agents one utility at a time.
User experience
A user working with Claude Code, Codex, Cursor or Gemini CLI installs the skill once; from then on, when they ask for a Lambda handler with logging, idempotency, batch processing or API routing, the agent reads the current Powertools documentation and examples instead of relying on what it remembers, and follows the same rules we enforce in review.
Verification
uv run python scripts/build_agent_skill_references.py --checkpasses, and a grep for leftover mkdocs syntax (--8<--,=== ",!!!,???,{target=,hl_lines) across the references returns nothing.tests/functional/test_agent_skill_references.pypasses;ruffandmypyare clean on the generator and the test; pre-commit passes on every changed file.zensical buildpasses and the new page renders;markdownlintpasses onSKILL.md, the docs page and the README.claude plugin marketplace addagainst an unmerged branch, so the plugin install path is validated by structure (plugin root withskills/*/SKILL.md, as in the Pydantic skills marketplace), not by an end-to-end install; I'll do that once this is ondevelop.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.