/agent-continuity:add-refactor-entry <commit-hash>from Agent Continuity
Given a commit hash, derive a before/after entry for Agent Continuity Style Refactor Catalog with the principle applied. Use when the user wants to capture a notable refactor as a teaching example, or asks to "add this commit to the refactor catalog" / "log this refactor".
Ships in Agent Continuity. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Inspect a commit, derive a before/after entry, append to the catalog. Interactive: never overwrites or appends without confirmation.
The commit hash is passed as $ARGUMENTS. Validate first:
git rev-parse --verify "$ARGUMENTS^{commit}"
If validation fails, ask the user for a valid hash and stop. Otherwise, capture:
git rev-parse "$ARGUMENTS").git log -1 --pretty=format:"%h %ad %an %s" --date=short "$ARGUMENTS").git show --stat --format= "$ARGUMENTS").Show this summary to the user so they confirm they're pointing at the right commit.
git show "$ARGUMENTS" --no-color
Read every file change. For each substantive transformation in the diff (a commit can contain more than one), identify:
for loop accumulating errors → validation railway with Either". "fold((f) => f, (v) => v) collapse → flatMap".Skip purely mechanical changes (formatting, renames without semantic shift, dependency bumps). The catalog is for style transformations, not changelogs.
If the commit contains zero substantive transformations, tell the user and stop — don't manufacture an entry.
Default path: <vault>/Knowledge/Style_Refactor_Catalog.md.
The vault is autodetected the same way the Agent Continuity hooks do it: glob AI_Codex*/ at the project root, or read vault.folder from .claude/agent-continuity.config.json. If multiple match or none match, ask the user.
If the catalog file doesn't exist, propose creating it with this header:
---
date: <today>
type: knowledge
tags: [knowledge, style, refactor, catalog]
---
# Style Refactor Catalog
Before/after pairs from authored refactor commits, each annotated with the principle applied. Anchored to commit hashes so the transformation can be inspected in full when the snippet isn't enough.
---
Use this format:
## <Short imperative title> (`<short-hash>`)
**Date:** <YYYY-MM-DD> · **Author:** <name> · **Subject:** <commit subject>
**Principle:** <one sentence — what property of the code improved and why.>
### Before
```<lang>
<3–10 line snippet>
<3–10 line snippet>
Notes: <0–3 sentences. Why the after-shape is preferred. Edge cases where the before-shape is still acceptable, if any.>
For multi-transformation commits, repeat the **Before / After / Notes** triplet for each transformation under the same top-level commit heading. Don't split a commit across multiple entries.
Show the drafted entry to the user. Iterate on snippets and principle wording until they approve.
## Step 5 — Append
Once approved:
- Append the entry to the end of the catalog file.
- Add a `---` separator before the new entry if the file already had entries.
- Never re-order existing entries.
## Step 6 — Recommend follow-ups
After appending, tell the user:
- If the entry illustrates a pattern not yet covered in a `<Stack>_Functional_Style_Examples.md` Knowledge note, consider promoting it to an anchor there (or running `/agent-continuity:mine-style` for a broader pass).
- If the catalog has crossed ~10–15 entries, consider organizing by stack or principle (sub-headings) — the linear list scales poorly past that.
## Notes
- One commit = one entry, even if multi-faceted. The commit hash is the join key.
- Snippets are quoted verbatim from the diff. Don't paraphrase; if a snippet would be too long, narrow the range.
- The Style Refactor Catalog is a *teaching* artifact, not a changelog. Entries earn their place by being instructive in isolation — if someone can't learn the principle from the before/after pair alone, the entry isn't ready.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub monolith-inc/agent-continuity --plugin agent-continuity13 skills in this plugin
/canvas-mapGenerate an Obsidian Canvas (.canvas) relationship map for a hub note — the note in the center, its outgoing links to one side and its backlinks to the other, wired with edges — saved into the vault's Architecture/ folder. Uses the Obsidian CLI to read the link graph. Use when the user wants a visual map of how a note connects to the rest of the vault, an architecture/dependency diagram, or asks to "make a canvas for X" / "map what links to X"./init-rulesDrop a starter set of `.agent/rules/*.md` template files (strict-implementation-lock, rules-architect-protocol, rules-git-workflow, rules-date-time-handling) at the project root. Use when bootstrapping a project that has no `.agent/rules/` yet, or when the user asks to "scaffold the agent rules" / "drop starter rule templates"./