Skip to content

HamStudy/easypost-skill

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

EasyPost Skill

Agentic development skill for building, debugging, and extending integrations with the EasyPost shipping API.

Overview

This repository provides structured knowledge and runnable examples for working with EasyPost. It covers the full shipping workflow: addresses, parcels, rates, labels, customs, tracking, pickups, scan forms, batches, insurance, claims, reports, webhooks, and carrier-specific gotchas.

Repository Structure

This is a multi-skill repository. Each top-level directory represents an independent skill that can be used individually or together:

├── easypost-api/          # Core EasyPost API skill
│   ├── SKILL.md           # Skill definition and routing table
│   ├── references/        # Detailed reference documentation
│   └── scripts/           # Runnable Node.js examples
└── README.md              # This file

Skills

Skill Description
easypost-api Build, debug, and extend EasyPost shipping API integrations

Usage

As an Agent Skill

Load the skill directory into your agentic development environment. The SKILL.md file in each skill directory provides the entry point, routing table, and conventions.

Running Examples

The easypost-api/scripts/ directory contains runnable Node.js examples:

cd easypost-api
npm install @easypost/api

# Set your API key
export EASYPOST_API_KEY="your_test_key_here"

# Run an example
node scripts/create-shipment.mjs

Available Scripts

  • create-shipment.mjs — Address → parcel → shipment → buy lowest rate → save label PDF
  • verify-address.mjs — Address verification with createAndVerify
  • international-shipment.mjs — Customs info + items + shipment with tax identifier
  • track-shipment.mjs — Create tracker, poll status
  • webhook-handler.mjs — Express endpoint using client.Utils.validateWebhook
  • batch-buy.mjs — Create batch, add shipments, purchase, generate combined label
  • schedule-pickup.mjs — Create pickup, buy cheapest pickup rate
  • smartrate-deliver-by.mjs — Pick cheapest rate meeting a delivery deadline

Key Principles

  1. Always use a test API key during development. Production keys cost real money on every label purchase.
  2. Inspect shipment.messages when rates are missing. Carriers that failed to rate return a message instead of a rate.
  3. Customs info is required for international shipments. Build CustomsInfo with accurate HS tariff numbers.
  4. Do not trust lowestRate() blindly for international or time-critical shipments. Use SmartRate or Luma when delivery guarantees matter.
  5. Verify webhook HMAC signatures with client.Utils.validateWebhook().
  6. Label URLs expire. Download the PDF/PNG to your own storage immediately after purchase.

Requirements

  • Node.js 18+
  • An EasyPost account (free tier available)
  • Test API key for development

Resources

Contributing

This skill is maintained for agentic development workflows. Improvements to accuracy, coverage, and clarity are welcome.

License

MIT

About

Agentic development skill for EasyPost shipping API integrations

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors