CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

swift-protocol-di-testing

Protocol-based dependency injection for testable Swift code — mock file system, network, and external APIs using focused protocols and Swift Testing. Use when Swift code needs testing and file system, network, or external APIs must be mocked.

Quality

84%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Passed

No findings from the security scan

SKILL.md
Quality
Evals
Security

Quality

Content

75%Weight 40%Scale 1-5

Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.

A solid, well-structured pattern skill: concrete, idiomatic Swift examples carrying the explanation, with a clear five-step sequence. The main weaknesses are minor — a duplicated When-to section, a few undefined referenced types (Purpose, MockFileSystemProvider, loadData), and no progressive-disclosure split for its ~190 lines.

Suggestions

Merge the duplicated "When to Activate" and "When to Use" sections into a single trigger list to remove ~8 redundant lines.

Define the missing referenced types — `Purpose`, `MockFileSystemProvider` (with its `containerURL:` initializer), and `loadData()` — or drop them from the test examples so every snippet is self-contained and executable.

Consider moving the extended test examples and anti-pattern commentary into a `references/` file linked from SKILL.md to slim the main body and improve progressive disclosure.

DimensionReasoningScore

Conciseness

The body is code-forward and lean — every code block teaches the pattern rather than re-explaining concepts Claude already knows (no "what is dependency injection" padding). It falls short of 5 mainly because "When to Activate" and "When to Use" are near-duplicate bullet lists restating the same triggers twice, which could be trimmed.

4 / 5

Actionability

The guidance is mostly executable, real Swift: concrete protocols, default implementations, a mock with configurable errors, default-parameter injection, and Swift Testing tests. Minor gaps keep it below the copy-paste-ready 5 anchor: the `Purpose` type, `MockFileSystemProvider` (used in two tests), and `manager.loadData()` are referenced but never defined.

4 / 5

Workflow Clarity

The five numbered sections (define protocols → default implementations → mocks → inject via default parameters → write tests) form a clear, correctly sequenced workflow. It lacks the explicit validation checkpoints of the 5 anchor, but since this is a design pattern rather than a destructive or batch operation, the validation cap does not apply and the sequence itself is unambiguous.

4 / 5

Progressive Disclosure

Well-organized section headers, coherent single-topic flow, and no buried or nested references (no bundle files exist, and the body references none). It misses 5 because the ~190-line body is above the simple-skill threshold where organization alone earns full marks, and some material (e.g., the full test examples or anti-pattern elaboration) could plausibly live in reference files.

4 / 5

Total

16

/

20

Passed

Description

87%Weight 40%Scale 1-5

Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.

A strong description: third-person, concrete, and fully answering both what and when with explicit trigger guidance. Minor room to improve via synonym coverage (unit testing, stubs, XCTest) and mentioning the error-path testing capability.

DimensionReasoningScore

Specificity

The description lists several concrete actions — "mock file system, network, and external APIs using focused protocols and Swift Testing" — grounded in a named domain ("testable Swift code"). It falls just short of the 5 anchor because coverage has minor gaps (e.g., error-path testing, a key emphasis of the skill, is not mentioned) and "network" is asserted without a corresponding concrete action example.

4 / 5

Completeness

It explicitly answers both questions: what ("Protocol-based dependency injection for testable Swift code — mock file system, network, and external APIs using focused protocols and Swift Testing") and when ("Use when Swift code needs testing and file system, network, or external APIs must be mocked"), with concrete trigger phrases matching the 5 anchor exactly.

5 / 5

Trigger Term Quality

Good keyword coverage with natural terms users would say: "Swift", "testable", "mock", "file system", "network", "external APIs", "dependency injection", "Swift Testing". A few natural variations are missing ("unit test", "stub", "XCTest", "test doubles"), keeping it below the comprehensive-synonym coverage of the 5 anchor.

4 / 5

Distinctiveness Conflict Risk

The niche is clear and narrow — Swift protocol-based dependency injection for testing — with distinct triggers (Swift, mock, protocol, Swift Testing). It is unlikely to fire for non-Swift or non-testing skills, matching the 5 anchor ("clear niche with distinct triggers; minimal conflict risk").

5 / 5

Total

18

/

20

Passed

Validation

93%

Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.

Validation — 15 / 16 Passed

Validation for skill structure

CriteriaDescriptionResult

metadata_version

'metadata.version' is missing

Warning

Total

15

/

16

Passed

Repository

affaan-m/ECC

Path

skills/swift-protocol-di-testing/SKILL.md

Reviewed

Table of Contents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.