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.
Installer avec mon Agent
Copiez cette demande dans votre Agent. Elle contient la page Skill de référence et le manifeste.
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.Votre Agent doit toujours présenter son plan et demander toute confirmation exigée par la politique de sécurité.
Ressources lisibles par les agents
Utilisez ces liens lorsquâun Agent IA, un crawler ou un script a besoin dâun contexte propre au lieu de lire toute la page.
Tester
Utilisation de « golang-refactoring ». Plan extracting validation from a long order-processing function with limited tests.
Résultat attendu:
- 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.
Utilisation de « golang-refactoring ». Plan moving a public invoice type into a billing package without breaking callers.
Résultat attendu:
- 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.
Audit de sécurité
SûrAll 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.
Facteurs de risque
đ AccĂšs au systĂšme de fichiers (3)
⥠Contient des scripts (1)
âïž Commandes externes (31)
đ AccĂšs rĂ©seau (2)
Partager et citer ce rapport
Partagez le rapport dâĂ©valuation versionnĂ©, le badge neutre, la carte intĂ©grable et les citations. Skillstore prĂ©sente les preuves sans dĂ©cider si ce Skill est sĂ»r.
Copier le lien du rapport
https://skillstore.io/skills/samber-golang-refactoring/audits/1?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportBadge Markdown
[](https://skillstore.io/skills/samber-golang-refactoring?utm_source=security_passport_badge)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>Carte intégrable
<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>Citations académiques (APA · BibTeX · CFF)
Citation 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/1Citation 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"
Score Skillstore
Pourquoi ce score Niveau de confiance des preuves: MoyenCe que vous pouvez créer
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.
Essayez ces 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.
Bonnes pratiques
- 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.
Ăviter
- 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.
Foire aux questions
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?
Détails du développeur
Auteur
samberLicence
MIT
Version de lâauteur
v1.1.1
Révision Skillstore
r1
Réf
cfb259a07b8f54bbd5254a63daaa42c5bab0ff20
Récence de maintenance
18/10/2026
Utilisation
0 téléchargements · 0 vues
Structure de fichiers
đ references/
đ catalog.md
đ go-tooling.md
đ safety-net.md
đ structural.md
đ workflow.md
đ SKILL.md