Extract Function — Development skill for Claude Code
Extract a code region into a well-named function and update the call site.
How to install Extract Function
Installs to ~/.claude/skills/imtiazrayhan-agentscamp-library-extract-function/SKILL.md
mkdir -p ~/.claude/skills/imtiazrayhan-agentscamp-library-extract-function && curl -fsSL https://raw.githubusercontent.com/imtiazrayhan/agentscamp-library/HEAD/commands/extract-function.md -o ~/.claude/skills/imtiazrayhan-agentscamp-library-extract-function/SKILL.md Restart Claude Code, or start a new session, for it to be picked up.
What Extract Function does
description: "Extract a code region into a well-named function and update the call site." argument-hint: "" allowed-tools: "Read, Grep, Glob, Edit"
Extract a region of code into a single, well-named function and replace the original code with a call to it. The result must behave exactly as before — this is a mechanical refactor, not a redesign.
Scope
Interpret `$ARGUMENTS` as the region to extract:
path/to/file.ts:40-72— extract those line numbe
Alternatives in Development
- Desloppify — Agent harness to make your slop code well-engineered and beautiful 3k ★
- Dive — Dive is an open-source MCP Host Desktop Application that seamlessly integrates with any LLMs supporting functi 1.8k ★
- OpenSquirrel — For people who get distracted by agents 1.3k ★
Full documentation available on GitHub
View Source RepositoryRelated Skills
Slide Figure Extractor
Extract figures from lecture slide PDFs and embed them into Anki flashcard Fronts. Detects the figure region o
Productize
Run Hormozi's Productized Objection Mapping (Mode 1). Turns every buyer objection into a named, tangible asset
Session Guidance V1
Prefer concrete adapter function calls when a registered adapter is loaded in the current tools[] list. A conc
Accuracy Read Issue
Accuracy-scout step 1 — parse issue body and extract all file:line and function name claims
Decapsulate
Dissolve the selected function into its call sites
Extract Entities
Extract named entities (people, orgs, locations) from text
Related Agents
Build Worker
Sonnet-tier worker for everyday coding subtasks: implement a well-specified function or component, fix a descr
Abstraction Hunter
Tests every symbol a diff introduces — function, class, wrapper, module, option, dependency — against its call
Edit Applier
Applies one fully specified mechanical transformation to an explicit, exclusively assigned file set. Writable.