shared-libraries

shared-libraries is a cursor rule for Cursor from kubev2v/forklift-console-plugin. It costs 16 tokens per session (2,762 once invoked), scanned A, original, Apache-2.0.

A set of shared Go libraries used by Forklift controllers, including status conditions, inventory containers, a file-backed database, itineraries, and references. Forklift controllers are software components that manage resources through a common framework.

In plain words
What is it for?
It helps developers use the shared condition framework, inventory and database containers, itinerary handling, and reference utilities when building Forklift controllers.
Why use it?
It gives related controllers common building blocks and consistent ways to represent resource status and other shared data.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit It helps developers use the shared condition framework, inventory and database containers, itinerary handling, and reference utilities when building Forklift controllers.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/kubev2v/forklift-console-plugin/shared-libraries
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.

Clone the repo
git clone --depth 1 https://github.com/kubev2v/forklift-console-plugin

Made for: Cursor.

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 shared-libraries

README.md
[![agentmods](https://agentmods.dev/badge/rules/kubev2v/forklift-console-plugin/shared-libraries/github.svg)](https://agentmods.dev/rules/kubev2v/forklift-console-plugin/shared-libraries)
Your own site
<a href="https://agentmods.dev/rules/kubev2v/forklift-console-plugin/shared-libraries"><img src="https://agentmods.dev/badge/rules/kubev2v/forklift-console-plugin/shared-libraries/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for shared-libraries

Your own site · 80×15
<a href="https://agentmods.dev/rules/kubev2v/forklift-console-plugin/shared-libraries"><img src="https://agentmods.dev/badge/rules/kubev2v/forklift-console-plugin/shared-libraries.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 16 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,762 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00016 $0.02762
Opus 5.5 $0.00006 $0.01105
Sonnet 5.5 $0.00003 $0.00552
Haiku 4.5 $0.00002 $0.00276

Measured 29d ago against content hash 81b0d7bc8a70, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

shared-libraries 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 29d 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.

.cursor/rules/backend/infrastructure/shared-libraries.mdc · 333 lines

How it starts

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

Shared Libraries (pkg/lib)

Analyzed from commit: baf9c7bcc307ed9358ad59886a5536366a050012 on 2026-09-17 Source paths: pkg/lib/

Package Purpose

pkg/lib/ is the shared Go library forked from konveyor/controller v0.11.0. Every Forklift controller, inventory collector, and REST handler depends on these packages for status conditions, inventory persistence, migration itineraries, cross-resource reference tracking, structured logging, and error wrapping. Understanding these patterns is prerequisite to reading any controller code.


Key Types and Structs

Condition (pkg/lib/condition)

type Condition struct {
    Type               string   // e.g. "Ready", "ReconcileFailed"
    Status             string   // "True" or "False"
    Category           string   // Critical, Error, Warn, Required, Advisory, ...
    Reason             string
    Message            string
    Suggestion         string
    LastTransitionTime v1.Time
    Durable            bool     // survives staging sweeps
    Items              []string // referenced in Message
    staged             bool     // internal: set this reconcile cycle
}

type Conditions struct {
    List    []Condition
    staging bool
    explain Explain
}

Built-in types: ReconcileFailed, Ready. Built-in categories: Critical, Error, Warn, Required, Advisory, plus pending-state categories ValidatingVDDK, VMMissingGuestIPs, VMMissingChangedBlockTracking, SharedDisks.

Itinerary (pkg/lib/itinerary)

type Step struct {
    Name string
    All  Flag   // ALL predicate flags must be true
    Any  Flag   // ANY predicate flag must be true
}

type Itinerary struct {
    Pipeline
    Predicate
    Name string
}

type Progress struct {
    Completed int64
    Total     int64
}

Inventory container (pkg/lib/inventory/container)

type Container struct {
    content map[Key]Collector  // Key = ObjectReference (Kind + UID)
}

type Collection struct {
    Stored   fb.Iterator
    Tx       *model.Tx
    Shepherd Shepherd
    Added, Updated, Deleted int
}

Read the full file on GitHub · 333 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. 29d ago Changed · -67 lines 81b0d7bc8a70
  2. 1mo ago First seen · 400 lines · 16 tokens per session scan A 5d620f30e967

Subscribe to this mod's changes

shared-libraries is a cursor rule published in the GitHub repository kubev2v/forklift-console-plugin (11 stars, last pushed today), licensed Apache-2.0. It adds 16 tokens to every session and 2,762 once invoked, about $0.0001 per session on Opus 5.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.