Logo di Deploy

Deploy

OrganizzazionePopolare
clacky-ai
deploy

Distribuisce applicazioni Rails su Railway. Gestisce la configurazione iniziale e le ridistribuzioni in modo idempotente tramite Railway CLI. Si attiva con: "deploy", "deploy to railway", "railway deploy", "发布", "部署", "上线".

Add to TypingMind

Panoramica

Pubblicato daclacky-ai
Repositoryopenclacky
Nome della skilldeploy
Stelle
1.2K
Fork
111
File inclusi
Solo istruzioni
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.

  • Tutto nelle istruzioni

    Tutto ciò che serve al modello è nelle istruzioni: nessun file aggiuntivo da sincronizzare.

  • Open source

    Pubblicata da clacky-ai su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Deploy 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/clacky-ai/openclacky/tree/main/lib/clacky/default_skills/deploy
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi 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 della skill nella directory delle skill di quell'agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/clacky-ai/openclacky.git /tmp/openclacky
mkdir -p .claude/skills
cp -r /tmp/openclacky/lib/clacky/default_skills/deploy .claude/skills/deploy
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Deploy 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 Deploy 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 Deploy 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à.

Deploy Rails App to Railway

Deploy the current Rails project to Railway using the Railway CLI. Works for both first-time deploys and re-deploys.

Prerequisites Check

Before starting, verify:

bash
# 1. Railway CLI installed?
railway --version

# 2. Logged in?
railway whoami

If not logged in, instruct the user:

Please run: railway login
Then retry deployment.

Step 0: Prepare for Linux Build

Railway runs on Linux. Ensure Gemfile.lock includes the linux platform:

bash
bundle lock --add-platform x86_64-linux

If the project uses a Dockerfile builder (check railway.toml for builder = "DOCKERFILE"), no Procfile is needed — skip creating one.

Only create a Procfile if there is no Dockerfile:

web: bundle exec puma -C config/puma.rb

Step 1: Check Link Status → Deploy Immediately if Already Linked

First: check if already linked:

bash
railway status 2>&1

If output contains Project: → project is already linked. Skip Steps 2–5 entirely and jump to Step 6 (Deploy).

If output contains "not linked" or an error → not linked yet. Try linking to an existing project first — list available projects:

bash
railway list 2>&1 | grep -i "<app-name>"

If a matching project is found, link it:

bash
railway link --project <project-name> --service <service-name> 2>&1

Only if no existing project is found, init a new one:

bash
railway init -n <app-name>

The app-name should match the current directory name (e.g., my-rails-app).

⚠️ NEVER run railway init when already linked or when an existing project exists. It silently creates a brand-new Railway project. If this happens by mistake:

  1. Find the correct project name from railway list
  2. Re-link: railway link --project <project-name> --service <service-name>

Step 2: Set Environment Variables

Set required Rails production variables. Use --skip-deploys to avoid triggering premature deploys:

bash
# Generate a secret key base
SECRET_KEY_BASE=$(bundle exec rails secret)

railway variable set SECRET_KEY_BASE=$SECRET_KEY_BASE --skip-deploys
railway variable set RAILS_ENV=production --skip-deploys
railway variable set RAILS_LOG_TO_STDOUT=true --skip-deploys
railway variable set RAILS_SERVE_STATIC_FILES=true --skip-deploys

If the project uses any other env vars (check .env.example or config/application.yml.example if they exist), prompt the user to provide values and set them too.

If the project uses config/application.yml (Figaro gem), read it and set all values as Railway variables:

