scan-and-extract

Identify duplicate Go code patterns and extract them into reusable modules under pkg/scan-and-extract/.

Updated Apr 7, 2026
One-click install
npx skills add https://github.com/easyspace-ai/minote --skill scan-and-extract
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: scan-and-extract
Source: https://github.com/easyspace-ai/minote/tree/main/.claude/skills/scan-and-extract
Command: npx skills add https://github.com/easyspace-ai/minote --skill scan-and-extract

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill identifies duplicated code patterns, common abstractions, and refactoring opportunities in a Go codebase, then extracts them into standalone reusable modules under pkg/.

Core Features & Use Cases

  • Pattern discovery: find duplicated utilities, concurrency patterns, data structures, and IO helpers across packages.
  • Automated extraction: move selected code into pkg/scan-and-extract/ and adjust call sites to preserve behavior.
  • Parallel aggregation: run extraction agents in parallel for multiple candidates to speed up refactoring.

Quick Start

Run the extraction workflow to identify extractable patterns and create new modules under pkg/scan-and-extract/ for each reusable abstraction.

Frequently Asked Questions about scan-and-extract

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

FAQPage Schema
How do I find and extract duplicate code patterns in a Go codebase?

To extract duplicate code patterns in a Go codebase, run the extraction workflow to identify recurring utilities and IO helpers, then move them into standalone modules under pkg/scan-and-extract/ while adjusting call sites.

What's the best way to refactor recurring Go utilities into reusable modules?

Refactoring recurring Go utilities into reusable modules is handled by identifying duplicated concurrency patterns and data structures, then moving them into pkg/scan-and-extract/ while updating callers to preserve behavior.

Does the extraction workflow update all callers when moving duplicate Go code?

Yes, the extraction workflow updates all callers. It moves selected duplicate code into pkg/scan-and-extract/ and adjusts call sites across the Go codebase to maintain original behavior.

When should I extract Go code patterns into reusable modules?

You should extract Go code patterns into reusable modules only when the duplicated pattern appears in two or more locations across packages. This targets recurring utilities, concurrency patterns, and IO helpers for safe refactoring.

Are there limitations to extracting duplicate code in multi-package Go repositories?

The main limitation is that extraction only happens when a pattern appears in two or more locations. It targets multi-package Go repositories with recurring utilities, data structures, and IO helpers for module creation.