Coding.Make Function Private
БесплатноБез исполняемых скриптовНе проверенIdentify private or public functions in a file and rename with underscore
от gpsaggese★ 158 звёзд на GitHubОб этом скилле
Goal
For each function <FUNC> in the passed Python file <FILE>, decide if it is
private or public by checking whether Python files or Jupyter notebooks outside
<FILE> call it.
Plan Only (--only_plan)
- With
--only_plan, follow.claude/skills/skill.rules.mdsection "Create Only a Plan with--only_plan" - Write the plan to
coding.make_function_private.<INPUT_REF>.md, then stop without executing the skill
Conventions
- Follow
## Mark Private Functionsin.claude/skills/coding.rules.md
Definitions
External Files
External files = any Python file or Jupyter notebook outside the target file
- Including:
- Sibling scripts in the same package (e.g.,
notes_to_pdf.pycalling functions fromlib_notes_to_pdf.py) - Parent/sibling modules that import from the target
- CLI entry point scripts
- Sibling scripts in the same package (e.g.,
- Excluding:
- Test files of the target. A function stays private even if a test calls it
- Including:
Note: Functions in a library module's public API are PUBLIC, even if no
__main__entry point calls them. Utilities that other scripts in the package import are PUBLIC too
Private Functions
If
<FUNC>is not called by any external file, it is private: rename it with a_prefix- E.g.,
def function->def _function - Include only internal utilities, helpers, and implementation details
- E.g.,
Update all callers of
<FUNC>to the new nameGood (only called within its own file, so renamed private)
# lib_helper.py def public_function(): _internal_helper() # Only called within this file, so private. def _internal_helper(): pass
Public Functions
If
<FUNC>is called by external files, it is public: its name must not start with_- This includes functions in shared utility modules that sibling scripts call
Update all callers, external and internal, to the new name
Good (called by an external file, so it stays public)
# lib_notes_to_pdf.py def preprocess_notes(file_name, prefix): # Called by notes_to_pdf.py, so public. _internal_step_1(file_name) # Private helper. def _internal_step_1(file_name): # Only used within lib_notes_to_pdf.py, so private. pass
Workflow
Find All Functions
- Find all functions in
<FILE>
Search for External Calls
- For each function, search the whole codebase:
grep -r "<FUNC>" --include="*.py" --include="*.ipynb" --exclude="test_*.py"
Classify and Rename
- Classify each function as public or private from its external usage
- Rename functions and update all call sites (in both files)
- Verify the changes
Verification
-
--only_plan(check only this item): the plan is incoding.make_function_private.<INPUT_REF>.mdin the current dir, has theGenerated byline, and nothing was executed - Grep the entire codebase to confirm all calls were renamed correctly
bash grep -r "old_name\|new_name" --include="*.py" --include="*.ipynb" - Run pyright to verify type correctness of modified function invocations
- Run unit tests for the modified files to ensure nothing broke
Установить Coding.Make Function Private в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл Coding.Make Function Private?
Identify private or public functions in a file and rename with underscore
Как установить скилл Coding.Make Function Private?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл Coding.Make Function Private запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic