hackmd-api

A skill for using the HackMD API, a programming interface for HackMD collaborative Markdown notes. It supports programmatic note management and requires an API token, Node.js, and its command-line setup.

In plain words
What is it for?
Automating HackMD notes, publishing documentation from code, syncing repositories with notes, and managing notes through scripts.
Why use it?
It reduces manual work when documentation must be created, listed, updated, synchronised, backed up, or migrated in HackMD.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/eastsun5566/hackmd-skills/hackmd-api
Any agent
npx skills add EastSun5566/hackmd-skills --skill hackmd-api
Clone the repo
git clone --depth 1 https://github.com/EastSun5566/hackmd-skills

Made for: Claude Code, Codex.

Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,335 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00042 $0.01335
Opus 5 $0.00021 $0.00668
Sonnet 5 $0.00008 $0.00267
Haiku 4.5 $0.00004 $0.00134

Measured yesterday against content hash d6e4d5d55234, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

hackmd-api scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/hackmd-cli.mjs), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/hackmd-api/SKILL.md · 216 lines

How it starts

The opening of the file, as written. The whole thing — 216 lines — stays where its author put it; the contents beside it link to each section on GitHub.

HackMD API Integration

This skill enables AI agents to interact with the HackMD API to programmatically manage notes, create documentation, and automate collaborative workflows.

When to Use This Skill

Use this skill when you need to:

  • Create documentation automatically after completing a task or project
  • Sync content from code repositories to HackMD
  • Manage notes programmatically (create, update, list, delete)
  • Automate collaborative workflows like creating meeting notes or project documentation
  • Backup or migrate HackMD content

Prerequisites

Before using this skill, ensure:

  1. HackMD API Token: You must have a valid HackMD API token

  2. Node.js: The skill requires Node.js (v18 or later)

  3. Dependencies: Install the required packages:

    cd skills/hackmd-api/scripts
    npm install
    

Available Commands

The skill provides a CLI tool located at scripts/hackmd-cli.mjs with the following commands:

List Notes

List all your HackMD notes:

node scripts/hackmd-cli.mjs list-notes

Options:

  • --limit <number> - Limit the number of notes returned (default: 10)

Create Note

Create a new HackMD note:

node scripts/hackmd-cli.mjs create-note --title "My Note" --content "# Hello\nThis is my note"

Options:

  • --title <string> - Note title (required)
  • --content <string> - Note content in Markdown (required)
  • --read-permission <string> - Read permission: owner, signed_in, guest (default: owner)
  • --write-permission <string> - Write permission: owner, signed_in, guest (default: owner)

Get Note

Retrieve a note's content and metadata:

node scripts/hackmd-cli.mjs get-note <note-id>

Update Note

Update an existing note:

node scripts/hackmd-cli.mjs update-note <note-id> --content "# Updated\nNew content"

Options:

Read the full file on GitHub · 216 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 216 lines · 42 tokens per session scan A d6e4d5d55234

Subscribe to this mod's changes

hackmd-api is a skill published in the GitHub repository EastSun5566/hackmd-skills (2 stars, last pushed 2mo ago), licensed MIT. It adds 42 tokens to every session and 1,335 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

modelchk

Size a task's run before spending it: the cheapest sufficient capability tier (fast, standard, frontier) and the reasoning effort within it, on a neutral scale that binds to whatever levels the model exposes. Use when work seems over- or under-powered, costly, ambiguous, or high-risk, or asks which model class and how…

LilMGenius/paperthin · 74 tokens

re0-loop

Run repeated build -> QA -> re0-memo -> re0-work cycles while preserving learning and letting code die. Use for long agentic projects where progress must be measured by quality-cleared templates, reusable modules, and eliminated anti-patterns rather than hours spent or features accumulated.

LilMGenius/paperthin · 60 tokens

autobahn

Carve guardrail-adjacent items out of scope with safe alternatives before risk-adjacent work starts, then run the safe remainder at full strength in a fresh subagent that only ever sees the carved prompt, never the risky input. Use when a task includes stealth, scraping, privacy, IP, policy, licensing, security, or…

LilMGenius/paperthin · 129 tokens

re0-release

Walk a pending change through this repo's shipping and releasing checklist end to end, then tag and publish once confirmed. User-invoked: run it when you've decided to ship.

LilMGenius/paperthin · 40 tokens

ssotize

Audit and consolidate a fact that's scattered across places into one canonical source, after approval, and replace the rest with references. Use when asked to find duplication, check consistency, locate the source of truth, deduplicate, consolidate, unify, or establish SSOT across artifacts or platforms. Starts…

LilMGenius/paperthin · 78 tokens

re0-plan

Open a paperthin iteration's casebook before re0-loop's first turn — seeded with real content the moment the folder exists, never an empty directory. User-invoked, paperthin-only: assumes the full skill package installed. Run when opening a new build cycle in this repo.

LilMGenius/paperthin · 62 tokens