ze-extract

Move Go symbols between files in a Ze repository with validation.

50|2|Updated Mar 27, 2026
One-click install
npx skills add https://github.com/ze-software/ze --skill ze-extract
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ze-extract
Source: https://github.com/ze-software/ze/tree/main/.codex/skills/ze-extract
Command: npx skills add https://github.com/ze-software/ze --skill ze-extract

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers move Go symbols between files within a Ze repository using the repo helper, ensuring source and destination integrity, path correctness, and consistent annotations.

Core Features & Use Cases

  • Reconcile and move Go symbols across Go files with automatic source/destination validation.
  • Update import paths and related references to maintain build correctness.
  • Use Case: during module maintenance when symbol renames or relocations are required.

Quick Start

Run the repo helper to extract the specified Go symbols from source.go to dest.go and verify the result.

Frequently Asked Questions about ze-extract

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

FAQPage Schema
How do I move Go symbols between files in a different package?

To move Go symbols between packages, the repo helper validates source validity, confirms symbol presence, and checks destination package compatibility before relocating the code. It updates import paths to ensure the build remains correct.

What is the safest way to refactor Go code across multiple files?

Safe Go code refactoring uses pre-checks, build verification, and go vet to guarantee a compilable state. The process ensures source and destination integrity before moving symbols and cleans up file annotations afterward.

Does moving Go symbols automatically update import paths and references?

Yes, moving Go symbols automatically updates import paths and related references. This maintains build correctness across packages by ensuring all dependencies are reconciled during the file relocation.

Why do I need to run go vet after extracting symbols to a new file?

Running go vet after symbol extraction is required to guarantee a correct, compilable state. The verification step checks for structural errors and ensures the destination package remains valid after the move.

Can I use this for in-repo symbol relocation during module maintenance?

Yes, you can use this for in-repo symbol relocation during module maintenance. It applies to refactoring tasks across Go packages by enforcing pre-checks and post-move verification to ensure consistent annotations.

What happens if the destination package is incompatible with the extracted symbol?

If the destination package is incompatible, the enforced pre-checks will detect the issue before the move. The validation ensures source validity and destination compatibility to prevent breaking the build.