xiaohongshu
xiaohongshu
deployment-management
Managing LangGraph Cloud deployments through listing, filtering, and cleanup operations. Use when managing test deployments, cleaning up orphaned resources, filtering by name patterns, or handling bulk deletion. Automatically sources credentials from devcontainer environment.
Full skill instructions
Manage LangGraph Cloud deployments using the Langstar CLI with focus on test deployment cleanup, filtering, and environment handling.
LangSmith API:
LANGSMITH_API_KEY - API key for Control Plane authenticationLANGSMITH_WORKSPACE_ID - Workspace ID (optional if using organization)Location: /workspace/.devcontainer/.env (gitignored)
All operations use langstar graph commands:
langstar graph list - List with filteringlangstar graph get <id> - Get detailslangstar graph delete <id> - Delete deploymentAlways check if credentials exist BEFORE sourcing:
# ✅ CORRECT: Check first
if [ -z "$LANGSMITH_API_KEY" ] || [ -z "$LANGSMITH_WORKSPACE_ID" ]; then
echo "📋 Sourcing credentials..."
source /workspace/.devcontainer/.env
fi
# Verify (never expose actual values)
[ -n "$LANGSMITH_API_KEY" ] && echo "✓ LANGSMITH_API_KEY set" || echo "❌ Not set"
Security Rule: Never expose credential values:
# ❌ WRONG: Exposes sensitive data
echo "Key: $LANGSMITH_API_KEY"
# ✅ CORRECT: Only check presence
[ -n "$LANGSMITH_API_KEY" ] && echo "Set" || echo "Not set"
# Source credentials if needed
if [ -z "$LANGSMITH_API_KEY" ]; then
source /workspace/.devcontainer/.env
fi
# List deployments
langstar graph list --limit 20
Output:
┌────────────────────────────────┬──────────────────────┬────────┐
│ Name │ ID │ Status │
├────────────────────────────────┼──────────────────────┼────────┤
│ langstar-test-1763668434 │ 97dff6a5-f844-472... │ Ready │
│ test-deployment-1763666536 │ 8665a96b-4620-407... │ Ready │
└────────────────────────────────┴──────────────────────┴────────┘
# Source credentials
if [ -z "$LANGSMITH_API_KEY" ]; then
source /workspace/.devcontainer/.env
fi
# Filter by substring
langstar graph list --name-contains "test"
langstar graph list --name-contains "langstar-test"
# Combine filters
langstar graph list --name-contains "test" --status READY --limit 100
# Source credentials
if [ -z "$LANGSMITH_API_KEY" ]; then
source /workspace/.devcontainer/.env
fi
# Interactive deletion (prompts for confirmation)
langstar graph delete <deployment-id>
# Skip confirmation
langstar graph delete <deployment-id> --yes
Recommended: Interactive review before each deletion
# Source credentials
if [ -z "$LANGSMITH_API_KEY" ]; then
source /workspace/.devcontainer/.env
fi
# List test deployments to review
langstar graph list --name-contains "test" --limit 100
# Get deployment IDs
deployment_ids=$(langstar graph list --name-contains "test" --limit 100 --format json | jq -r '.resources[].id')
# Delete with confirmation for each
for id in $deployment_ids; do
echo "Deployment: $id"
langstar graph get "$id" | jq '{name, status, created_at}'
read -p "Delete? (y/n): " confirm
[ "$confirm" = "y" ] && langstar graph delete "$id" --yes && echo "✓ Deleted"
done
Alternative: Bulk deletion (use with caution)
See examples/batch-cleanup.md for non-interactive scripts.
Available filters:
READY, AWAITING_DATABASE, UNUSED, AWAITING_DELETEdev_free, dev, prod# Source credentials
if [ -z "$LANGSMITH_API_KEY" ]; then
source /workspace/.devcontainer/.env
fi
# Filter by status
langstar graph list --status READY
langstar graph list --status UNUSED
# Filter by type
langstar graph list --deployment-type dev_free
# Combine filters
langstar graph list --name-contains "test" --status READY
langstar graph list [OPTIONS]
Options:
-l, --limit <N> Max to return [default: 20]
--offset <N> Pagination offset [default: 0]
--name-contains <STR> Filter by name substring
--status <STATUS> Filter: READY, AWAITING_DATABASE, UNUSED, etc.
--deployment-type <TYPE> Filter: dev_free, dev, prod
-f, --format <FORMAT> Output: text, json [default: text]
langstar graph get <DEPLOYMENT_ID>
Returns full deployment JSON including source config, status, timestamps, and revisions.
langstar graph delete <DEPLOYMENT_ID> [OPTIONS]
Options:
-y, --yes Skip confirmation prompt
✅ Check before sourcing
if [ -z "$LANGSMITH_API_KEY" ]; then
source /workspace/.devcontainer/.env
fi
✅ Never expose values
[ -n "$LANGSMITH_API_KEY" ] && echo "✓ Set" || echo "✗ Not set"
✅ Review before deleting
# List first, verify, then delete
langstar graph list --name-contains "test"
langstar graph delete <id> --yes
✅ Interactive confirmation for batch
# Confirm each deletion
for id in $ids; do
read -p "Delete $id? (y/n): " confirm
[ "$confirm" = "y" ] && langstar graph delete "$id" --yes
done
✅ Use specific patterns
# Specific reduces false matches
langstar graph list --name-contains "langstar-test-"
✅ Combine filters for precision
langstar graph list --name-contains "test" --status READY --deployment-type dev_free
# Source credentials
if [ -z "$LANGSMITH_API_KEY" ]; then source /workspace/.devcontainer/.env; fi
# List test deployments
langstar graph list --name-contains "langstar-test"
langstar graph list --name-contains "test-deployment"
# Delete each
langstar graph delete <id-1> --yes
langstar graph delete <id-2> --yes
# Source credentials
if [ -z "$LANGSMITH_API_KEY" ]; then source /workspace/.devcontainer/.env; fi
# List unused
langstar graph list --status UNUSED --limit 100
# Review and delete manually
langstar graph list --limit 100 --format json | \
jq '.resources[] | select(.status == "UNUSED") | {name, id, created_at, status}'
# Source credentials
if [ -z "$LANGSMITH_API_KEY" ]; then source /workspace/.devcontainer/.env; fi
# Filter by username/CI prefix
langstar graph list --name-contains "alice-"
langstar graph list --name-contains "ci-build-"
langstar graph list --name-contains "pr-"
Diagnosis:
[ -n "$LANGSMITH_API_KEY" ] && echo "Set" || echo "Not set"
[ -n "$LANGSMITH_WORKSPACE_ID" ] && echo "Set" || echo "Not set"
Solution:
source /workspace/.devcontainer/.env
# Verify
[ -n "$LANGSMITH_API_KEY" ] && echo "Set" || echo "Not set"
Cause: Deployment deleted or incorrect ID.
Solution:
# Verify ID from list
langstar graph list --limit 100
langstar graph list --name-contains "<name-fragment>"
Solution:
# Try without filters
langstar graph list --limit 100
# Try broader patterns
langstar graph list --name-contains "test"
sdk/src/deployments.rs - Full API clientcli/src/commands/graph.rs - ImplementationClean up after test runs:
# After integration tests
cd /workspace/wip/<worktree-name>
if [ -z "$LANGSMITH_API_KEY" ]; then source /workspace/.devcontainer/.env; fi
langstar graph list --name-contains "langstar-test"
Works in any location - credentials source the same:
# Works in main or worktree
cd /workspace
# or
cd /workspace/wip/claude-188-deployment-management
# Source once
if [ -z "$LANGSMITH_API_KEY" ]; then source /workspace/.devcontainer/.env; fi
langstar graph list
if [ -z "$LANGSMITH_API_KEY" ] || [ -z "$LANGSMITH_WORKSPACE_ID" ]; then
source /workspace/.devcontainer/.env
fi
[ -n "$LANGSMITH_API_KEY" ] && echo "✓" || echo "✗"
if [ -z "$LANGSMITH_API_KEY" ]; then source /workspace/.devcontainer/.env; fi
langstar graph list --name-contains "test" --limit 100
if [ -z "$LANGSMITH_API_KEY" ]; then source /workspace/.devcontainer/.env; fi
for id in $(langstar graph list --name-contains "test" --format json | jq -r '.resources[].id'); do
langstar graph get "$id" | jq '{name, status, created_at}'
read -p "Delete? (y/n): " confirm
[ "$confirm" = "y" ] && langstar graph delete "$id" --yes
done
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience