setup-memory

A setup command for giving an AI coding project persistent memory. It can create CLAUDE.md with project context and, for Tier 3 projects, add files and hooks that load and save session notes.

In plain words
What is it for?
Use it to collect project and technology details, create or update CLAUDE.md, configure the memory folder and lifecycle hooks, or set up only the project file or memory system.
Why use it?
It prevents important project context and decisions from being lost between coding sessions.

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/shipwithai/shipwithai-plugins/setup-memory
Any agent
npx skills add ShipWithAI/shipwithai-plugins --skill setup-memory
Clone the repo
git clone --depth 1 https://github.com/ShipWithAI/shipwithai-plugins

Made for: Claude Code, Codex.

Per session 89 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,697 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.02697
Opus 5 $0.00044 $0.01349
Sonnet 5 $0.00018 $0.00539
Haiku 4.5 $0.00009 $0.00270

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

Security

Grade A, and why

setup-memory 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 2d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (assets/hooks/load-memory.sh, assets/hooks/remind-save.sh), 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.

plugins/starter/skills/setup-memory/SKILL.md · 263 lines

How it starts

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

/setup-memory

Configures the Memory pillar: CLAUDE.md (project context, all tiers) and a self-sustaining .claude/memory/ lifecycle — store + hooks + /save-memory skill (Tier 3 only).

Flags

Check flags first — they override Mode Detection behavior:

  • --claude-md-only — write CLAUDE.md only, skip .claude/memory/ entirely
  • --memory-only — create .claude/memory/ only, skip CLAUDE.md entirely

Mode Detection

