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 ./.kiro/skills/swift-protocol-di-testing/SKILL.md
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 well-structured, code-forward skill that demonstrates the full DI pattern with executable Swift examples and clear sequencing. The main deductions are a redundant 'When to Use' section duplicating 'When to Activate', and test examples that reference types (MockFileSystemProvider, SyncError) not shown in the body.

Suggestions

Merge 'When to Use' into 'When to Activate' (or vice versa) — the two sections repeat nearly identical bullet lists.

Define or show the missing pieces the tests depend on: `MockFileSystemProvider`, `SyncError`, `Purpose`, and the `loadData()` method used in the second test.

Move the extended mock implementations and/or anti-pattern catalog into a `references/` file to shorten the overview and enable leaner progressive disclosure.

DimensionReasoningScore

Conciseness

Mostly efficient — code examples earn their place and prose is minimal — but it could be tightened: the 'When to Activate' and 'When to Use' sections repeat nearly the same four bullets, and 'Best Practices' partially restates points from the inline code comments. Not 4 (no padding is merely trimmable) because a full duplicated section is more than a minor instance of over-explanation.

3 / 5

Actionability

The core pattern is shown as complete, executable Swift code (protocols, default implementations, mocks, actor injection, Swift Testing tests). Minor gaps keep it from 5: the test examples reference `MockFileSystemProvider`, `manager.loadData()`, `Purpose`, and `SyncError`, none of which are defined in the shown code, so the examples are not fully copy-paste ready.

4 / 5

Workflow Clarity

The five numbered steps (define protocols → defaults → mocks → inject → test) form a clear, coherent sequence with the intent of each step stated. Not 5 because there are no explicit checkpoints (e.g., guidance on verifying a type actually needs a protocol before abstracting, or how to migrate existing code); not 3 because the sequence itself is complete and unambiguous for this non-destructive design task.

4 / 5

Progressive Disclosure

Good single-file structure with clear section headers, each step focused and appropriately sized; no bundle files exist to reference, and at ~190 lines the inline content is cohesive rather than monolithic. Not 5 because the skill exceeds the simple-skill threshold and content like the extended mock implementations or the anti-pattern catalog could live in a referenced file to slim the overview.

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-scoped description with concrete capabilities and natural trigger terms, written in third person. Its main weakness is the missing 'Use when...' clause, which both caps completeness and leaves activation conditions implicit.

Suggestions

Append an explicit trigger clause, e.g., 'Use when writing Swift code that touches the file system, network, or external APIs, or when tests need to mock external dependencies.'

Add common synonyms users would naturally say — 'unit testing', 'stubbing', 'XCTest' — alongside 'Swift Testing' to broaden natural-language matching.

Mention the default-parameter injection pattern ('production code uses real implementations by default') to round out capability coverage.

DimensionReasoningScore

Specificity

The description lists several concrete actions — 'mock file system, network, and external APIs using focused protocols and Swift Testing' — with only minor gaps in coverage (no mention of defining protocols or default production implementations). It sits between the 5 anchor ('comprehensive coverage') and the 3 anchor ('1-2 concrete actions'): more than a couple of actions, but not fully comprehensive.

4 / 5

Completeness

It has a clear 'what' (protocol-based DI for mocking external dependencies in Swift) but no 'Use when...' clause or equivalent trigger guidance, which caps completeness at 3 per the rubric guidelines. Not 4 because the 'when' is entirely absent rather than merely implicit-but-present.

3 / 5

Trigger Term Quality

Natural terms a user would say are present: 'Swift', 'testable', 'mock', 'dependency injection', 'Swift Testing', 'file system', 'network'. A few common variations are missing (e.g., 'unit test', 'stub', 'DI', 'XCTest'), so it falls just short of the comprehensive-synonyms anchor at 5.

4 / 5

Distinctiveness Conflict Risk

The combination of 'Protocol-based dependency injection', 'testable Swift code', and 'Swift Testing' carves a distinct niche; overlap risk is limited to closely related Swift-testing skills. Not 5 because terms like 'mock' and 'test' alone could plausibly activate it for generic Swift mocking questions outside its scope.

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

affaan-m/ECC

Path

.kiro/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.