harvest-knowledge

harvest-knowledge is a skill for Claude Code, Codex from acn-ericlaw/agent-memory. It costs 89 tokens per session (1,622 once invoked), scanned A, original, Apache-2.0.

A tool that re-reads the repository's human-written documentation and adds lasting facts to its shared memory. Repository documentation can include design decisions, plans, roadmaps, and work notes.

In plain words
What is it for?
Use it on demand after documentation grows or changes, or to update a repository enabled before this feature existed.
Why use it?
Shared memory can become outdated as documentation changes. This refreshes it when new decisions or project information appear.

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/acn-ericlaw/agent-memory/harvest-knowledge
Any agent
npx skills add acn-ericlaw/agent-memory --skill harvest-knowledge
Clone the repo
git clone --depth 1 https://github.com/acn-ericlaw/agent-memory

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 harvest-knowledge

README.md
[![agentmods](https://agentmods.dev/badge/skills/acn-ericlaw/agent-memory/harvest-knowledge.svg)](https://agentmods.dev/skills/acn-ericlaw/agent-memory/harvest-knowledge)
Your own site
<a href="https://agentmods.dev/skills/acn-ericlaw/agent-memory/harvest-knowledge"><img src="https://agentmods.dev/badge/skills/acn-ericlaw/agent-memory/harvest-knowledge.svg" alt="Measured on agentmods" height="20"></a>
Per session 89 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,622 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.00089 $0.01622
Opus 5 $0.00044 $0.00811
Sonnet 5 $0.00018 $0.00324
Haiku 4.5 $0.00009 $0.00162

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

Security

Grade A, and why

harvest-knowledge 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 5d ago.

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.

agent-skills/harvest-knowledge/SKILL.md · 86 lines

How it starts

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

harvest-knowledge

⚠️ Tool-managed skill provided by agent-memory (provenance: agent-memory-builtin). Don't edit it in place — it is overwritten on upgrade. To change behavior: fork it under a new skill name, or upstream a genuine fix to the agent-memory project (file an issue in its repo, or bring it to the tool maintainer) for back-port + validation. See SKILLS.md → "Tool-provided (system) skills".

The on-demand, recurring counterpart to the enable-time knowledge harvest (ENABLE.md Step 4b). Enable seeds memory once from the team's docs; this skill keeps it in sync as those docs evolve.

When to use

  • The repo's docs have grown or changed since it was enabled — new ADRs, a design spec, decision-log entries, a roadmap/kanban update.
  • To backfill a repo that was enabled before the curious harvest existed (the post-upgrade catch-up).
  • A human or agent asks to "harvest knowledge" / "refresh memory from the docs."

On demand only — never part of the per-session ritual, and not tied to enable/upgrade mode.

It is NOT a vendor /init

A vendor /init does a deep code analysis and (re)writes a vendor steering file (CLAUDE.md, .cursorrules, …), usually overwriting it. harvest-knowledge instead:

  • reads the team's human-authored knowledge docs (prose — not code),
  • distills durable facts into the neutral, shared, committed memory/ layer (every vendor sees it),
  • is additive + incremental — it never overwrites curated facts; a conflict becomes a Contradiction thread, not a silent rewrite,
  • is repeatable — run it whenever docs change, not a one-shot bootstrap.

You may borrow /init's analysis muscle, but the output goes to memory/, never a vendor file.

What to do

  1. Enumerate, recursively (same net as ENABLE.md Step 4b). Recurse every documentation tree — docs/, doc/, documentation/, wiki/, rfcs/, adr/, design/, notes/ (all subfolders) — and sweep the repo + module roots for human-authored knowledge markdown: decision logs / DECISIONS*, ADR*, ROADMAP* / TODO* / BACKLOG*, kanban/board files, ARCHITECTURE* / DESIGN*, CONTRIBUTING*, RFC*, GLOSSARY*, onboarding / runbook / postmortem notes. Match .md/.markdown/.mdx/.rst/.txt/.adoc. Exclude (not team prose): node_modules/, vendor/, .venv/venv/, target/, dist/, build/, .git/, generated API reference, minified/vendored files, anything already .gitignored.
  2. Scope to what's NEW or CHANGED since the last harvest. Read last_harvest from continuity.md → Project State (the marker this skill stamps in step 7). If present, look only at docs changed since then — git log --since=<date> / git diff --name-only <since>..HEAD over the doc paths. If it's absent (never harvested — or the repo predates this field), treat it as a full first pass. Either way, budget with disclosure: cap the read (prioritize roots → docs/ → recently-modified); if the budget is hit, record a - [ ] (knowledge-harvest) Open Thread listing what's left, so nothing vanishes silently. (last_harvest only scopes the read — the step-4 check-existing-first guard is what actually prevents duplicates, so a re-scan is always safe.)
  3. Distill — don't transcribe — into memory, additively:
    • conventions / architecture decisions / hard constraints → memory/instructions.md (and seed Architectural Invariants from explicit "must / never" rules);
    • current goals / roadmap / in-flight work / decision-log open items → Open Threads; the aspiration → the Current-state context of memory/vision.md (never fabricate the target);
    • newcomer-facing knowledge → candidate smoke-test questions.
    • Map, don't mirror: link the canonical doc and capture only the enduring fact — never duplicate a living doc into memory.
  4. Check each candidate against existing facts first (DECAY.md §10) so a re-run doesn't duplicate. A harvested fact that contradicts an existing one → raise a - [ ] Contradiction: … Open Thread (never-pick-a-winner); a genuine replacement → supersede the old fact (DECAY.md §9). Never silently overwrite curated memory.
  5. Human-gated. Summarize what you folded in, what you superseded/flagged, and what you skipped for budget — let the human review before it's treated as settled.
  6. Record it. A harvest is a memory-relevant event → write a session log with a ## Memory References section listing the fact ids you created / changed (it stays inside the normal after-session ritual).
  7. Stamp last_harvest in continuity.md → Project State: last_harvest: <today> | through <this session-file> (create the field if absent — it sits with last_review / last_invariant_check). This is what step 2 reads next time, so each run scopes incrementally. The harvest owns last_harvest, the way the review owns last_review. Even a no-op run (nothing new to fold) stamps it — that records "docs were checked through here." Write it safely (REVIEW.md → Safety: never truncate-before-read).

Read the full file on GitHub · 86 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. 5d ago First seen · 86 lines · 89 tokens per session scan A ed410356f880

Subscribe to this mod's changes

harvest-knowledge is a skill published in the GitHub repository acn-ericlaw/agent-memory (5 stars, last pushed today), licensed Apache-2.0. It adds 89 tokens to every session and 1,622 once invoked, about $0.0004 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.