Vibe Code Leaf Finder logo

Vibe Code Leaf Finder

Community
gnurio
vibe-code-leaf-finder

This skill should be used when a user wants to identify which parts of a codebase are safe to modify with AI ("vibe code") and which require careful human engineering. It classifies files and modules into Leaf (safe to vibe), Branch (caution), or Trunk (hands off) based on dependency isolation, stability, and external verifiability. Use when users say "find safe places to vibe code", "where can I let AI loose in this repo", "leaf nodes", "vibe-code audit", "can a PM edit this codebase", or when someone points at a directory and asks whether it's safe to let Claude rewrite it. Grounded in Erik Schluntz's (Anthropic) "leaf nodes vs trunks" framework from the "Vibe coding in prod" talk.

Overview

Publishergnurio
Repositorynurijanian-skills
Skill namevibe-code-leaf-finder
Stars
127
Forks
9
Bundled files
2
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 2 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by gnurio on GitHub. Read the source before you install it.

Installation

Install the Vibe Code Leaf Finder AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/gnurio/nurijanian-skills/tree/main/skills/vibe-code-leaf-finder
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/gnurio/nurijanian-skills.git /tmp/nurijanian-skills
mkdir -p .claude/skills
cp -r /tmp/nurijanian-skills/skills/vibe-code-leaf-finder .claude/skills/vibe-code-leaf-finder
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Vibe Code Leaf Finder in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Vibe Code Leaf Finder on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Vibe Code Leaf Finder is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Vibe Code Leaf Finder

Purpose

Classify every part of a codebase by risk-to-modify-with-AI, producing a report that tells the user where AI can write freely (leaves), where it needs guardrails (branches), and where humans must stay in the loop (trunks).

Based on Erik Schluntz's framing from "Vibe coding in prod" (Anthropic, 2025): tech debt is acceptable in leaf nodes because nothing depends on them, but trunks and branches are core architecture that must be "protected, deeply understood, extensible, and flexible."

Full framework quotes and rationale: references/schluntz-framework.md.

When to Use

Trigger this skill when the user:

  • Points at a codebase or directory and asks where it's safe to use AI.
  • Wants a report of "leaf nodes" vs "trunks" before a vibe-coding session.
  • Is a PM, founder, or non-engineer who wants to ship features without breaking core architecture.
  • Says phrases like: "vibe-code audit", "leaf finder", "where can I let Claude loose", "which files are safe to rewrite", "can a PM edit this".

Do NOT use this skill for: general code review, bug hunting, or performance audits. This skill only answers one question — "where is it safe to let AI write this code without human review of every line?"

Workflow

Execute these four checks against the target scope. If no scope is given, ask the user once: "Scope this to a directory, a package, or the whole repo?"

Step 1: Dependency Check (outward edges)

For each file in scope, find every place outside the file (and outside the scope directory if scoped) that imports or references it.

Use ripgrep, not grep. Search for:

  • Import statements: from <module>, import <module>, require('<path>'), from '<path>'
  • Symbol references: exported class names, exported function names
  • String references: dynamic imports, module registries, route tables

Record, for each file: a list of external referrers. Zero referrers = candidate leaf.

Step 2: Isolation Check (inward edges)

For each candidate leaf from Step 1, confirm it is also a pure consumer not a provider:

  • Does it register anything globally (plugins, middleware, migrations, event handlers, cron jobs)?
  • Does it write to shared state (singletons, global config, shared DB schema)?
  • Does it expose a public API surface (HTTP routes, SDK exports, CLI commands)?

A file with zero external importers but that registers a middleware or a route is NOT a leaf — it is a hidden trunk. Flag these as BRANCH.

Step 3: Stability Check (time axis)

For each remaining leaf candidate, inspect git history:

bash
git log --follow --oneline --since="12 months ago" -- <file>
git log --follow --stat -- <file> | head -40

Signals of a true leaf (end-feature, unlikely to grow):

  • Low commit frequency after initial creation.
  • Commits are bugfixes or copy changes, not structural refactors.
  • File has no TODO, FIXME, or HACK comments pointing to future expansion.
  • No recent PR descriptions mention building on top of it.

Signals of a hidden trunk:

  • High commit churn.
  • Frequent "refactor", "extract", "split" commits.
  • Comments like "temporary", "will move", "refactor soon".

Step 4: Testability Check (verification axis)

This is the Schluntz test: can you verify this feature works without reading the implementation?

For each leaf candidate, answer:

  • Does it have clear, observable inputs and outputs (HTTP request → response, CLI args → stdout, form input → rendered DOM)?
  • Can you write an end-to-end test that exercises it from outside?
  • Can a non-engineer verify the behavior by using the product?

If no to any of these: downgrade to BRANCH.

Step 5: Classify and Report

Classify every file in scope as one of:

ClassDefinitionAI Strategy
LEAFZero external deps, no registrations, stable git history, externally verifiableVibe code freely. Claude writes, human runs tests, ships.
BRANCHLeaf-like but with 1-2 of: light external refs, some registrations, moderate churnAI can draft, human reviews structural decisions only.
TRUNKImported by many files, registers globally, high churn, OR no external test surfaceHuman writes. AI may suggest, human writes every line.

Then for each LEAF, propose Schluntz-style stress tests — 3 end-to-end tests minimum (one happy path, two failure modes) that verify behavior without reading the implementation.

Write output to LEAF_REPORT.md using the template in assets/LEAF_REPORT_TEMPLATE.md. Use the Write tool, not Shell echo.

Output Contract

Every run produces:

  1. A table: every file in scope classified LEAF / BRANCH / TRUNK with one-line reasoning.
  2. A Safe to Vibe section listing LEAF files with suggested stress tests per file.
  3. A Hands Off section listing TRUNK files with the blocking reason (who imports them, what they register, what churns).
  4. A Caution section listing BRANCH files with the specific guardrail needed.

If the user is non-technical (PM, founder), add a plain-English summary at the top: "You can safely ask Claude to edit these N files. Do not let Claude touch these M files without an engineer present."

Anti-Patterns

Do NOT:

  • Classify a file as LEAF just because it has zero imports inside the scope. External imports from outside the scope still count.
  • Rely on filename patterns (e.g. "utils.py always = trunk"). Check actual dependencies.
  • Skip the stability check. A file with zero deps today that had 40 commits last quarter is a hidden trunk mid-extraction.
  • Suggest stress tests that require reading the implementation. Tests must be writable from the outside.
  • Produce the report without running rg / git log — hallucinated classifications destroy trust.

Edge Cases

  • Monorepo: If scope crosses package boundaries, treat each package as its own scope and produce one report per package.
  • Generated code: Auto-generated files (protobuf, GraphQL schemas, migrations) are always TRUNK regardless of deps. Flag and skip.
  • Config files: .env, config.yaml, infra-as-code — always TRUNK.
  • Tests: Test files themselves are LEAF by definition (nothing depends on them). Don't classify test files; report them separately as "test coverage context".
  • Empty repo or single-file project: Skip classification, return: "Not enough structure to classify. Entire file is either leaf or trunk depending on who will call it."

Resources

  • references/schluntz-framework.md — source quotes, framework definitions, rationale. Read this before running the workflow if unfamiliar with the leaf/trunk model.
  • assets/LEAF_REPORT_TEMPLATE.md — the exact report format to produce. Copy and fill in.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Vibe Code Leaf Finder AI skill do?

This skill should be used when a user wants to identify which parts of a codebase are safe to modify with AI ("vibe code") and which require careful human engineering. It classifies files and modules into Leaf (safe to vibe), Branch (caution), or Trunk (hands off) based on dependency isolation, stability, and external verifiability. Use when users say "find safe places to vibe code", "where can I let AI loose in this repo", "leaf nodes", "vibe-code audit", "can a PM edit this codebase", or when someone points at a directory and asks whether it's safe to let Claude rewrite it. Grounded in Er...

Why use Vibe Code Leaf Finder on TypingMind?

Because you install it once and use it with any model. Vibe Code Leaf Finder is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Vibe Code Leaf Finder in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/gnurio/nurijanian-skills/tree/main/skills/vibe-code-leaf-finder. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Vibe Code Leaf Finder?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Vibe Code Leaf Finder?

As many as you like. As long as a model supports skills, you can use Vibe Code Leaf Finder with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Vibe Code Leaf Finder AI skill free?

Yes. It is published on GitHub by gnurio under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