Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 27 additions & 1 deletion SKILL.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,37 @@
---
name: use-notify
description: Help users integrate and troubleshoot the use-notify Python library. Use when asked about use-notify, @notify, NotificationPublishError, RetryConfig, default notify instances, custom notification channels, or any Bark/Ding/WeChat/WeCom/Email/Chanify/Feishu/Ntfy/PushDeer/PushOver notification setup.
description: "Configure notification channels, set up retry policies, debug publish errors, and customize @notify decorators for the use-notify Python library. Use when asked about use-notify, @notify, NotificationPublishError, RetryConfig, default notify instances, custom notification channels, useNotify.from_settings, set_default_notify_instance, or any Bark/Ding/WeChat/WeCom/Email/Chanify/Feishu/Ntfy/PushDeer/PushOver notification setup."
---

# use-notify

Use this skill when the user wants to add notifications with `use-notify`, choose a channel, wire `@notify` into existing code, or debug delivery and retry behavior.

## Quick examples

**Decorator pattern** β€” wrap a function to send notifications on success or failure:

```python
from use_notify import notify, set_default_notify_instance, useNotify, useNotifyChannel

default_notify = useNotify([useNotifyChannel.Console()])
set_default_notify_instance(default_notify)

@notify(title="Data sync")
def sync_data():
return "ok"
```

**Publisher pattern** β€” send ad hoc notifications from scripts or services:

```python
from use_notify import useNotify, useNotifyChannel

n = useNotify()
n.add(useNotifyChannel.Ntfy({"topic": "alerts"}))
n.publish(title="Deploy done", content="Production release successful")
```

## What to read

- For first-time setup, quick snippets, or migration examples, read `skill-references/quickstart.md`.
Expand All @@ -21,6 +46,7 @@ Read only the references needed for the request.
2. Generate code against the current public API in this repo.
3. Prefer the smallest working example that matches the user's stack.
4. Call out behavior that often surprises users, especially retries and error propagation.
5. Verify the solution handles errors correctly β€” check whether the user needs `NotificationPublishError` handling for multi-channel failures and whether retry settings match their reliability requirements.

## Integration defaults

Expand Down