Export a task node as a Claude Code skill¶
A Hadron task node carries an actionable procedure — instructions an
AI agent can follow to do real work. You can publish any task node as a
Claude Code skill: a SKILL.md file that Claude Code auto-loads and
triggers from a plain-English request.
Source-of-truth note: the node is canonical; the exported
SKILL.mdis a generated artifact. To change a skill's behavior, edit the node and re-export — never hand-edit the file. A re-export overwrites it.
How it works¶
Hadron task node ──export──▶ ~/.claude/skills/<name>/SKILL.md ──▶ Claude Code auto-triggers it
(source of truth) (generated; do not edit)
The export reads the node, composes a SKILL.md whose frontmatter comes
from the node's claudeSkill properties and whose body is the node's
content copied verbatim, and writes it into a Claude Code skills directory.
It is a one-way publishing pipeline.
You can run it two ways:
- Ask an agent. If Claude Code has the
hadron-export-task-as-claude-skillskill installed, just say "export<urn>as a skill." That skill is itself published from the canonical nodehrn:node:hadronmemory.com::hadron-mcp::export-task-as-claude-skill. - By hand. Follow the procedure below — it needs only
h-read-node(or thehadronCLI) plus a text editor.
Prerequisites¶
The source node must satisfy all three, or the export should stop:
nodeType: task— only task nodes are exportable.properties.claudeSkill.name— kebab-case; becomes the skill name and its directory name (~/.claude/skills/<name>/).properties.claudeSkill.description— a trigger-shaped description ("Use when… Handles the gotchas…"); becomes theSKILL.mddescriptionfrontmatter that drives auto-triggering.
If any are missing, stop and report — don't invent values. The strictness is deliberate: it keeps nodes that weren't designed as skills from being published by accident.
You also need:
- The Hadron MCP server (or the
hadronCLI) to read the node. See Add Hadron to Claude Code. - Claude Code, with permission to write under
~/.claude/skills/.
Prepare the node¶
Set the claudeSkill properties on the task node — via h-add-node's
properties, the portal, or Git-sync (see
Adding nodes to a memory). For example:
{
"claudeSkill": {
"name": "mm-briefing",
"description": "Generate the morning briefing — open PRs awaiting review plus recent tasks. Use when the user asks for 'my briefing', 'what's on my plate', or 'catch me up'. Handles the gotchas — only open PRs, identity resolves from the authenticated user."
}
}
Keep the node content as the skill body only — no frontmatter. The
frontmatter is composed from properties at export time.
Procedure (by hand)¶
Step 1 — Read the source node¶
With the MCP tool:
or with the CLI:
Step 2 — Validate¶
Confirm the three prerequisites above. On any failure, stop and report which one is missing.
Step 3 — Choose the output path¶
Resolve <name> from properties.claudeSkill.name, then pick a skills root:
| Target | Path | Use when |
|---|---|---|
| User-global (default) | ~/.claude/skills/<name>/SKILL.md |
You want the skill in every project; it shouldn't ship in a repo. |
| Project | <repo-root>/.claude/skills/<name>/SKILL.md |
You want it version-controlled with the codebase and shared with the team. |
Create the parent directory if it doesn't exist.
Step 4 — Compose the SKILL.md¶
---
name: <properties.claudeSkill.name>
description: <properties.claudeSkill.description>
---
<!-- Generated from <source URN> -->
<!-- Edit the source node and re-export; do not edit this file directly. -->
<the node's `content` body, verbatim>
Copy the node body exactly — don't reflow, summarize, or add headings. The provenance comment makes the source-of-truth contract visible in the file.
Step 5 — Write the file¶
Write to the resolved path, overwriting any existing file. A re-export is meant to replace the old skill, because the node is the source of truth.
Step 6 — Restart Claude Code¶
Claude Code loads skills at session start. Quit and relaunch (claude) so
the new or updated skill is picked up — a running session won't see it.
Verify¶
In a fresh Claude Code session, trigger the skill with one of the phrasings from
its description. It should fire and run the node's procedure. You can also
confirm the file landed:
cat ~/.claude/skills/<name>/SKILL.md # or .claude/skills/<name>/SKILL.md for project-specific skills
Gotchas¶
- The node is the source of truth, not the
SKILL.md. To change behavior, edit the node and re-export. The provenance comment in the file says so. - One-way pipeline. Never copy edits from the
SKILL.mdback into the node. - Body is verbatim; frontmatter is composed. The node
contentis the skill body; the---frontmatter is built fromproperties.claudeSkill. Don't put frontmatter in the node body. - Names are case-sensitive. Use
properties.claudeSkill.nameexactly. - Skills load at session start. Write the file, then restart Claude Code.
- Missing
claudeSkillproperties stop the export. That's a feature, not a bug — it prevents accidental publication.
Related¶
- Adding nodes to a memory — create the task node and
set its
claudeSkillproperties. - Add Hadron to Claude Code (OAuth) — register the Hadron MCP server so an agent can read nodes and write skills.
- Install the hadron CLI — read nodes from the terminal
with
hadron node get.