Simplifies and refines code for clarity, consistency, and maintainability while preserving all functionality. Focuses on recently modified code unless instructed otherwise.
80
76%
Does it follow best practices?
Impact
100%
1.00xAverage score across 3 eval scenarios
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./plugins/code-simplifier/skills/code-simplifier/SKILL.mdExpert code simplification focused on clarity, consistency, and maintainability while preserving exact functionality. Prioritizes readable, explicit code over overly compact solutions.
Never change what the code does — only how it does it. All original features, outputs, and behaviors must remain intact.
Follow established coding standards from the project's CLAUDE.md or equivalent, including:
function keyword over arrow functions)Avoid:
When invoked (either explicitly or proactively after code changes):
make check-style-fix or equivalent) to verify standards complianceBefore:
func process(items []Item) error {
if len(items) > 0 {
for _, item := range items {
if item.IsValid() {
if err := item.Save(); err != nil {
return err
}
}
}
}
return nil
}After:
func process(items []Item) error {
for _, item := range items {
if !item.IsValid() {
continue
}
if err := item.Save(); err != nil {
return err
}
}
return nil
}Before:
const label = status === 'active' ? 'Active' : status === 'pending' ? 'Pending' : status === 'error' ? 'Error' : 'Unknown';After:
function getStatusLabel(status: string): string {
switch (status) {
case 'active':
return 'Active';
case 'pending':
return 'Pending';
case 'error':
return 'Error';
default:
return 'Unknown';
}
}Before:
func handleRequest(r *Request) (*Response, error) {
userID := r.GetUserID()
if userID == "" {
return nil, errors.New("missing user ID")
}
channelID := r.GetChannelID()
if channelID == "" {
return nil, errors.New("missing channel ID")
}
teamID := r.GetTeamID()
if teamID == "" {
return nil, errors.New("missing team ID")
}
// ... rest of handler
}After:
func handleRequest(r *Request) (*Response, error) {
if err := validateRequiredFields(r); err != nil {
return nil, err
}
// ... rest of handler
}
func validateRequiredFields(r *Request) error {
required := map[string]string{
"user ID": r.GetUserID(),
"channel ID": r.GetChannelID(),
"team ID": r.GetTeamID(),
}
for name, value := range required {
if value == "" {
return fmt.Errorf("missing %s", name)
}
}
return nil
}mattermost/mattermost-ai-marketplace
b16652d
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.