Skills and rules for the NanoClaw host agent (Claude Code on Mac), covering plugin promotion, container management, staging checks, repository safety, and upstream updates.
91%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Medium
Suggest reviewing before use
Host runtime jbaruch/nanoclaw owns canonical memory counting and CommonMark section boundaries. Installed authority jbaruch/nanoclaw-host rules/memory-budget-policy.md covers its fixed image lookup and versioned metadata contract for the jbaruch/nanoclaw-admin memory-diet and memory-hygiene skills.
The runtime co-ships these reviewed artifacts in its host/agent images:
container/shared/memory-budget-cli.mjscontainer/shared/memory-budget-policy.mjscontainer/shared/memory-budget-policy.jsonThe immutable agent copies live together under /app/shared/, owned by the image rather than the agent. The host uses the same source artifacts. The policy JSON is schema 1; parseMemoryBudgetPolicy owns its exact fields and bounds. No reader maintains a second heading list, budget threshold or Markdown parser.
node /app/shared/memory-budget-cli.mjs with no arguments.MEMORY.md UTF-8 bytes on stdin, preserving BOM, CRLF and Unicode.max_source_bytes before analysis.Exit 0 emits one JSON object and a newline, with these exact fields and no memory content:
| Field | Contract |
|---|---|
schema_version | Integer 1 |
policy_schema_version | Integer 1 |
policy_sha256 | Lowercase SHA-256 of the exact co-shipped policy bytes |
total_chars | Nonnegative Unicode-scalar count of the complete input |
counted_chars | total_chars minus the complete exempt-section counts |
budget | Positive integer from the canonical policy |
section_max_chars | Positive integer from the canonical policy |
exempt_sections | Array of {heading, chars} records, with string names and nonnegative scalar counts |
sections | Array of {heading, chars, body_chars, exempt} records; heading is a string, counts are nonnegative integers, body_chars <= chars, and exempt is Boolean |
Section names and exemption decisions come from the common host parser. Whole exempt sections stay verbatim in live memory, never become extraction/retirement selectors, and contribute only neutral growth metadata. Fences, quotes, lists and HTML do not become top-level selectors. Raw total size still includes exempt content.
An unavailable sibling, unsupported policy/version, oversized input, malformed UTF-8 or analyzer failure exits nonzero, emits no usable stdout and writes an actionable safe stderr diagnostic. Consumers discard partial/invalid output, report unknown budget as one validation issue, and preserve source memory. Never infer an empty exemption set or a clean budget from failure.
The admin memory-diet skill runs only on an explicit main-group request. The main agent measures MEMORY.md with this helper, moves chosen incident sections verbatim into memory/incidents/ reference files, and leaves each heading with a one-line lesson and a link. Exempt sections are never chosen. The helper's metadata grants no memory-write authority; the owner's request does. The host's job-based extraction (plans, results, private journals) is retired.
jbaruch/nanoclaw src/memory-budget-policy.test.ts: actual co-shipped CLI/module lookup, UTF-8/BOM/CRLF/scalar accounting, metadata-only stdout, missing/future siblings and invalid-input refusal.jbaruch/nanoclaw-admin tests/test_memory_hygiene.py: fixed command lookup, complete schema-1 output validation and unknown-budget refusal without source mutation..tessl-plugin
rules
skills
add-ugos-project
check-staging
extract-to-overlay
host-contracts
references
scripts
nuke
promote
reconcile
ship-code
update-from-upstream