Home / Blog / An agent skill and a script for Claude Code to send…
Tech News

An agent skill and a script for Claude Code to send Mattermost DMs as you

Abdallah launched mattermost-dm to let Claude Code send Mattermost direct messages with human preview approval, one-hour send windows, and zero dependencies.

By Dillip Chowdary β€’ Nov 07, 2026 β€’ Source: github.com

An agent skill and a script for Claude Code to send Mattermost DMs as you

Developer Abdallah released mattermost-dm, an open-source agent skill and companion script designed to let Anthropic's Claude Code send Mattermost direct messages on behalf of an authenticated user with mandatory dry-run approvals. According to github.com's report, the utility operates as a constrained, safety-oriented messaging workflow rather than an interactive chat client. It layers deterministic verification rules directly over the Mattermost platform interface, ensuring that automated coding sessions cannot broadcast unintended text or transmit messages to misidentified internal colleagues without human oversight.

This breakdown covers the architectural safety guarantees, local storage layout, configuration mechanics, and voice modeling templates built into the release. Software engineers, team leads, and automation developers running Claude Code within terminal environments can use this tool to delegate status queries, staging updates, and teammate follow-ups without relinquishing personal conversational control. The system specifically targets teams hosted on Mattermost instances who want agentic terminal assistance while preventing token leakage, runaway bot loops, or broken message deliveries across internal communication channels.

What shipped in An agent skill and a script for Claude Code

The mattermost-dm release delivers a lightweight Python skill that coordinates directly with Claude Code alongside a standalone executable named mm-dm. The implementation introduces strict operational guarantees over the standard Mattermost messaging endpoints, centered around an explicit preview requirement. Under this model, running a dry-run command writes the evaluated payload to a pending cache record, and the separate send-pending command transmits that exact text once within an expiration window of one hour. The tool also provides all-or-nothing batch processing, meaning if even a single target recipient fails to resolve properly across the directory, the entire batch halts and the preview cannot be dispatched.

In addition to dispatch gates, the release includes per-person dynamic templating, reply waiting, and isolated credential isolation. The templating engine evaluates dynamic tokens such as first name to populate individual recipient identities and applies greeting placeholders only when an opening remark is scheduled. A dedicated wait-reply flag blocks terminal execution until an answer arrives, making the command suitable for background job sequences that depend on teammate confirmations. Security boundaries prevent the underlying access token from printing to logs or standard output, and the skill instructions explicitly direct Claude Code never to inspect the credential file.

What improved in An agent skill and a script for Claude Code

Compared to standard Mattermost webhooks, raw REST endpoints, or unrestricted agent clients, this specialized tooling replaces permissive dispatch behavior with structured verification barriers. Standard script calls execute arbitrary network payloads immediately with standard timeouts and zero recipient validation checks. In contrast, mattermost-dm enforces local cached reviews, dependency-free execution, and automatic batch cancellations whenever recipient identity matching stumbles.

Operational MetricStandard API ExecutionMattermost-DM Safeguards
Preview Expiration WindowImmediate dispatch / none1 hour cached review window
Third-Party Package DependenciesVariable / requests library0 third-party packages
Python Runtime RequirementPython 2.7 or 3.xPython 3.9 or later
Batch Delivery Failure HandlingPartial sends permittedAll-or-nothing resolution
Token Disclosure In PromptsUnrestricted agent file accessExplicit agent read restriction
An agent skill and a script for Claude Code to send Mattermost DMs as you
Illustration Β· Pexels

The architectural improvements eliminate common risks where an artificial intelligence agent might misread an email handle, generate unauthorized corporate statements, or leak sensitive API keys during context assembly. Because the Python script operates strictly with standard library components, developers do not need to install virtual environments or external communication packages inside their global systems. The one-hour pending cache boundary ensures that unconfirmed drafts automatically expire rather than lingering indefinitely in local memory registers.

What you gain from An agent skill and a script for Claude Code

Advertisement

Tech Pulse Daily

Get tomorrow's pulse first

Join engineers who read Tech Pulse before stand-up. Free, weekday mornings.

Engineers incorporating the skill gain the ability to delegate internal check-ins through normal conversational prompts while retaining complete editorial authority. Users can instruct Claude Code to message a coworker regarding deployment plans, inspect the rendered message output directly within their terminal console, and authorize delivery only after verifying the contents. Because message greetings respect time-based rules through environment variables, communications avoid mechanical, repetitive introductions throughout the working day.