bash
# Read application.yml and set each key=value pair
ruby -ryaml -e "
  data = YAML.safe_load(File.read('config/application.yml')) || {}
  data.each { |k, v| puts %(railway variable set #{k}=#{v} --skip-deploys) unless v.to_s.empty? }
" | bash

Step 3: Ensure PostgreSQL Service (Idempotent)

Check if Postgres already exists:

bash
railway status --json

Parse the JSON output. If a service with type postgres or name containing postgres/Postgres is already found, skip with: ✅ PostgreSQL already provisioned

⚠️ IMPORTANT: railway add --database postgres has a known CLI bug that always returns Unauthorized. Do NOT attempt to run this command. Instead, instruct the user to add PostgreSQL manually via the Railway Web UI:

  1. Open your Railway project: https://railway.com/project/<project-id> (Get the project ID from the Railway dashboard or cat .railway/config.json)
  2. Click "+ New" → "Database" → "PostgreSQL"
  3. Wait for the database to provision
  4. Come back and continue

After Postgres is provisioned, set the DATABASE_URL variable:

bash
railway variable set DATABASE_URL='${{Postgres.DATABASE_URL}}' --skip-deploys

Step 4: Get Domain (Idempotent)

Check if a domain is already set:

bash
railway domain --json

If no domain exists yet:

bash
railway domain

Capture and display the domain URL to the user. Also set it as PUBLIC_HOST:

bash
railway variable set PUBLIC_HOST=<domain-without-https> --skip-deploys

Step 5: Configure Storage Bucket (if needed)

Check if the project uses S3-compatible storage by reading config/storage.yml. If it contains an amazon or s3 service section, storage bucket configuration is required.

⚠️ Storage bucket requires Railway Hobby plan ($5/month minimum). Confirm with the user before proceeding.

Check if bucket env vars are already set:

bash
railway variables --json | grep STORAGE_BUCKET

If not set, create a bucket and configure the variables:

bash
# Create bucket (choose region: iad=US East, sjc=US West, ams=EU, sin=Asia)
railway bucket create <app-name>-storage --region iad --json

# Get credentials
railway bucket credentials --bucket <app-name>-storage --json

The credentials JSON will contain: accessKeyId, secretAccessKey, region, endpoint, bucketName.

Set them as environment variables:

bash
railway variables set \
  STORAGE_BUCKET_ACCESS_KEY_ID=<accessKeyId> \
  STORAGE_BUCKET_SECRET_ACCESS_KEY=<secretAccessKey> \
  STORAGE_BUCKET_REGION=<region> \
  STORAGE_BUCKET_NAME=<bucketName> \
  STORAGE_BUCKET_ENDPOINT=<endpoint> \
  --skip-deploys

⚠️ Missing these variables will cause a hard crash at boot (Aws::Errors::MissingRegionError) because the AWS SDK initializes at startup, not lazily.

If the project does not use S3 storage, skip this step entirely.

Step 6: Deploy

Upload and deploy the project:

bash
railway up --detach

Show the user the deployment is in progress and they can monitor it with:

bash
railway logs

No manual migration needed. The bin/docker-entrypoint script runs rails db:prepare automatically on container startup. Just wait for the deployment to complete.

Step 7: Verify Deployment

After deployment completes (wait ~30 seconds), verify the app is running:

bash
# Should return 200
curl -s -o /dev/null -w "%{http_code}" https://<domain>/

If it returns 200, deployment is successful. If not, check logs:

bash
railway logs --tail 50

Step 8: Done

Print a summary:

✅ Deployment complete!
🌐 Platform URL: https://<domain>
📋 Monitor: railway logs
🔄 Re-deploy: just run deploy again

Notes

  • Idempotency: Running this skill multiple times is safe. Each step checks current state before acting.
  • Link detection: Use railway status to check if already linked — it's more reliable than checking .railway/config.json (works across machines and fresh clones).
  • Re-deploy: On subsequent runs, Steps 1–5 are all skipped or no-ops. Only Step 6 (upload) actually runs.
  • Secret key: Only set SECRET_KEY_BASE if not already set (check with railway variable list).
  • Database migrations: Handled automatically by bin/docker-entrypoint via rails db:prepare — never run railway run bundle exec rails db:migrate as Railway's internal DB IP is not accessible from local machine.
  • PostgreSQL CLI bug: railway add --database postgres always fails with Unauthorized — always use the Web UI instead.

Domande frequenti

Cosa fa la skill IA Deploy?

Distribuisce applicazioni Rails su Railway. Gestisce la configurazione iniziale e le ridistribuzioni in modo idempotente tramite Railway CLI. Si attiva con: "deploy", "deploy to railway", "railway deploy", "发布", "部署", "上线".

Perché usare Deploy su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Deploy è 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 la skill 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 Deploy in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/clacky-ai/openclacky/tree/main/lib/clacky/default_skills/deploy. TypingMind legge il file SKILL.md e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Deploy?

Qualsiasi modello che colleghi a 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 Deploy?

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

La skill IA Deploy è gratuita?

Sì. È pubblicata su GitHub da clacky-ai 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, template 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.

Elenco completo

Crea subito il tuo spazio di lavoro AI

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