Encapsulate — Development skill for Claude Code
Lift the selected text in the editor into its own function.
How to install Encapsulate
Installs to ~/.claude/commands/elibaumgardner-refactor-tools-encapsulate.md
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/EliBaumgardner/refactor-tools/HEAD/.claude/commands/encapsulate.md -o ~/.claude/commands/elibaumgardner-refactor-tools-encapsulate.md Restart Claude Code, or start a new session, for it to be picked up.
What Encapsulate does
description: Lift the selected text in the editor into its own function argument-hint: allowed-tools: Bash(refactor.encap:*), Read
Lift the text currently selected in the editor into a new function named `$ARGUMENTS`.
Resolve the range from the IDE selection: take its file, its start line and column and its end line and column, and make the path relative to the repo root. Columns are 1-based and both ends are inclusive, so the end column is the column of the last se
Alternatives in Development
- Dive — Dive is an open-source MCP Host Desktop Application that seamlessly integrates with any LLMs supporting functi 1.8k ★
- Claude Code Sub Agent Collective — 🧠 Context Engineering Research - Not just another agent collection, but using research and context engineerin 523 ★
- List Tools — List all available tools as TypeScript function prototypes with parameter and purpose comments 222 ★
Full documentation available on GitHub
View Source RepositoryRelated Skills
Decapsulate
Dissolve the selected function into its call sites
Nora Gal
Claude skill: Russian text editor using Nora Gal method (The Living and Dead Word); removes bureaucratese, fix
Sublime Claude Code
Claude Code IDE integration for Sublime Text 4 — in-editor diff review, live selection context, @-mentions. Sp
Sapwood Stop
Emergency-stop, trip/lift the kill switch, or pause/resume dispatch — three human-control tiers
Claude Flat Search
Searches Rightmove, Zoopla, OnTheMarket and OpenRent in a real browser and reads the listing prose for what th
Audio Browser
Launch the AgentVibes audio browser - browse, preview, and install TTS voices. Automatically switches AgentVib
Related Agents
Senior Editor
Use this agent to refine, polish, and perfect any piece of text. This agent is a master of grammar, style, and
Every Style Editor
Use this agent when you need to review and edit text content to conform to Every's specific style guide. This
Deal Editor
Drafts replacement contract language for a flagged clause. Produces ready-to-paste text in the contract's own