specstar-clean-code

Reduce code complexity and maintainability issues in refactoring and review.

1|Updated Apr 18, 2026
One-click install
npx skills add https://github.com/primolabs-org/spec-star-go --skill specstar-clean-code
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: specstar-clean-code
Source: https://github.com/primolabs-org/spec-star-go/tree/main/.github/skills/specstar-clean-code
Command: npx skills add https://github.com/primolabs-org/spec-star-go --skill specstar-clean-code

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps improve code quality by reducing complexity, duplication, dead code, and confusing control flow without changing the intended architecture.

Core Features & Use Cases

  • Maintainable Refactoring: Split oversized functions, simplify branching, and remove unused parameters or locals.
  • Review Support: Check for naming issues, repeated literals, stale comments, and hidden dead code after changes.
  • Practical Use Case: Use it when a Go service or library needs cleanup before merge, especially after a feature addition or partial refactor.

Quick Start

Apply the specstar-clean-code skill to this codebase refactor and remove avoidable complexity while preserving behavior.

Frequently Asked Questions about specstar-clean-code

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I reduce cognitive complexity and clean up dead code in a Go repository?

To reduce cognitive complexity and clean up dead code in Go, apply refactoring rules that enforce guard clauses, parameter cleanup, and remove unused imports, locals, and artifacts without changing the intended architecture.

What does clean code refactoring do to simplify branching logic and oversized functions?

Clean code refactoring simplifies branching logic and splits oversized functions by enforcing cognitive complexity limits, controlling duplication, improving naming clarity, and removing unused parameters to improve maintainability.

How do I check for hidden dead code and naming issues during a code review?

To check for hidden dead code and naming issues during a code review, scan for repeated literals, stale comments, and unused locals after feature additions or partial refactors to ensure merge readiness.

Can I use this refactoring approach for Go services and libraries before a merge?

Yes, you can use this refactoring approach for Go services and libraries before a merge. It targets implementation and review work by removing avoidable complexity while preserving the original behavior.

What is the best way to remove duplicated code and confusing control flow without breaking architecture?

The best way to remove duplicated code and confusing control flow is to apply duplication control, guard clauses, and naming clarity rules that reduce complexity while preserving the intended architecture.

When should I not use clean code refactoring on my codebase?

You should avoid clean code refactoring when your goal is to change the intended architecture or add new features, as this approach specifically targets complexity, duplication, and dead code removal without altering behavior.