Skip to content

Port testcontainers-go skill from anthropics/skills#73 with MIT license#1

Merged
mdelapenya merged 6 commits into
mainfrom
copilot/add-testcontainers-go-skill
Nov 13, 2025
Merged

Port testcontainers-go skill from anthropics/skills#73 with MIT license#1
mdelapenya merged 6 commits into
mainfrom
copilot/add-testcontainers-go-skill

Conversation

Copilot AI commented Nov 13, 2025

Copy link
Copy Markdown
Contributor

Port testcontainers-go skill from anthropics/skills#73

This PR ports the testcontainers-go skill from anthropics/skills#73 (authored by @mdelapenya) to the testcontainers/claude-skills repository.

Completed:

  • Create testcontainers-go directory structure
  • Import SKILL.md with MIT license reference (original: Apache 2.0)
  • Create MIT LICENSE file (replacing original Apache 2.0 license)
  • Import examples directory with all test files
  • Import go.mod and go.sum from examples
  • Import examples README
  • Verify license references are updated to MIT
  • Document attribution to original author and PR
  • Add GitHub Actions workflow to test examples compile and run
  • Add explicit permissions to workflow for security
  • Pin GitHub Actions versions to specific commits
  • Actually run Go tests (not just compile)
  • Fix setup-go action SHA and use go-version-file

Changes Made:

  • License: Changed from Apache 2.0 to MIT (repository standard)
    • Replaced testcontainers-go/LICENSE.txt (Apache 2.0) with testcontainers-go/LICENSE (MIT)
    • Updated YAML frontmatter in SKILL.md: license: MIT (was: license: Complete terms in LICENSE.txt)
  • Source: Ported from anthropics/skills#73 by @mdelapenya
  • CI/CD: Added .github/workflows/test-skills.yml to:
    • Pinned Actions (for security):
      • actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 (v4.2.2)
      • actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 (v5.0.2) ✅ Fixed SHA
    • Uses go.mod for version: Reads Go version from testcontainers-go/examples/go.mod via go-version-file
    • Verify all examples compile successfully
    • Run go vet for static analysis
    • Check Go code formatting with gofmt
    • Download and verify dependencies
    • Run actual Go tests with Docker support (10-minute timeout for container operations)
    • Runs on push to main/copilot branches and pull requests
    • Configured with minimal permissions (contents: read) for security
  • Files Imported:
    • SKILL.md: Comprehensive guide (1,253 lines) with 62+ pre-configured modules documented
    • LICENSE: MIT license (repository standard)
    • examples/01_postgres_basic_test.go: Basic PostgreSQL usage examples
    • examples/02_postgres_snapshot_test.go: PostgreSQL snapshot/restore for test isolation
    • examples/03_redis_cache_test.go: Redis cache operations examples
    • examples/04_multi_container_network_test.go: Multi-container networking patterns
    • examples/05_generic_container_test.go: Generic container usage patterns
    • examples/README.md: Examples documentation
    • examples/go.mod & examples/go.sum: Go module dependencies

