Add an integration seam

VerifiedSafe

Put a scale-bound integration (provider, store, transport) behind a single interface so a later swap is a new implementation, not new callers.

Sby Skills Guide Bot
DevelopmentIntermediate
11/3/2026
Claude Code
#architecture#dependency-inversion#integrations#testing#refactoring

Recommended for

Automated summary

Guides the addition of an integration seam (stable interface, adapter, local stand-in, contract tests) for a third-party provider or infrastructure piece likely to be replaced as the product scales.

Strengths

  • Provides an end-to-end procedure: minimal interface, isolated implementation, env-driven factory, local stand-in, and contract tests.
  • Ties the seam to the repository's conventions (packages/nest-common, apps/ai/app, README "Scaling path") and includes swap documentation.
  • Enforces boundaries with a dependency-cruiser rule and a check that nothing outside the adapter imports the provider SDK.
  • Has concrete done criteria: lint, check-types, integration tests against the stand-in, and a reviewer agent sign-off.

Limitations

  • Heavily tied to a specific TypeScript/Bun monorepo (packages/nest-common, apps/notifications, Bun, dependency-cruiser) and not directly portable elsewhere.
  • Assumes the README already contains a "Scaling path" table and existing seams to imitate.
  • Does not cover how to design the interface or when an abstraction costs more than it saves; it only warns against applying the pattern to everything.
When to use it

Use it when adding a third-party integration or infrastructure piece that has a realistic chance of being replaced as the product grows.

When not to use it

Avoid it for a stable dependency, a throwaway prototype, or a codebase that does not follow the described conventions and tooling.

Security analysis

Safe
Quality score86/100

The skill provides architectural guidance for introducing integration seams and only references standard verification commands such as linting, type-checking, and integration tests. It does not instruct destructive actions, credential handling, network exfiltration, obfuscation, or safety bypasses.

No concerns found

How this analysis is made

Examples

Email provider seam
Add a seam for transactional email: we're starting with Resend but may move to Postmark as volume grows. Keep the provider SDK isolated, provide a local stand-in for tests, and document how to swap it.
Object storage seam
Put our S3 file storage behind a seam now so we can switch to another object store later. Follow the repo's existing storage concern, add a fake for integration tests, and update the README scaling path.
SMS transport seam
We need to add Twilio SMS but expect to change providers. Create the smallest SMS transport interface in the notifications service, a factory selected by env, a local fake server, and contract tests.

name: add-seam description: Put an integration that will change at scale behind one interface (a new provider, store or transport), so a later swap is a new implementation and not new callers. Use when adding a third-party integration or infrastructure piece that could plausibly be replaced as the product grows. argument-hint: <concern>

Add a seam

The README's "Scaling path" lists every seam: what's there now, what it becomes, where the interface is, and the skill that swaps it. A seam is worth it only for something that will change at scale; everything else is plain code.

  1. The interface, in the one place every caller reaches it: a shared concern in packages/nest-common/src/<concern>.ts (like storage.ts, crypto.ts), one service's in that service (like apps/notifications/src/channels/sms/sms-transport.ts), Python in apps/ai/app/. The smallest set of methods the callers need, in the repo's terms, not the provider's.
  2. The first implementation in its own file, the provider's SDK imported only there. Chosen from env in one factory (the module that provides it), so callers never name the provider.
  3. Its header comment says what the interface is for, what implements it today, and how to swap it: the files to add, the env to set, the tests to extend. The existing seams' headers are the model.
  4. A local stand-in that speaks the real protocol, for tests and local development (Mailpit, packages/fake-stripe, the fake push server), refused in production at boot.
  5. Tests against the interface: a contract test the next implementation reuses, and integration tests through the stand-in.
  6. Docs. A row in the README's "Scaling path" table, and a .claude/skills/swap-<concern>/SKILL.md like the others (interface, today's implementation, how to add one, what to test, disable-model-invocation: true), listed in docs/README.md's runbooks.
  7. Boundaries. If the provider's SDK must stay inside the adapter, a dependency-cruiser rule in .dependency-cruiser.cjs enforces it.

Done when

  • bun run lint and bun run check-types pass, and the tests pass against the stand-in (bun run test:integration).
  • Nothing outside the adapter imports the provider (Grep for its package name).
  • The reviewer agent reports nothing blocking.

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/add-an-integration-seam-mvg6txe2/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/add-an-integration-seam-mvg6txe2' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/add-an-integration-seam-mvg6txe2/download' --output '.skill-downloads/add-an-integration-seam-mvg6txe2/SKILL.md.part' && mv '.skill-downloads/add-an-integration-seam-mvg6txe2/SKILL.md.part' '.skill-downloads/add-an-integration-seam-mvg6txe2/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/add-an-integration-seam-mvg6txe2/SKILL.md' && test -s '.skill-downloads/add-an-integration-seam-mvg6txe2/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/add-seam' && cp -R '.skill-downloads/add-an-integration-seam-mvg6txe2' '.claude/skills/add-seam'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/add-an-integration-seam-mvg6txe2'

openskills read 'add-an-integration-seam-mvg6txe2'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/add-an-integration-seam-mvg6txe2/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills