coding.make_function_private
SkillFiles & storageIdentify private / public functions in a file and rename them with an underscore or not
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the coding.make_function_private skill
What this skill tells your AI
The instructions your AI receives, as published by causify-ai/helpers in .claude/skills/coding.make_function_private/SKILL.md and read by ahel’s review.
For each function <FUNC> in the passed Python file <FILE>, determine if it
should be private or public by checking if it's called by Python files or
Jupyter notebooks outside <FILE>
Definition: 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 that test the target module, since a function is private even if it's called by a test files
- Including:
-
Note: Functions that form the public API of a library module should be PUBLIC, even if they're not called from a
__main__entry point. If a module exports utility functions for use by other scripts in the package, those are PUBLIC functions
Private Functions
-
If the function
<FUNC>is not called by any external file, then it should be a private function and should be renamed and prepended with a_- E.g.,
def function->def _function - Include only internal utility functions, helpers, and implementation details
- E.g.,
-
Modify all the callers of the function
<FUNC>to use the new name -
Example: Private Functions
# lib_helper.py def public_function(): _internal_helper() # Only called within this file → should be private def _internal_helper(): pass
Public Functions
-
If the function
<FUNC>is called by external files, then it should be a public function and its name should NOT start with_- This includes functions in shared utility modules called by sibling scripts
-
Modify all callers (both external and internal) of the function to use the new name
-
Example: Public Functions
# lib_notes_to_pdf.py def preprocess_notes(file_name, prefix): # Called by notes_to_pdf.py → PUBLIC _internal_step_1(file_name) # Private helper def _internal_step_1(file_name): # Only used within lib_notes_to_pdf.py → PRIVATE pass
Workflow
- Find all functions in
<FILE> - For each function, search the entire codebase for external calls:
grep -r "<FUNC>" --include="*.py" --include="*.ipynb" --exclude="test_*.py" - Classify as public or private based on external usage
- Rename functions and update all call sites (both files)
- Verify changes
Verification
- Grep in the entire codebase to confirm all function 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
Signals
- GitHub stars
- 145
- Forks
- 159
- Last commit
- Sep 2026
Advanced
- Catalog kind
- skill
- Gateway key
coding-make-function-private- Source
- github.com/causify-ai/helpers