/ctx:ctx-commitfrom ctx
Commits code changes with context persistence, capturing decisions and learnings alongside code. Replaces raw git commit to enforce project rules and spec-per-commit.
Ships in ctx. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Commit code changes, then prompt for decisions and learnings worth persisting. Bridges the gap between committing code and recording the context behind it.
git commit bypasses spec enforcement and violates CONSTITUTION./ctx-commit
/ctx-commit "implement session enrichment"
/ctx-commit --skip-qa
Read .context/CONSTITUTION.md (if it exists) for commit-specific
rules. Common project rules to look for and enforce:
Spec: trailer, verify a spec file exists in
specs/ before proceeding. If no spec exists, stop and offer to run
/ctx-spec to scaffold one.Signed-off-by: trailer.
Commit with git commit -s so it is appended from the configured git
identity; do not hand-type it. Never add a Co-Authored-By: or
any agent/tool sign-off: it is prohibited even if a harness default
suggests one. See CONSTITUTION "Process Invariants" (the commit DCO /
trailer rules), and mirror the trailer convention you find in
git log -5 --format=%B before your first commit.Read CONSTITUTION fully and apply all relevant rules before proceeding to pre-commit checks.
Unless the user says --skip-qa or "skip checks":
git diff --name-only to see what changedVerify before claiming ready: map each claim to evidence. "Tests pass" requires test output with 0 failures. "Build succeeds" requires exit 0. "Lint clean" requires linter output with 0 errors. Run commands fresh; never reuse earlier output. Before proceeding to stage, answer these self-audit questions:
If any answer reveals a gap, address it before staging.
Every commit closes work. Before staging, check TASKS.md for tasks that this commit completes:
.context/TASKS.mdSpec: trailer value)[ ]) whose Spec: field matches[x]This is the closure point in the plan→spec→task→commit chain. Skipping it causes task rot: completed work stays open, future sessions waste time re-triaging stale items.
git statusgit add -A)Spec: trailer, and commit with git commit -s so the
Signed-off-by: DCO trailer is appended automatically (see format
below). Never add a Co-Authored-By: / agent sign-off.After a successful commit, ask the user:
Any context to capture?
- Decision: Did you make a design choice or trade-off?
- Learning: Did you hit a gotcha or discover something?
- Neither: No context to capture: we're done.
Wait for the user's response. If they provide a decision or learning, record it using the appropriate command:
ctx decision add "Use PostgreSQL" \
--session-id abc12345 --branch main --commit 68fbc00a \
--context "Need a reliable database" \
--rationale "ACID compliance and JSON support" \
--consequence "Team needs training"
ctx learning add "Go embed requires files in same package" \
--session-id abc12345 --branch main --commit 68fbc00a \
--context "..." --lesson "..." --application "..."
After every commit, run /ctx-reflect to capture the bigger
picture before moving on. This is mandatory: Skipping reflection
is how context gets lost between sessions.
Follow the repository's existing commit style. Draft messages that:
Spec:,
Signed-off-by:)Example:
complete journal-recall merge wiring and cross-cutting cleanup
Wire journal commands through journal/core packages instead of
recall/core. Move importer, lock, unlock, sync cmd packages from
recall/cmd to journal/cmd.
Changes:
- journal/core/{plan,execute,query} are now canonical
- sourcefm/sourceformat renamed to source/frontmatter, source/format
- Magic numbers extracted to config/stats constants
- state.StateDir renamed to state.Dir across 26 callers
- splitLines moved to parse.ByteLines
- /ctx-commit skill generalized to be language-agnostic
Spec: specs/journal-merge-completion.md
Signed-off-by: Jane Doe <[email protected]>
Spec: in the commit message. If
CONSTITUTION also requires it, this is non-negotiable..env, credentials, tokens) in the diff
before stagingBefore committing, verify:
[x] in TASKS.mdSpec: and Signed-off-by: trailers are present (the latter
added via git commit -s, not hand-typed)Co-Authored-By: or agent/tool sign-off in the messagegit add -A)After committing, verify:
After every successful commit, relay a structured summary to the human verbatim:
┌─ Commit Summary ─────────────────────────
│ Spec: specs/<name>.md
│ Tasks closed: <list or "none">
│ Files changed: <count>
│ Message: <first line of commit message>
└──────────────────────────────────────────
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub activememory/ctx --plugin ctx54 skills in this plugin
/ctx-agentLoad full context packet. Use at session start or when context seems stale or incomplete./ctx-architectureBuild and maintain architecture maps. Use to create or refresh ARCHITECTURE.md and DETAILED_DESIGN.md. Supports principal mode for deeper analysis: vision, future direction, bottlenecks, implementation alternatives, gaps, upstream proposals, and intervention points./ctx-architecture-enrichEnrich architecture artifacts with code intelligence data. Takes existing /ctx-architecture output as baseline, verifies and quantifies with GitNexus MCP (blast radius, execution flows, domain clustering, registration sites). Run after /ctx-architecture, not instead of it./ctx-archiveArchive completed tasks. Use when TASKS.md has many completed items cluttering the view.Other plugins' skills for the same job