smartgwt-panel-refactoring
Skill by optyfr-org
Guides refactoring of SmartGWT UI panels to remove double-brace initialization, extract factory methods, and replace anonymous classes with lambdas. Intended for developers fixing SonarQube issues in GWT and SmartGWT code.
Install smartgwt-panel-refactoring
Built from the published package, never by AI.
git clone --depth 1 https://github.com/optyfr-org/JRomManager /tmp/JRomManager && mkdir -p ~/.claude/skills && cp -r /tmp/JRomManager/.qoder/skills/smartgwt-panel-refactoring ~/.claude/skills/smartgwt-panel-refactoringRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
Step-by-step: install smartgwt-panel-refactoring in Claude Code
git clone --depth 1 https://github.com/optyfr-org/JRomManager /tmp/JRomManager && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/JRomManager/.qoder/skills/smartgwt-panel-refactoring ~/.gemini/antigravity-cli/skills/smartgwt-panel-refactoringAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install smartgwt-panel-refactoring in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
This agent skill gives step-by-step guidance for refactoring SmartGWT UI panels. It targets anti-patterns such as double-brace initialization, double-brace HashMap setup, repeated string literals, and anonymous inner classes. The skill shows before and after code, including moving widget creation into build methods and using lambdas for single-method handlers.
The skill lists an ordered refactoring process, from finding double-brace blocks to checking with Grep that removed symbols are not used elsewhere. It names ProfilePanel.java as the reference example and lists panels still needing work, such as ScannerPanel.java and SettingsForm.java. It is aimed at developers working on WebClient UI classes or reducing SonarQube violations in GWT and SmartGWT code.
Written from the project's SKILL.md and checked against it.
What it can do
- Double-brace removalReplaces {{ }} widget and map initialization with build methods and Map.ofEntries.
- Factory method extractionMoves nested widget creation into separate build*() methods for each widget.
- Lambda conversionConverts single-method anonymous handlers such as click, double-click, and DSCallback into lambdas or method references.
- String constant extractionMoves string literals used two or more times into private static final constants.
- Residual handlingExplains which SonarQube findings are framework constraints and how to suppress S6213.
- Usage verificationRecommends searching with Grep that no external code references removed symbols.
What you need
- Java codebase using SmartGWT and GWT
- Access to the WebClient UI source files
Try asking
- Refactor ScannerPanel.java to remove its nested double-brace initialization
- Convert the anonymous handlers in SettingsForm.java to lambdas
- Review this SmartGWT panel and extract its widgets into build methods
Good to know
- Targets SmartGWT and GWT code, not other UI frameworks
- S110 and S6213 violations are framework constraints that cannot be fully removed
- Written around specific files in the WebClient project
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: .qoder/skills/smartgwt-panel-refactoring/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to smartgwt-panel-refactoring
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
smartgwt-panel-refactoring: common questions
Does this skill reduce SonarQube violations in SmartGWT panels?
The source says it aims to reduce SonarQube violations such as S3599, S110, and S1604. It reports that ProfilePanel.java went from 60+ violations to 2 framework-constrained residuals.
Which SonarQube issues are left after refactoring?
The source lists S110 (too many parents) as unavoidable because of the SmartGWT class hierarchy. It also lists S6213 for HoverCustomizer, which needs an anonymous class and a @SuppressWarnings annotation.
Which panels does the skill recommend refactoring first?
ScannerPanel.java is rated High severity because of deeply nested double-brace initialization. SettingsForm.java is rated Medium for its double-brace HashMap.
How do I install smartgwt-panel-refactoring?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is smartgwt-panel-refactoring free?
The code is published under the GPL-2.0 licence. The service it connects to may have its own pricing.
Is smartgwt-panel-refactoring safe to use?
It scores 50 of 100. Grades: maintenance A, licence C, quality C. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to smartgwt-panel-refactoring?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
