agentleFS
TJaenichenTJaenichen/claude-code-harness/skills/user/mm-notify/SKILL.md

mm-notify

Skill0 starsChanged 3 months agoMITView on GitHub

Send a notification message to the user's Mattermost DM. Use when you need to notify the user via Mattermost (e.g., task completion, alerts, stats).

  • Sends data out

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 4 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read all three from environment variables — never hardcode them in this file:

    line 17
  2. Distinctive:

    If any of them is unset, stop and report which one is missing.

    line 25
  3. Very specific:

    Use curl to POST to the Mattermost API.

    line 29
  4. Distinctive:

    Use Mattermost-flavored markdown in the message

    line 43
  5. Very specific:

    Use #### for headers

    line 44
  6. Distinctive:

    Use markdown tables for tabular data

    line 45
  7. Very specific:

    Use :emoji: for emoji (e.g., :white_check_mark:, :warning:, :bar_chart:)

    line 46

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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

Mattermost DM Notification

Message to send: $ARGUMENTS

Your task

Send the provided message to the user's Mattermost self-DM channel.

Configuration

Read all three from environment variables — never hardcode them in this file:

VariableMeaning
MM_URLMattermost base URL, e.g. https://mattermost.example.com
MM_TOKENPersonal access token (Bearer)
MM_CHANNEL_IDChannel ID of the user's self-DM (open your DM with yourself and copy the ID from the URL or via the API)

If any of them is unset, stop and report which one is missing.

How to send

Use curl to POST to the Mattermost API. Read the variables with printenv (not direct shell expansion) so the token never appears in the transcript:

curl -s -X POST \
  -H "Authorization: Bearer $(printenv MM_TOKEN)" \
  -H "Content-Type: application/json" \
  -d "{\"channel_id\": \"$(printenv MM_CHANNEL_ID)\", \"message\": \"MESSAGE_HERE\"}" \
  "$(printenv MM_URL)/api/v4/posts"

For messages with quotes or newlines, write the JSON body to a temp file and use -d @file to avoid escaping issues.

Formatting

  • Use Mattermost-flavored markdown in the message
  • Use #### for headers
  • Use markdown tables for tabular data
  • Use :emoji: for emoji (e.g., :white_check_mark:, :warning:, :bar_chart:)

Output

Report whether the message was sent successfully. Show the HTTP status code if there's an error.

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.