Token导航 LogoToken导航TokenDH.com
待分类执行命令github未标认证来源可访问clear审计通过

load-lifecycle-patterns加载生命周期模式

Agent Skill

load-lifecycle-patterns 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

306

周安装

13

GitHub Stars

4

下载量

107
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:load-lifecycle-patterns(加载生命周期模式)
来源仓库:https://github.com/linehaul-ai/linehaulai-claude-marketplace
仓库路径:skills/load-lifecycle-patterns
安装命令:
npx skills add https://github.com/linehaul-ai/linehaulai-claude-marketplace --skill load-lifecycle-patterns
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/linehaul-ai/linehaulai-claude-marketplace --skill load-lifecycle-patterns

简介

用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。

  • 适用于待分类任务场景,可结合来源仓库和原始 README 核验具体用法。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装,需确认权限范围和安装路径。
  • 建议在安装前确认维护状态、是否会触发联网或文件读写操作。
  • load-lifecycle-patterns 属于待分类类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Load Lifecycle Patterns - Business Logic for laneweaverTMS

When to Use This Skill

Use when:

  • Implementing load status transitions
  • Building billing workflow logic (POD, carrier bills, invoicing)
  • Calculating financial metrics (gross profit, margin, net profit)
  • Handling load cancellations and TONU scenarios
  • Implementing quick pay features for carriers
  • Understanding the "life of load" flow from tender to payment

Load Status Transitions

Status Lifecycle

uncovered → assigned → dispatched → at_origin → in_transit → at_destination → delivered

Valid Transitions Table

Current StatusValid Next StatusTrigger
uncoveredassigned, cancelledCarrier assignment or cancellation
assigneddispatched, uncovered, cancelledDispatch confirmation or carrier bounce
dispatchedat_origin, assigned, cancelledCarrier arrives or dispatch cancelled
at_originin_transit, cancelledPickup completed, load departs
in_transitat_destination, cancelledApproaching delivery destination
at_destinationdelivered, cancelledDelivery completed
delivered(terminal state)No further transitions
cancelled(terminal state)No further transitions

Transition Triggers

uncovered → assigned

  • Carrier is selected and rate is confirmed
  • carrier_id is set on the load
  • carrier_rate is established

assigned → dispatched

  • Carrier confirms pickup commitment
  • Driver information may be captured in load_cognition
  • Dispatch confirmation timestamp recorded

dispatched → at_origin

  • Carrier/driver arrives at pickup facility
  • Check-in time recorded on origin stop

at_origin → in_transit

  • Loading completed
  • Departure time recorded on origin stop
  • BOL (Bill of Lading) may be captured

in_transit → at_destination

  • Carrier approaching delivery facility
  • Optional: ETA updates via tracking

at_destination → delivered

  • Delivery completed
  • Delivery time recorded on destination stop
  • POD (Proof of Delivery) capture begins

Cancellation Rules

Cancellation can happen from ANY non-terminal status:

  • Creates a load_cancellations record
  • Sets loads.is_cancelled = true (synced via trigger)
  • Records cancellation reason and timestamp
  • If carrier was assigned, may trigger TONU (see below)
-- Example cancellation logic
INSERT INTO load_cancellations (load_id, reason, cancelled_by)
VALUES ($1, $2, $3);

-- Trigger auto-syncs is_cancelled flag:
UPDATE loads SET is_cancelled = true WHERE id = $1;

Billing Workflow

Post-Delivery Billing Flow

delivered → POD Received → Carrier Bill Received → Invoice Ready → Customer Invoiced → Carrier Paid

Billing Status Tracking

The load_billing table tracks billing milestones for each load:

FieldPurpose
pod_receivedProof of Delivery document received
pod_received_atTimestamp when POD was received
carrier_bill_receivedCarrier's invoice/rate confirmation received
carrier_bill_received_atTimestamp when carrier bill was received
invoice_readyGenerated column: pod_received AND carrier_bill_received

Invoice Ready Logic

A load is ready for customer invoicing when BOTH:

  1. POD is received (proof that delivery occurred)
  2. Carrier bill is received (final carrier charges confirmed)
-- Generated column auto-calculates invoice readiness
invoice_ready BOOLEAN GENERATED ALWAYS AS (pod_received AND carrier_bill_received) STORED

Customer Invoice Creation

