From rpl-magang
One-time setup — parse pedoman PDF, review extracted config, and save for use by other rpl-magang skills
How this skill is triggered — by the user, by Claude, or both
Slash command
/rpl-magang:init [--pdf /path/to/pedoman.pdf][--pdf /path/to/pedoman.pdf]This skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
<objective>
Run:
test -f ~/.claude/magang-tools/config.json && echo "exists" || echo "not_found"
If config exists → show warning: "Config sudah ada dari sebelumnya. Re-init akan menimpa konfigurasi yang lama." Ask:
If $ARGUMENTS contains --pdf, extract path from there.
Otherwise ask:
"Berikan path ke file pedoman PDF kamu (contoh: ~/Downloads/Pedoman_MBKM.pdf):"
Validate the path exists before continuing:
test -f "[PATH]" && echo "ok" || echo "not_found"
If not found → ask again.
Run:
~/.claude/magang-tools/venv/bin/python ~/.claude/magang-tools/scripts/init_pedoman.py --pdf "[PDF_PATH]"
Parse the JSON output.
If exit code 2 (pdf_parse_failed) → go to Step 3b (manual fallback).
If exit code 0 → go to Step 4 (review).
Tell user: "PDF tidak bisa dibaca otomatis. Gw akan tanya manual."
Ask the following (can batch into one AskUserQuestion call or multiple):
Build config dict from answers. Skip Step 4, go to Step 5.
Display extracted info in a readable format. Example:
📋 Hasil ekstraksi dari pedoman:
FORMATTING:
Font : Arial 11pt
Spasi : 1.5
Margin : 4cm kiri, 3cm atas/bawah/kanan
Kutipan : APA
STRUKTUR LAPORAN:
Bab I : Pendahuluan (1.1 Latar Belakang, 1.2 Manfaat & Tujuan, ...)
Bab II : Profil Institusi Mitra (2.1, 2.2, ...)
Bab III : Pelaksanaan Kegiatan (3.1, 3.2, ...)
Bab IV : Kesimpulan dan Saran (4.1, 4.2)
KOMPONEN PENILAIAN:
1. Aspek kemampuan kompetensi dan ketrampilan
2. Aspek personal dan sosial
3. ...
Sanity-check the extracted structure before showing it (safety net on top of the extractor):
3.1) → keep the one matching the bab's real outline, drop the stray.4.1 Substansi sitting in Bab IV alongside the real 4.1 Kesimpulan) → drop the off-topic one; the real Bab IV is "Kesimpulan dan Saran".Then ask: "Ada yang perlu dikoreksi? Kalau ada, sebutkan field mana dan nilai yang benar. Kalau sudah oke ketik 'lanjut'."
If user provides corrections → apply them to the config dict. If user types 'lanjut' or equivalent → proceed.
Ask: "Punya template PKS DOCX sendiri? Kalau ada, berikan path-nya. Kalau tidak, skip (Enter)."
If path provided → validate it exists → set pks_template_path in config.
If skipped → pks_template_path remains null (use built-in).
Ask (boleh skip dengan Enter): "Mau simpan identitas biar nggak ditanya ulang tiap skill? (boleh skip)"
Bila diisi, simpan ke config sebagai student_identity:
{ "student_identity": { "nama": "...", "nim": "...", "mitra": "...", "penyelia": "..." } }
Skill laporan / logbook / pks membaca ini dan hanya minta konfirmasi,
tidak tanya ulang. Bila skip, student_identity tidak ditulis (skill akan
menanyakannya saat dibutuhkan, lalu menyimpannya balik).
Tampilkan template nama file default dari config dan tanyakan apakah ada yang mau diubah:
📁 Konvensi penamaan file P3NK (dari panduan):
form_konversi : Form_Mk_Konversi_MBKM_{nama_mhs}.xlsx
loa : LoA_{nama_mhs}.pdf
logbook : Logbook_{nama_mhs}.pdf
laporan : Laporan_MBKM_{nama_mhs}.pdf
transkrip_nilai : Transkrip_Nilai_{nama_mhs}.pdf
pks : PKS_{nama_perusahaan}.pdf
presentasi : presentasi_{nama_mhs}.mp4
sertifikat : Sertifikat_{nama_kegiatan}_{nama_mhs}.pdf
Tanya: "Ada template nama file yang mau diubah? Kalau sudah sesuai, ketik 'lanjut'."
Jika user ubah salah satu → update key yang relevan di config["file_naming"].
Jika skip/lanjut → biarkan default.
Write config to ~/.claude/magang-tools/config.json.
mkdir -p ~/.claude/magang-tools
Use the Write tool to write the final config JSON.
Run:
~/.claude/magang-tools/venv/bin/python \
~/.claude/magang-tools/scripts/generate_bab_skills.py \
--config ~/.claude/magang-tools/config.json \
--output-dir ~/.claude/magang-tools/generated-skills
Parse JSON output. If error → show error, continue (skills can be regenerated later).
Sync generated skills to plugin cache:
CACHE=$(ls -d ~/.claude/plugins/cache/rpl-magang/rpl-magang/*/skills 2>/dev/null | sort -V | tail -1)
if [ -n "$CACHE" ]; then
for skill_dir in ~/.claude/magang-tools/generated-skills/laporan-bab-*/; do
dir="${skill_dir%/}"
[ -d "$dir" ] && cp -r "$dir" "$CACHE/"
done
fi
Show which skills were generated:
🔧 Skills yang di-generate dari pedoman kamu:
/rpl-magang:laporan-bab-1 — BAB I [title from config]
/rpl-magang:laporan-bab-2 — BAB II [title from config]
/rpl-magang:laporan-bab-3 — BAB III [title from config]
/rpl-magang:laporan-bab-4 — BAB IV [title from config]
Show:
✅ Setup selesai! Config disimpan di ~/.claude/magang-tools/config.json
Skills siap digunakan:
/rpl-magang:laporan — cover, lembar pengesahan, kata pengantar
/rpl-magang:laporan-compile — compile semua section jadi DOCX
/rpl-magang:logbook — buat logbook mingguan
/rpl-magang:pks — buat PKS
/rpl-magang:penilaian-penyelia — buat lembar penilaian penyelia
⚠️ RESTART CLAUDE CODE untuk mengaktifkan skill bab yang baru di-generate:
/rpl-magang:laporan-bab-1, laporan-bab-2, laporan-bab-3, laporan-bab-4
Provides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
npx claudepluginhub dikdns/upi-rpl-laporan-magang --plugin rpl-magang