add claude-obsidian
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
custom:
|
||||
- https://www.skool.com/ai-marketing-hub-pro
|
||||
@@ -0,0 +1,41 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Something is broken or behaves unexpectedly
|
||||
title: "[bug] "
|
||||
labels: bug
|
||||
assignees: ''
|
||||
---
|
||||
|
||||
## What happened
|
||||
A clear description of the unexpected behavior.
|
||||
|
||||
## Expected behavior
|
||||
What you expected to happen instead.
|
||||
|
||||
## Reproduction steps
|
||||
1. ...
|
||||
2. ...
|
||||
3. ...
|
||||
|
||||
## Environment
|
||||
- Plugin version: (e.g. v1.9.0)
|
||||
- Claude Code version: (run `claude --version`)
|
||||
- OS: (e.g. macOS 14.5, Pop!_OS 24.04, Windows 11)
|
||||
- Obsidian version: (if relevant)
|
||||
- Transport selected: (filesystem / obsidian-cli / mcp-obsidian — see `.vault-meta/transport.json`)
|
||||
|
||||
## Skill / agent / script involved
|
||||
Which surface is affected? (e.g. `/wiki-ingest`, `scripts/wiki-mode.py`, `agents/verifier.md`)
|
||||
|
||||
## Logs / output
|
||||
```
|
||||
Paste relevant terminal output or error messages here.
|
||||
```
|
||||
|
||||
## What you tried
|
||||
- [ ] Ran `make test` — all 8 suites green? Yes / No
|
||||
- [ ] Checked CHANGELOG for known issues at your version
|
||||
- [ ] Searched existing issues for similar reports
|
||||
|
||||
## Additional context
|
||||
Anything else that might help (screenshots, related issues, recent changes).
|
||||
@@ -0,0 +1,36 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea, new skill, or enhancement
|
||||
title: "[feature] "
|
||||
labels: enhancement
|
||||
assignees: ''
|
||||
---
|
||||
|
||||
## Problem
|
||||
What user need or workflow gap motivates this request? Be specific about the situation where today's behavior falls short.
|
||||
|
||||
## Proposed solution
|
||||
Describe what you'd like to see. New skill? New agent? Change to an existing one? Sketch the interface (slash command, trigger phrases, expected output).
|
||||
|
||||
## Alternatives considered
|
||||
What other approaches did you think about, and why is this one preferred?
|
||||
|
||||
## Scope
|
||||
Which existing surface(s) does this touch?
|
||||
- [ ] A new skill (`skills/<name>/`)
|
||||
- [ ] A new agent (`agents/<name>.md`)
|
||||
- [ ] A new script (`scripts/<name>`)
|
||||
- [ ] Change to existing skill: (which?)
|
||||
- [ ] Change to plugin manifest / hooks / setup scripts
|
||||
- [ ] Documentation only
|
||||
|
||||
## Compatibility
|
||||
- Does this change behavior for existing v1.x vaults? Yes / No
|
||||
- Does it require a new opt-in (`bin/setup-*.sh`)? Yes / No
|
||||
- Does it introduce a new dependency? Yes / No
|
||||
|
||||
## Testing
|
||||
How would this be tested hermetically? (No network, no external services.)
|
||||
|
||||
## Additional context
|
||||
Links, examples, or references to similar features in other tools.
|
||||
@@ -0,0 +1,51 @@
|
||||
# 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 a `SKILL.md` defining trigger phrases and instructions
|
||||
- `hooks/hooks.json`: Claude Code lifecycle hooks (SessionStart, PostCompact, PostToolUse, Stop)
|
||||
- `.claude-plugin/plugin.json`: plugin manifest
|
||||
- `wiki/`: 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:
|
||||
|
||||
1. **Frontmatter is flat YAML** with plural keys: `tags`, `aliases`, `cssclasses`
|
||||
2. **Internal links are wikilinks**: `[[Note Name]]`, not Markdown links to `.md` paths
|
||||
3. **Dates are `YYYY-MM-DD`**, not ISO datetimes
|
||||
4. **`.raw/` is immutable**. Never suggest edits to anything under that path
|
||||
5. **`wiki/log.md` is append-only**, with new entries at the top
|
||||
6. **`wiki/hot.md` is overwritten** at session end, not appended to
|
||||
7. **Skills use only `name` and `description` in frontmatter**. No `allowed-tools`, no `triggers`, no `globs` (these are not part of the Agent Skills spec)
|
||||
8. **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) and `description` (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 `description` field, 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)
|
||||
- `matcher` field uses regex against tool names for `PreToolUse`/`PostToolUse`
|
||||
- For `SessionStart`: matcher uses `startup`, `resume`, `clear`, or `compact`
|
||||
|
||||
## 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
|
||||
@@ -0,0 +1,54 @@
|
||||
# Pull request
|
||||
|
||||
## Summary
|
||||
One-paragraph description of what this PR changes and why.
|
||||
|
||||
## Type
|
||||
- [ ] Bug fix (`fix:`)
|
||||
- [ ] New feature (`feat:`)
|
||||
- [ ] Documentation (`docs:`)
|
||||
- [ ] Refactor (`refactor:`)
|
||||
- [ ] Test coverage (`test:`)
|
||||
- [ ] Chore / build / maintenance (`chore:`)
|
||||
|
||||
## Related issue
|
||||
Closes #<issue-number> (if applicable)
|
||||
|
||||
## Changes
|
||||
List the files and surfaces touched:
|
||||
- `skills/<name>/SKILL.md` — what changed
|
||||
- `scripts/<name>.py` — what changed
|
||||
- ...
|
||||
|
||||
## Six-cut self-review
|
||||
- [ ] Read every file before changing it
|
||||
- [ ] New identifiers named for the next reader
|
||||
- [ ] Smallest unit that works (no speculative abstraction)
|
||||
- [ ] Deletions kept up with additions where applicable
|
||||
- [ ] New behavior has hermetic test coverage
|
||||
- [ ] New failure modes have explicit handling + undo plan
|
||||
|
||||
## Testing
|
||||
```
|
||||
make test
|
||||
```
|
||||
Paste the tail of the output here (or a summary if too long):
|
||||
|
||||
```
|
||||
All tests passed.
|
||||
```
|
||||
|
||||
## Verifier
|
||||
For non-trivial changes, dispatch `agents/verifier.md` on the staged diff and paste its verdict:
|
||||
|
||||
- Verdict: SHIP / HOLD-FIX-FIRST / NEEDS-REWORK
|
||||
- BLOCKER: N / HIGH: N / MEDIUM: N / LOW: N
|
||||
|
||||
## CHANGELOG
|
||||
- [ ] Added an entry under `## [Unreleased]` in `CHANGELOG.md`
|
||||
|
||||
## Screenshots / output
|
||||
If the change affects user-visible output, paste a before/after example.
|
||||
|
||||
## Notes for reviewer
|
||||
Anything specific the reviewer should focus on, or context that's not obvious from the diff.
|
||||
@@ -0,0 +1,124 @@
|
||||
name: Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Hermetic test suite
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.11'
|
||||
|
||||
- name: Verify Python version
|
||||
run: python3 --version
|
||||
|
||||
- name: Verify Bash + GNU coreutils
|
||||
run: bash --version && date --version | head -1
|
||||
|
||||
- name: Make scripts executable
|
||||
run: chmod +x scripts/*.sh scripts/*.py bin/*.sh tests/*.sh 2>/dev/null || true
|
||||
|
||||
- name: Run hermetic test suite
|
||||
run: make test
|
||||
|
||||
- name: Verify wiki-mode CLI surfaces
|
||||
run: |
|
||||
python3 scripts/wiki-mode.py get
|
||||
python3 scripts/wiki-mode.py config | python3 -m json.tool > /dev/null
|
||||
python3 scripts/wiki-mode.py id
|
||||
python3 scripts/wiki-mode.py templates
|
||||
|
||||
- name: Verify transport detection
|
||||
run: bash scripts/detect-transport.sh --peek | python3 -m json.tool > /dev/null
|
||||
|
||||
lint-skills:
|
||||
name: Skill frontmatter validation
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 2
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.11'
|
||||
|
||||
- name: Install PyYAML
|
||||
run: pip install pyyaml
|
||||
|
||||
- name: Validate every SKILL.md has valid YAML frontmatter
|
||||
run: |
|
||||
python3 <<'PYEOF'
|
||||
import os, sys, yaml
|
||||
errors = []
|
||||
for root, dirs, files in os.walk('skills'):
|
||||
for f in files:
|
||||
if f == 'SKILL.md':
|
||||
path = os.path.join(root, f)
|
||||
with open(path) as fh:
|
||||
content = fh.read()
|
||||
if not content.startswith('---'):
|
||||
errors.append(f"{path}: missing frontmatter")
|
||||
continue
|
||||
try:
|
||||
end = content.index('\n---', 4)
|
||||
frontmatter = yaml.safe_load(content[4:end])
|
||||
if not frontmatter.get('name'):
|
||||
errors.append(f"{path}: missing 'name' in frontmatter")
|
||||
if not frontmatter.get('description'):
|
||||
errors.append(f"{path}: missing 'description' in frontmatter")
|
||||
except Exception as e:
|
||||
errors.append(f"{path}: frontmatter parse error: {e}")
|
||||
if errors:
|
||||
print("\n".join(errors))
|
||||
sys.exit(1)
|
||||
print("All SKILL.md files have valid frontmatter.")
|
||||
PYEOF
|
||||
|
||||
- name: Validate every agent has tools declared
|
||||
run: |
|
||||
python3 <<'PYEOF'
|
||||
import os, sys, yaml
|
||||
errors = []
|
||||
for f in os.listdir('agents'):
|
||||
if f.endswith('.md'):
|
||||
path = os.path.join('agents', f)
|
||||
with open(path) as fh:
|
||||
content = fh.read()
|
||||
if not content.startswith('---'):
|
||||
errors.append(f"{path}: missing frontmatter")
|
||||
continue
|
||||
try:
|
||||
end = content.index('\n---', 4)
|
||||
frontmatter = yaml.safe_load(content[4:end])
|
||||
if not frontmatter.get('tools'):
|
||||
errors.append(f"{path}: missing 'tools' in frontmatter")
|
||||
except Exception as e:
|
||||
errors.append(f"{path}: frontmatter parse error: {e}")
|
||||
if errors:
|
||||
print("\n".join(errors))
|
||||
sys.exit(1)
|
||||
print("All agents have tools declared.")
|
||||
PYEOF
|
||||
|
||||
- name: Validate plugin.json + marketplace.json
|
||||
run: |
|
||||
python3 -c "import json; json.load(open('.claude-plugin/plugin.json'))"
|
||||
python3 -c "import json; json.load(open('.claude-plugin/marketplace.json'))"
|
||||
python3 -c "import json; json.load(open('hooks/hooks.json'))"
|
||||
echo "All plugin manifests are valid JSON."
|
||||
Reference in New Issue
Block a user