coding.make_function_private

A Python function-visibility review that decides whether each function is public or private based on calls from other project files.

In plain words
What is it for?
Use it to add an underscore to internal functions that are not used outside their file and leave externally used functions public.
Why use it?
It prevents internal helper functions from looking like part of a module's usable interface, while keeping library functions available to other code.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/causify-ai/helpers/coding.make_function_private
Any agent
npx skills add causify-ai/helpers --skill coding.make_function_private
Clone the repo
git clone --depth 1 https://github.com/causify-ai/helpers

Made for: Claude Code, Codex.

Per session 16 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 715 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00016 $0.00715
Opus 5 $0.00008 $0.00358
Sonnet 5 $0.00003 $0.00143
Haiku 4.5 $0.00002 $0.00072

Measured 2d ago against content hash 90871acf0e16, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

coding.make_function_private scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/coding.make_function_private/SKILL.md · 79 lines

How it starts

The opening of the file, as written. The whole thing — 79 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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.py calling functions from lib_notes_to_pdf.py)
      • Parent/sibling modules that import from the target
      • CLI entry point scripts
    • Excluding
      • Test files that test the target module, since a function is private even if it's called by a test files
  • 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
  • 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
    

Read the full file on GitHub · 79 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 79 lines · 16 tokens per session scan A 90871acf0e16

Subscribe to this mod's changes

coding.make_function_private is a skill published in the GitHub repository causify-ai/helpers (145 stars, last pushed 2d ago), licensed Apache-2.0. It adds 16 tokens to every session and 715 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

babysit-pr

Babysit a GitHub pull request after creation by continuously polling review comments, CI checks/workflow runs, and mergeability state until the PR is merged/closed or user help is required. Diagnose failures, retry likely flaky failures up to 3 times, auto-fix/push branch-related issues when appropriate, and keep…

openai/codex · 114 tokens

imagegen

Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output…

openai/codex · 113 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens