{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "title": "X",
  "description": "Integration with X API enabling social media interactions including retrieving posts, mentions, user information, and posting content with media support",
  "x-icon": "/skills/twitter/twitter.png",
  "x-tags": [
    "Communication",
    "Social"
  ],
  "properties": {
    "enabled": {
      "type": "boolean",
      "title": "Enabled",
      "description": "Whether this skill is enabled",
      "default": false
    },
    "states": {
      "type": "object",
      "properties": {
        "get_mentions": {
          "type": "string",
          "title": "Get Mentions",
          "enum": [
            "disabled",
            "public",
            "private"
          ],
          "x-enum-title": [
            "Disabled",
            "Agent Owner + All Users",
            "Agent Owner Only"
          ],
          "description": "Retrieves posts that mention the authenticated user from the past 24 hours.",
          "default": "disabled"
        },
        "post_tweet": {
          "type": "string",
          "title": "Create a Post",
          "enum": [
            "disabled",
            "public",
            "private"
          ],
          "x-enum-title": [
            "Disabled",
            "Agent Owner + All Users",
            "Agent Owner Only"
          ],
          "description": "Publishes posts with media attachments, and content moderation checks",
          "default": "disabled"
        },
        "reply_tweet": {
          "type": "string",
          "title": "Reply to a Post",
          "enum": [
            "disabled",
            "public",
            "private"
          ],
          "x-enum-title": [
            "Disabled",
            "Agent Owner + All Users",
            "Agent Owner Only"
          ],
          "description": "Constructs contextual replies to posts with mention handling and conversation threading",
          "default": "disabled"
        },
        "get_timeline": {
          "type": "string",
          "title": "Get Timeline",
          "enum": [
            "disabled",
            "public",
            "private"
          ],
          "x-enum-title": [
            "Disabled",
            "Agent Owner + All Users",
            "Agent Owner Only"
          ],
          "description": "Fetches user's home timeline with recent posts.",
          "default": "disabled"
        },
        "follow_user": {
          "type": "string",
          "title": "Follow User",
          "enum": [
            "disabled",
            "public",
            "private"
          ],
          "x-enum-title": [
            "Disabled",
            "Agent Owner + All Users",
            "Agent Owner Only"
          ],
          "description": "Initiates following of X accounts with rate limit handling and anti-spam safeguards",
          "default": "disabled"
        },
        "like_tweet": {
          "type": "string",
          "title": "Like a Post",
          "enum": [
            "disabled",
            "public",
            "private"
          ],
          "x-enum-title": [
            "Disabled",
            "Agent Owner + All Users",
            "Agent Owner Only"
          ],
          "description": "Likes a post",
          "default": "disabled"
        },
        "retweet": {
          "type": "string",
          "title": "Repost a Post",
          "enum": [
            "disabled",
            "public",
            "private"
          ],
          "x-enum-title": [
            "Disabled",
            "Agent Owner + All Users",
            "Agent Owner Only"
          ],
          "description": "Shares posts with attribution tracking and duplicate prevention mechanisms",
          "default": "disabled"
        },
        "search_tweets": {
          "type": "string",
          "title": "Search Posts",
          "enum": [
            "disabled",
            "public",
            "private"
          ],
          "x-enum-title": [
            "Disabled",
            "Agent Owner + All Users",
            "Agent Owner Only"
          ],
          "description": "Executes advanced X searches with keyword filters, date ranges, and engagement thresholds",
          "default": "disabled"
        },
        "get_user_by_username": {
          "type": "string",
          "title": "Get User by Username",
          "enum": [
            "disabled",
            "public",
            "private"
          ],
          "x-enum-title": [
            "Disabled",
            "Agent Owner + All Users",
            "Agent Owner Only"
          ],
          "description": "Retrieves user information by username.",
          "default": "disabled"
        },
        "get_user_tweets": {
          "type": "string",
          "title": "Get User Tweets",
          "enum": [
            "disabled",
            "public",
            "private"
          ],
          "x-enum-title": [
            "Disabled",
            "Agent Owner + All Users",
            "Agent Owner Only"
          ],
          "description": "Retrieves tweets from a specific user by their user ID.",
          "default": "disabled"
        }
      },
      "description": "States for each X skill"
    },
    "consumer_key": {
      "type": "string",
      "title": "X API consumer key",
      "description": "X API consumer key",
      "x-link": "[Get your API key](https://developer.x.com/)",
      "x-sensitive": true,
      "maxLength": 100
    },
    "consumer_secret": {
      "type": "string",
      "title": "X API consumer secret",
      "description": "X API consumer secret",
      "x-sensitive": true,
      "maxLength": 100
    },
    "access_token": {
      "type": "string",
      "title": "X API access token",
      "description": "X API access token",
      "x-sensitive": true,
      "maxLength": 100
    },
    "access_token_secret": {
      "type": "string",
      "title": "X API access token secret",
      "description": "X API access token secret",
      "x-sensitive": true,
      "maxLength": 100
    }
  },
  "required": [
    "states",
    "enabled"
  ],
  "if": {
    "properties": {
      "enabled": {
        "const": true
      }
    }
  },
  "then": {
    "required": [
      "consumer_key",
      "consumer_secret",
      "access_token",
      "access_token_secret"
    ]
  },
  "additionalProperties": true
}
