본문으로 건너뛰기
cccskills
무료GitHub에 공개

arcpy-migration

Migrates ArcPy and ArcGIS Pro workflows to explicit, testable open-source Python geospatial workflows. Use when removing ArcPy dependencies, porting geoprocessing scripts, or documenting ArcGIS behavior that will not be migrated.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(9)

  • SKILL.md7.6 KB
  • examples/explicit-workflow.md868 B
  • references/limitations-and-evidence.md975 B
  • references/source-inventory.md1.0 KB
  • references/spatial-semantics.md944 B
  • templates/migration-manifest.yaml597 B
  • templates/operation-contract.yaml594 B
  • templates/qa-and-test-matrix.md969 B
  • templates/workflow-boundary.py1.1 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

ArcPy Migration

Migrate the workflow, not ArcGIS UI state. Create an inventory, explicit contracts, separate adapters, a pure core, parity evidence, and documented limits.

Phase gates

Gate 0: Discover the source contract

Before changing code, inventory:

  • Entrypoints, ArcPy tools, parameters, environment settings, and implicit defaults.
  • Inputs, outputs, intermediate artifacts, file formats, naming rules, overwrite behavior, and side effects.
  • CURRENT project access, active maps/layers, scratch workspaces, selections, symbology, progress reporting, and global state.
  • Horizontal and vertical CRS, units, datum assumptions, resampling, tolerances, NoData, invalid-geometry, and empty-result behavior.
  • Dependencies, licenses, ArcGIS version, and any ArcGIS-only behavior.

Write the inventory to a migration manifest. Stop if the behavior cannot be reproduced from explicit inputs or hidden state remains undocumented.

Gate 1: Approve shared contracts

Define a contract for every operation and output. Each contract names:

  • Typed inputs and outputs.
  • Source and target CRS, horizontal and vertical units, reprojection point, and raster resampling.
  • Geometry validity policy, distance/area semantics, NoData policy, tolerances, ordering, naming, and overwrite rules.
  • Side effects, deterministic expectations, semantic parity criteria, unsupported behavior, and tests.

Use explicit status values such as covered, partially_covered, unmapped, and no_data. Do not collapse NoData, empty coverage, service failure, and numeric zero into one value. Preserve denominators for weighted calculations.

Stop if an output lacks a type, CRS, naming rule, or semantic parity criterion.

Gate 2: Separate adapter and core

The core must:

  • Accept explicit paths, values, models, CRS, units, tolerances, NoData policy, and output configuration.
  • Avoid importing arcpy, reading arcpy.env or CURRENT, mutating map layers, or relying on scratch-workspace state.
  • Keep data loading, transformation, and output writing behind narrow seams.
  • Return a structured result containing artifacts, diagnostics, status, provenance, and limitations.

The adapter may read ArcGIS projects, extract parameters, report progress, and create ArcGIS-facing outputs. Convert every arcpy.env value, scratch location, current-map reference, and implicit relative path into a named workflow-context field.

Gate 3: Implement and test the pure core

Prefer these defaults where they fit the contract:

ArcPy concernDefault replacement
Geometry and attribute transformsShapely, GeoPandas, pandas, NumPy
Raster read/write, windows, masksRasterio
Projection and coordinate transformsPyProj
Feature-class and table I/OFiona or GeoPandas
arcpy.env settingsExplicit workflow-context fields
Scratch geodatabaseExplicit temporary or output directory
Map/layer mutationOmit unless explicitly required; otherwise use an optional presentation adapter
Symbology/layout/exportDocument as a scope reduction or isolate in a presentation adapter

Extract reusable helpers for I/O, projection, clipping, zoning, raster conditioning, geometry repair, logging, and deterministic artifact writing. Do not duplicate spatial logic across migrated scripts.

Make these decisions visible in code and tests:

  • Reject unknown CRS; never infer silently.
  • Reproject mixed CRS explicitly before overlay, clipping, distance, or area.
  • Do not calculate planar measurements directly in geographic coordinates.
  • Require vertical units for elevation or terrain calculations.
  • State whether invalid geometries are rejected or repaired, and report repairs.
  • Preserve input immutability unless mutation is part of the contract.
  • Normalize external identifiers at boundaries and log failures at the feature, tile, or operation level.

Gate 4: Show behavior matches

Compare the migrated workflow with a retained ArcPy reference fixture where available:

  • Geometry after normalization.
  • Raster dimensions, transform, CRS, NoData, and values within declared tolerance.
  • Attribute schema and values.
  • File naming and artifact set.
  • Stable ordering and repeated-run determinism.

