EliBaumgardner

Encapsulate — Development skill for Claude Code

Development community

Lift the selected text in the editor into its own function.

How to install Encapsulate

Installs to ~/.claude/commands/elibaumgardner-refactor-tools-encapsulate.md

Terminal
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 Repository