After invoice_ready = true:

  1. Create customer_invoices record
  2. Link to load via load_id
  3. Include line items for:

- Base freight rate (customer_rate) - Customer accessorials - Fuel surcharges (if applicable)

  1. Set invoice_status to initial state

Carrier Bill Approval and Payment

After carrier bill is received:

  1. Review carrier charges against agreed rate
  2. Add carrier accessorials if applicable
  3. Approve or dispute discrepancies
  4. Schedule payment based on payment terms
  5. Handle quick pay if requested (see Quick Pay section)

Financial Calculations

Core Formulas

grossProfit    = customerRate - carrierRate
grossMarginPct = (grossProfit / customerRate) * 100
netProfit      = (customerRate + customerAccessorials) - (carrierRate + carrierAccessorials)

Calculation Examples

Basic Load:

Customer Rate: $2,500
Carrier Rate:  $2,000

Gross Profit:  $500
Gross Margin:  20%

Load with Accessorials:

Customer Rate:        $2,500
Customer Accessorials: $150 (detention, lumper)
Carrier Rate:         $2,000
Carrier Accessorials:  $100 (detention)

Revenue:      $2,650 ($2,500 + $150)
Cost:         $2,100 ($2,000 + $100)
Net Profit:   $550
Net Margin:   20.75%

Implementation Pattern

-- View for financial calculations
CREATE OR REPLACE VIEW public.loads_with_financials
WITH (security_invoker = on)
AS
SELECT
    l.id,
    l.load_number,
    l.customer_rate,
    l.carrier_rate,

    -- Gross profit (base rates only)
    (l.customer_rate - COALESCE(l.carrier_rate, 0)) AS gross_profit,

    -- Gross margin percentage
    CASE
        WHEN l.customer_rate > 0
        THEN ((l.customer_rate - COALESCE(l.carrier_rate, 0)) / l.customer_rate * 100)
        ELSE 0
    END AS gross_margin_pct,

    -- Accessorial totals
    (SELECT COALESCE(SUM(amount), 0)
     FROM customer_accessorials
     WHERE load_id = l.id AND deleted_at IS NULL) AS customer_accessorials_total,

    (SELECT COALESCE(SUM(amount), 0)
     FROM carrier_accessorials
     WHERE load_id = l.id AND deleted_at IS NULL) AS carrier_accessorials_total,

    -- Net profit (including accessorials)
    ((l.customer_rate + (SELECT COALESCE(SUM(amount), 0) FROM customer_accessorials WHERE load_id = l.id AND deleted_at IS NULL)) -
     (COALESCE(l.carrier_rate, 0) + (SELECT COALESCE(SUM(amount), 0) FROM carrier_accessorials WHERE load_id = l.id AND deleted_at IS NULL))) AS net_profit

FROM public.loads l
WHERE l.deleted_at IS NULL;

TONU (Truck Ordered Not Used)

What is TONU?

TONU occurs when a load is cancelled after a carrier has been assigned and has committed resources (dispatched driver, positioned truck, etc.).

When TONU Applies

TONU may be charged when:

  • Load is cancelled after carrier assignment (assigned or later status)
  • Cancellation is NOT due to carrier fault
  • Carrier has incurred costs (deadhead miles, driver time)

TONU Workflow

  1. Load Cancelled - User initiates cancellation after carrier assignment
  2. TONU Evaluation - Determine if TONU is warranted
  3. TONU Amount Set - Negotiate or apply standard TONU rate
  4. Record Created - load_cancellations record includes TONU details
  5. Customer Billing - TONU amount billed to customer
  6. Carrier Payment - TONU amount paid to carrier (minus margin if applicable)

Data Model

-- load_cancellations table captures TONU
CREATE TABLE public.load_cancellations (
    id UUID DEFAULT gen_random_uuid() NOT NULL,
    load_id UUID NOT NULL,
    reason TEXT,
    tonu_amount NUMERIC(10,2),  -- Amount charged for TONU
    cancelled_at TIMESTAMPTZ DEFAULT now() NOT NULL,
    cancelled_by INT4,
    -- ... audit columns
);

Business Rules

  • TONU is typically a flat fee (e.g., $250-$500)
  • May be a percentage of the agreed carrier rate
  • Should be documented in carrier agreements
  • Customer may dispute TONU charges
  • TONU still triggers customer invoice (for the TONU amount)