Read .claude/starter-context.json if it exists
  → Exists:
      - Load all fields
      - For each required field that is null or missing → ask for that field only
      - Use tier field to determine whether to create .claude/memory/ (Tier 3 = full / standard ≠ Tier 3)
  → Not found (standalone):
      - Read existing CLAUDE.md if present (extract what's already there)
      - Ask for any missing fields
      - Ask: "Should I also set up .claude/memory/? (Tier 3 feature)"

Required fields from starter-context.json: tier, project.name, project.type, project.team_size, project.stage, stack.language, stack.framework, stack.build_tool, stack.test_framework, stack.package_manager, architecture.style, architecture.key_layers, architecture.entry_points, architecture.external_deps, architecture.gotchas, conventions.formatter, conventions.branch_strategy, conventions.commit_format, conventions.workflow_gates (optional — absent means no workflow section generated)

CLAUDE.md Structure

Write with actual values — no generic text, no leftover placeholders:

# [Project Name] — Claude Context

*Generated by /shipwithai-starter on [DATE].
Edit directly — every skill reads this before doing anything.*

---

## Project identity

**Name:** [name]
**Type:** [web app / API / CLI / lib / monorepo]
**Team size:** [N developers]
**Stage:** [greenfield / active / maintenance]

---

## Tech stack

**Language(s):** [...]
**Framework(s):** [...]
**Build tool:** [...]
**Test framework:** [...]
**Package manager:** [...]
**Runtime:** [Node 20 / Python 3.12 / Go 1.22 / etc.]

---

## Architecture overview

**Style:** [monolith / microservices / modular monolith]

[Only include the following block when project.stage is "greenfield":]
**Status:** Greenfield — build toward this structure

**Build order:**
[Derive from architecture.build_order if present in starter-context.json.
 Otherwise generate a sensible 3-step order based on the stack and architecture:
 - Step 1: foundation first (e.g., db/schema.ts → run initial migration)
 - Step 2: authentication (e.g., features/auth/ — auth before any business domain)
 - Step 3: core domain (e.g., features/<core-domain>/)]
[End greenfield block — omit entirely for non-greenfield projects]

**Key layers:**
- [e.g., API layer: src/routes/]
- [e.g., Service layer: src/services/]
- [e.g., Data layer: src/db/]

**Entry points:**
- [e.g., src/index.ts → main server]

**Key directories:**
[paste tree output or describe structure]

**External dependencies:**
- [databases, queues, caches, external APIs]

---

## Key conventions

**Code style:** [ESLint + Prettier / Black / gofmt / etc.]
**Branch strategy:** [trunk-based / gitflow]
**Commit format:** [conventional / custom / none]
**Test coverage target:** [e.g., 80%]

---

## What Claude should know before touching code

**Gotchas:**
- [e.g., "src/generated/ is auto-generated, never edit manually"]
- [e.g., "migrations/ only via npm run migrate:create"]

**Build order:**
- [e.g., "codegen must run before tsc"]

**Test isolation:**
- [e.g., "integration tests require Docker Compose up"]

**Sensitive areas (extra care):**
- [e.g., "auth/ and payments/ require security review before merge"]

---

## Development workflow

[Only include this section if conventions.workflow_gates is present and not ["none"] or []]

**When working on any task, Claude must follow these gates:**

[Generate one bullet per gate selected:]
- plan-before-code → **Plan first:** For any task > 30 min, create a plan and get approval before writing code.
- tdd             → **TDD:** Write failing tests first. Never write implementation without a corresponding test.
- code-review     → **Code review:** Run the code-reviewer agent after every significant change. Address all CRITICAL and HIGH findings.
- security-review + sensitive_areas present → **Security review:** Before committing to [list from architecture.sensitive_areas], run security-reviewer agent.
- security-review + sensitive_areas empty  → **Security review:** Before committing to sensitive areas (auth, payments, migrations), run security-reviewer agent.

[If workflow_gates is ["none"] or [] → omit this section entirely]

---

## Harness config

**Tier:** [Essential / Standard / Full]
**Last updated:** [DATE]

Hooks: see `.claude/settings.json`
MCP servers: see `.mcp.json`

Read the full file on GitHub · 263 lines

Files

What ships with it

7 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. 2d ago First seen · 263 lines · 89 tokens per session scan A 7b8feb62ce2b

Subscribe to this mod's changes

setup-memory is a skill published in the GitHub repository ShipWithAI/shipwithai-plugins (10 stars, last pushed 20d ago), licensed MIT. It adds 89 tokens to every session and 2,697 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.

Related

Other skills, from other repositories

rulesync

Generates and syncs AI rule configuration files (.cursorrules, CLAUDE.md, copilot-instructions.md) across 20+ coding tools from a single source. Use when syncing AI rules, running rulesync commands, importing or generating rule files, or managing shared AI coding configurations.

dyoshikawa/rulesync · 64 tokens

agent-workspace-linux

Use when a task needs an isolated hidden Linux desktop or workspace-owned browser: GUI app QA, web/browser/shopping automation, sandboxed app observation, or stale workspace cleanup. Routes agent-workspace-linux MCP tools on demand. Does NOT apply to host desktop/Chrome control, generic MCP setup, or pure code/file…

ilysenko/codex-desktop-linux · 70 tokens

ss-component

Generate a new UI component following the StyleSeed design conventions.

bitjaru/styleseed · 14 tokens

loongsuite-pilot-insight

基于 LoongSuite Pilot / AI Coding Agent 日志生成事件洞察、组织洞察、数据质量、研发效能和 AI Native 使用类 SLS 报表时使用;包含 AI Coding 事件表语义,以及团队报表可选的部门维表、deptuser 组织关系、指标口径和公共 CTE,通常与 sls-dashboard-builder 一起使用。.

alibaba/loongsuite-pilot · 91 tokens

map-review

Interactive 4-section code review using monitor, predictor, and evaluator agents plus the user and maintainer role reviewers on current changes. Use when reviewing a diff, PR, or staged work before merge. Do NOT use to plan or implement; use map-plan or map-efficient.

azalio/map-framework · 58 tokens

map-fast

Minimal workflow for small, low-risk changes — no planning, no learning.

azalio/map-framework · 17 tokens