agentleFS
vhmarquezvhmarquez/argo/skills/notify/SKILL.md

notify

Skill1 starsChanged 7 months agoMITView on GitHub

Post a structured notification to a configured Slack or Microsoft Teams webhook. Used by deploy / coverage / security skills (or CI pipelines) to broadcast results without hardcoding webhook URLs in scripts. Webhook URLs come from `.claude/sf-project.json` (or env override).

  • Sends data out

13 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 12 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Sensitive content scrub: Never include test data, customer PII, or auth tokens in the message.

    line 123

“Common” is measured: kept by at least 6 in 10 of the 12 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

You are posting a notification to a team chat webhook. The webhook URL lives in the project config under notifications.webhooks; this skill never accepts a URL as an argument (so it's safe in shell history).

Read Project Config First

source "${CLAUDE_PLUGIN_ROOT}/hooks/lib/config.sh"
SLACK_URL="$(sf_config_get '.notifications.webhooks.slack // empty' "$ENV")"
TEAMS_URL="$(sf_config_get '.notifications.webhooks.teams // empty' "$ENV")"

Config Schema (in sf-project.json)

{
  "notifications": {
    "webhooks": {
      "slack": "https://hooks.slack.com/services/T.../B.../X...",
      "teams": "https://outlook.office.com/webhook/..."
    },
    "channels": {
      "deploy": ["slack"],
      "coverage": ["slack", "teams"],
      "security": ["slack"],
      "release": ["slack", "teams"]
    }
  }
}

The channels map says which event types go to which platforms. If empty, all configured platforms receive every event.

/argo:sf-init (Phase 1) does not prompt for these by default — they're sensitive. Recommend adding to a per-env override file (.claude/sf-project.prod.json) so dev/QA don't post to the team channel during testing.

Input

$ARGUMENTS: required.

  • <event-type> <payload-json> — e.g., deploy '{"status":"Succeeded","org":"Prod","componentCount":12,"deployId":"0Af..."}'
  • --channel slack|teams|all — override the configured channel routing
  • --dry-run — print the message that would be sent without posting

Event types and rendering

EventSlack renderingTeams rendering
deploy:rocket: *Deploy <status>* to <org> — <componentCount> components — <deployId> + actions block linking to deploy logAdaptive Card with the same fields
coverage:bar_chart: *Coverage <delta>* — overall <percent>% — <regressions count> classes regressedAdaptive Card
security:rotating_light: *Security scan* — <criticalCount> critical, <warningCount> warningAdaptive Card
release:package: *<version> released* — <highlightCount> features, <fixCount> fixes — <releaseNotesUrl>Adaptive Card
custom<text> (raw)<text>

Steps

1. Validate inputs

  • Event type must be one of the supported list
  • Payload must be valid JSON

2. Render messages

For Slack (Block Kit):

{
  "blocks": [
    { "type": "section", "text": { "type": "mrkdwn", "text": "<rendered text>" } },
    { "type": "context", "elements": [{ "type": "mrkdwn", "text": "<project.name> · <org>" }] }
  ]
}

For Teams (Adaptive Card):

{
  "type": "message",
  "attachments": [
    {
      "contentType": "application/vnd.microsoft.card.adaptive",
      "content": { "type": "AdaptiveCard", "body": [...], "version": "1.4" }
    }
  ]
}

3. Post

curl -fsS -X POST -H 'Content-Type: application/json' --data "$BODY" "$WEBHOOK_URL"

Capture HTTP status. Slack returns ok (200); Teams returns 1 (200).

4. Output

Default:

[notify] Posted deploy notification to slack (HTTP 200)
[notify] Posted deploy notification to teams (HTTP 200)

--dry-run:

[notify] Would POST to slack: <URL truncated>
{"blocks": [...]}

CI mode: emit {"posted": ["slack", "teams"], "errors": []}.

Exit codes

  • 0 — all configured channels accepted the post (or --dry-run)
  • 1 — at least one channel rejected (HTTP 4xx/5xx)
  • 2 — invocation error (no webhook configured, invalid event type)

Rules

  • Never log webhook URLs. They're effectively credentials. Truncate when echoing in dry-run
  • Never accept a webhook URL via $ARGUMENTS. Force users to put it in config
  • Don't fail loudly in CI. A failed notification shouldn't break a deploy. Exit 1 with a message; the caller decides whether to retry
  • Truncate long payloads. Slack/Teams cap message size; if a release note is >4 KB, truncate with a "see full notes at <URL>" footer
  • Sensitive content scrub. Never include test data, customer PII, or auth tokens in the message. The skill blocks if the rendered text contains anything matching common token patterns

Consumers

  • CI deploy pipeline: /argo:notify deploy "$DEPLOY_RESULT_JSON"
  • /argo:test-coverage posts a coverage event when run with --notify
  • /argo:security-scan posts a security event when run with --notify
  • Release process: /argo:release-notes + /argo:notify release ...

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.