Logo di Iblai Api Studio Pdf

Iblai Api Studio Pdf

Organizzazione
iblai
iblai-api-studio-pdf

Add a PDF viewer component to an Open edX unit on Studio — enable the pdf advanced module on the course, upload the PDF as a course asset, create the pdf block, and save its title and href through the block's own save_pdf handler (the generic xblock update does not persist the file field). Use when the user wants a PDF, slides, a syllabus, a reading handout or any document displayed inline in a unit. Session auth via studio.env.

Panoramica

Pubblicato daiblai
Repositoryvibe
Nome della skilliblai-api-studio-pdf
Stelle
229
Fork
8
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 iblai su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Iblai Api Studio Pdf 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/iblai/vibe/tree/main/skills/content/iblai-api-studio-pdf
  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/iblai/vibe.git /tmp/vibe
mkdir -p .claude/skills
cp -r /tmp/vibe/skills/content/iblai-api-studio-pdf .claude/skills/iblai-api-studio-pdf
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Iblai Api Studio Pdf 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 Iblai Api Studio Pdf 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 Iblai Api Studio Pdf 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à.

iblai-api-studio-pdf

The pdf XBlock renders a PDF inline in the unit. It is an advanced module: the course has to list it in advanced_modules before Studio will create one, and it saves its fields through its own handler, not the generic xblock update. Three steps: enable once per course → upload the file → create + save.

Before you start

  1. Preflight: node .claude/skills/iblai-api-studio-auth/scripts/studio-login.mjs --check prints two oks; otherwise run /iblai-api-studio-auth first — do not attempt the calls below.
  2. A unit locator (/iblai-api-studio-unit, or the unit list from /iblai-api-studio-outline — the bulk builder cannot create pdf blocks, so they are always added here afterwards).
  3. The PDF file on disk (compressed if large).

Auth & conventions

  • Base URL: $STUDIO_URL; Studio session cookies from studio.env (its values are single-quoted — bash strips the quotes; any other parser must strip them too, or Studio answers 500: /iblai-api-studio-auth).
  • Snippet:
    bash
    set -a; . ./studio.env; set +a
    S=(-s -b "studio_session_id=$STUDIO_SESSION; csrftoken=$STUDIO_CSRF" -H "X-CSRFToken: $STUDIO_CSRF" \
       -H "Origin: $STUDIO_URL" -H "Referer: $STUDIO_URL/" -H "Accept: application/json" -H "Content-Type: application/json")
  • Keys: COURSE = course-v1:…; parent = a unit locator; the block is …+type@pdf+block@<hex>.
  • Fields: display_name (title) and href (URL of the PDF — a course asset /static/<file>.pdf or an absolute https:// URL).
  • Draft until the unit is published (/iblai-api-studio-publish). DELETE is destructive — confirm with the user first.

Reads

  • GET /settings/advanced/{COURSE} — { …, "advanced_modules": { "value": ["pdf", …], … } }; the block can be created only when "pdf" is in value.
  • GET /xblock/{pdf} — { "display_name", "category": "pdf", "metadata": { "display_name" }, "published", "has_changes" }. The href is not in metadata; read it from the studio view:
  • GET /xblock/{pdf}/studio_view — { "html": "…<input id=\"edit_href\" … value=\"/static/syllabus.pdf\">…" }; regex id="edit_href"[^>]*value="([^"]*)".
  • GET /assets/{COURSE}/?asset_type=Documents&page_size=50 — uploaded PDFs (assets[].portable_url is the /static/… path to use).

Writes

  1. Enable the module (once per course; keeps the other entries): POST /settings/advanced/{COURSE} { "advanced_modules": { "value": ["pdf"] } } → the full advanced-settings map with the new value. Read first and merge if value already lists other modules.
  2. Upload the PDF (multipart, field file, no JSON content type):
    bash
    curl -s -b "studio_session_id=$STUDIO_SESSION; csrftoken=$STUDIO_CSRF" -H "X-CSRFToken: $STUDIO_CSRF" \
      -H "Origin: $STUDIO_URL" -H "Referer: $STUDIO_URL/" -H "Accept: application/json" \
      -X POST "$STUDIO_URL/assets/$COURSE/" -F "file=@syllabus.pdf"
    → { "asset": { "display_name": "syllabus.pdf", "content_type": "application/pdf", "url": "/asset-v1:…+type@asset+block@syllabus.pdf", "portable_url": "/static/syllabus.pdf", "external_url": "https://<lms>/asset-v1:…", "id": "asset-v1:…", "locked": false, … }, "msg": "Upload completed" }. Re-uploading the same filename replaces the asset.
  3. Create the block: POST /xblock/ { "parent_locator": "<unit>", "category": "pdf", "display_name": "Syllabus" } → { "locator": "…+type@pdf+block@<hex>", "courseKey" }. 400/500 here usually means step 1 was skipped.
  4. Save title + file: POST /xblock/{pdf}/handler/save_pdf
    json
    { "display_name": "Syllabus", "href": "/static/syllabus.pdf" }
    → { "result": "success" } (or { "result": "error", "message": "…" }). This is the only call that persists href.
  • POST /xblock/{pdf} { "metadata": { "display_name": "New title" } } — rename only. Sending href or url in metadata is silently ignored or returns 500; never use it for the file.
  • DELETE /xblock/{pdf} → 204. Confirm with the user first.

