note-first

note-first is a skill for Claude Code, Codex from bearded-illirian/trailmark. It costs 66 tokens per session (623 once invoked), scanned A, original, MIT.

A task-note tool that saves the agent’s most recent message as a numbered file linked to the current task. A task is the tracked piece of work the agent is handling.

In plain words
What is it for?
Use it when you want to remember the last answer, save a note, or preserve a decision for later work.
Why use it?
It keeps useful explanations or decisions attached to the task instead of leaving them only in the chat history. The links make the task and its notes easy to follow in both directions.

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/bearded-illirian/trailmark/note-first
Any agent
npx skills add bearded-illirian/trailmark --skill note-first
Clone the repo
git clone --depth 1 https://github.com/bearded-illirian/trailmark

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for note-first

README.md
[![agentmods](https://agentmods.dev/badge/skills/bearded-illirian/trailmark/note-first.svg)](https://agentmods.dev/skills/bearded-illirian/trailmark/note-first)
Your own site
<a href="https://agentmods.dev/skills/bearded-illirian/trailmark/note-first"><img src="https://agentmods.dev/badge/skills/bearded-illirian/trailmark/note-first.svg" alt="Measured on agentmods" height="20"></a>
Per session 66 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 623 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.00066 $0.00623
Opus 5 $0.00033 $0.00311
Sonnet 5 $0.00013 $0.00125
Haiku 4.5 $0.00007 $0.00062

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

Security

Grade A, and why

note-first 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 today.

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.

adapters/codex/.agents/skills/note-first/SKILL.md · 117 lines

How it starts

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

Note-First Protocol

Saves the last Claude message as a note attached to the current task.

Input

The user's request to save the agent's most recent chat message; the current task context.

Output

note-{NN}.md with two-way links (task.md ↔ note file), auto-numbered.

Hands off to

— (terminal).


Step 0 — Task context

Ensure {log_dir} and {slug} are known. Otherwise resolve from the latest task log folder.

Cannot skip — without {log_dir} the note has nowhere to go.


Step 1 — Capture the last message

Take the assistant message that comes immediately before the /note-first command.

Rules:

  • Copy verbatim — no abbreviations, no rephrasing
  • If no previous assistant message exists → tell the user, finish

Step 2 — Determine note number

ls {log_dir}/note-*.md 2>/dev/null | sort | tail -1
  • No files → note-01.md
  • note-02.md exists → write note-03.md

Step 3 — Write file + update task.md

Write the note

> 🔗 Task: tasks/log/{slug}/task.md

# Note NN

**Date:** {date}

{verbatim last assistant message}

Update task.md

Add a header line after the last > 📋 or > 📝 line:

> 📝 Note N: tasks/log/{slug}/note-NN.md

If none exist — add as the first line of the file.


Step 4 — Confirm

Report in one line:

📝 Saved: {log_dir}/note-NN.md

Nothing more — the note is already visible in the chat.


Anti-patterns

❌ Rephrasing before saving

Copy the message verbatim. The user is saving what was actually said.

❌ Writing the file but not updating task.md

Both actions in Step 3 are mandatory. Otherwise the note is orphaned.

❌ Saving the user's own message

The /note-first command is not the content. Save the previous assistant reply.

❌ Imitating the skill inline

Always via $note-first. Never copy the protocol from memory — outdated versions drift silently.


  • decision-first — saves an architectural decision (structured, not free-form)
  • plan-first — plans execution steps (before code, not after)

Read the full file on GitHub · 117 lines

Files

What ships with it

1 file 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. today Changed 32fb3cbb589f
  2. 5d ago First seen · 117 lines · 66 tokens per session scan A 14cccf6e340f

Subscribe to this mod's changes

note-first is a skill published in the GitHub repository bearded-illirian/trailmark (19 stars, last pushed 2d ago), licensed MIT. It adds 66 tokens to every session and 623 once invoked, about $0.0003 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-30.