Coding.make function private

From gpsaggese/helpers · View interactive version

Coding.make function private is an AI agent skill from the GitHub repository gpsaggese/helpers. Identify private or public functions in a file and rename with underscore

How to use this skill

Skill file

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.

Conventions

Definitions

External Files

file

functions from lib_notes_to_pdf.py)

__main__ entry point calls them. Utilities that other scripts in the package

import are PUBLIC too

Private Functions

_ prefix

```python

# lib_helper.py

def public_function():

_internal_helper() # Only called within this file, so private.

def _internal_helper():

pass

```

Public Functions

with _

```python

# 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

Search for External Calls

```bash

grep -r "<FUNC>" --include=".py" --include=".ipynb" --exclude="test_*.py"

```

Classify and Rename

Verification

```bash

grep -r "old_name\|new_name" --include=".py" --include=".ipynb"

```

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.