The utility also provides a local voice configuration framework that allows Claude Code to mirror individual writing habits. By default, the tool outputs brief, friendly, plain text messages. Developers can either modify a local template file by hand or instruct Claude Code to analyze past sent messages over a ninety-day history window. The model evaluates message length, capitalization, punctuation, warmth, and common phrases without storing confidential project details, ensuring that automated communications preserve personal tone across professional conversations.

How to get An agent skill and a script for Claude Code

Setting up the integration requires Python 3.9 or later and a personal access token generated through your Mattermost profile security settings. Installation begins by cloning the repository directly into your Claude skills directory, creating a restricted configuration file, and defining your server connection details.

Command
git clone https://github.com/abdallah/mattermost-dm.git ~/.claude/skills/mattermost-dm
touch ~/.mattermost && chmod 600 ~/.mattermost

Edit the newly created configuration file to populate your instance address and personal access token, and optionally define morning or afternoon greeting strings:

Command
MM_URL=https://chat.example.com
MM_TOKEN=your-token
MM_DM_GREETINGS_AM="good morning|morning :)"
MM_DM_GREETINGS_PM="hi there|hey|good afternoon"

Once configured, the script functions interactively through Claude Code or via terminal commands using the dry-run and send-pending flags:

Command
./mm-dm --dry-run --to alex@example.com --message-file - <<'MSG'
{hi}
can you share the staging plan?
MSG
./mm-dm --send-pending

What to watch after An agent skill and a script for Claude Code

Teams implementing mattermost-dm must note the boundaries of its architecture and local data management rules. The project stores connection tokens inside the home folder, while voice profiles and gathered contact lists reside exclusively inside the skill directory, ignored by version control. Because Git does not synchronize these configuration files across workstations, developers maintaining multiple laptops must manually copy their customized voice profiles and reconstruct their local contact histories.

Furthermore, running the optional history analysis flag outputs both sides of conversation logs to terminal streams, which causes colleague replies to reach your upstream artificial intelligence provider during profile drafting. Administrators must verify corporate compliance policies before running history extraction on proprietary channels, or choose the manual template path instead. For comprehensive channel browsing, message reading, or enterprise workspace administration, the author recommends dedicated alternatives such as ziyan/mm, rhnvrm/mattermost-cli, or the official Mattermost Model Context Protocol server.

Developer Action Items

  • ☐ Diff the official changelog for Anthropic / Claude / GitHub 2.7 before you bump β€” APIs, defaults, and removed flags only.
  • ☐ Install through the vendor's documented channel in staging; keep a one-command rollback and time-box the canary.
  • ☐ Grep your repo for old flag names, lockfile pins, and plugin versions that the notes mark as breaking.
  • ☐ Prefer the first patch cut over the day-zero tag unless you have a reason to be on the leading edge.
  • ☐ If HN AI Agents did not name a region, plan, or SKU, screenshot the official availability line before you promise it to users.

An agent skill and a script for Claude Code FAQ

What runtime dependencies are required to run mattermost-dm?

The script requires Python 3.9 or later and relies entirely on the Python standard library without any third-party package dependencies.

How does the preview and confirmation mechanism protect against accidental messages?

The script requires a dry-run invocation that saves the rendered text to a pending cache file, allowing the send-pending command to send that exact message once within a one-hour window.

Where are credentials, voice settings, and recipient records stored?

Connection tokens stay in a protected configuration file in your home directory, pending message drafts live in your local cache, and writing style preferences alongside contact histories remain uncommitted in the skill folder.

Sources

Dillip Chowdary

Author

Dillip Chowdary

Writes Tech Bytes coverage of AI, engineering, and the tools that actually ship. Editor of Tech Pulse Daily.

Related on Tech Bytes

Advertisement

5-min tech signal

Weekday briefing for engineers who skip the noise.

No spam Β· Unsubscribe anytime

Advertisement

✈️ CareerPilot

Your AI job-search copilot

Match your resume against live Ashby, Greenhouse & Lever openings β€” fit scores, job-specific resume optimization and email alerts.

Find matching jobs β†’

Free Tools

Browse all tools β†’