plugins/agentic-behavior/skills/correct-behavior/SKILL.md
Use this skill when the user says you did something wrong, made a mistake, or wants to correct your behavior. Trigger phrases include "don't do that", "that's wrong", "stop doing X", "you should have done Y", "correct yourself", "fix your behavior", "remember to always/never", or any feedback about incorrect AI actions that should be prevented in the future.
npx skillsauth add nsheaps/ai-mktpl correct-behaviorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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)
tools
Manually reproduce what the github-app plugin's SessionStart hook does to make a GitHub App installation token usable in the current session — materialize the PEM, generate the token, isolate GH_CONFIG_DIR, write the runtime env file, and wire CLAUDE_ENV_FILE so every Bash call sees GH_TOKEN/GITHUB_TOKEN. Use when the hook did not run, the token is missing from the environment, or a shell/teammate needs the token wired up by hand. <example>GH_TOKEN isn't set even though github-app is configured</example> <example>the github-app SessionStart hook didn't run, set up the token manually</example> <example>wire the github app token into CLAUDE_ENV_FILE</example> <example>gh keeps falling back to the wrong account, isolate GH_CONFIG_DIR</example>
tools
Manually configure the GitHub App bot git identity the way the github-app plugin's SessionStart hook does — resolve the app slug and bot user ID, build the <slug>[bot] name and noreply email, set GIT_AUTHOR_*/GIT_COMMITTER_* env vars, and write an isolated GIT_CONFIG_GLOBAL with the gh auth git-credential helper. Use when commits are attributed to the wrong account, "Author identity unknown" appears, or git identity must be set up by hand. <example>my commits are showing up as the handler, not the bot</example> <example>git says Author identity unknown after the github-app hook ran</example> <example>configure the github app bot git identity manually</example> <example>set up the gh credential helper for git push</example>
tools
Manages spec files for requirements capture and validation
tools
# Bash Chaining Alternatives This skill teaches you how to work around the bash command chaining restriction enforced by this plugin. ## Why Chaining is Blocked The `bash-command-rejection` plugin blocks these operators: | Operator | Name | Why Blocked | | -------- | ---------- | ----------------------------------------------------------------------------------- | | `&&` | AND chain | Runs cmd2 only if cmd1 su