Original PR Description (from anthropics/skills#73):

This PR adds a comprehensive skill for Docker-based integration testing in Go using Testcontainers.

What's Included:

  • Comprehensive SKILL.md (1,239 lines) with YAML frontmatter
  • 62+ pre-configured modules documented (databases, queues, cloud services, search engines)
  • 5 practical examples with runnable Go tests
  • Best practices for cleanup, wait strategies, networking, and troubleshooting

Attribution:

Original work by @mdelapenya from the @testcontainers organization. This port maintains all original content and functionality while adapting the license to match the testcontainers/claude-skills repository standard (MIT).

Testing:

All Go examples compile successfully and pass tests (including actual Docker container tests):

cd testcontainers-go/examples
go build ./...
go vet ./...
gofmt -l .
go test -v -timeout 10m ./...

GitHub Actions workflow will automatically:

  • Verify examples compile
  • Run static analysis (go vet)
  • Check code formatting
  • Execute all tests with Docker support
  • All on every push and PR

Security Summary:

  • CodeQL analysis passed with no security vulnerabilities detected
  • GitHub Actions workflow configured with minimal permissions (contents: read)
  • Actions pinned to specific commit SHAs for security
  • All imported files scanned for security issues
Original prompt

Goal: Add the 'testcontainers-go' skill from anthropics/skills#73 (PR #73 authored by mdelapenya) into the testcontainers/claude-skills repository as a new pull request, and update the license in that PR to use the MIT license used by this repository.

Background: The source changes to add are currently in anthropics/skills PR #73: anthropics/skills#73. We need to port those files and any related changes into testcontainers/claude-skills, ensure repository structure and metadata match target repo conventions, and replace any non-MIT license text with the repository's MIT license.

Tasks for the coding agent (do all of the following):

  1. Import files and changes from anthropics/skills PR #73 into a new branch in testcontainers/claude-skills. Copy the full contents of the added/modified files in that PR. Preserve authorship in the commit message and reference the original PR and author.

  2. Update license to MIT:

    • Replace any LICENSE file(s) in the imported files or skill directory with the canonical MIT license used in testcontainers/claude-skills. Use the standard MIT text and set the year to 2025 and copyright owner to testcontainers (or match the repository's existing LICENSE if present).
    • Update license headers in source files (Go files, readme or metadata files) to reference MIT where the original uses a different license. If the original file had no header, do not add unnecessary headers except where repository conventions require it.
    • If there are package metadata files (go.mod, package.json, skill metadata) that specify a license field, update it to "MIT".
  3. Make repository-consistent adjustments:

    • Ensure the skill lives under the appropriate path and naming conventions used in claude-skills (for example, skills/testcontainers-go or skills/testcontainers-go/*). If the target repo uses a specific folder layout for skills, follow that layout.
    • Update any README or documentation references so they point to the new repository location and mention that this code was ported from anthropics/skills PR #73.
  4. Add tests or CI adjustments only if present in the original PR; do not add new tests beyond what came in PR #73. Ensure that CI/workflows in testcontainers/claude-skills do not break because of added files; if workflow modifications are needed to run tests for the new skill, make minimal necessary changes and explain them in the PR description.

  5. Create a clear pull request in testcontainers/claude-skills with:

    • Title: "feat: add testcontainers-go skill (ported from feat: add testcontainers-go skill anthropics/skills#73)"
    • Description: reference the original PR URL, original author (mdelapenya), and list the changes made including the license update to MIT and any path adjustments.
    • Include a note that license in the imported files was changed to MIT and that the LICENSE file in the skill directory was replaced with repository MIT.
  6. Commit messages: Use concise commits that reference the original PR. Example commit message: "Import testcontainers-go skill from feat: add testcontainers-go skill anthropics/skills#73 — author: mdelapenya; update license to MIT." If multiple commits are created, ensure the PR is clean and grouped logically.

  7. Do not merge the PR. Leave it open for maintainers to review.

References:

Deliverables:

  • A new pull request in testcontainers/claude-skills containing the imported files and license updates.
  • PR description documenting the source and license change.

If anything from the original PR cannot be ported (for example, licensing conflicts or binary assets), explain why in the PR description and in the pull request conversation. If you need additional information from me (mdelapenya) about authorship or permission to relicense, ask before proceeding.

This pull request was created as a result of the following prompt from Copilot chat.

Goal: Add the 'testcontainers-go' skill from anthropics/skills#73 (PR #73 authored by mdelapenya) into the testcontainers/claude-skills repository as a new pull request, and update the license in that PR to use the MIT license used by this repository.

Background: The source changes to add are currently in anthropics/skills PR #73: anthropics/skills#73. We need to port those files and any related changes into testcontainers/claude-skills, ensure repository structure and metadata match target repo conventions, and replace any non-MIT license text with the repository's MIT license.

Tasks for the coding agent (do all of the following):

  1. Import files and changes from anthropics/skills PR #73 into a new branch in testcontainers/claude-skills. Copy the full contents of the added/modified files in that PR. Preserve authorship in the commit message and reference the original PR and author.

  2. Update license to MIT:

    • Replace any LICENSE file(s) in the imported files or skill directory with the canonical MIT license used in testcontainers/claude-skills. Use the standard MIT text and set the year to 2025 and copyright owner to testcontainers (or match the repository's existing LICENSE if present).
    • Update license headers in source files (Go files, readme or metadata files) to reference MIT where the original uses a different license. If the original file had no header, do not add unnecessary headers except where repository conventions require it.
    • If there are package metadata files (go.mod, package.json, skill metadata) that specify a license field, update it to "MIT".
  3. Make repository-consistent adjustments:

    • Ensure the skill lives under the appropriate path and naming conventions used in claude-skills (for example, skills/testcontainers-go or skills/testcontainers-go/*). If the target repo uses a specific folder layout for skills, follow that layout.
    • Update any README or documentation references so they point to the new repository location and mention that this code was ported from anthropics/skills PR #73.
  4. Add tests or CI adjustments only if present in the original PR; do not add new tests beyond what came in PR #73. Ensure that CI/workflows in testcontainers/claude-skills do not break because of added files; if workflow modifications are needed to run tests for the new skill, make minimal necessary changes and explain them in the PR description.

  5. Create a clear pull request in testcontainers/claude-skills with:

    • Title: "feat: add testcontainers-go skill (ported from feat: add testcontainers-go skill anthropics/skills#73)"
    • Description: reference the original PR URL, original author (mdelapenya), and list the changes made including the license update to MIT and any path adjustments.
    • Include a note that license in the imported files was changed to MIT and that the LICENSE file in the skill directory was replaced with repository MIT.
  6. Commit messages: Use concise commits that reference the original PR. Example commit message: "Import testcontainers-go skill from feat: add testcontainers-go skill anthropics/skills#73 — author: mdelapenya; update license to MIT." If multiple commits are created, ensure the PR is clean and grouped logically.

  7. Do not merge the PR. Leave it open for maintainers to review.

References:

Deliverables:

  • A new pull request in testcontainers/claude-skills containing the imported files and license updates.
  • PR description documenting the source and license change.

If anything from the original PR cannot be ported (for example, licensing conflicts or binary assets), explain why in the PR description and in the pull request conversation. If you need additional information from me (mdelapenya) about authorship or permission to relicense, ask before proceeding.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

…elapenya; update license to MIT

Co-authored-by: mdelapenya <951580+mdelapenya@users.noreply.github.com>
Copilot AI and others added 3 commits November 13, 2025 13:17
Co-authored-by: mdelapenya <951580+mdelapenya@users.noreply.github.com>
Co-authored-by: mdelapenya <951580+mdelapenya@users.noreply.github.com>
Co-authored-by: mdelapenya <951580+mdelapenya@users.noreply.github.com>
Copilot AI changed the title [WIP] Add testcontainers-go skill and update license to MIT Port testcontainers-go skill from anthropics/skills#73 with MIT license Nov 13, 2025
Copilot AI requested a review from mdelapenya November 13, 2025 13:24
@mdelapenya

Copy link
Copy Markdown
Member

@copilot please verify the GH actions:
Download action repository 'actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683' (SHA:11bd71901bbe5b1630ceea73d27597364c9af683)
Download action repository 'actions/setup-go@f111f3307d8850f501ac008b48f4f251b0c6a1cf' (SHA:f111f3307d8850f501ac008b48f4f251b0c6a1cf)
Error: An action could not be found at the URI 'https://api.github.com/repos/actions/setup-go/tarball/f111f3307d8850f501ac008b48f4f251b0c6a1cf' (8000:3B1155:7C7B1E:A106B7:6915DC77)

Also, make sure the go-setup action uses the go.mod file for using a Go version

….mod

Co-authored-by: mdelapenya <951580+mdelapenya@users.noreply.github.com>

Copilot AI commented Nov 13, 2025

Copy link
Copy Markdown
Contributor Author

@copilot please verify the GH actions:
Download action repository 'actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683' (SHA:11bd71901bbe5b1630ceea73d27597364c9af683)
Download action repository ...

Fixed in commit 665a254:

  1. Updated actions/setup-go to use correct SHA: 0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 (v5.0.2)
  2. Changed to use go-version-file: testcontainers-go/examples/go.mod instead of hardcoded version

The workflow now reads the Go version directly from the go.mod file (go 1.24.0).

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/actions/setup-go/git/refs/tags/v5.2.0
    • Triggering command: curl -s REDACTED (http block)
  • https://api.github.com/repos/actions/setup-go/releases
    • Triggering command: curl -s REDACTED (http block)

If you need me to access, download, or install something from one of these locations, you can either:

@mdelapenya mdelapenya marked this pull request as ready for review November 13, 2025 13:32
@mdelapenya mdelapenya merged commit 5c12168 into main Nov 13, 2025
3 checks passed
@mdelapenya

Copy link
Copy Markdown
Member

@copilot based on the main README in https://github.com/anthropics/skills, please send another PR to our testcontainers/claude-skills repo with a sensible README

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants