lineage

lineage is an agent for Claude Code from Ramilito/kubectl.nvim. It costs 29 tokens per session (2,365 once invoked), scanned A, original, Apache-2.0.

A specialist for showing relationships between Kubernetes resources in a lineage tree or graph. Kubernetes is a system for running and managing containerised applications.

In plain words
What is it for?
Use it to change lineage views, owner-reference traversal, graph building, filtering, caching, refresh behaviour, or DOT and Mermaid exports.
Why use it?
Resource ownership and dependencies can be difficult to follow when many Kubernetes objects are involved. This specialist helps with relationship traversal, orphan detection, impact analysis, and lineage display.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter; mentions subagents.

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 agents/ramilito/kubectl.nvim/lineage
Clone the repo
git clone --depth 1 https://github.com/Ramilito/kubectl.nvim

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for lineage

README.md
[![agentmods](https://agentmods.dev/badge/agents/ramilito/kubectl.nvim/lineage.svg)](https://agentmods.dev/agents/ramilito/kubectl.nvim/lineage)
Your own site
<a href="https://agentmods.dev/agents/ramilito/kubectl.nvim/lineage"><img src="https://agentmods.dev/badge/agents/ramilito/kubectl.nvim/lineage.svg" alt="Measured on agentmods" height="20"></a>
Per session 29 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,365 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.1 $0.00029 $0.02365
Opus 5 $0.00015 $0.01182
Sonnet 5 $0.00006 $0.00473
Haiku 4.5 $0.00003 $0.00236

Measured yesterday against content hash 1ebc752517f1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

lineage 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 yesterday.

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/agents/lineage.md · 217 lines

How it starts

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

Lineage Feature Guidance

ALWAYS use this subagent for ANY task involving:

  • Resource lineage display or tree visualization
  • Owner reference traversal
  • Relationship definitions between K8s resources
  • Orphan detection and filtering
  • Impact analysis
  • Export (DOT/Mermaid)
  • Lineage cache loading or refresh

For general Lua patterns or Neovim API usage, use the lua subagent.

Delegation Rules

Delegate to rust subagent for:

  • Adding tracing/instrumentation to Rust code
  • Telemetry or logging changes
  • Any cross-cutting Rust concerns not specific to lineage logic

File Map

Lua (lua/kubectl/views/lineage/)

File Responsibility
init.lua Orchestrator — View lifecycle, Draw dispatch, state machine, progress timer, folding. Thin layer that delegates data ops to graph.lua and rendering to renderer.lua
graph.lua Data pipeline — Facade for fetch → process → build. Owns processRow, collect_all_resources, build_graph_async, and load_and_build. Uses commands.run_async / commands.await_all
definition.lua Static metadata only — resource name, ft, hints, panes, find_resource_name()
renderer.lua RenderingRenderContext builder class, render functions for each phase (status, header, tree, orphans, error)
actions.lua User actionsgo_to_resource, impact_analysis (floating buffer), export (DOT/Mermaid, table-driven format dispatch)
mappings.lua Keybindings — Uses with_graph_node(fn) decorator for callbacks needing graph+cursor validation

Rust (kubectl-client/src/lineage/)

File Responsibility
builder.rs FFI entry points — build_lineage_graph_worker, get_lineage_related_nodes, export/impact/orphan functions. Stores trees in LINEAGE_TREES mutex
tree.rs Resource, RelationRef, EdgeType, Tree structs. Uses petgraph::DiGraph for the graph. Key methods: new, add_node, link_nodes
query.rs GraphQuery — traversal algorithms for related nodes, subgraph extraction, impact computation
relationships.rs extract_relationships(kind, item) — extracts dependency refs from resource JSON by kind
orphan_rules.rs Orphan detection rules and exceptions
resource_behavior.rs Resource-specific behavior traits
registry.rs Resource behavior registry
mod.rs Module exports and install() for Lua FFI registration

Read the full file on GitHub · 217 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. yesterday First seen · 217 lines · 29 tokens per session scan A 1ebc752517f1

Subscribe to this mod's changes

lineage is an agent published in the GitHub repository Ramilito/kubectl.nvim (537 stars, last pushed 22d ago), licensed Apache-2.0. It adds 29 tokens to every session and 2,365 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-09-04.

Related

Other agents, from other repositories

agentic-workflows

GitHub Agentic Workflows (gh-aw) - Create, debug, and upgrade AI-powered workflows with intelligent prompt routing.

meshery/meshery · 24 tokens

proto-rpc-reviewer

Use when reviewing changes to any .proto file under rpc/ or to the Go bindings generated from them. Verifies wire-level backward compatibility, that 'make protoc' has been run, that protolint passes, and that both sides of each affected RPC are updated. Surfaces incompatibilities that would break older clients, older…

telepresenceio/telepresence · 86 tokens

ark-security-patcher

Fix security vulnerabilities in Ark by researching CVEs, analyzing impact, proposing mitigations, implementing patches, and creating PRs. Use when the user reports CVE numbers or security issues that need fixing in Ark. Examples:\n\n- User: "Fix CVE-2025-55183 in Ark"\n Assistant: "I'll use the ark-security-patcher…

mckinsey/agents-at-scale-ark · 0 tokens

issue-tracker

Issues and PRDs for this repo live as GitHub issues. Use the gh CLI for all operations.

xiaods/k8e · 0 tokens

security-reviewer

Review security aspects including network policies, RBAC, IAM, secrets management, Cilium policies, and pod security.

Smana/cloud-native-ref · 26 tokens

overview

NVIDIA Dynamo adds agent-aware serving features without taking ownership of the agent loop: your harness still manages prompts, tools, subagents, and reasoning state, while Dynamo uses metadata attached to each LLM request to correlate work, improve routing and scheduling, manage KV cache behavior, and produce traces…

ai-dynamo/dynamo · 0 tokens