port-adapter-designer
Design Rust Port and Adapter Boundaries
External services can leak infrastructure concerns into domain code. This skill helps design Rust traits and adapters that keep dependencies isolated and testable.
Install with my Agent
Copy this request to your Agent. It includes the canonical Skill page and manifest.
Review the Skillstore skill "port-adapter-designer" from https://skillstore.io/skills/emillindfors-port-adapter-designer.md and its manifest at https://skillstore.io/api/skills/emillindfors-port-adapter-designer/manifest. Verify the artifact. You may proceed after verification, subject to the environment's own policy.Your Agent should still show its plan and request any confirmation required by the security policy.
Agent-readable resources
Use these links when an AI agent, crawler, or script needs clean context instead of reading the full page.
Test it
Using "port-adapter-designer". A Rust service calls SQLx queries directly from domain logic.
Expected outcome:
The skill identifies a repository port, a PostgreSQL adapter, an in-memory test adapter, and domain error mapping.
Using "port-adapter-designer". A payment workflow needs Stripe integration without coupling the domain layer to reqwest.
Expected outcome:
The skill proposes a payment gateway port, a Stripe adapter outline, error categories, and test double guidance.
Using "port-adapter-designer". A notification feature must support email now and SMS later.
Expected outcome:
The skill suggests a focused notification port with separate adapters for each provider and shared domain results.
Security Audit
SafeAll static findings were adjudicated as false positives tied to Markdown Rust examples or normal adapter design text. No evidence found of executable commands, live network behavior by the skill, credential exfiltration, obfuscation, or prompt injection. The skill declares only Read and Grep tools.
Risk Factors
โ๏ธ External commands (11)
๐ Network access (1)
๐ Env variables (2)
Share & cite this report
Share the versioned assessment report, neutral badge, embed card, and citations. Skillstore reports evidence without deciding whether this Skill is safe.
Copy report link
https://skillstore.io/skills/emillindfors-port-adapter-designer/audits/4?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportMarkdown badge
[](https://skillstore.io/skills/emillindfors-port-adapter-designer?utm_source=security_passport_badge)HTML badge
<a href="https://skillstore.io/skills/emillindfors-port-adapter-designer?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/emillindfors-port-adapter-designer/security.svg" alt="Skillstore security assessment" loading="lazy"></a>Embed card
<iframe src="https://skillstore.io/embed/skills/emillindfors-port-adapter-designer.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>Academic citations (APA ยท BibTeX ยท CFF)
APA citation
EmilLindfors. (2026). port-adapter-designer security audit report (audit version 4) [Author version 1.0.0]. Skillstore. https://skillstore.io/skills/emillindfors-port-adapter-designer/audits/4BibTeX citation
@techreport{emillindfors-emillindfors-port-adapter-designer-2026,
author = {EmilLindfors},
title = {port-adapter-designer security audit report (audit version 4)},
institution = {Skillstore},
year = {2026},
number = {4},
url = {https://skillstore.io/skills/emillindfors-port-adapter-designer/audits/4},
note = {Author version 1.0.0}
}CITATION.cff
cff-version: 1.2.0
message: "If you use this Skill, cite its author and this versioned security audit report."
title: "port-adapter-designer security audit report (audit version 4)"
version: "1.0.0"
type: report
authors:
- name: "EmilLindfors"
date-released: "2026-07-06"
url: "https://skillstore.io/skills/emillindfors-port-adapter-designer/audits/4"
identifiers:
- type: other
value: "skillstore:emillindfors-port-adapter-designer:audit:4"
description: "Skillstore immutable audit report identifier"
Skillstore Score
Why this score Evidence Confidence: HighWhat You Can Build
Decouple Persistence
Move direct SQLx usage behind repository traits and keep domain logic independent from the database.
Plan Hexagonal Architecture
Define ports and adapters before adding external APIs, queues, file stores, or payment services.
Improve Testability
Create in-memory adapters or mocks so application services can be tested without production infrastructure.
Try These Prompts
Find the external dependency in this Rust module and suggest the smallest useful port trait for it.
Design a Rust adapter for this port. Include construction, error mapping, async behavior, and ownership choices.
Suggest in-memory or mock adapters for these ports and explain which behaviors each test should cover.
Review this Rust service and propose a step-by-step refactor to ports and adapters without changing behavior.
Best Practices
- Keep port traits focused on domain actions, not vendor APIs.
- Use domain types and domain errors at every boundary.
- Add test adapters before wiring production infrastructure.
Avoid
- Expose database rows or HTTP response types through domain traits.
- Create large gateway traits that combine unrelated external systems.
- Let adapters return raw infrastructure errors to application services.
Frequently Asked Questions
What architecture style does this skill support?
Can it design database repositories?
Can it help with external APIs?
Does it generate complete working applications?
Is it useful for tests?
Which tools can use this skill?
Developer Details
Author
EmilLindforsLicense
MIT
Author version
v1.0.0
Skillstore revision
r1
Ref
a06681402992ceae98ba04d54cfd4ab004862696
Maintenance freshness
7/18/2026
Usage
6 downloads ยท 138 views
File structure
๐ SKILL.md