How this skill is triggered — by the user, by Claude, or both
Slash command
/hive-mind:pr-noteThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Pull PR data from GitHub and write a structured note to the user's Obsidian vault
Pull PR data from GitHub and write a structured note to the user's Obsidian vault documenting what shipped, why, and what decisions were made.
The vault path is defined by the HIVE_MIND_PATH environment variable.
The qmd collection name is defined by HIVE_MIND_COLLECTION (default: hive-mind).
The note author is defined by HIVE_MIND_AUTHOR (a wikilink to a people/ entry).
If any of these are unset, abort and tell the user to run ./setup.sh in the vault
directory.
Also verify that gh is installed before proceeding:
command -v gh &>/dev/null
If gh is not found, abort and tell the user to install the GitHub CLI.
Inferred from branch — /hive-mind:pr-note
Detect the current branch and infer the open PR via gh pr view.
Explicit — /hive-mind:pr-note #123 or /hive-mind:pr-note <URL>
Use the provided PR number or URL directly. The value is available as $ARGUMENTS.
$ARGUMENTS contains a PR number (e.g., #123, 123) or a GitHub PR URL,
use that as the target PR.git branch --show-current
Then fetch the PR associated with it:
gh pr view --json number,title,body,files,commits,reviews,labels,state
Fetch full PR data via:
gh pr view <number> --json title,body,files,commits,reviews,labels,state
Use the returned fields to populate the note:
title → note title and slugbody → Summary and Decisions sectionscommits → supplement Summary; mine for decision rationalefiles → Changes section (group logically, do NOT dump a raw list)reviews → supplement Decisions section with reviewer commentarylabels → inform tag selectionstate → included for awareness; note whether the PR is open/merged/closedDetermine the target repo directory dynamically from the current working directory and the vault structure.
pwdUse the basename of the current working directory (or its git root) as the repo slug. Use the name exactly as-is — do not strip suffixes or transform it.
Search for the prs directory for the repo slug anywhere under $HIVE_MIND_PATH/projects:
find "$HIVE_MIND_PATH/projects" -type d -path "*/repos/<repo-slug>/prs" | head -1
$PRS_DIR).Extract the project name from the resolved prs path:
PROJECT=$(echo "$PRS_DIR" | sed 's|.*/projects/||' | cut -d'/' -f1)
The repo slug (from step 1) populates repo:. The extracted project name
populates project:. There is no corresponding tag.
All tags MUST exist in $HIVE_MIND_PATH/TAGS.md. Read that file every
time you generate a note — do not rely on a cached or hardcoded list.
Use the template from $HIVE_MIND_PATH/templates/pr-note.md as the structural
starting point. Populate each section following these guidelines:
PR #<number>: <PR title> — used in both frontmatter and as the H1Omit any section that has no content. Do not include empty sections.
YYYY-MM-DD-pr-<number>-<slug>.md
The slug should be 2-4 hyphenated words derived from the PR title.
Examples:
2026-02-21-pr-42-jwt-auth-strategy.md2026-02-21-pr-108-batch-apex-refactor.md2026-02-21-pr-7-docker-compose-setup.md[[path|Title]] syntax from the linking context.
Do not guess at links — only link to notes confirmed to exist by search.Validate prerequisites: HIVE_MIND_PATH, HIVE_MIND_COLLECTION, and
HIVE_MIND_AUTHOR are set; gh is installed.
Resolve the target PR from $ARGUMENTS or by inferring from the current
branch via gh pr view.
Read $HIVE_MIND_PATH/TAGS.md, $HIVE_MIND_PATH/FRONTMATTER.md, and
$HIVE_MIND_PATH/templates/pr-note.md to load the current valid tag list,
frontmatter conventions, and the note template. Use the template as the
structural starting point for the generated note — it defines the
frontmatter fields and body sections.
Extract PR data from GitHub via gh pr view <number> --json title,body,files,commits,reviews,labels,state.
Determine repo slug from pwd and resolve the vault prs directory via
find "$HIVE_MIND_PATH/projects" -type d -path "*/repos/<repo-slug>/prs" | head -1.
Extract the project name from the resolved path.
Discover vault context for linking. If qmd is not installed, skip
this entire step — the note will be created without wikilinks. Otherwise,
execute sub-steps 7a–7f:
7a. Extract search entities — From the PR data (step 4), identify every named entity that plausibly exists as its own vault note. Entity types by priority:
| Priority | Entity type | Examples | Always query? |
|---|---|---|---|
| 1 (highest) | People (PR author, reviewers) | person names | Yes — never drop |
| 1 (highest) | Repositories | repo slugs from step 5 | Yes — never drop |
| 2 | Glossary terms / internal jargon | TDS, Command Center, Mascot | Yes |
| 2 | Named tools / frameworks | qmd, Salesforce Shield, Next.js | Yes |
| 3 | Key technical terms from title/desc | JWT Bearer Flow, ECA auth | If distinctive |
| 3 | Significantly changed components | AuthService, batch processor | If distinctive |
| 4 (lowest) | Generic file names / minor changes | "update README", "bump version" | Drop first |
Soft ceiling: ~6 BM25 queries. Drop priority 4 and 3 entities first. Never drop a person or repo query.
7b. BM25 query formatting — CRITICAL
WARNING: BM25 tokenizes on hyphens and slashes. This vault is full of hyphenated content. Failing to de-hyphenate queries will produce poor or empty results.
Always convert hyphens and slashes to spaces before running BM25 queries:
What you want to find Wrong query Correct query Notes about trusted-services-lite trusted-services-litetrusted services liteNotes tagged salesforce/lwc salesforce/lwcsalesforce lwcNotes about jwt-auth jwt-authjwt authNotes about session-token handling session-tokensession tokenThis does NOT apply to semantic search — the embedding model handles hyphens and compound terms naturally.
7c. Run searches — Two search strategies, used together:
BM25 (per entity) — One query per named entity from 7a:
qmd search "<de-hyphenated entity>" --json -n 5 -c $HIVE_MIND_COLLECTION
Semantic (one pass for overall PR purpose) — One vsearch query
describing what this PR accomplishes at a high level:
qmd vsearch "<conceptual description of the PR's purpose>" --json -n 5 -c $HIVE_MIND_COLLECTION
The semantic query should be a 5–15 word natural language description, not a keyword list. Example: "migrating authentication from session tokens to JWT bearer flow" rather than "auth jwt migration".
If total BM25 hits across all entity queries already exceed 8 unique notes, the semantic pass may be skipped — the vault has been adequately sampled.
No qmd update here — that runs in the final step after the note is
written.
7d. Build linking context — From combined BM25 + semantic results, deduplicate by path and discard:
index.md)For each remaining result, record:
qmd://vault/ prefix and .md extension)[[<vault-path>|<title>]]qmd get "<filepath>" -l 20
for 2–3 top results to read their frontmatter tags)Note which domain tags recur across related notes — this is a signal (not a directive) for tag selection in step 9.
7e. Duplicate detection — If any result has a title or topic that closely matches the note being created (same repo, overlapping subject matter), flag it:
Potential duplicate detected:
[[path|Title]]covers a similar topic.
Present the warning to the user and ask whether to:
Do NOT silently create a duplicate.
7f. Use context during generation — Carry the linking context into step 8. During note generation:
[[path|Title]] wikilinks where the note's content naturally
references a related note's topic. Link on first mention only.type: term), wikilink
to it on first mention using [[glossary/<slug>|<Title>]].Generate the note content following the output format. Use the linking
context from step 7 to insert [[wikilinks]] to related vault notes
where the content naturally references their topics. Link on first
mention only; do not add a separate "Related Notes" section.
Validate that ALL tags in frontmatter exist in $HIVE_MIND_PATH/TAGS.md.
For any tag that doesn't exist, apply the three-check protocol from
TAGS.md. If it passes, add the tag to TAGS.md and keep it. If it fails,
replace it with the closest broader existing tag. Cross-reference domain
tags observed on related notes in step 7d. If a recurring tag from
related notes is relevant to the new note and was not already selected,
consider adding it (still subject to the 2–5 tag limit). Use related
notes' tags as a weak signal — do not blindly copy them.
Determine target directory:
find in step 5.Write the file to the target directory.
Update the qmd index so the new note is immediately searchable:
qmd update 2>/dev/null && qmd embed 2>/dev/null
If qmd is not installed, skip silently.
Report to the user: file path, title, which sections were populated, the number of wikilinks added, and which notes were linked.
npx claudepluginhub arctype-ventures/arctype-plugins --plugin hive-mindCreates and edits notes in PKM vault using templates for ADR, research, tasks, meetings; duplicate checks via semantic search, link discovery, annotations, index updates.
Manages Obsidian vault as developer knowledge base: create/search/update notes with standard frontmatter, organize by projects/technologies/Claude Code, auto-capture commits/tasks/components.
Provides persistent Obsidian vault memory for coding agents. Auto-orients sessions with TODOs and project overviews, supports lookup of notes/patterns, and writes discoveries using commands like init, lookup, note.