naming-gen
Suggest better variable and function names in your code. Use when improving code readability.
Why use this skill?
Improve code readability with naming-gen. Automatically analyze your codebase and receive intelligent suggestions for better variable and function names.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/lxgicstudios/naming-genWhat This Skill Does
The naming-gen skill acts as an intelligent refactoring assistant designed to improve code maintainability by identifying and suggesting superior identifiers for variables and functions. It leverages advanced static analysis to understand the context of your codebase, identifying ambiguous names like "data," "temp," or "processStuff" that often lead to technical debt. By analyzing how these elements are utilized across your source files, the tool provides context-aware, descriptive alternatives that adhere to professional naming conventions. It is designed to be a friction-less addition to your workflow, requiring no complex setup while providing actionable insights that make your code self-documenting.
Installation
Installing this skill within the OpenClaw environment is streamlined to ensure you can start refactoring immediately. Use the following command in your terminal:
clawhub install openclaw/skills/skills/lxgicstudios/naming-gen
Alternatively, if you prefer to use the standalone version of the underlying tool directly via your terminal, you can run npx ai-naming without needing a global installation. Ensure you are using Node.js version 18 or higher for the best performance and compatibility.
Use Cases
- Pre-PR Cleanup: Use this tool before submitting a pull request to ensure your variable naming is clean and readable for your reviewers.
- Legacy Code Refactoring: When you are tasked with updating older projects that have cryptic, non-descriptive names, this skill helps you quickly modernize the naming conventions without manual line-by-line inspection.
- Educational Tooling: Junior developers can utilize this skill to learn patterns for writing more semantic and readable code, helping them understand why specific names are preferred over others in professional software engineering.
- Large Refactors: When renaming a variable that is used throughout a massive codebase, identifying the best target name is crucial to prevent confusion.
Example Prompts
- "OpenClaw, please analyze my ./src/auth.ts file and suggest better variable names for all the temporary flags I used there."
- "Use naming-gen to audit the directory ./src/services and highlight any function names that are too vague, like 'handler' or 'process'."
- "Run the naming-gen skill on my current project and output the suggestions in a checklist format so I can track my refactoring progress."
Tips & Limitations
- Start Small: Focus on fixing the 'worst offenders'—the variables named 'temp', 'data', or 'result' first. These provide the highest immediate gain in readability.
- Consider Context: Remember that names are contextual. A short name like 'i' is perfectly acceptable for a loop index, while a complex object passed across several modules deserves a descriptive, multi-word name.
- Consistency is Key: Use this tool to enforce a consistent naming schema across your team. If the tool suggests 'customer' instead of 'user', update your documentation to match.
- Limitations: While the tool is highly effective at identifying candidates for renaming, always perform a quick mental check or run your test suite after applying suggestions. Automated tools are powerful, but human oversight remains essential for architectural changes.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-lxgicstudios-naming-gen": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-read, file-write
Related Skills
script-gen
Generate package.json scripts with AI. Use when setting up npm scripts.
email-template-gen
Generate responsive email templates. Use when building transactional emails.
branch-namer
Generate descriptive git branch names from plain English. Use when you need a branch name that follows conventions.
cloudflare-gen
Generate Cloudflare Workers configuration and code. Use when building on the edge.
adr-writer
Generate Architecture Decision Records with AI. Use when documenting technical decisions.