Example

bash
set -a; . ./studio.env; set +a
S=(-s -b "studio_session_id=$STUDIO_SESSION; csrftoken=$STUDIO_CSRF" -H "X-CSRFToken: $STUDIO_CSRF" \
   -H "Origin: $STUDIO_URL" -H "Referer: $STUDIO_URL/" -H "Accept: application/json" -H "Content-Type: application/json")
COURSE="course-v1:acme+DATA101+2026-T1"
UNIT="block-v1:acme+DATA101+2026-T1+type@vertical+block@645f5ded5f544adab9fb603c4afc3bac"

# 1. enable (merge with existing modules)
MODS=$(curl "${S[@]}" "$STUDIO_URL/settings/advanced/$COURSE" | python3 -c '
import sys,json; v=json.load(sys.stdin)["advanced_modules"]["value"]; print(json.dumps(sorted(set(v)|{"pdf"})))')
curl "${S[@]}" -X POST "$STUDIO_URL/settings/advanced/$COURSE" -d "{\"advanced_modules\":{\"value\":$MODS}}" >/dev/null

# 2. upload (multipart: same cookies/CSRF, no JSON content type)
U=(-s -b "studio_session_id=$STUDIO_SESSION; csrftoken=$STUDIO_CSRF" -H "X-CSRFToken: $STUDIO_CSRF" \
   -H "Origin: $STUDIO_URL" -H "Referer: $STUDIO_URL/" -H "Accept: application/json")
STATIC=$(curl "${U[@]}" -X POST "$STUDIO_URL/assets/$COURSE/" -F "file=@syllabus.pdf" \
  | python3 -c 'import sys,json; print(json.load(sys.stdin)["asset"]["portable_url"])')      # /static/syllabus.pdf

# 3 + 4. create and save
PDF=$(curl "${S[@]}" -X POST "$STUDIO_URL/xblock/" -d "{\"parent_locator\":\"$UNIT\",\"category\":\"pdf\",\"display_name\":\"Syllabus\"}" \
  | python3 -c 'import sys,json; print(json.load(sys.stdin)["locator"])')
curl "${S[@]}" -X POST "$STUDIO_URL/xblock/$PDF/handler/save_pdf" -d "{\"display_name\":\"Syllabus\",\"href\":\"$STATIC\"}"

Notes

  • href accepts /static/<name> (course asset, portable across reruns and hosts) or an absolute URL; use assets for anything the org owns. External URLs must allow embedding (no X-Frame-Options: DENY).
  • The viewer is an inline reader; there is no download toggle in this block's fields — link the external_url from an /iblai-api-studio-html block if users need a download link.
  • Verify with studio_view (regex above) after saving; the generic GET /xblock/{pdf} will always show only display_name.
  • The -F upload must not carry Content-Type: application/json; the example uses a second header array without it.
  • Large PDFs: Studio accepts uploads up to the deployment's limit (tens of MB); compress first when in doubt.

Domande frequenti

Cosa fa la skill IA Iblai Api Studio Pdf?

Add a PDF viewer component to an Open edX unit on Studio — enable the pdf advanced module on the course, upload the PDF as a course asset, create the pdf block, and save its title and href through the block's own save_pdf handler (the generic xblock update does not persist the file field). Use when the user wants a PDF, slides, a syllabus, a reading handout or any document displayed inline in a unit. Session auth via studio.env.

Perché usare Iblai Api Studio Pdf su TypingMind?

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

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/iblai/vibe/tree/main/skills/content/iblai-api-studio-pdf. TypingMind legge il file SKILL.md e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Iblai Api Studio Pdf?

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 Iblai Api Studio Pdf?

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

La skill IA Iblai Api Studio Pdf è gratuita?

Sì. È pubblicata su GitHub da iblai 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 👇