ZipperBagCoffee/crabshell
ZipperBagCoffee/crabshell · 1 stars · 1 plugin
Marketplace One Crabshell plugin for Claude Code and Codex: shared project memory, native lifecycle guidance, verification, and structured workflows.
Install
/plugin marketplace add ZipperBagCoffee/crabshellRun inside Claude Code, then install plugins from it. Check the repo's README before you run it.
Plugins 1
After adding the marketplace, install one with /plugin install <name>@crabshell-marketplace.
- 1crabshellShared project memory, native Claude Code and Codex hooks, verification, and structured document workflows.
/plugin install crabshell@crabshell-marketplace
Files
Crabshell
One Crabshell plugin for Claude Code and Codex: shared project memory, native lifecycle guidance, verification, and structured workflows.
Three pillars:
- Session memory — Both hosts automatically load the same project memory and workflow state. Claude Code retains automatic session capture/rotation; either host can use explicit load/save/search skills.
- Behavioral correction — Both hosts receive the same compact first-turn contract, workflow, subagent, compaction, and parent-completion semantics through native hooks. v21.113.0 (I083): per-response 3-field ending, model-visible pressure texts, and the pressure/sycophancy/scope behavioral guards are retired; deterministic guards (path, docs, log, verify, commit-gate, doc-watchdog) remain.
- Structured workflows — D-T document system: a discussion (D) carries the plan, tickets (T) hang off it; investigations (I) are independent; existing P and H documents stay readable. Host-native skills cover discussing, ticketing, investigating and iterative improvement (regressing).
All plugin output lives under .crabshell/ — gitignored, clean project root.
Installation
In Claude Code (2.1.275 or later):
/plugin install crabshell --marketplace ZipperBagCoffee/crabshell
On older Claude Code versions:
/plugin marketplace add ZipperBagCoffee/crabshell
/plugin install crabshell
In Windows or Linux Codex CLI:
codex plugin marketplace add ZipperBagCoffee/crabshell --ref master codex plugin add crabshell@crabshell-repo codex plugin list
Start a new host session after installation. Codex will ask you to trust the current hook hash before hooks run.
Codex Compatibility
This repository is a dual-runtime plugin repo:
- Claude Code uses
.claude-plugin/plugin.json,hooks/hooks.json,skills/(every slash command, such as/crabshell:save-memory), andcommands/install-codex.md(the legacy Codex bridge). - Codex uses
.agents/plugins/marketplace.json,.codex-plugin/plugin.json,hooks/codex-hooks.json,codex-skills/, and thescripts/codex-*.jswrappers.
Installing the plugin in one runtime does not automatically activate the other runtime. The files can ship in the same GitHub repository, but each product only reads its own manifest and entrypoints.
For Codex CLI development, . must be the Crabshell source checkout itself—not the project where you want to use Crabshell:
cd path/to/crabshell codex plugin marketplace add . codex plugin add crabshell@crabshell-repo
Review and trust the discovered Crabshell hook definition in Codex before expecting it to run. Invoke crabshell:status to report the live Claude/Codex installed, activated, trusted, behavior-verified, degraded, drifted, and unsupported states. Codex desktop-app status is reported separately from CLI evidence.
The shared project state is .crabshell/. Claude and Codex can both read and write the same memory/document store. Installed Codex memory skills and seven document skills call bundled launchers from the plugin cache while targeting the active project. Document launchers require an absolute --project-dir; consumer projects do not need their own scripts/codex-docs.js. Direct source-checkout commands remain available for development:
node scripts/codex-memory.js load node scripts/codex-memory.js save --title="Codex session note" --message="..." node scripts/codex-memory.js search "query" node scripts/claude-to-agents.js node scripts/codex-docs.js investigation "research topic" node scripts/codex-docs.js worklog "task title"
Codex activates synchronous native lifecycle events: SessionStart, UserPromptSubmit, PreToolUse, PostToolUse, PreCompact, PostCompact, SubagentStart, SubagentStop, Stop, and Interrupt. They share host-neutral memory/workflow/verification cores with Claude while emitting each host's native hook response. Every Codex launcher catches adapter-load and rejected-main() failures so hook infrastructure errors fail open instead of interrupting the user's tool call. Claude's automatic SessionEnd capture remains Claude-specific; the retired verifier, pressure/sycophancy/scope guards, and fixed agent-count hooks are absent from both runtimes.
On every prompt, both native UserPromptSubmit paths inject one shared compact turn contract and Rules Quick-Check. The per-response [의도]/[이해]/[설명] ending was retired in v21.113.0 (I083 R8, user-approved).
/crabshell:install-codex and scripts/install-codex.js remain as legacy/development bridges for older installations. Native marketplace installation is the default Codex path.
How It Works
- Session start - Claude and Codex load the same saved memory and active workflow context. A legacy-only project description is copied once to
.crabshell/project.md; the legacy file is preserved. - During work - Both receive shared task/subagent/completion semantics; Claude additionally runs its automatic capture and deterministic guard lifecycle.
- Session end - Claude performs its existing full conversation backup/final save. Codex uses explicit save skills and never needs to launch Claude.
Project verification uses a portable schema-v2 manifest. Commands are repo-relative, and behavioral entries pass only when command exits, structured observations, and forbidden-path snapshots match; printing PASS is never sufficient by itself.
Parent completion evidence recognizes checks declared in the project manifest or package test configuration. Claude success can omit an exit code; PostToolUseFailure records its separate error envelope. Codex obtains an explicit code from a matching completed command in the native transcript when its hook only contains output text. Failures, interruptions, duplicate and late results cannot reuse an earlier passing check. Ordinary shell reads avoid a whole-project content scan; decisive checks, edits and commit/Stop decisions retain content-based validation.
New in v21.143.0: adding, renaming or deleting a test file no longer makes the changed-file check run every check; a new test runs by itself. v21.142.0: a changed test that reads changed source must also fail on the code before the change (HEAD), or the check run fails — a test that passes either way does not check the change; and the changed-file check no longer runs every check when nothing changed or after a commit verified with it. v21.141.0: a Depth rule — when a task calls for expertise, Claude uses the methods and tools a top practitioner would use, not just their vocabulary — and verification no longer counts Claude judging its own work; the evidence is a tool result or an outside check. v21.140.0: a check run in the background no longer keeps the commit gate closed after a passing foreground run; the block reason says to run checks in the foreground. v21.139.0: verification checks the diff only — routine updates run only the checks your change touches (run-verify.js --changed), the full suite runs only when you ask, and Claude asks you first when it thinks a full run is needed; the commit gate accepts the changed-file check, and a version bump no longer runs every check. v21.138.0: a Take Pride rule — Claude works at a quality it would be proud to put its name on, and before handing work over asks whether it is proud of it; if not, it improves it first. v21.137.0: temporary files made for a test are deleted once the test is done — only the paths Claude created, by exact path and never by wildcard; anything it did not make stays and is reported, and deleting any other file still asks first. v21.136.0: a Common Sense rule — before doing the work and before handing it over, Claude pictures you using or reading the result and fixes anything that would look weird, and every verification asks the same question; the communication rule is about 30% shorter. v21.135.0: the discussion carries the plan — a ## Plan the user confirms before tickets, tickets carry its specifics and compare their result with the discussion, and a ticket without a plan is blocked; the commit gate accepts cd <dir> &&, > file, rtk and pnpm/yarn test runs. v21.134.0: a rule makes git the record of changes — git or a repository is set up (after confirming) when missing, and before saying why something changed Claude finds and cites the commit that changed it. v21.133.0: memory saves are mandatory again — v21.123.0 had made the save notice optional and the logbook stopped getting entries; the save now runs on every turn with its summarizers in the background, and a large backlog is split across several summarizers. v21.132.0: the large document skills keep their rules after compaction (bodies fit the 5,000-token re-attach budget; details moved to references/), manual memory saves go through the locked append path, and loaded memory is marked as past-session data. v21.131.0: checks that read INDEX rows work on the wikilink rows the skills write — a ticket cannot be marked done or verified while its result sections are still template text, and another session's document skill call no longer moves a regressing workflow unless it names that workflow. v21.130.0: the document workflow is D → T — a discussion carries the plan and its tickets are D001_T001; regressing cycles no longer create plan documents, one-pass work is a discussion with one ticket, and existing P/H documents stay readable. The retired guards were deleted. v21.129.0: reverting or checking out a file no longer makes run-verify.js --changed run everything (the load map compares content, not just file times). v21.128.0: run-verify.js --changed keeps running only the checks your change touches while a session is writing its memory files (a scripts/codex-docs.js change runs 26 of 97 checks, about half the full time). v21.127.0: a commit blocked because the project declares no full check now says what to declare (tools.test or package.json test); prompts carry 1,021 fewer characters because the project description loads once per session; the rules add one advisor line and match common brevity rules; document folders, time limits, locks and JSON state each have one definition. v21.126.0: the declared checks now run every test file (the manifest discovers them), run-verify.js --changed runs only the checks your change touches (everything when it cannot tell), and only the project's own check commands unlock a commit. v21.125.0: the path guard blocks only writes into another project's .crabshell (reads get a notice; prose, grep patterns, heredoc text, temp folders and unknown variables are no longer blocked), doc-watchdog and web-guard look only at this project, and Claude runs its hooks in one process per event (one Edit starts 2 hook processes instead of 10). v21.124.0: sessions running at the same time in one project keep their own memory position, save counter, completion record and skill flag, so they no longer duplicate, drop or unblock each other's work; the commit gate no longer blocks after documentation-only edits and advises instead of blocking when a project declares no check; SessionStart memory fits the host's 10,000-character limit. v21.123.0: opt-in raw hook capture, failure/result ordering, scoped request guidance, prepared memory finalization, and a small recovery record. The record preserves request excerpts, observed checks and unfinished/paused status; it does not grant new execution permission. Claude delta processing prepares a fixed input, summarizes it in the foreground when the host permits, and uses one finalize command. New input stays queued. Codex preserves pending automatic summaries because those summarizer skills are not bundled. See runtime and memory details.
What Gets Saved
Automatic (No action needed)
logbook.md- Session summaries accumulate here (auto-rotates at 23,750 tokens)logbook_*.md- Rotated archives (L2)*.summary.json- L3 summaries (Haiku-generated)sessions/*.l1.jsonl- Detailed session transcripts (L1)
Manual Setup (Optional)
If there's information you want Claude to know every session, directly edit the files:
# Create/edit the project description at the .crabshell root echo "React + TypeScript web app." > .crabshell/project.md
Or just ask Claude: "Save the project info to project.md"
With this setup, Claude starts every new session knowing this information.
The supported counter.js memory-set/get/list commands use the same .crabshell/project.md path as both hosts' context readers. If only the old .crabshell/memory/project.md exists, it is copied without deleting the old file. If both exist, the root file takes precedence; an explicit setter saves its prior contents to project.md.bak.
Slash Commands
Works in any project where the plugin is installed:
| Command | Description |
|---|---|
/crabshell:save-memory |
Save now (don't wait for auto-save) |
/crabshell:load-memory |
Reload memory (after manual edits) |
/crabshell:search-memory query |
Search past sessions |
/crabshell:clear-memory old |
Clean up files older than 30 days |
/crabshell:discussing "topic" |
Create/update a discussion document |
/crabshell:planning "topic" |
Create/update a plan document |
/crabshell:ticketing P001 "topic" |
Create/update a ticket tied to a plan |
/crabshell:investigating "topic" |
Multi-source multi-agent investigation |
/crabshell:regressing "topic" |
Iterate current P→T improvement cycles until the Discussion converges; an explicit user cap is a maximum, not a target |
/crabshell:hotfix "description" |
One-pass work: a discussion whose Plan you confirm, one ticket, then the change |
/crabshell:verifying |
Create/run project-specific verification tools |
/crabshell:status |
Healthcheck of plugin state (memory, regressing, verification, version) |
/crabshell:install-codex |
Legacy/development bridge that links a Claude-installed checkout into Codex locations; prefer native Codex marketplace installation |
/crabshell:lint |
Run Obsidian document lint checks (orphans, broken wikilinks, stale, missing frontmatter, INDEX inconsistencies) |
/crabshell:search-docs query |
BM25 full-text search across all D/P/T/I/W documents |
/crabshell:knowledge "title" |
Create a K-page (verified fact or operational tip) in .crabshell/knowledge/ |
Document Management (D-T System)
Track project work through structured, append-only documents:
| Skill | ID Format | Statuses | Use For |
|---|---|---|---|
/discussing |
D001 | open, concluded | Decisions, dialogues, conclusions |
/planning |
P001 | draft, approved, in-progress, done | Existing plans only (new plans are written into the discussion) |
/ticketing |
D001_T001 (P001_T001 for existing plans) | todo, in-progress, done, verified | Session-sized work units under a discussion |
/investigating |
I001 | open, concluded | Multi-source investigations with cross-review |
/hotfix |
— (H001 for existing records) | — | One-pass work, recorded as a discussion with one ticket; /hotfix H001 updates an existing H record |
W worklogs (W001...) are legacy history from the retired light-workflow skill (v21.112.0, D113) — still readable and searchable, no new ones are created.
Each document type has its own folder under .crabshell/ with an INDEX.md for status tracking. Tickets name their discussion as parent and require verification-at-creation (TDD principle); a discussion is concluded by its final report, not by its tickets.
Agent Orchestration Workflow
For one-pass work the parent does the task directly and records it as a discussion with one ticket. The parent agent owns the task contract, named references, source changes, direct execution, and the final completion decision.
Delegation is optional and risk-based. When a worker is useful, its prompt carries the relevant original request, non-goals, authoritative references, read/write scope, expected observation, and verification method. Worker claims, counts, and spot-checks are supporting evidence only; the parent must inspect the resulting diff and decisive observations itself.
User questions are reserved for destructive or irreversible actions, changes outside the workspace, external installation, and product choices that cannot be discovered from project evidence. Non-blocking uncertainty does not stop local inspection or implementation.
Regressing (Iterative Optimization)
For tasks requiring multiple improvement cycles, /regressing "topic" runs Plan→Ticket→Verify iterations until the Discussion converges:
- Each cycle's verification results determine the next cycle's direction
- Phase Tracker (v19.23.0): Hook-based auto-enforcement of Skill tool usage — UserPromptSubmit injects phase-specific reminders, PostToolUse auto-advances phase on Skill tool detection
- Anti-partitioning: each cycle plans current work only (no pre-dividing across cycles)
- A single Discussion wraps the iterations and concludes only after the requested outcome is verified
CLAUDE.md Integration
The plugin automatically manages a rules section in your project's CLAUDE.md:
## CRITICAL RULES (Core Principles Alignment) ...plugin-managed rules... ---Add your project-specific rules below this line--- ## Your Project Rules (plugin never touches this) Build pipeline: src → build → dist Coding conventions: ...
- Above the line: Auto-managed by the plugin (updated on every prompt)
- Below the line: Your project-specific content (never modified by the plugin)
Note: The plugin also writes a warning to Claude Code's built-in
MEMORY.md(at~/.claude/projects/{project}/memory/MEMORY.md) to prevent confusion between the two memory systems. This is separate from the plugin's ownlogbook.md.
Storage Location
[project]/.crabshell/memory/
├── logbook.md # Active rolling memory (auto-rotates at 23,750 tokens)
├── logbook_*.md # Rotated archives (L2)
├── *.summary.json # L3 summaries (Haiku-generated)
├── memory-index.json # Rotation tracking & delta state
├── counter.json # Legacy counter (payloads without a session id)
├── session-state/ # Per-session counter, L1 read position, skill flag
├── logs/ # Refine logs
└── sessions/
└── *.l1.jsonl # L1 session transcripts (deduplicated)
[project]/.crabshell/
├── project.md # Shared project overview (optional)
├── discussion/ # Discussion documents (D001, D002...)
│ └── INDEX.md
├── plan/ # Plan documents (P001, P002...)
│ └── INDEX.md
├── ticket/ # Ticket documents (P001_T001...)
│ └── INDEX.md
├── investigation/ # Investigation documents (I001, I002...)
│ └── INDEX.md
└── worklog/ # Worklog documents (W001, W002...) — legacy history (light-workflow retired v21.112.0)
└── INDEX.md
Configuration
Global: ~/.crabshell/config.json
Project: .crabshell/memory/config.json (takes precedence over global)
{
"saveInterval": 15,
"keepRaw": false,
"rulesInjectionFrequency": 1
}
saveInterval: How many tool uses before auto-save (default: 15)keepRaw: Keep raw.jsonl files after L1 conversion (default: false)rulesInjectionFrequency: Inject rules every N prompts (default: 1 = every prompt)
Hierarchical Memory Architecture
L1 (sessions/*.l1.jsonl) - Refined session transcripts (~95% size reduction)
↓
L2 (logbook_*.md) - Rotated archives (auto at 23,750 tokens)
↓
L3 (*.summary.json) - Haiku-generated summaries
↓
logbook.md - Active rolling memory (loaded at startup)
- L1: Raw transcripts refined to keep only meaningful content
- L2: logbook.md auto-rotates when too large, archives preserved
- L3: AI-generated summaries of archived content
- Search:
search-memorytraverses logbook.md → L3 → L2 (add--deepfor L1)
Documentation
- User Manual - Detailed usage guide
- Architecture - System design
- Structure - Directory layout & version history
Version
{
"name": "crabshell-marketplace",
"owner": {
"name": "TaWa"
},
"metadata": {
"description": "Crabshell plugin marketplace",
"version": "1.0.0"
},
"plugins": [
{
"name": "crabshell",
"source": "./",
"description": "Shared project memory, native Claude Code and Codex hooks, verification, and structured document workflows.",
"version": "21.143.0",
"author": {
"name": "TaWa"
},
"repository": "https://github.com/ZipperBagCoffee/crabshell",
"license": "MIT",
"keywords": [
"memory",
"context",
"session",
"productivity",
"verification",
"behavioral-correction",
"guard-hooks",
"workflows"
]
}
]
}Facts
- Kind
- Marketplace
- Repo
- ZipperBagCoffee/crabshell
- Group
- Uncategorized
- Stars
- 1
- Marketplace name
- crabshell-marketplace
- Owner
- TaWa
- Language
- JavaScript
- Created
- 2025-12-21
- Last push
- 2026-11-23
- Plugins
- 1