agentleFS
nirholasnirholas/XActions/skills/direct-messages/SKILL.md

direct-messages

Skill648 starsChanged 9 months agoApache-2.0View on GitHub

Sends, manages, and automates direct messages on X/Twitter. Supports personalized bulk DMs with templates, conversation management, message request filtering, and DM export. The agent uses this skill when a user needs to send DMs, manage conversations, or automate direct messaging workflows.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    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:

    Add delays (30s+) between bulk DMs to avoid rate limits

    line 89

≈ “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

Direct Messages

Browser console scripts for sending, managing, and exporting X/Twitter DMs.

Available Scripts

ScriptFilePurpose
Send Direct Messagessrc/sendDirectMessage.jsSend personalized DMs to a list of users
DM Managersrc/dmManager.jsCore DM management (read, filter, organize, export)

Send Direct Messages

File: src/sendDirectMessage.js

Send personalized DMs to multiple users with message templates and rate limiting.

Configuration

const CONFIG = {
  targetUsers: ['user1', 'user2'],
  messageTemplate: 'Hey {username}! 👋 Just wanted to connect.',
  limits: {
    messagesPerSession: 10,
    delayBetweenMessages: 30000,
  },
  skipIfAlreadyMessaged: true,
  dryRun: true,
};

How to use

  1. Navigate to x.com/messages
  2. Edit CONFIG with target users and message template
  3. Set dryRun: false when ready
  4. Open DevTools (F12) → Console
  5. Paste the script → Enter

Safety features

  • Tracks sent messages in localStorage to avoid duplicates
  • Configurable delay between messages (30s default)
  • Session limit prevents over-messaging
  • Dry-run mode previews actions without sending

Warning: Mass DMing can get your account restricted. Only message users who have open DMs or follow you.

DM Manager

File: src/dmManager.js

Core module for reading, filtering, organizing, and exporting DM conversations. Supports message requests, conversation search, and DM privacy settings.

How to use

  1. Navigate to x.com/messages
  2. Open DevTools (F12) → Console
  3. Paste the script → Enter

Key Selectors

ElementSelector
New message button[data-testid="NewDM_Button"]
Search people[data-testid="searchPeople"]
Message input[data-testid="dmComposerTextInput"]
Send button[data-testid="dmComposerSendButton"]
Conversation list[data-testid="conversation"]
Message bubble[data-testid="messageEntry"]
Message requests[data-testid="messageRequests"]
Back button[data-testid="app-bar-back"]

Notes

  • DM scripts require being on the Messages page (x.com/messages)
  • Group chats support up to 50 participants
  • Message requests from non-followers must be approved before replying
  • Add delays (30s+) between bulk DMs to avoid rate limits
  • {username} placeholder in templates is replaced with the recipient's handle
  • Sent history is persisted in localStorage across sessions

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.