pathfinder
Fungsinya
Pathfinder membantu Anda memahami bagaimana sebuah program komputer diorganisasi. Tool ini membuat diagram (flowchart) yang menunjukkan bagaimana berbagai bagian program bekerja sama, mengidentifikasi bagian yang melakukan hal yang sama di tempat berbeda, dan menyarankan cara yang lebih sederhana untuk mengatur semuanya.
Kapan dipakai
- βSaat Anda ingin cepat memahami kode yang rumit.
- βSaat Anda melihat bagian kode yang duplikat dan ingin menyatukannya.
- βSebelum melakukan perubahan besar (refactoring) pada program.
Link skill
https://github.com/thedotmack/claude-mem/blob/main/plugin/skills/pathfinder/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βBantu saya memahami struktur kode ini dan temukan bagian yang duplikat.β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Pertama, Pathfinder membagi program menjadi 'fitur'. Lalu, ia menggambar alur yang dilalui setiap fitur dan mencari kode yang duplikat di antara fitur-fitur tersebut. Terakhir, ia menyarankan satu organisasi yang lebih sederhana dan membuat instruksi untuk tool lain agar bisa membuat rencana tindakan.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.
Pathfinder
You are an ORCHESTRATOR. Map the codebase into feature-grouped flowcharts, identify duplicated concerns, propose the simplest unified architecture, and hand off per-system plans to /make-plan.
You do not write implementation code. You produce diagrams, a duplication report, a proposed unified flowchart, and handoff prompts.
Delegation Model
Use subagents for discovery and extraction (file reading, flow tracing, grep, diagramming). Keep synthesis (deciding feature boundaries, picking unification strategies, final flowchart) with the orchestrator. Reject subagent reports that lack source citations and redeploy.
Subagent Reporting Contract (MANDATORY)
Each subagent response must include:
- Sources consulted β exact file paths and line ranges read
- Concrete findings β exact function names, call sites, data flow
- Mermaid diagram(s) with nodes labeled by
file:line - Confidence note + known gaps
Output Artifacts
All artifacts go in PATHFINDER-<YYYY-MM-DD>/ at repo root:
00-features.mdβ feature inventory with boundaries01-flowcharts/<feature>.mdβ one Mermaid flowchart per feature02-duplication-report.mdβ cross-cutting duplicated concerns with evidence03-unified-proposal.mdβ proposed unified architecture + Mermaid04-handoff-prompts.mdβ copy-pasteable/make-planprompts per unified system
Phases
Phase 0: Feature Discovery (ALWAYS FIRST)
Deploy ONE "Feature Discovery" subagent to:
- Walk the source tree (not built artifacts) and read top-level README / CLAUDE.md
- Propose feature boundaries based on directory structure, import graph, and naming
- Return a flat list of features with: name, entry points (file:line), core files, brief purpose
Orchestrator reviews the proposal, adjusts boundaries if needed, writes 00-features.md. Do NOT fan out until feature boundaries are approved.
Phase 1: Per-Feature Flowcharts (FAN OUT)
Deploy ONE "Flowchart" subagent per feature in parallel. Each receives only its feature's scope. Each must:
- Trace the feature's primary happy path from entry point to terminal state
- Identify side effects (DB writes, HTTP calls, file I/O, process spawns)
- Note error and fallback branches but do not let them dominate the diagram
- Produce a Mermaid
flowchart TDwith every node labeledName<br/>file:line - List external dependencies (other features it calls into) at the bottom
Orchestrator writes each flowchart to 01-flowcharts/<feature>.md. Reject any diagram missing file:line labels.
Phase 2: Duplication Hunt
Deploy TWO subagents in parallel:
"Within-Feature Duplication" subagent:
- For each feature, find repeated code/logic patterns inside the feature only
- Report only duplications worth consolidating (ignore trivial repetition)
"Cross-Feature Duplication" subagent:
- Compare flowcharts across features for concerns that appear in multiple places
- Examples of what to look for: multiple capture paths, parallel queue implementations, duplicated storage/migration code, repeated agent scaffolding, parallel parsing layers
- For each duplication, report: (a) the concern, (b) every location with
file:line, (c) why they diverged, (d) whether the divergence is legitimate specialization or accidental
Orchestrator synthesizes both into 02-duplication-report.md. Every duplication claim must cite β₯2 file:line locations.
Phase 3: Unified Proposal (ORCHESTRATOR)
The orchestrator writes 03-unified-proposal.md itself β do not delegate synthesis.
For each duplicated concern from Phase 2 that is NOT legitimate specialization:
- Propose the simplest unified design (one path, one store, one handler β whatever applies)
- Name the consolidated component and its single entry point
- Show what each old call site becomes
- Call out any loss of capability and whether it's acceptable
End the document with ONE combined Mermaid flowchart showing the proposed unified system. Nodes still labeled with target file:line (new or existing) where knowable.
Anti-patterns to reject in your own proposal:
- Adding a new abstraction layer "for flexibility"
- Keeping both old paths behind a feature flag
- Introducing a registry/factory when a switch statement suffices
- Preserving divergent behavior "just in case"
Phase 4: Per-System Handoff Prompts
For each unified system in the proposal, write a ready-to-run /make-plan prompt to 04-handoff-prompts.md. Each prompt must:
β¦
Pertanyaan umum
Apa itu 'flowchart'?
Flowchart adalah diagram yang menunjukkan alur kerja atau urutan langkah dalam sebuah proses atau program.
Apa maksud 'unify architecture'?
Artinya mencari cara yang lebih sederhana dan teratur untuk menangani tugas yang dikerjakan secara berulang atau rumit di berbagai bagian program.
Apakah Pathfinder yang menulis kode untuk memperbaiki program?
Tidak. Pathfinder hanya menganalisis kode yang ada, mengidentifikasi masalah, dan membuat rencana (instruksi) agar tool lain bisa melakukan perbaikannya.
Detail
Deskripsi asli dari pembuat
Map a codebase into feature-grouped flowcharts, identify duplicated concerns across features, and propose a unified architecture. Use when asked to "find the ideal path," unify duplicated systems, or audit architecture before a refactor. Emits a proposed unified flowchart plus per-system /make-plan prompts.
repo: thedotmack/claude-mem
Popularitas
- Bintang GitHub
- 101k
- Peringkat
- #1277
- Lisensi
- Apache-2.0
- Diperbarui
- 15/10/2026
Komentar
- β¦
Skill lain dari repositori ini
Agent Cost Report
101kMeminta agent Anda membuat laporan biaya terperinci atas aktivitasnya. Menunjukkan berapa banyak yang dihabiskan untuk token dan layanan.
claude-mem-install
101kMembantu agent Anda menyiapkan Claude-Mem di berbagai lingkungan. Anda bisa memilih worker lokal atau remote, serta mengatur observasi.
mem-search
101kMemungkinkan agent Anda mencari memori masa lalu. Berguna untuk mengingat solusi sebelumnya atau pekerjaan dari sesi lama.
host-observer
101kMembantu agent Anda merespons tugas observer Claude-Mem. Agent hanya boleh membalas dengan 'skip_summary' atau observasi XML lengkap.
Skill serupa
openclaw-update
394kMembantu agent Anda memperbarui OpenClaw Gateway yang sudah ada, dengan memilih metode pembaruan yang sesuai cara pemasangannya dan menjaga sesi Anda tetap berjalan.
diagnose-gateway
394kMembantu agent Anda mencari tahu mengapa OpenClaw Gateway gagal dengan memeriksa pengaturan, channel, dan port tanpa mengubah apa pun.
crabbox-apps
394kMembantu agent Anda membuka dan menjalankan aplikasi di mesin cloud sementara, lalu menampilkan tampilannya di panel samping chat Anda.