cg-work-memory

cg-work-memory is a skill for Claude Code, Codex from Intelligent-Internet/CommonGround. It costs 31 tokens per session (1,155 once invoked), scanned A, original, Apache-2.0.

A workflow for submitting a concise public record of a completed local task to CommonGround's work-memory system.

In plain words
What is it for?
It is for recording what a local agent completed, using the configured project and agent profile.
Why use it?
It preserves useful task context for later work while requiring the project's approved command-line setup and reporting process.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Codex.

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/intelligent-internet/commonground/cg-work-memory
Any agent
npx skills add Intelligent-Internet/CommonGround --skill cg-work-memory
Clone the repo
git clone --depth 1 https://github.com/Intelligent-Internet/CommonGround

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 cg-work-memory

README.md
[![agentmods](https://agentmods.dev/badge/skills/intelligent-internet/commonground/cg-work-memory.svg)](https://agentmods.dev/skills/intelligent-internet/commonground/cg-work-memory)
Your own site
<a href="https://agentmods.dev/skills/intelligent-internet/commonground/cg-work-memory"><img src="https://agentmods.dev/badge/skills/intelligent-internet/commonground/cg-work-memory.svg" alt="Measured on agentmods" height="20"></a>
Per session 31 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,155 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.1 $0.00031 $0.01155
Opus 5 $0.00015 $0.00577
Sonnet 5 $0.00006 $0.00231
Haiku 4.5 $0.00003 $0.00115

Measured 6d ago against content hash b66cd23c7d8d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

cg-work-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 6d 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.

examples/skills/cg-work-memory/SKILL.md · 130 lines

How it starts

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

CG Work Memory Skill

Use this skill with the base cg skill. The base cg skill defines the CLI safety contract; this skill defines the work-memory reporting workflow and manifest content policy.

If the base cg skill is unavailable, stop and fix the local skill setup. Do not replace it with direct CommonGround HTTP calls or raw cg worker lifecycle commands.

This skill assumes the target project has already been prepared by an operator. For local open-source demos, use the default project cg-demo unless the user explicitly provides another seeded project/profile. If the CLI returns project_not_seeded, project_bootstrap_conflict, admin_service_credential_required, or profile_auth_required, stop and report the setup error instead of running cg setup, reading PG_DSN, or calling Admin Service / CommonGround HTTP directly.

If the CLI config/profile is missing, ask the user/operator for the non-secret client connection facts instead of reading config or token files yourself: project id, agent id/profile, CommonGround service URL, Admin Service URL, and either an already prepared Admin Service bearer token file path or confirmation that CLI config has been written. Never ask for a bearer token value in chat.

Purpose

Submit selected public work facts from a local agent run as a CommonGround work-memory report.

Use this skill when:

  • A local task has completed and produced a useful public summary.
  • The task produced validation evidence, artifact references, or failure notes worth future inspection.
  • Another same-project agent, operator, or reviewer may need to audit or reference the work later.

Do not use this skill for:

  • Token-level reasoning or chain-of-thought capture.
  • Private scratchpad, local runtime state, or native memory import.
  • Credential, claim token, registration authority, grant, or admission material.
  • Managed continuation or worker lifecycle ownership.

Allowed Command

Only use these base cg skill commands:

cg profile ensure-agent --profile <project-id>/<agent-id> --project-id <project-id> --requested-agent-id <agent-id> --profile-kind byoa.work_memory_reporter.v1 --runtime-kind <runtime-kind> --display-name <display-name>
cg report work-memory --profile <project-id>/<agent-id> --project-id <project-id> --agent-id <agent-id> --manifest-file <manifest.json>

Read the full file on GitHub · 130 lines

Files

What ships with it

2 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. 6d ago First seen · 130 lines · 31 tokens per session scan A b66cd23c7d8d

Subscribe to this mod's changes

cg-work-memory is a skill published in the GitHub repository Intelligent-Internet/CommonGround (149 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 31 tokens to every session and 1,155 once invoked, about $0.0002 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.

Related

Other skills, from other repositories

knowledge_store_skill

Skill for working with local .knowledge.yaml files via KnowledgeStore. Use this when you need to recall, search, or manage directory-local memories and knowledge links stored in plain YAML alongside the user's project files. KnowledgeStore is directory-scoped. Each directory that contains a .knowledge.yaml file…

NPC-Worldwide/npcpy · 346 tokens

knowledge_index_skill

Skill for using the KnowledgeIndex registry to discover which directories contain .knowledge.yaml files without walking the filesystem. KnowledgeIndex is a lightweight SQLite cache. It maps directory paths to file metadata (mtime, memorycount, linkcount). The database path is caller-provided — npcpy does not hardcode…

NPC-Worldwide/npcpy · 272 tokens

cocoscout

Relevance-ranked context loading — Tier 2 async subagent (Haiku, <5s) that fires after Tier 1 deterministic checks in UserPromptSubmit. Injects ranked context from CocoGrove, CocoContext, Environment Inspector, Prompt Studio, and CocoDream.

Snowflake-Labs/cocoplus · 59 tokens

cocohealth

Context utilization monitor — background monitor that samples context window utilization via PostToolUse hook, surfaces advisory at 60% and critical warning with recovery decision matrix at 70%.

Snowflake-Labs/cocoplus · 38 tokens

pull-search

CocoPull session archive search — full-text search across past sessions. Handles $pull search " " with --since and --feature filters, and $pull index rebuild.

Snowflake-Labs/cocoplus · 38 tokens

pod-kb

Display the project knowledge base (lifecycle/kb.md) — project-specific patterns, decisions, and gotchas accumulated by CocoCupper across sessions.

Snowflake-Labs/cocoplus · 33 tokens