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.

Quality

72%

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

Fix and improve this skill with Tessl

tessl review fix ./skills/swift-protocol-di-testing/SKILL.md

The canonical home for this skill is swift-protocol-di-testing in affaan-m/ECC

SKILL.md
Quality
Evals
Security

Quality

Content

67%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 strong pattern-oriented skill body: concrete, realistic Swift code for every step of a clearly sequenced DI workflow, plus useful best-practice and anti-pattern lists. The main costs are a redundant 'When to Use' section duplicating 'When to Activate', and test examples that reference types and methods never defined in the skill.

Suggestions

Remove or merge the 'When to Use' section — it nearly duplicates 'When to Activate' — and drop the opening sentence that restates the frontmatter description.

Define `MockFileSystemProvider` (or reuse `DefaultFileSystemProvider` with an injectable URL) and either define `loadData()` or change the test to call the shown `sync()`, so the test examples are copy-paste consistent.

Consider moving the full default-implementation and extended test examples into a references/ file, keeping SKILL.md as a leaner overview of the five-step pattern.

DimensionReasoningScore

Conciseness

The bulk is efficient — code examples carry the content and no basic Swift or DI concepts are re-explained — but the 'When to Activate' and 'When to Use' sections are near-duplicate bullet lists and the opening sentence restates the frontmatter description. This redundancy is a whole trimmable section rather than minor over-explanation, fitting anchor 3 rather than 4.

3 / 5

Actionability

Every pattern step is backed by concrete, realistic Swift code (protocols, default implementations, mocks, default-parameter injection, Swift Testing tests). Minor gaps keep it from anchor 5: the test examples use `MockFileSystemProvider` and `manager.loadData()`, neither of which is defined in the shown code.

4 / 5

Workflow Clarity

The Core Pattern is a clearly sequenced five-step workflow (define protocols → default implementations → mocks → inject with default parameters → write tests), each step with executable code, and it involves no destructive or batch operations so the validation cap does not apply. It lacks the explicit verification checkpoints or checklist of anchor 5, and the test snippets' undefined references slightly muddy the follow-along path.

4 / 5

Progressive Disclosure

The single-file body is well organized into scannable sections (When to Activate, Core Pattern steps 1–5, Best Practices, Anti-Patterns) with no nested or buried references, and no bundle files exist to misstructure. It stays at anchor 4 rather than 5 because the ~185-line body keeps everything inline — the extended default-implementation and test examples could be split into reference files — and the skill exceeds the under-50-line simple-skill exception.

4 / 5

Total

15

/

20

Passed

Description

66%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 specific, well-targeted description that names the domain, the technique, and several concrete capabilities in third-person voice. Its main weakness is the complete absence of a 'when to use' trigger clause, which both caps completeness and slightly weakens trigger-term quality and distinctiveness.

Suggestions

Append an explicit trigger clause, e.g. 'Use when writing Swift code that touches the file system, network, or external APIs, or when the user asks how to make Swift code testable or mockable.'

Add natural keyword variations users might say — 'unit testing', 'XCTest', 'test doubles', 'stubbing' — to broaden trigger coverage without lengthening the description much.

Mirror the body's 'When to Activate' conditions (error-path testing, SwiftUI preview environments, actors/Sendable) as 'when' triggers in the description to sharpen distinctiveness.

DimensionReasoningScore

Specificity

The description lists several concrete capabilities — 'mock file system, network, and external APIs using focused protocols and Swift Testing' — anchored in a specific technique ('Protocol-based dependency injection for testable Swift code'). It falls short of anchor 5 because coverage is not comprehensive (network and external API mocking are named but not elaborated), but exceeds anchor 3 since multiple distinct actions are named.

4 / 5

Completeness

The 'what' is clearly stated (protocol-based DI for mocking external dependencies in Swift), but there is no 'Use when...' clause or equivalent explicit trigger guidance anywhere in the description, which caps completeness at 3 per the judging guidelines. This matches anchor 3 exactly: clear what, missing when.

3 / 5

Trigger Term Quality

It includes the natural terms a Swift developer would actually say — 'dependency injection', 'mock', 'testable', 'protocol', 'Swift Testing' — giving good keyword coverage. It misses common variations and synonyms like 'unit test', 'XCTest', 'test double', or 'stub', keeping it below anchor 5.

4 / 5

Distinctiveness Conflict Risk

The Swift-specific framing ('Protocol-based dependency injection... Swift code... Swift Testing') carves out a mostly distinct niche with minor overlap risk against general testing or mocking skills. It does not reach anchor 5 because no explicit trigger phrases sharpen the distinction further.

4 / 5

Total

15

/

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

frontmatter_unknown_keys

Unknown frontmatter key(s) found; consider removing or moving to metadata

Warning

Total

15

/

16

Passed

Repository

valeriibeck-star/claude-skills

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.