archive

archive is a skill for Claude Code from orwa-mahmoud/nightshift. It costs 17 tokens per session (2,289 once invoked), scanned A, original, MIT.

A filing step for completed project records, storing finished work in a dated archive while keeping active files small.

In plain words
What is it for?
Use it to archive shipped items, research, opportunities, journal entries, snags, and other project tracking files according to their separate lifecycles.
Why use it?
It prevents finished notes from cluttering the live project state and preserves the record without changing the work or contracts.

Skill for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable. Also seen: mentions Claude Code; mentions Codex.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the nightshift plugin — 13 skills, 5 hooks shipped together

Good fit Use it to archive shipped items, research, opportunities, journal entries, snags, and other project tracking files according to their separate lifecycles.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add orwa-mahmoud/nightshift
Claude Code
/plugin install nightshift

Made for: Claude Code.

Or install nightshift, the plugin that ships this one along with the rest of its 13 skills, 5 hooks.

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 archive

README.md
[![agentmods](https://agentmods.dev/badge/skills/orwa-mahmoud/nightshift/archive/github.svg)](https://agentmods.dev/skills/orwa-mahmoud/nightshift/archive)
Your own site
<a href="https://agentmods.dev/skills/orwa-mahmoud/nightshift/archive"><img src="https://agentmods.dev/badge/skills/orwa-mahmoud/nightshift/archive/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for archive

Your own site · 80×15
<a href="https://agentmods.dev/skills/orwa-mahmoud/nightshift/archive"><img src="https://agentmods.dev/badge/skills/orwa-mahmoud/nightshift/archive.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 17 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,289 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00017 $0.02289
Opus 5 $0.00009 $0.01144
Sonnet 5 $0.00003 $0.00458
Haiku 4.5 $0.00002 $0.00229

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

Security

Grade A, and why

archive 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.

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.

plugins/nightshift/skills/archive/SKILL.md · 160 lines

How it starts

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

Archive the finished paperwork for the host-opened project. This files records — it never does shift work, never ticks a box, never touches the contract.

The four state files and what each holds are in $NIGHTSHIFT_PLUGIN_ROOT/skills/nightshift/references/shift/state-map.md. Archive each by its own lifecycle; never reclassify one as another.

Resolve the installed plugin root to an absolute $NIGHTSHIFT_PLUGIN_ROOT${CLAUDE_PLUGIN_ROOT} on Claude Code, $PLUGIN_ROOT on Codex when set, otherwise the absolute path this skill was attached from (skills/archive/SKILL.md). Run every command below through "$NIGHTSHIFT_PLUGIN_ROOT/runtime/ns" — native Windows: & "$NIGHTSHIFT_PLUGIN_ROOT\runtime\windows\ns.ps1" in the PowerShell tool, same verbs — which resolves the host and the workspace; ns help lists the verbs, and ns bind prints the six resolved facts (TASK_ROOT, NIGHTSHIFT_WORKSPACE, NS, NIGHTSHIFT_PLUGIN_ROOT, HOST, SOURCE); $NS below is that NS. Never a bare relative path: the working directory persists between calls.

Read $NS/state-version first. Legacy (missing) and current (1) may be archived. A newer or malformed marker fails closed — file nothing, rewrite nothing, and never migrate. state-version itself stays live; it is not an archive record.

In artifact mode the work target is a persistent folder, not a Git repository. File the same Nightshift records; do not require a work-target commit that cannot exist. Copy live receipts with "$NIGHTSHIFT_PLUGIN_ROOT/runtime/ns" archive-receipts. Missing or empty receipts create no dated receipts folder. A receipts path that is not a usable directory is a refuse, not an empty skip.

If $NS/.pending-filing exists, a shift asked for filing at clock-out. It carries date= and shiftId= lines naming that shift — use them — and an asked=1 line once the gate has held the session to ask for it. Delete the marker once filing is done, and only then. Nothing else about it is special: file the same way you would on any explicit Archive.

$NS/.ended names the shift that finished and where it files, in shiftId=, archiveRoot= and archiveLayout= lines. Those are what a later Archive follows: clock-out has already archived the policy that carried them.

Filing is a copy. Removing a live record is a separate decision, and it is yours to make. The helper retires only what you name, and only once the shift has ended: --retire with one record name, repeated once per record on POSIX; on native Windows, -Retire takes the names as a single comma-separated list. Without a name it copies and removes nothing, which is the right answer whenever you are unsure.

Before naming anything, read $NS/punch-list.md and the records themselves and decide which belong to work that is finished with. A shift can end with items still open — STOP and the deadline both do that — so a terminal marker says nothing about any particular record. Keep a record live when an open item, an unanswered parking decision or work carried into the next shift still needs it, and when you cannot tell who owns it. Rejected work is filed with its rejection, never erased. A name the helper did not file is refused and told back to you.

Where it goes

Everything lands under the archive root, which is archive.root in the resolved policy, in <YYYY-MM-DD>/ or shift-<id>/ according to archive.layout. Left alone those give the default $NS/archive/<YYYY-MM-DD>/, and receipts land in archive/<YYYY-MM-DD>/receipts/ under it. Today's date is date +%Y-%m-%d on POSIX, or Get-Date -Format yyyy-MM-dd on native Windows. One folder per archive run; create parents, and re-running on the same day appends to that day's files.

The report keeps working from where it lands. The helper repoints its links: a record that travelled with it stays a sibling, a record that stayed live is reached back through the archive. That rewriting changes bytes, so the untouched original is preserved beside it, under the report's own name with an "original" suffix. Do not hand-edit either one.

Read the full file on GitHub · 160 lines

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 Changed · +9 lines · -26 tokens per session 1481a13bd0f2
  2. 3d ago Changed · +6 lines 7282fffdddf6
  3. 9d ago First seen · 145 lines · 43 tokens per session scan A 87b0012255b4

Subscribe to this mod's changes

archive is a skill published in the GitHub repository orwa-mahmoud/nightshift (57 stars, last pushed today), licensed MIT. It adds 17 tokens to every session and 2,289 once invoked, about $0.0001 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.