diff --git a/hackmd-cli.skill b/hackmd-cli.skill index e1d62cc..c3147ea 100644 Binary files a/hackmd-cli.skill and b/hackmd-cli.skill differ diff --git a/hackmd-cli/SKILL.md b/hackmd-cli/SKILL.md index 72f8fff..b56962f 100644 --- a/hackmd-cli/SKILL.md +++ b/hackmd-cli/SKILL.md @@ -210,11 +210,14 @@ All list commands support: ### Sync local file to HackMD ```bash -# Create new note from file +# Create new note from file and verify cat doc.md | hackmd-cli notes create --title="My Doc" +# Confirm creation by retrieving the note +hackmd-cli notes --filter=title="My Doc" -# Update existing note from file +# Update existing note from file and verify cat doc.md | hackmd-cli notes update --noteId= +hackmd-cli export --noteId= | head -5 ``` ### Create a folder and put a note inside it @@ -261,3 +264,13 @@ hackmd-cli notes --output=json | jq '.[] | .id' ```bash hackmd-cli notes --filter=title=README ``` + +## Error Handling + +Common errors and fixes: + +| Error | Cause | Fix | +|-------|-------|-----| +| `Unauthorized` | Invalid or expired token | Re-run `hackmd-cli login` or update `HMD_API_ACCESS_TOKEN` | +| `Not Found` | Wrong `noteId` or `teamPath` | Verify the ID with `hackmd-cli notes` or `hackmd-cli teams` | +| `Forbidden` | Insufficient permissions | Check note permissions with `hackmd-cli notes --noteId= -x` |