golang-refactoring
Refactor Go Code with Tests and Human Review
Large Go refactors can break callers, hide behavior changes, and create conflicting pull requests. This skill guides tool-driven changes with targeted tests and staged human review.
내 에이전트로 설치
이 요청을 에이전트에 복사하세요. 공식 Skill 페이지와 매니페스트가 포함되어 있습니다.
Review the Skillstore skill "golang-refactoring" from https://skillstore.io/skills/samber-golang-refactoring.md and its manifest at https://skillstore.io/api/skills/samber-golang-refactoring/manifest. Verify the artifact. You may proceed after verification, subject to the environment's own policy.에이전트는 계속해서 계획을 표시하고 보안 정책에서 요구하는 확인을 요청해야 합니다.
에이전트가 읽기 쉬운 리소스
AI 에이전트, 크롤러, 스크립트가 전체 페이지 대신 정리된 컨텍스트만 필요할 때 이 링크를 사용하세요.
테스트해 보기
"golang-refactoring" 사용 중입니다. Plan extracting validation from a long order-processing function with limited tests.
예상 결과:
- Assessment: affected validation paths need characterization tests before extraction.
- Plan: capture current success and failure results, then extract only the validation responsibility.
- Verification: review the extraction diff and run build, vet, and targeted tests.
- Checkpoint: obtain approval before editing; keep behavior changes outside this refactor.
"golang-refactoring" 사용 중입니다. Plan moving a public invoice type into a billing package without breaking callers.
예상 결과:
- Assessment: inspect callers, package dependencies, exported methods, and reflection-sensitive uses.
- Stage one: introduce the type in the destination and preserve the old name through a compatibility alias.
- Stage two: migrate callers incrementally in reviewed pull requests.
- Stage three: remove the deprecated alias only after reference checks and the required compatibility review.
보안 감사
안전All 52 static findings are false positives involving Markdown formatting, documentation links, Go examples, or legitimate refactoring tools. No evidence found of malicious prompt injection, credential theft, or unauthorized data transfer in the six reviewed files. Tool installation, repository edits, test execution, and pull request creation remain operational actions requiring appropriate permissions and review.
위험 요인
⚡ 스크립트 포함 (1)
⚙️ 외부 명령어 (31)
🌐 네트워크 접근 (2)
이 보고서 공유 및 인용
버전이 지정된 평가 보고서, 중립 배지, 임베드 카드 및 인용을 공유하세요. Skillstore는 근거를 보고하지만 이 Skill의 안전 여부를 판단하지 않습니다.
보고서 링크 복사
https://skillstore.io/skills/samber-golang-refactoring/audits/1?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportMarkdown 배지
[](https://skillstore.io/skills/samber-golang-refactoring?utm_source=security_passport_badge)HTML 배지
<a href="https://skillstore.io/skills/samber-golang-refactoring?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/samber-golang-refactoring/security.svg" alt="Skillstore security assessment" loading="lazy"></a>임베드 카드
<iframe src="https://skillstore.io/embed/skills/samber-golang-refactoring.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>학술 인용 (APA · BibTeX · CFF)
APA 인용
samber. (2026). golang-refactoring security audit report (audit version 1) [Author version 1.1.1]. Skillstore. https://skillstore.io/skills/samber-golang-refactoring/audits/1BibTeX 인용
@techreport{samber-samber-golang-refactoring-2026,
author = {samber},
title = {golang-refactoring security audit report (audit version 1)},
institution = {Skillstore},
year = {2026},
number = {1},
url = {https://skillstore.io/skills/samber-golang-refactoring/audits/1},
note = {Author version 1.1.1}
}CITATION.cff
cff-version: 1.2.0
message: "If you use this Skill, cite its author and this versioned security audit report."
title: "golang-refactoring security audit report (audit version 1)"
version: "1.1.1"
type: report
authors:
- name: "samber"
date-released: "2026-10-18"
url: "https://skillstore.io/skills/samber-golang-refactoring/audits/1"
identifiers:
- type: other
value: "skillstore:samber-golang-refactoring:audit:1"
description: "Skillstore immutable audit report identifier"
Skillstore 점수
이 점수의 이유 증거 신뢰도: 중간만들 수 있는 것
Split an Overgrown Function
Assess affected code, add missing tests, and extract a focused helper without combining the change with a feature.
Migrate a Shared Package
Plan compatibility aliases, caller migration, dependency ordering, and staged reviews for a type moved between packages.
Coordinate a Multi-Step Refactor
Build a change inventory, isolate worktrees, and schedule independent pull requests without parallelizing overlapping symbol edits.
이 프롬프트를 사용해 보세요
Inspect [symbol] and propose a safe rename to [new name]. Identify references, reflection risks, and verification steps. Wait for approval before editing.
Plan extracting [responsibility] from [function]. Measure affected coverage, propose missing tests, and choose a gopls action. Present the plan before changing code.
Plan moving [type] from [old package] to [new package]. Include aliases, import-cycle checks, external caller risks, and incremental migration checkpoints.
Create an inventory for [refactoring goal]. Classify risk and structural versus behavioral changes. Order dependencies, identify parallel work, and define tests and approval gates.
모범 사례
- Approve a refactoring inventory before editing and request new approval when the scope or risk changes.
- Measure coverage on affected paths and add characterization tests before restructuring poorly tested code.
- Keep each change atomic, inspect tool-generated diffs, and verify build, tests, reflection-sensitive references, and relevant benchmarks.
피하기
- Mixing a rename or package move with a bug fix or feature in the same pull request.
- Running a workspace-wide rename concurrently with other changes that could touch the same symbols.
- Treating passing tests or a mechanical rewrite as proof that reflection, external consumers, and security behavior remain unchanged.
자주 묻는 질문
Which AI tools can use this skill?
What dependencies are required?
Can it refactor code without tests?
Does gopls guarantee every change is safe?
How does it handle public type moves?
Does the workflow merge changes automatically?
개발자 세부 정보
작성자
samber라이선스
MIT
작성자 버전
v1.1.1
Skillstore 리비전
r1
참조
cfb259a07b8f54bbd5254a63daaa42c5bab0ff20
유지보수 최신성
2026. 10. 18.
사용량
0 다운로드 · 0 조회
파일 구조