Quick Pay

What is Quick Pay?

Quick Pay is an accelerated payment option where carriers receive payment faster than standard terms (typically net 30) in exchange for a fee.

Quick Pay Terms

Standard TermsQuick Pay TermsTypical Fee
Net 301-2 days1-2% of payment
Net 451-2 days2-3% of payment

Data Model

-- carrier_bills table tracks quick pay requests
CREATE TABLE public.carrier_bills (
    id UUID DEFAULT gen_random_uuid() NOT NULL,
    load_id UUID NOT NULL,
    carrier_id UUID NOT NULL,
    bill_amount NUMERIC(10,2) NOT NULL,
    bill_status public.carrier_bill_status NOT NULL,

    -- Quick pay fields
    quick_pay_requested BOOLEAN DEFAULT false,
    quick_pay_fee_pct NUMERIC(5,2),  -- e.g., 2.00 for 2%
    quick_pay_fee_amount NUMERIC(10,2),

    scheduled_payment_date DATE,
    paid_at TIMESTAMPTZ,
    -- ... audit columns
);

Quick Pay Workflow

  1. Carrier Requests Quick Pay - Sets quick_pay_requested = true
  2. Fee Calculation - Calculate quick pay fee
  3. Net Payment - Deduct fee from carrier payment
  4. Expedited Processing - Move to front of payment queue
  5. Payment Execution - Pay within quick pay terms

Fee Calculation

Quick Pay Fee = Bill Amount * Quick Pay Fee Percentage
Net Payment   = Bill Amount - Quick Pay Fee

Example:

Bill Amount:      $2,000
Quick Pay Fee %:  2%
Quick Pay Fee:    $40
Net Payment:      $1,960

Implementation Notes

  • Index quick_pay_requested = true for efficient filtering
  • Track quick pay fee as revenue (margin improvement)
  • Quick pay is optional and carrier-initiated
  • Consider automated quick pay for preferred carriers

Related Tables Reference

Core Load Tables

TablePurpose
loadsCore load record with status, rates
tendersCustomer tender/order source
stopsPickup and delivery locations
load_billingPOD/carrier bill tracking, invoice ready

Cancellation & TONU

TablePurpose
load_cancellationsCancellation records with TONU amounts

Invoicing & Payment

TablePurpose
customer_invoicesCustomer invoices for loads
carrier_billsCarrier bills/invoices to pay
customer_accessorialsAdditional customer charges
carrier_accessorialsAdditional carrier charges

Business Logic Checklist

Load Status Management:
[ ] Validate status transitions against allowed transitions table
[ ] Record status change timestamps
[ ] Sync is_cancelled flag via trigger when load_cancellations inserted
[ ] Prevent invalid transitions (e.g., uncovered → delivered)

Billing Workflow:
[ ] Track POD receipt separately from carrier bill receipt
[ ] Use generated column for invoice_ready calculation
[ ] Create customer invoice only when invoice_ready = true
[ ] Link all billing records to load_id

Financial Calculations:
[ ] Always use NUMERIC(10,2) for money fields
[ ] Include accessorials in net profit calculations
[ ] Handle null carrier_rate (uncovered loads)
[ ] Calculate margin percentages safely (avoid division by zero)

TONU Handling:
[ ] Only apply TONU after carrier assignment
[ ] Record TONU amount in load_cancellations
[ ] Bill TONU to customer
[ ] Pay TONU to carrier (if applicable)

Quick Pay:
[ ] Carrier-initiated request only
[ ] Calculate fee based on agreed percentage
[ ] Deduct fee from carrier payment
[ ] Track as revenue/margin improvement

Remember: This skill focuses on business logic patterns. For database schema implementation details (columns, indexes, constraints), refer to the laneweaver-database-design skill.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

26.63%
按下载量换算28

Antigravity

21.45%
按下载量换算23

windsurf

19.62%
按下载量换算21

Codex

13.21%
按下载量换算14

OpenCode

7.02%
按下载量换算8

Gemini CLI

3.18%
按下载量换算3

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/linehaul-ai/linehaulai-claude-marketplace --skill load-lifecycle-patterns;npx skills add linehaul-ai/linehaulai-claude-marketplace --skill "load-lifecycle-patterns" 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills