extract-service

Plan extraction of repeated operational mechanics into a shared service with migration verification.

14|Updated Apr 1, 2026
One-click install
npx skills add https://github.com/hungv47/meta-skills --skill extract-service
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: extract-service
Source: https://github.com/hungv47/meta-skills/tree/main/forsvn-dev/skills/product/extract-service
Command: npx skills add https://github.com/hungv47/meta-skills --skill extract-service

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This skill lifts repeated operational mechanics (SDK, API, file I/O, or network logic) out of multiple callers into a single shared service layer, preserving observable behavior while reducing duplication.

Core Features & Use Cases

  • Extract the shared "how" into a service function that can be reused by multiple callers.
  • Preserve the callers' orchestration logic (the "why/when") in the callers; the service handles the "how" only.
  • Support plan-driven migrations with per-caller verification and rollback.

Quick Start

Design a service interface from the scan, then migrate each caller one by one with verification.

Frequently Asked Questions about extract-service

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract duplicated service layer logic into a shared service?

To extract duplicated service layer logic, identify repeated operational mechanics across callers, design a data-driven interface for the shared how, and migrate callers individually with verification and rollback procedures.

What is the best way to refactor duplicated API mechanics across multiple callers?

Refactoring duplicated API mechanics involves moving the shared how into a service function while preserving orchestration logic in callers, then executing a per-caller migration plan with built-in verification and rollback steps.

How does a plan-driven service extraction migration work?

A plan-driven service extraction migration works by designing an explicit service interface from a scan, then migrating each caller one by one with verification to ensure observable behavior remains identical after each step.

Can I preserve caller orchestration logic when extracting a shared service?

Yes, you can preserve caller orchestration logic by leaving the why and when in the callers. The extracted shared service handles only the how, capturing repeated operational mechanics without altering caller behavior.

How do I verify observable behavior remains identical after a service layer refactor?

To verify observable behavior remains identical during a service layer refactor, specify verification steps and rollback procedures for each migrated caller, ensuring the extracted service function preserves the original mechanics.

When should I not use a shared service extraction for code duplication?

You should not use shared service extraction when the duplicated logic represents caller-specific orchestration rather than operational mechanics. Extraction targets the shared how; the callers must retain their unique why and when logic.