Use checksums only when byte-level equality is meaningful. Preserve exact inputs and configuration needed for replay. Keep ArcGIS-runtime, network, and live-service tests opt-in; deterministic unit and fixture tests belong in the default suite.

Gate 5: Release check

Before release, require:

  • A fixture-backed end-to-end command.
  • Validated manifest and operation contracts.
  • Reproducible output locations and cleanup behavior.
  • Explicit partial-output and failure behavior.
  • QA report with contract parity, tests, intentional differences, limitations, blockers, provenance, authority, and artifact locations.
  • A documented list of unsupported ArcGIS behavior and scope reductions.

Do not claim universal tool coverage, zero failures, runtime improvement, or official determinations without direct run evidence and source citations.

Migration rules

  1. Preserve original workflow behavior, file naming, and deterministic outputs before restructuring.
  2. Replace ArcGIS global state with explicit paths, configuration, and result objects.
  3. Prefer allowlisted domain operations over unrestricted expression or geoprocessing passthrough.
  4. Keep I/O, transforms, and writing separate so each can be tested independently.
  5. Treat provenance and authority as separate concerns: authoritative source data does not make a derived result official.
  6. Keep timeout detection, per-unit diagnostics, failure snapshots, and replay evidence distinct from success claims.

Required artifacts

At minimum, create:

  • A migration manifest.
  • An operation contract for each migrated operation.
  • A workflow context and structured result model.
  • An adapter/core boundary.
  • A test matrix covering CRS, units, NoData, geometry, boundaries, determinism, and parity.
  • A QA report and assumptions/limitations register.

Use the templates and references in this skill when needed.

Key supporting files:

  • Templates: templates/migration-manifest.yaml, templates/operation-contract.yaml, templates/workflow-boundary.py, and templates/qa-and-test-matrix.md.
  • References: references/source-inventory.md, references/spatial-semantics.md, and references/limitations-and-evidence.md.
  • Worked example: examples/explicit-workflow.md.

Anti-patterns

Anti-patternWhy it failsFix
Keep ArcPy globalsHides dependencies and breaks testabilityPass explicit paths, configuration, and CRS values
Recreate ArcGIS UI behaviorAdds unsupported scopePreserve workflow intent, not the UI
Mix file I/O into core mathMakes migration hard to verifySeparate loading, transforms, and writes
Use one-off library choices per scriptCreates inconsistent behaviorCentralize geospatial helpers
Infer unknown CRS or unitsProduces plausible but invalid resultsBlock and require explicit metadata
Silently repair or discard dataMakes parity and audit impossibleReport repairs, exclusions, and status

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Distills enduring architectural decisions and design rationale from wave orchestration plans or historical git changes into structured, tracked Architecture Decision Records (ADRs). Use pre-wave to resolve active architectural constraints or post-wave to record enduring decisions in docs/decisions/.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

AndrewBrown-USDA/aigb-skills-usda72026년 10월 22일 업데이트

Create and maintain AGENTS.md files for project onboarding and grounding. Use when initialized in a new project, when project structure changes significantly, or when creating subfolder-level AGENTS.md files for complex monorepos.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

AndrewBrown-USDA/aigb-skills-usda72026년 10월 22일 업데이트

Audit and update an arbitrary codebase to follow the Code.mil federal open-source licensing model (MIT with 17 U.S.C. Section 105 disclaimers and INTENT.md), including CRAN/R package DESCRIPTION setup.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

AndrewBrown-USDA/aigb-skills-usda72026년 10월 22일 업데이트

caveman

무료

Ultra-compressed communication mode that cuts output tokens while keeping technical accuracy. Levels: lite, full, ultra and the wenyan variants. Use for /caveman, "caveman mode", "talk like caveman", "be brief" or "less tokens".

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

AndrewBrown-USDA/aigb-skills-usda72026년 10월 22일 업데이트

Review the changes since a fixed point (commit, branch, tag, or merge-base) along two axes - Standards (does the code follow this repo's documented coding standards?) and Spec (does the code match what the originating issue/spec asked for?). Runs both reviews in parallel sub-agents and reports them side by side. Use when the user wants to review a branch, a PR, work-in-progress changes, or asks to "review since X".

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

AndrewBrown-USDA/aigb-skills-usda72026년 10월 22일 업데이트

Create, classify, validate, and explain commit messages using Conventional Commits v1.0.0, with repository-aware type, scope, footer, and breaking-change guidance. Use when drafting or reviewing a commit message.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

AndrewBrown-USDA/aigb-skills-usda72026년 10월 22일 업데이트

AndrewBrown-USDA의 스킬 모두 보기

이 스킬의 문제 신고