ask-python-refactor

<critical_constraints> ❌ NO refactoring without tests first ❌ NO single-letter variables (n, x) → use descriptive names ❌ NO functions >20 lines → extract smaller functions ✅ MUST run tests after every change ✅ MUST commit frequently for easy rollback </critical_constraints>

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "ask-python-refactor" with this command: npx skills add navanithans/agent-skill-kit/navanithans-agent-skill-kit-ask-python-refactor

<critical_constraints> ❌ NO refactoring without tests first ❌ NO single-letter variables (n, x) → use descriptive names ❌ NO functions >20 lines → extract smaller functions ✅ MUST run tests after every change ✅ MUST commit frequently for easy rollback </critical_constraints>

<code_smells>

  • Duplicated code → extract to shared function

  • Long parameter lists → group into dataclass

  • Deep nesting → use early returns/guard clauses

  • Magic numbers → replace with named constants </code_smells>

Type Hints

def get_user(user_id: int) -> Optional[User]: return db.find(user_id)

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

ask-explaining-code

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

ask-code-reviewer

No summary provided by upstream source.

Repository SourceNeeds Review
Automation

ask-shadcn-architect

No summary provided by upstream source.

Repository SourceNeeds Review