Logo di X

X

Community
alanalvestech
x

Post and manage tweets on X (formerly Twitter) via API v2

Panoramica

Autorealanalvestech
Repositoryhitank
Nome della skillx
Stelle
38
Fork
4
File inclusi
11
LicenzaMIT
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • 11 file inclusi

    Script, modelli di documento e riferimenti che il modello può leggere mentre lavora. I file sono di sola lettura e non vengono mai eseguiti.

  • Open source

    Pubblicata da alanalvestech su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA X in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/alanalvestech/hitank/tree/main/skills/x
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Nuova skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella nella cartella delle skill di quell'agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/alanalvestech/hitank.git /tmp/hitank
mkdir -p .claude/skills
cp -r /tmp/hitank/skills/x .claude/skills/x
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva X in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente X non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi X non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

/x

Connect to the X (formerly Twitter) API v2 to post tweets, search, view timelines and manage likes. Pure Ruby, zero gems — stdlib only.

Structure

scripts/
├── auth.rb          # OAuth 1.0a signature + twitter_request helper (required by all scripts)
├── check_setup.rb   # Check if credentials exist (outputs OK or SETUP_NEEDED)
├── save_token.rb    # Save and validate API credentials
├── me.rb            # Get authenticated user info
├── tweets.rb        # List recent tweets for a user
├── tweet.rb         # Get tweet details by ID
├── post_tweet.rb    # Post a new tweet (requires confirmation)
├── delete_tweet.rb  # Delete a tweet (requires confirmation)
├── search.rb        # Search recent tweets
├── likes.rb         # List liked tweets
└── like.rb          # Like a tweet (requires confirmation)

Setup (check before using)

bash
ruby ~/.claude/skills/x/scripts/check_setup.rb

If the output is OK, proceed to the Flow section.

If the output is SETUP_NEEDED, guide the user step by step. Present ONE step at a time, wait for the user to confirm before moving to the next.

Step 1 — Ask the user to create a Twitter Developer app:

You need Twitter API credentials. Go to the Developer Portal and create a project and app:

https://developer.x.com/en/portal/dashboard

  1. Create a new Project (or use an existing one)
  2. Create an App inside that project

Step 2 — Ask the user to generate credentials:

In your app settings, go to "Keys and tokens" and generate all 4 credentials:

  • API Key (also called Consumer Key)
  • API Key Secret (also called Consumer Secret)
  • Access Token
  • Access Token Secret

Copy all 4 values.

Step 3 — Ask the user to check permissions:

Make sure your app has Read and Write permissions. You can check this under your app's "User authentication settings" in the Developer Portal.

Step 4 — When the user pastes the credentials, save them:

bash
ruby ~/.claude/skills/x/scripts/save_token.rb 'API_KEY' 'API_SECRET' 'ACCESS_TOKEN' 'ACCESS_TOKEN_SECRET'

If the script outputs an error, the credentials are invalid. Ask the user to double-check and try again.

If setup is not complete, DO NOT proceed to the Flow. Complete all steps first.

Flow

The argument $ARGUMENTS may contain tweet text or a tweet ID.

Step 1: Check account info

bash
ruby ~/.claude/skills/x/scripts/me.rb

Present the account info to the user.

Step 2: Present options

Ask the user what they want to do:

  • Post a tweet
  • List recent tweets
  • Search tweets
  • View a tweet
  • Delete a tweet
  • View liked tweets
  • Like a tweet

If $ARGUMENTS looks like tweet text (not a number), offer to post it. If it looks like a tweet ID (numeric), offer to view it.

Step 3: Actions

Post a tweet (requires user confirmation):

Ask the user to type the tweet text. Show a preview of the tweet and its character count. Ask: "Do you want to post this tweet?" Only execute after a "yes".

bash
ruby ~/.claude/skills/x/scripts/post_tweet.rb 'TWEET_TEXT'

List recent tweets:

bash
ruby ~/.claude/skills/x/scripts/tweets.rb
ruby ~/.claude/skills/x/scripts/tweets.rb --user_id USER_ID

View a tweet:

bash
ruby ~/.claude/skills/x/scripts/tweet.rb TWEET_ID

Search recent tweets:

bash
ruby ~/.claude/skills/x/scripts/search.rb 'SEARCH_QUERY'

Delete a tweet (requires user confirmation):

Show the tweet details first, then ask: "Do you want to delete this tweet?" Only execute after a "yes".

bash
ruby ~/.claude/skills/x/scripts/delete_tweet.rb TWEET_ID

View liked tweets:

bash
ruby ~/.claude/skills/x/scripts/likes.rb
ruby ~/.claude/skills/x/scripts/likes.rb --user_id USER_ID

Like a tweet (requires user confirmation):

Show the tweet details first, then ask: "Do you want to like this tweet?" Only execute after a "yes".

bash
ruby ~/.claude/skills/x/scripts/like.rb TWEET_ID

Notes

  • Pure Ruby, zero gems — stdlib only (json, net/http, uri, fileutils, openssl, base64, securerandom)
  • OAuth 1.0a with HMAC-SHA1 signature — full signature generation implemented in auth.rb
  • Twitter API v2 endpoints — all scripts use the v2 API
  • Free tier allows 1,500 tweets/month (posting) and limited reads
  • Token files stored at ~/.config/x/ (4 files, never commit)
  • Post, delete, and like require explicit user confirmation
  • Base URL: https://api.twitter.com

File inclusi

Il modello legge questi file quando servono, mentre la skill è caricata. Sono accessibili in sola lettura e non vengono mai eseguiti.

Domande frequenti

Cosa fa la skill IA X?

Post and manage tweets on X (formerly Twitter) via API v2

Perché usare X su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. X è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo X in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/alanalvestech/hitank/tree/main/skills/x. TypingMind legge il file SKILL.md, include i file associati e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare X?

Qualsiasi modello che colleghi in TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con X?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con X: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA X è gratuita?

Sì. È pubblicata su GitHub da alanalvestech con licenza MIT. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, modelli o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Vedi tutti

Crea subito la tua area di lavoro IA

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