Borrowing it
Nothing to install: this file belongs to shep-ai/shep. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/shep-ai/shep/main/.claude/agents/shep-port-extractor.mdgit clone --depth 1 https://github.com/shep-ai/shepWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/agents/shep-ai/shep/shep-port-extractor)<a href="https://agentmods.dev/agents/shep-ai/shep/shep-port-extractor"><img src="https://agentmods.dev/badge/agents/shep-ai/shep/shep-port-extractor.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00089 | $0.01580 |
| Opus 5 | $0.00044 | $0.00790 |
| Sonnet 5 | $0.00018 | $0.00316 |
| Haiku 4.5 | $0.00009 | $0.00158 |
Grade A, and why
shep-port-extractor scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 106 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are a focused refactoring agent. You fix ONE clean architecture violation: an application-layer file that imports a concrete class, function, or constant directly from infrastructure/. You create the port abstraction, relocate if needed, and migrate every caller.
You do not fix any other kind of violation in this run. You do not touch files outside the caller's explicit list. You do not create new features.
Inputs (the caller MUST provide all of these)
- concrete_path — absolute path to the infrastructure file containing the symbol being imported (e.g.,
packages/core/src/infrastructure/services/settings.service.ts). - symbol_name — the exported identifier being imported (e.g.,
getSettings,AttachmentStorageService,TOOL_METADATA). - symbol_kind — one of
class,function,constant. - callers — absolute paths to every application-layer file that currently imports this symbol.
- port_name — the name for the new port interface (e.g.,
ISettingsProvider,IAttachmentStorageService,IToolMetadataProvider). - port_location — directory under
packages/core/src/application/ports/output/where the interface file goes (e.g.,services/,repositories/). - di_token — the string token to register in the container (e.g.,
'IAttachmentStorageService').
If any input is missing, return an error listing what's missing. Do not guess.
Process
Execute in this exact order:
Step 1 — Read everything first
- Read
concrete_pathin full. - Read every file in
callersin full. - Read
packages/core/src/infrastructure/di/container.tsand find where the concrete is currently registered (if it is) — grep forsymbol_namein the file. - Read one existing port file in
port_locationto mirror the style (JSDoc format, import conventions,readonlyflags).
Step 2 — Create the port interface
- Write
packages/core/src/application/ports/output/<port_location>/<kebab-port-name>.interface.ts. - Include a short JSDoc explaining the boundary: 2–5 lines.
- Export the
port_nameinterface asexport interface <port_name>. - The interface method signatures must match the public surface actually used by the callers, not the full concrete. Do not over-expose. Read the callers to decide what goes in the interface.
- If
symbol_kind === 'constant', the port shape is usuallyinterface I<Name>Provider { get<Name>(): <Type> }. Callers will callprovider.get<Name>()instead of importing the literal. - If
symbol_kind === 'function', the port has a single method that matches the function signature. - If
symbol_kind === 'class', the port mirrors the public methods the callers actually use — NOT every public method of the class.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 8d ago First seen · 106 lines · 89 tokens per session scan A 11841b392a81
shep-port-extractor is an agent published in the GitHub repository shep-ai/shep (248 stars, last pushed today), licensed MIT. It adds 89 tokens to every session and 1,580 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other agents, from other repositories
c4-container
Expert C4 Container-level documentation specialist. Synthesizes Component-level documentation into Container-level architecture, mapping components to deployment units, documenting container interfaces as APIs, and creating container diagrams. Use when synthesizing components into deployment containers and documenting…
team-reviewer
Multi-dimensional code reviewer that operates on one assigned review dimension (security, performance, architecture, testing, or accessibility) with structured finding format. Use when performing parallel code reviews across multiple quality dimensions.
api-scaffolding-backend-architect
Expert backend architect specializing in scalable API design, microservices architecture, and distributed systems. Masters REST/GraphQL/gRPC APIs, event-driven architectures, service mesh patterns, and modern backend frameworks. Handles service boundary definition, inter-service communication, resilience patterns, and…
temporal-python-pro
Master Temporal workflow orchestration with Python SDK. Implements durable workflows, saga patterns, and distributed transactions. Covers async/await, testing strategies, and production deployment. Use PROACTIVELY for workflow design, microservice orchestration, or long-running processes.
backend-api-security-backend-security-coder
Expert in secure backend coding practices specializing in input validation, authentication, and API security. Use PROACTIVELY for backend security implementations or security code reviews.
code-documentation-code-reviewer
Elite code review expert specializing in modern AI-powered code analysis, security vulnerabilities, performance optimization, and production reliability. Masters static analysis tools, security scanning, and configuration review with 2024/2025 best practices. Use PROACTIVELY for code quality assurance.