2.8 KiB
2.8 KiB
claude-obsidian: GitHub Copilot Instructions
This repository is a Claude Code plugin and Obsidian vault that builds persistent, compounding knowledge bases using Andrej Karpathy's LLM Wiki pattern. It is markdown-only. No build step, no compiled code, no runtime dependencies.
Project Type
- Agent Skills package (cross-platform Agent Skills standard)
- Obsidian vault (interpretable by Obsidian directly)
- Claude Code plugin (installable via marketplace)
Repository Layout
skills/: 10 skills, each with aSKILL.mddefining trigger phrases and instructionshooks/hooks.json: Claude Code lifecycle hooks (SessionStart, PostCompact, PostToolUse, Stop).claude-plugin/plugin.json: plugin manifestwiki/: generated knowledge base (Markdown files with YAML frontmatter).raw/: immutable source documents (never modify)_templates/: Obsidian Templater templates_attachments/: images and PDFs referenced by wiki pages
Conventions Copilot Should Follow
When suggesting edits:
- Frontmatter is flat YAML with plural keys:
tags,aliases,cssclasses - Internal links are wikilinks:
[[Note Name]], not Markdown links to.mdpaths - Dates are
YYYY-MM-DD, not ISO datetimes .raw/is immutable. Never suggest edits to anything under that pathwiki/log.mdis append-only, with new entries at the topwiki/hot.mdis overwritten at session end, not appended to- Skills use only
nameanddescriptionin frontmatter. Noallowed-tools, notriggers, noglobs(these are not part of the Agent Skills spec) - Custom callouts: this vault defines
[!contradiction],[!gap],[!key-insight],[!stale]in.obsidian/snippets/vault-colors.css. These render only with that snippet enabled.
When Editing Skills (skills/<name>/SKILL.md)
- Frontmatter:
name(matches directory name) anddescription(single quoted line, max ~250 useful chars) - Body: short, imperative instructions. Reference files with backticks. Do not paste large code blocks unless they're essential.
- Trigger phrases go in the
descriptionfield, not in body or non-standard fields
When Editing Hooks (hooks/hooks.json)
- Valid event names only:
SessionStart,Stop,PreToolUse,PostToolUse,PreCompact,PostCompact,UserPromptSubmit - Hook types:
command(shell),prompt(LLM),http(POST),agent(subagent) matcherfield uses regex against tool names forPreToolUse/PostToolUse- For
SessionStart: matcher usesstartup,resume,clear, orcompact
Cross-Reference
- Plugin: https://github.com/AgriciDaniel/claude-obsidian
- Pattern source: https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f
- Authoritative Obsidian-specific skills: https://github.com/kepano/obsidian-skills