Add agent skills for building integrations - #53
Merged
Conversation
Introduces `.agents/skills/` — skills that teach a coding agent how to build an integration with this package, aimed at consumers rather than contributors. Six task-oriented skills, each usable on its own: * `generate-http-api-call` — orchestrates a full endpoint slice * `configure-http-client` — config, client and transport factory, once per API * `generate-http-request` — request models, URI templates, BodyType * `generate-http-response` — strictly typed response models * `generate-http-request-handler` — handler + interface, error handling layers * `test-http-integration` — mock client vs VCR cassettes Reference files cover the plugin catalogue and priorities, the encoder/decoder matrix, psl/type usage and VCR cassette handling. Strict typing with a single validation step at the boundary is presented as the non-negotiable rule; psl/type is the recommended way to get there, with symfony/serializer, valinor and webmozart/assert documented as alternatives, since the package cannot require psl of everyone. All examples use an imaginary "Crumbs Bakery" API so snippets compose across skills. `.claude/skills` is git-ignored so Claude Code can pick these up through a local symlink.
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.
Introduces
.agents/skills/— skills that teach a coding agent how to build an integration with this package. Aimed at consumers of the library, not at contributors..agents/skills/is the cross-runtime location (Claude Code, Codex, Copilot CLI, Gemini CLI)..claude/skillsis git-ignored so it can be a local symlink.Six task-oriented skills
Each is usable on its own — asking for just a response model pulls only that skill.
generate-http-api-callconfigure-http-clientgenerate-http-requestRequestInterfacemodel: URI templates, parameters,BodyType.generate-http-responsegenerate-http-request-handlertest-http-integrationReference files (loaded on demand, not up front) cover the plugin catalogue and priority levels, the full encoder/decoder matrix,
psl/typeusage, and VCR cassette handling.Conventions they encode
Model/+Request/+RequestHandler/folders.?? nullaccessors.psl/typeis the recommended validator;symfony/serializer, valinor,webmozart/assertand plain PHP are documented alternatives, since we can't require psl of everyone.Verification
ClientBuilderpriority levels,FormatterBuilder, the*::createDecorator()formatters, all encoders and decoders,SerializerTransport::withOutputType(),PathNamingStrategyoptions,FilesystemRecorderregex filters, andpsl/type'sshape($elements, $allowUnknownFields).fromArray()/toArray()instead of parsed types, and handler tests mockingTransportInterface.Examples use an imaginary "Crumbs Bakery" API (
App\Infrastructure\Bakery,GET /orders/{orderId}) throughout, so snippets compose across skills.