Helps you spot multi-purpose routines and refactor them into single-responsibility units.
The material indicates a prompt/document-only open-source skill with no required secrets, no declared remote endpoints, and no evident local execution or data-access capabilities, so overall risk is low. The main uncertainties are low community adoption, no declared license, and unknown maintenance status, but the available facts do not justify a high-risk rating.
The material explicitly states that no keys or environment variables are required; as a prompt-only skill, there is no visible path for credential collection, storage, or abuse.
No remote endpoints are declared, and the system flags it as prompt-only; the material shows no indication of sending user data to external services.
The skill content is guidance and examples about code design principles, with no indication that it launches local processes, executes scripts, or invokes system capabilities.
The material does not declare file read/write, local resource access, or user-data handling; it appears to be a static methodology prompt without data permissions.
It comes from an open-source GitHub repository, which is a positive factor because the source is auditable; however, no license is declared, community adoption is 0 stars, and maintenance status is unknown, so sustainability and supply-chain transparency warrant caution.
Copy the install command and let the AI configure it · recommended for beginners
Please install the "Keeping Routines Focused" skill from askskill: 1. Download https://raw.githubusercontent.com/obra/clank/main/skills/coding/keeping-routines-focused/SKILL.md 2. Save it as ~/.claude/skills/keeping-routines-focused/SKILL.md 3. Reload skills and tell me it's ready
Review the code below, identify the different responsibilities mixed into one function, and provide a refactoring plan with example code based on the single responsibility principle.
Identifies multiple responsibilities in the function and provides a split design with refactored code examples.
Review these routines for maintainability, determine which ones do more than one thing, and explain how to extract them into more focused smaller routines.
Provides a list of problematic routines, responsibility breakdowns, and recommended extraction approaches.
Analyze this module using the principle that each routine should do one thing well, and produce an actionable refactoring checklist prioritized by impact.
Returns a prioritized refactoring checklist to improve code focus and readability step by step.
A routine should do ONE thing and do it well. This is called functional cohesion - the strongest, best kind of cohesion.
Core principle: If a routine's description contains "and", it's doing too many things. Extract into focused routines.
Goal: Improve intellectual manageability. The more focused a routine, the easier to understand, test, modify, and reuse.
Proactively (writing new code):
Reactively (improving existing code):
Warning signs routine needs focus:
One thing means one level of abstraction:
✅ Does one thing:
def calculate_total_price(items, tax_rate):
"""Calculate total price of items including tax."""
subtotal = sum(item.price * item.quantity for item in items)
tax = subtotal * tax_rate
return subtotal + tax
Single purpose: price calculation. All statements at same abstraction level (arithmetic).
❌ Does multiple things:
def handle_order(order_data, user_id):
"""
Process order:
- Validate order data
- Calculate total with tax
- Apply discount codes
- Check inventory
- Create order record
- Send confirmation email
- Update user history
- Return confirmation
"""
validated = validate_order_data(order_data, user_id) # Thing 1
subtotal = calculate_subtotal(validated["items"]) # Thing 2
discount = apply_discount(subtotal, validated.get("discount_code")) # Thing 3
tax = calculate_tax(subtotal - discount, validated["tax_rate"]) # Thing 4
total = subtotal - discount + tax # Thing 5
check_inventory(validated["items"]) # Thing 6
order_record = create_order_record(...) # Thing 7
send_confirmation_email(...) # Thing 8
update_user_history(user_id, order_record["order_id"]) # Thing 9
return {...} # Thing 10
Description has 8 "and"s. Does 10 different things. Violates single responsibility.
Group related statements, extract into focused routine:
Before (orchestrator does everything):
def handle_order(order_data, user_id):
# Validation (lines 1-10)
validated = validate_order_data(order_data, user_id)
# Pricing (lines 11-15)
subtotal = calculate_subtotal(validated["items"])
discount = apply_discount(subtotal, validated.get("discount_code"))
tax = calculate_tax(subtotal - discount, validated["tax_rate"])
total = subtotal - discount + tax
# Inventory (lines 16-20)
check_inventory(validated["items"])
# Persistence (lines 21-30)
order_record = create_order_record(...)
# Notifications (lines 31-35)
send_confirmation_email(...)
update_user_history(user_id, order_record["order_id"])
return {...}
After (each phase is focused routine):
def handle_order(order_data, user_id):
"""Single responsibility: Orchestrate order processing."""
validated_order = validate_order_request(order_data, user_id)
pricing = calculate_order_pricing(validated_order)
verify_inventory_available(validated_order)
order = create_and_save_order(validated_order, pricing, user_id)
…
Write evergreen comments focused on what and why, not historical context.
Compare 2-3 approaches before execution to choose a stronger solution.
Plan with pseudocode first, refine approaches, then translate into working code.
Search past Claude Code chats to recover facts, decisions, and context.
Design systems by hiding implementation details behind domain-level interfaces.
Name code by domain meaning to improve clarity and team alignment.
Improve code clarity and maintainability by assigning each variable one purpose.
Help developers simplify nested conditionals for clearer, more maintainable code.
Helps developers keep class abstractions cohesive and free of unrelated responsibilities.
Extract shared principles from skills and turn them into maintainable rule files.
Capture and reuse codebase learnings to avoid repeating implementation and review mistakes.
Research, plan, and execute large code changes with parallel PR-producing agents.