Install
openclaw skills install foam-notesWork with Foam note repositories. Create, edit, link, and tag notes. Get intelligent wikilink and tag suggestions. Skill supports backlinks discovery, daily...
openclaw skills install foam-notesWork with Foam note-taking workspaces in VS Code. Foam is a free, open-source personal knowledge management system using standard Markdown files with wikilinks.
[[note-name]] — connect notes bidirectionally![[note-name]] — include content from other notes#tag or frontmatter tags: [tag1, tag2]Alt+D or command "Foam: Open Daily Note"Copy config.json.template to config.json and edit to taste:
{
"foam_root": "/path/to/your/foam-workspace",
"default_template": "new-note",
"default_notes_folder": "notes",
"daily_note_folder": "journals",
"author": "Your Name",
"wikilinks": {
"title_stopwords": ["home", "index", "readme", "draft", "template"],
"suffixes": ["-hub"],
"min_length": 3
},
"tags": {
"editorial_stopwords": ["notes", "note", "foam", "markdown", "file", "page", "section"]
}
}
Location: config.json in the skill directory (next to SKILL.md).
| Key | Type | Default | Description |
|---|---|---|---|
foam_root | string | "" (auto-detect) | Path to your Foam workspace |
default_template | string | "new-note" | Template for new notes |
default_notes_folder | string | "notes" | Subfolder for new notes |
daily_note_folder | string | "journals" | Subfolder for daily notes |
author | string | "" | Author name for note creation |
wikilinks.title_stopwords | list | [] | Note titles to never match as wikilinks (e.g. "home", "index", "todo"). Add any generic filenames from your workspace that produce false positives. |
wikilinks.suffixes | list | [] | Filename suffixes whose base stem should also register as a match key. For example, if you name your hub/MOC notes docker-hub.md, add "-hub" here so that "docker" in prose matches docker-hub.md. |
wikilinks.min_length | int | 3 | Minimum key length to consider for wikilink matching |
tags.editorial_stopwords | list | [] | Domain-specific words to exclude from tag suggestions (in addition to standard English stopwords). |
--foam-root CLI argumentFOAM_WORKSPACE environment variablefoam_root in config.json.foam or .vscode directorySee references/configuration.md for complete documentation.
All scripts support --foam-root to override the workspace path.
Initialize .foam/templates/ with starter templates from the official Foam template:
python3 scripts/init_templates.py # Copy to current workspace
python3 scripts/init_templates.py --foam-root ~/notes
python3 scripts/init_templates.py --list # Show available templates
python3 scripts/init_templates.py --force # Overwrite existing
python3 scripts/init_templates.py --dry-run # Preview what would be copied
Templates included:
new-note.md — Default template for new notesdaily-note.md — Template for daily notesyour-first-template.md — Example template demonstrating VS Code snippetsCreate a new note from template:
python3 scripts/create_note.py "My New Idea"
python3 scripts/create_note.py "Meeting Notes" --template meeting
python3 scripts/create_note.py "Research Topic" --dir research/
Find all notes that link to a given note:
python3 scripts/find_backlinks.py "Machine Learning"
python3 scripts/find_backlinks.py "ml-basics" --format json
Find notes by tag:
python3 scripts/search_tags.py "#research"
python3 scripts/search_tags.py machine-learning --include-frontmatter
List all tags with usage counts:
python3 scripts/list_tags.py
python3 scripts/list_tags.py --hierarchy --min-count 3
Analyze the knowledge graph:
python3 scripts/graph_summary.py
python3 scripts/graph_summary.py --format json
Create daily notes:
python3 scripts/daily_note.py
python3 scripts/daily_note.py --yesterday
python3 scripts/daily_note.py --template custom-daily
python3 scripts/daily_note.py --print-path # Just output the path
Suggest wikilinks by finding text in a note that matches existing note titles:
python3 scripts/suggest_wikilinks.py my-note.md # Interactive mode
python3 scripts/suggest_wikilinks.py my-note.md --apply 1,3,5 # Auto-apply
python3 scripts/suggest_wikilinks.py my-note.md --auto-apply # Apply all
python3 scripts/suggest_wikilinks.py my-note.md --dry-run # Preview only
python3 scripts/suggest_wikilinks.py my-note.md --with-aliases # Create [[target|text]] format
The script scans the note content and identifies words/phrases that match existing note titles in the archive. It presents them as a numbered list:
1. Line 12, col 8
Text: "machine learning"
Link to: [[machine-learning]]
Context: ...working on machine learning projects...
Wikilink formats:
[[target]] — clean, simple links--with-aliases: [[target|display text]] — preserves original text as aliasRespond with:
1 3 5)all to apply all suggestionsnone to cancelSuggest tags for a note based on content and existing tags in the archive:
python3 scripts/suggest_tags.py my-note.md # Interactive mode
python3 scripts/suggest_tags.py my-note.md --apply all # Add all suggested
python3 scripts/suggest_tags.py my-note.md --apply existing # Only existing tags
python3 scripts/suggest_tags.py my-note.md --frontmatter # Add to frontmatter
The script:
Presented as numbered list with two sections:
Respond with:
1 3 5)all — all suggestionsexisting — only existing tagsnew — only new suggestionsnone — cancel#mytag #projectDelete notes with optional backup and automatic backlink handling:
python3 scripts/delete_note.py "Old Note" # Interactive deletion
python3 scripts/delete_note.py "Old Note" --force # Skip confirmation
python3 scripts/delete_note.py "Old Note" --backup # Move to .foam/trash/
python3 scripts/delete_note.py "Old Note" --fix-links # Remove wikilinks from other notes
Features:
.foam/trash/ instead of permanent deletion--force)Rename notes and automatically update all wikilinks:
python3 scripts/rename_note.py "Old Name" "New Name" # Interactive rename
python3 scripts/rename_note.py "Old Name" "New Name" --force # Skip confirmation
Features:
[[old-name]] referencesold-name.md to new-name.mdUse this skill when:
foam-workspace/
├── .vscode/
│ ├── extensions.json # Recommended extensions
│ └── settings.json # VS Code settings
├── .foam/
│ └── templates/ # Note templates (.md and .js)
├── journals/ # Daily notes (default location)
├── attachments/ # Images and files
├── *.md # Your notes
└── foam.json (optional) # Foam configuration
Create connections between notes using double brackets:
See also [[related-concept]] for more information.
[[ + type note nameCtrl+Click (or Cmd+Click on Mac)[[note-name#Section Title]]See references/wikilinks.md for complete documentation.
Backlinks show which notes reference the current note — discovered automatically by Foam.
Access via:
Use backlinks for:
See references/backlinks.md for complete documentation.
Organize notes beyond wikilinks:
# Inline tags
#machine-learning #research #in-progress
# Frontmatter tags
---
tags: [machine-learning, research, in-progress]
---
#programming/pythonSee references/tags.md for complete documentation.
Quick daily journaling:
Alt+D/today, /yesterday, /tomorrowTemplate: .foam/templates/daily-note.md
See references/daily-notes.md for complete documentation.
Customize note creation. Foam looks for templates in .foam/templates/.
To initialize starter templates:
python3 scripts/init_templates.py
This copies official Foam templates to your workspace:
new-note.md — Default templatedaily-note.md — Daily notes templateyour-first-template.md — Example with VS Code snippetsMarkdown templates (.md):
---
foam_template:
filepath: '$FOAM_CURRENT_DIR/$FOAM_SLUG.md'
---
# $FOAM_TITLE
Created: $FOAM_DATE_YEAR-$FOAM_DATE_MONTH-$FOAM_DATE_DATE
$FOAM_SELECTED_TEXT
JavaScript templates (.js) — for smart, context-aware templates.
See references/templates.md for complete documentation.
When creating notes programmatically (not via VS Code), always read the workspace template in .foam/templates/new-note.md first and follow its structure exactly.
In VS Code:
[[new-note]]Include content from other notes:
![[glossary]]
See the full definition above.
Foam can publish to static sites:
See recipes in Foam documentation for publishing options.
| Feature | Foam | Obsidian |
|---|---|---|
| Wikilinks | [[note]] | [[note]] |
| Embeds | ![[note]] | ![[note]] |
| Platform | VS Code | Dedicated app |
| Plugin ecosystem | Minimal (VS Code extensions) | Extensive |
| File format | Standard Markdown | Markdown with extensions |
| Configuration | .vscode/settings.json | .obsidian/ folder |
| Price | Free | Freemium |
Both use the same core linking syntax. Foam prioritizes simplicity and standard formats.
Key .vscode/settings.json options:
{
"foam.openDailyNote.onStartup": true,
"foam.dateSnippets.format": "yyyy-mm-dd",
"markdown.styles": [".foam/css/custom.css"]
}
Key VS Code commands:
Foam: Open Daily Note — Create/open today's noteFoam: Create New Note — Create from default templateFoam: Create New Note From Template — Choose templateFoam: Create New Template — Create new templateFoam: Show Graph — Visualize knowledge graphFoam: Search Tag — Search for tagged notesExplorer: Focus on Connections — Show backlinks panelRead these files for detailed information on specific features.