Extract function

From berkcangumusisik/claude-code-practices · View interactive version

Extract function is an AI agent skill from the GitHub repository berkcangumusisik/claude-code-practices. Extracts a code block into a named function with proper types and tests

How to use this skill

Skill file

Extract Function

File: $1

Lines: $2

  1. Read the file, locate the specified lines.
  1. Analyze the block:
  1. Propose a function name that describes what it does (verb phrase).
  1. Show the extracted function with:
  1. Ask for confirmation, then:
  1. Note if this function would be useful elsewhere in the codebase.
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.