HackMD
by @nulltea
Work with HackMD documents. Use when reading, creating, updating, or deleting notes on HackMD. Supports change tracking to detect document modifications since last check. Supports personal and team workspaces.
clawhub install hackmdπ About This Skill
name: hackmd description: Work with HackMD documents. Use when reading, creating, updating, or deleting notes on HackMD. Supports change tracking to detect document modifications since last check. Supports personal and team workspaces. metadata: { "clawdbot": { "emoji": "π", "requires": { "bins": ["hackmd-cli"], "env": ["HMD_API_ACCESS_TOKEN"] }, "primaryEnv": "HMD_API_ACCESS_TOKEN", }, }
HackMD Integration
Requirements
npm install -g @hackmd/hackmd-cli
Quick Reference
Read Notes
# List all personal notes
hackmd-cli notesGet note metadata (includes lastChangedAt)
hackmd-cli notes --noteId= --output jsonGet note content (markdown)
hackmd-cli export --noteId=List teams
hackmd-cli teamsList team notes
hackmd-cli team-notes --teamPath=
Write Notes
# Create note
hackmd-cli notes create --content='# Title'Create from file
cat file.md | hackmd-cli notes createUpdate note
hackmd-cli notes update --noteId= --content='# Updated'Delete note
hackmd-cli notes delete --noteId=
Team Notes
hackmd-cli team-notes create --teamPath= --content='# Team Note'
hackmd-cli team-notes update --teamPath= --noteId= --content='...'
hackmd-cli team-notes delete --teamPath= --noteId=
Change Tracking
Use hackmd-track.js (in scripts/) to detect document changes efficiently.
Track a Note
node scripts/hackmd-track.js add
Check for Changes
# Single note - outputs content only if changed
node scripts/hackmd-track.js changes All tracked notes
node scripts/hackmd-track.js changes --allJSON output for parsing
node scripts/hackmd-track.js changes --json
Manage Tracking
node scripts/hackmd-track.js list # Show tracked notes
node scripts/hackmd-track.js remove # Stop tracking
node scripts/hackmd-track.js reset # Reset (next check shows as changed)
How It Works
1. hackmd-track.js add stores note's lastChangedAt timestamp
2. hackmd-track.js changes compares current lastChangedAt with stored value
3. If changed: outputs content and updates stored timestamp
4. If unchanged: outputs nothing (use --verbose for status)
State stored in ./.hackmd/tracked-notes.json (current working directory)
Note Metadata Fields
When using --output json, notes include:
| Field | Description |
| ---------------- | ---------------------------------------- |
| lastChangedAt | Unix timestamp of last modification |
| lastChangeUser | {name, userPath, photo} of last editor |
| titleUpdatedAt | When title changed |
| tagsUpdatedAt | When tags changed |