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.
Instalar con mi Agente
Copia esta solicitud en tu Agente. Incluye la página canónica del Skill y el manifiesto.
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.Tu Agente debe seguir mostrando su plan y solicitar cualquier confirmación exigida por la política de seguridad.
Recursos legibles por agentes
Usa estos enlaces cuando un agente de IA, crawler o script necesite contexto limpio en vez de leer la página completa.
Pruébalo
Usando "golang-refactoring". Plan extracting validation from a long order-processing function with limited tests.
Resultado esperado:
- 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.
Usando "golang-refactoring". Plan moving a public invoice type into a billing package without breaking callers.
Resultado esperado:
- 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.
Auditoría de seguridad
SeguroAll 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.
Factores de riesgo
📁 Acceso al sistema de archivos (3)
⚡ Contiene scripts (1)
⚙️ Comandos externos (31)
🌐 Acceso a red (2)
Compartir y citar este informe
Comparte el informe de evaluación versionado, la insignia neutral, la tarjeta insertable y las citas. Skillstore presenta evidencias sin decidir si este Skill es seguro.
Copiar enlace del informe
https://skillstore.io/skills/samber-golang-refactoring/audits/1?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportInsignia Markdown
[](https://skillstore.io/skills/samber-golang-refactoring?utm_source=security_passport_badge)Insignia 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>Tarjeta para insertar
<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>Citas académicas (APA · BibTeX · CFF)
Cita 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/1Cita BibTeX
@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"
Puntuación de Skillstore
Por qué esta puntuación Confianza de la evidencia: MedioLo que puedes crear
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.
Prueba estos prompts
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.
Mejores prácticas
- 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.
Evitar
- 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.
Preguntas frecuentes
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?
Detalles del desarrollador
Autor
samberLicencia
MIT
Versión del autor
v1.1.1
Revisión de Skillstore
r1
Ref.
cfb259a07b8f54bbd5254a63daaa42c5bab0ff20
Actualidad del mantenimiento
18/10/2026
Uso
0 descargas · 0 vistas
Estructura de archivos