CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

service-layer-extractor

The guide compares a fat controller with a service-layer design, then illustrates dependency injection, repository-based database access, and service unit tests. It also provides a folder structure, a phased migration plan, and a checklist for adopting the pattern.

Quality

79%

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 ./.agents/skills/service-layer-extractor/SKILL.md
SKILL.md
Quality
Evals
Security

Quality

Scored by GLM 5.3

Content

65%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.

The content delivers strong, mostly executable before/after code examples for the core refactoring pattern, but it is a monolithic single-file skill with no reference files. The migration workflow lacks validation checkpoints despite describing a multi-week batch refactoring, and the dependency injection section — a headline capability — is left as an unimplemented stub.

Suggestions

Add explicit validation checkpoints to the Migration Strategy (e.g., "Run the full test suite after each phase; do not proceed to the next phase until green" and "Verify endpoint responses are unchanged before deleting old controller code").

Split the ~50-line testing example, the DI container details, and the full migration plan into reference files (e.g., references/testing.md, references/dependency-injection.md, references/migration.md) and link them from short summary sections in SKILL.md.

Replace the Container stub where resolveDependencies returns an empty array with a complete working implementation or a concrete tsyringe example, and define or import the asyncHandler helper used in the controller example.

DimensionReasoningScore

Conciseness

The body is dominated by executable code with minimal prose, and every token in the before/after comparison and folder structure earns its place. It misses a 5 because the "Benefits" section ("Testability", "Reusability", "Separation", "Maintainability") explains concepts Claude already knows about service layers, and the Migration Strategy is fenced as a markdown block rather than living content.

4 / 5

Actionability

The service, controller, repository, and test examples are copy-paste ready TypeScript covering the common cases, matching the 4 anchor. It falls short of 5 because the DI Container — one of the skill's four claimed pillars — is a stub ("resolveDependencies" returns an empty array with the comment "// Resolve constructor dependencies"), and "asyncHandler" is used but never defined.

4 / 5

Workflow Clarity

The Migration Strategy provides a clear four-phase sequence with week estimates, but it contains no validation checkpoints — no "run the test suite", no verification that behavior is preserved between phases. Per the rubric, a batch operation like a whole-codebase refactoring without validation/verification steps is capped at 3; the phases are checkboxes, not verify-then-proceed gates.

3 / 5

Progressive Disclosure

There are no bundle files at all: everything, including a ~50-line test example, the DI container, and a detailed migration plan, is inlined in a 265-line SKILL.md. Section headers are clear (giving structure), but material that naturally belongs in separate reference files is inline and there is no one-level-deep reference navigation, matching the 3 anchor's 'content that should be separate is inline'.

3 / 5

Total

14

/

20

Passed

Description

83%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 that explicitly states both capabilities and trigger conditions with domain-native terminology like "fat controllers". The only weaknesses are mild buzzword padding ("clean boundaries") and a couple of overly broad trigger terms that create minor overlap risk with general refactoring skills.

DimensionReasoningScore

Specificity

The description lists several concrete actions — "Refactors route handlers into service layer", "Provides service interfaces, folder structure, testing strategy, and migration plan" — with named mechanisms like dependency injection. It stops short of a 5 because phrases like "clean boundaries" and "separation of concerns" are architecture buzzwords rather than concrete actions, but it is well above the 3 anchor's '1-2 concrete actions'.

4 / 5

Completeness

It clearly answers 'what' (refactors route handlers into a service layer with DI, interfaces, folder structure, testing strategy, and migration plan) and 'when' with an explicit "Use when..." clause containing concrete trigger phrases. This matches the 5 anchor directly; the 4 anchor's 'when could be more explicit' does not apply since the triggers are quoted and specific.

5 / 5

Trigger Term Quality

"Use when refactoring 'fat controllers', 'business logic', 'service layer', or 'architecture cleanup'" includes several natural phrases a user would actually say, with "fat controllers" being an especially strong domain-native trigger. A 5 would require synonyms and variations (e.g., "thin controllers", "move logic out of controllers", "messy controllers") that are absent.

4 / 5

Distinctiveness Conflict Risk

"route handlers", "service layer", and "fat controllers" carve out a clear niche in backend architecture refactoring with minimal conflict risk. It is not a 5 because "business logic" and "architecture cleanup" are broad phrases that could also trigger general refactoring or code-cleanup skills.

4 / 5

Total

17

/

20

Passed

Validation

100%

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

Validation — 16 / 16 Passed

Validation for skill structure

No warnings or errors.

Repository

sathishssj3/Stereix-Engine

Path

.agents/skills/service-layer-extractor/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.