/agentic-behavior:correct-behavior [SCOPE] <description of what I did wrong>from agentic-behavior
Records user corrections about AI behavior mistakes and updates rules, skills, or plugins to prevent recurrence. Triggered by phrases like 'don't do that' or 'stop doing X'.
Ships in agentic-behavior. 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.
This skill helps correct AI behavior mistakes and ensures they don't happen again by updating the appropriate rules, skills, plugins, or hooks.
It can be triggered two ways:
$ARGUMENTS./agentic-behavior:correct-behavior [SCOPE] <description> — $ARGUMENTS is the typed argument string.User's correction: $ARGUMENTS
| Scope | Description | Location |
|---|---|---|
user | Personal rules for all projects | ~/.claude/CLAUDE.md or ~/.claude/rules/*.md |
project | Rules for the current project | <git-root>/.claude/CLAUDE.md or <git-root>/.claude/rules/*.md |
skills | User's skills | ~/.claude/skills/*/SKILL.md |
plugins | Plugin source code | ~/src/nsheaps/ai-mktpl/plugins/... |
marketplace | The AI config marketplace repo | ~/src/nsheaps/ai-mktpl/... |
Note on slash commands (deprecated): Slash commands (~/.claude/commands/*.md) are deprecated. If the correction is about a slash command's behavior, migrate it to a user-invocable skill (user-invocable: true in frontmatter) under ~/.claude/skills/<name>/SKILL.md or in the appropriate plugin. Skills supersede slash commands and offer richer features (auto-recall, supporting files, frontmatter controls).
Note: If scope is obvious from context (e.g., correcting a skill's behavior), infer it. Otherwise, ask the user.
You MUST follow these steps in order:
Before doing anything else, document these 5 items concretely:
$ARGUMENTS)If you're unsure about any of these items, use the AskUserQuestion tool to clarify before proceeding.
Parse the arguments to determine scope:
skills scope correction and migrate the behavior to a user-invocable skillALWAYS review ALL sources to determine where existing rules lie, regardless of where the correction will be made:
Identify:
Analyse your collected data on what went wrong. Use the issue-management skill to document the failure to learn from it further.
Based on your analysis:
Contribution priority order — apply corrections in this order of preference:
When you're already working inside a plugin, drop the plugins-first preference (you're already there) and apply HOOKS → AGENTS → SKILLS → RULES.
Determine the best place for the rule:
| If the correction is... | Put it in... |
|---|---|
| General user behavior | a re-usable plugin that exists or will be created |
| Project-specific | <git-root>/.../CLAUDE.md or <git-root>/.claude/rules/*.md |
| About a slash command | Migrate it to a user-invocable skill (user-invocable: true) instead |
| About a skill | The skill's SKILL.md |
| About a plugin | The plugin source in ~/src/nsheaps/ai-mktpl/plugins/... |
| Agent behavior | henry, jack, or alex's repo (for example) |
| Repo contribution rules | ~/src/nsheaps/ai-mktpl/.claude/rules/*.md (Claude-specific) |
Write the correction:
*.local.md files — these are personal and not savedStructure appropriately:
rules/ directoryReview your changes:
CRITICAL: All changes must end up committed somewhere.
| Scope | Commit Strategy |
|---|---|
user | Changes go to ~/.claude/... immediately. Source of truth is ~/src/nsheaps/ai-mktpl/.ai/rules/. Ask user if they want changes synced there (requires PR). |
project | Remind user to commit changes to the project repo |
skills | If in ~/.claude/..., ask about syncing to ~/src/nsheaps/ai-mktpl/.... Slash commands being corrected should be migrated to skills (see Supported Scopes). |
plugins / marketplace | Changes are in ~/src/nsheaps/ai-mktpl/.... Create a PR and assign to user. |
Directory Structure in ~/src/nsheaps/ai-mktpl/:
.claude/rules/ — Rules for working on this repo (Claude-specific).ai/rules/ — User behavior rules that sync to user's config (AI-agnostic, can be used by other AI tools)When making changes to ~/src/nsheaps/ai-mktpl/...:
gh pr create --assignee <user>gh pr view --webGo back to the work you just did and fix what was done incorrectly:
Always commit: Changes must always end up committed somewhere. User config changes should be synced to ~/src/nsheaps/ai-mktpl/.ai/rules/ as source of truth.
Never guess: If uncertain about the scope or the correction, always ask the user.
Best practices first: Even if current rules don't follow best practices, your correction should follow them if it works.
Document the "why": Include brief context in the rule so future AI instances understand the reasoning.
AI-agnostic rules: When the behavior applies to any AI assistant (not just Claude), put it in .ai/rules/ instead of .claude/rules/.
Use claude-code-guide agent: You can and should consider using the claude-code-guide agent to help you with any changes needed to Claude Code configuration files.
Work on main branch: When correcting behavior, make the change directly on the main branch and commit + push after completing the correction.
These examples show both invocation styles. The skill is auto-recalled when the user's message matches a corrective phrase (in which case Claude passes the message as $ARGUMENTS), or it can be invoked explicitly as /agentic-behavior:correct-behavior [SCOPE] <description>.
User says (auto-recalls the skill):
don't commit unless I tell you
Or explicitly:
/agentic-behavior:correct-behavior user don't commit unless I tell you
Would add to ~/.claude/CLAUDE.md and offer to sync to ~/src/nsheaps/ai-mktpl/.ai/rules/:
- NEVER commit changes to git unless the user explicitly asks you to commit.
/agentic-behavior:correct-behavior project always use the ApiClient class for API calls
Would add to project's .claude/CLAUDE.md and remind user to commit.
User says:
the commit command should always show a preview first
Slash commands are deprecated. The correction should migrate the behavior into a user-invocable skill (e.g., ~/.claude/skills/commit/SKILL.md with user-invocable: true) or update the relevant plugin's skill, then PR to marketplace.
/agentic-behavior:correct-behavior stop adding unnecessary comments
Would prompt:
This could apply in multiple places. Where should I add this rule?
- USER (applies to all your projects)
- PROJECT (just this codebase)
- MARKETPLACE (shared with others via ~/src/nsheaps/ai-mktpl)
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub nsheaps/ai-mktpl --plugin agentic-behavior9 skills in this plugin
/brainGit-backed memory and prompt tracking with self-checking reminders. Auto-saves prompts, syncs memory to git, and implements the Ralph loop pattern for work validation./claude-codeReference material for Claude Code internals — the on-disk layout under ~/.claude and project-scope .claude, the plugin cache, session-env propagation, and the full hook lifecycle. Auto-recall when working on Claude-Code-related tasks: writing or debugging hooks, authoring plugins, inspecting session state, troubleshooting why an env var is or isn't visible to a Bash tool call, or when paths under ~/.claude or ~/.claude/plugins/ come up./continue-workOther plugins' skills for the same job