mattrguerra/meridian-skillsmainPrivate on GitHub, published here in full

SKILL.md

Language Markdown3.4 KB62 lines

skills/bitrix-tracker/SKILL.md

  1. ---
  2. name: bitrix-tracker
  3. description: >-
  4. Generate a read-only status digest of Bitrix24 tasks so nothing slips through the cracks. Pulls
  5. tasks via the Bitrix REST API and groups them into what needs attention (overdue, unassigned,
  6. stale with no movement in N days, and changed since yesterday), then prints a clean digest. Use
  7. when someone wants to "track" Bitrix work, get a daily or morning status of the task queue, see
  8. what's overdue or unassigned, find tasks that have gone quiet, or stop manually scrolling Bitrix
  9. to keep tabs on things. It is read-only and never changes a task. Built for Hazel's tracking
  10. request; the buckets are configurable.
  11. ---
  12. # Bitrix Tracker
  13. A read-only status digest of the Bitrix24 task queue. It answers "what needs attention right now?" without anyone scrolling the CRM.
  14. ## What it does
  15. Reads tasks from Bitrix24 via an inbound webhook and sorts them into attention buckets:
  16. - **Overdue**: deadline is in the past and the task isn't closed.
  17. - **Unassigned**: no real responsible person (responsible is empty or matches the configured "unassigned" placeholder).
  18. - **Stale**: no change in the last N days (default 7) and still open.
  19. - **Changed since yesterday**: moved in the last 24 hours (useful as a "what happened" glance).
  20. It only reads. It never edits, assigns, or closes anything, so there's no write-gate and no risk of it touching live data.
  21. ## Setup
  22. 1. Copy `config.example.json` to `config.json` and adjust:
  23. - `stale_days`: how many days of no movement counts as stale (default 7).
  24. - `unassigned_ids`: Bitrix user IDs (or empty value) that mean "nobody really owns this." Often the account owner's ID if your team uses that as a holding pen.
  25. - `task_filter`: which tasks to pull (default: open, not closed).
  26. 2. Copy `.env.example` to `.env` and set `BITRIX_WEBHOOK_URL` (the `https://<domain>.bitrix24.com/rest/<user_id>/<token>/` base URL). Needs **task** read scope. If you later want deals tracked too, the same webhook needs CRM scope and we add a deals bucket.
  27. The webhook URL is a credential. Treat `.env` like a password; don't commit it.
  28. ## Running it
  29. ```bash
  30. python scripts/bitrix_tracker.py # digest from live Bitrix
  31. python scripts/bitrix_tracker.py --mock # digest from bundled sample_tasks.json
  32. python scripts/bitrix_tracker.py --json # machine-readable output instead of text
  33. ```
  34. ## Output
  35. A dated digest with a one-line count per bucket, then the tasks under each (ID, title, owner, and the relevant date: deadline for overdue, last-change for stale). Empty buckets are shown as "clear" so a quiet day reads as reassurance, not a blank screen.
  36. ## Tuning the buckets
  37. The four buckets are a sensible default for "tracking," but a reader may want something narrower (their own open tasks, one project group, deals rather than tasks). The buckets and filter live in `config.json`, so reshaping the digest doesn't mean touching code. Keep the buckets people act on and trim the rest.
  38. ## Going automatic
  39. This pairs naturally with a scheduled task, e.g. run every weekday at 8am and drop the digest somewhere the team will see it. Since it's read-only, scheduling it carries no risk; it's just a question of where the output should land (email, a doc, a chat message).
  40. ## How to read failures
  41. - `BITRIX_WEBHOOK_URL not set` → `.env` missing or empty.
  42. - HTTP 401 / "Invalid token" → webhook URL wrong or revoked.
  43. - Empty digest with a live connection → check `task_filter`; the default only pulls open tasks.