
Kmg rules capture
Spots mid-session behavioral corrections and routes them to the right rules file
Kmg rules capture is an open-source agent skill for knowledge and memory. It is available on Claude Code.
- Scripts
- None
- Platforms
- Claude Code
- GitHub stars
- 6
- Last commit
- License
- MIT
- Listing updated
Similar skills
About Kmg rules capture
This skill watches the conversation for implicit corrections and standing preferences the user states without asking to record anything. When one is found, it drafts the instruction as a short always or never statement and offers to save it, rather than writing it silently.
Before suggesting a destination, the skill works out where a rule belongs. It checks whether the project has a platform configuration file such as CLAUDE.md, GEMINI.md, .cursor rules or AGENTS.md, and separates project-wide rules from personal style notes. It also avoids firing on one-time or time-bounded instructions and on code-style remarks, and it defers to other capture skills when the user explicitly asks to capture or save something.
The skill is written for the knowledge-management-graph setup, using paths such as knowledge/rules.md and a personal ~/.kmgraph folder, and it hands the actual write to a separate rules-capture agent. Its detection logic relies on file and directory checks in the project root.
When your agent uses it
Detect implicit mid-session behavioral corrections and route to the correct rules file
From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.
What it can access
From a static check of its 1 file (21 KB) on GitHub on 4 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.
Check another skill before you install it.
Install
This skill ships in the kmgraph plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):
/plugin marketplace add technomensch/knowledge-graph
/plugin install kmgraph@knowledge-management-graphOr copy only this skill to ~/.claude/skills/kmg-rules-capture:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/technomensch/knowledge-graph.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/kmg-rules-capture &&
cp -R "$tmp/skills/kmg-rules-capture" ~/.claude/skills/kmg-rules-capture &&
rm -rf "$tmp"For one project only, put the folder in .claude/skills/kmg-rules-capture inside it instead.
Copy the skill folder to ~/.agents/skills/kmg-rules-capture to use it in every repository:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/technomensch/knowledge-graph.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/kmg-rules-capture &&
cp -R "$tmp/skills/kmg-rules-capture" ~/.agents/skills/kmg-rules-capture &&
rm -rf "$tmp"For one repository only, put the folder in .agents/skills/kmg-rules-capture inside it instead.
Copy the skill folder to ~/.cursor/skills/kmg-rules-capture to use it in every project:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/technomensch/knowledge-graph.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/kmg-rules-capture &&
cp -R "$tmp/skills/kmg-rules-capture" ~/.cursor/skills/kmg-rules-capture &&
rm -rf "$tmp"For one project only, put the folder in .cursor/skills/kmg-rules-capture inside it instead.
Run in a terminal (add --scope workspace to install it for the current workspace only):
gemini skills install https://github.com/technomensch/knowledge-graph.git --path skills/kmg-rules-captureOr copy the folder to ~/.gemini/skills/kmg-rules-capture yourself.
For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/kmg-rules-capture:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/technomensch/knowledge-graph.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/kmg-rules-capture &&
cp -R "$tmp/skills/kmg-rules-capture" ~/.copilot/skills/kmg-rules-capture &&
rm -rf "$tmp"For one project only, put the folder in .github/skills/kmg-rules-capture inside it instead.
Get the folder:
git clone --depth 1 https://github.com/technomensch/knowledge-graph.gitThen copy knowledge-graph/skills/kmg-rules-capture into your agent's skills folder as kmg-rules-capture. Agents that support SKILL.md read one folder per skill.
What it does
- Implicit correction detection
- Recognizes phrases like always, never, from now on and going forward as standing behavioral directives.
- Ephemeral instruction filtering
- Skips session-only or time-bounded instructions such as anything ending in yet or until a condition.
- Scope classification
- Separates project rules, project-personal notes, and personal rules and style preferences.
- Platform-aware routing
- Detects the AI client config file present in the project and suggests it as a write target.
- Trigger pairing prompt
- Asks whether a phase-specific rule should apply only in certain situations.
Good for
- Save a standing instruction like never force-push so future sessions follow it
- Record a personal writing style preference across all projects
- Route a project workflow rule into the team rules file
- Store a platform-specific convention in the matching client config file
Kmg rules capture FAQ
What triggers Kmg rules capture?
Phrases such as always, never, from now on, going forward, or I prefer that express standing behavior rather than a one-off task.
Does Kmg rules capture write rules automatically?
No. It shows a one-line suggestion with a target and waits for the user to accept, pick another target, or decline. Writes are handled by a separate agent.
Which files does Kmg rules capture detect?
It checks the project root for .claude, .cursor, GEMINI.md, .windsurfrules, .github/copilot-instructions.md, .zed, .rules and AGENTS.md, plus the CLAUDE.md variant, to choose a platform target.
What does Kmg rules capture skip?
Temporary instructions such as don't push yet, observations about past events, one-time clarifications, and code-style remarks about a diff.
How do I install Kmg rules capture in Claude Code?
Copy the skill folder from GitHub to ~/.claude/skills/kmg-rules-capture to use it in all your projects, or to .claude/skills/kmg-rules-capture in one project. Or install the kmgraph plugin, which includes it: /plugin marketplace add technomensch/knowledge-graph, then /plugin install kmgraph@knowledge-management-graph.
Does Kmg rules capture run scripts?
No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.
Which AI agents can use Kmg rules capture?
Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.
What are the best alternatives to Kmg rules capture?
The closest alternatives to Kmg rules capture are Kmg capture router, Kmg lesson capture, Kmg knowledge graph usage, Kmg update profile and Remember.
Where this comes from
- Description: from the skill's own SKILL.md.
More from technomensch/knowledge-graph

Prompts the agent to capture architectural decisions as Architecture Decision Records
- Open source
- 6 GitHub stars
- Developer tools

Lets your agent search a knowledge graph for past decisions and solved problems
- Open source
- 6 GitHub stars
- Knowledge and memory

Makes the agent check a project's knowledge graph for prior decisions before recommending
- Open source
- 6 GitHub stars
- Knowledge and memory

Routes 'capture that' and 'remember that' requests to memory, lessons or ADRs
- Open source
- 6 GitHub stars
- Knowledge and memory

Routes explicit doc-update requests to the right knowledge-graph update command
- Open source
- 6 GitHub stars
- Developer tools

Finds docs affected by code changes before you push, PR or ship
- Open source
- 6 GitHub stars
- Developer tools



