AGENT SKILL

dispatch-pipeline

Use when changing dispatch behavior, tracing how a message is built and sent, or debugging why accounts were or were not messaged. Trigger on brand, filter, or dispatcher questions that reach beyond one module.

License 许可
MIT
最近更新
2026-08-11
Stars
★ 0
Forks
0

01 前言 Front Matter

name
dispatch-pipeline
license
MIT
sources
[ "anthropics/skills", "mattpocock/skills" ]
version
1.0.0
description
Use when changing dispatch behavior, tracing how a message is built and sent, or debugging why accounts were or were not messaged. Trigger on brand, filter, or dispatcher questions that reach beyond one module.

03 SKILL.md 正文

Dispatch Pipeline

End to end

  1. pipeline.load_dataframes reads the sales dump + party master.
  2. build_brand_map(settings) returns the enabled brands — the mute chokepoint. It feeds sales_brands, target_cols, market_names, so muted brands vanish from everything downstream (aggregation, messages, dashboard).
  3. cast_sales_columns / cast_target_columns coerce numeric columns; a missing brand column would silently become 0, so validate_brand_columns (skips muted brands) flags missing columns before casting.
  4. Parties are filtered: depot checkboxes, then one filter mode — All, Priority, Groups, Custom, or Below Achievement % (filter_parties_by_achievement, strict <, threshold ELIGIBILITY_MAX_ACH_PCT).
  5. aggregate_actuals → build_regular_items / build_custom_item → templates.build_whatsapp_message (signature falls back to MESSAGE_FOOTER).
  6. resolve_dispatcher() (in main.py, used by both frontends) picks the backend: auto → Windows desktop, Linux web. Desktop: dispatcher.process_dispatch_queue (pyautogui, whatsapp:// URIs). Web: dispatcher_web.process_dispatch_queue_web (Selenium, DOM-verified send, invalid-number popup detection).
  7. Audit: log lines + logs/; missing contacts exported via export_missing_contacts.

Behavior knobs (config.py)

TEST_MODE / TEST_LIMIT (cap the queue), SKIP_DUPLICATE_PHONES, COOL_DOWN, MAX_RETRIES, FOCUS_TIMEOUT, WAIT_TIME, ELIGIBILITY_MAX_ACH_PCT, ELIGIBILITY_MIN_BALANCE, DISPATCH_BACKEND, WEB_USER_DATA_DIR, WEB_HEADLESS, WEB_LOGIN_TIMEOUT.

Common mistakes

  • Adding a filter branch in only one frontend — shared logic goes in pipeline.py; both gui.py and main.py call the engine.
  • Forgetting muted-brand semantics when touching build_brand_map or validate_brand_columns.
  • Hardcoding pacing thresholds — they live in config.py (ELIGIBILITY_*).
  • Changing a dispatcher's return contract — process_dispatch_queue and process_dispatch_queue_web must keep identical signatures and (sent, failed, invalid) returns for swap compatibility.

04 同仓库更多 Skills

BangerSoul
BangerSoul/whatsapp-mtd-sales-automation

vercel-react-view-transitions

Guide for implementing smooth, native-feeling animations using React's View Transition API (`<ViewTransition>` component, `addTransitionType`, and CSS view transition pseudo-elements). Use this skill whenever the user wants to add page transitions, animate route changes, create shared element animations, animate enter/exit of components, animate list reorder, implement directional (forward/back) navigation animations, or integrate view transitions in Next.js. Also use when the user mentions view transitions, `startViewTransition`, `ViewTransition`, transition types, or asks about animating between UI states in React without third-party animation libraries.

★ 0
BangerSoul
BangerSoul/whatsapp-mtd-sales-automation

vercel-react-native-skills

React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.

★ 0
BangerSoul
BangerSoul/whatsapp-mtd-sales-automation

vercel-react-best-practices

React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.

★ 0
BangerSoul
BangerSoul/whatsapp-mtd-sales-automation

vercel-composition-patterns

React composition patterns that scale. Use when refactoring components with boolean prop proliferation, building flexible component libraries, or designing reusable APIs. Triggers on tasks involving compound components, render props, context providers, or component architecture. Includes React 19 API changes.

★ 0
BangerSoul
BangerSoul/whatsapp-mtd-sales-automation

supabase-postgres-best-practices

Postgres best practices maintained by Supabase, for Postgres running anywhere. Load this skill BEFORE writing or changing anything that lives in a Postgres database: creating or altering tables and columns (including choosing column types), schema design, migrations and declarative schema files, RLS policies and the tests that verify them, indexes, triggers, database functions, queues and scheduled jobs (pg_cron, pgmq), vector/semantic search (pgvector), and restoring dumps (pg_restore) or importing data. Also load it when diagnosing slow queries, high CPU, timeouts, EXPLAIN plans, connection exhaustion, locking, bloat, or rows visible to the wrong user or tenant. This is not just a performance guide — schema, migration, security, and SQL authoring tasks need these rules too, even for a one-column change or a single query.

★ 0
BangerSoul
BangerSoul/whatsapp-mtd-sales-automation

skill-installer

Install Codex skills into $CODEX_HOME/skills from a curated list or a GitHub repo path. Use when a user asks to list installable skills, install a curated skill, or install a skill from another repo (including private repos).

★ 0