spacehub

surshar / claude-code

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

Built by Anthropic · github.com/anthropics

claude-code / plugins / accept-with-feedback / commands / configure-feedback.md
80 lines · 2.2 KBPreviewCodeRaw
1---
2description: Configure persistent feedback rules for accept-with-feedback
3---
4
5# Configure Accept-with-Feedback Rules
6
7You are helping the user configure persistent feedback rules that automatically provide guidance to Claude when certain operations are approved.
8
9## Configuration file location
10
11Rules are stored in `.claude/accept-feedback.json` in either:
12- User's home directory (`~/.claude/accept-feedback.json`) for global rules
13- Project directory (`.claude/accept-feedback.json`) for project-specific rules
14
15Project rules take precedence over user rules.
16
17## Configuration format
18
19```json
20{
21 "rules": [
22 {
23 "matcher": "Edit|Write",
24 "conditions": {
25 "file_path": ".py"
26 },
27 "feedback": "Ensure all Python code follows PEP 8 style guidelines and includes type hints."
28 },
29 {
30 "matcher": "Bash",
31 "conditions": {
32 "command": "git"
33 },
34 "feedback": "Use conventional commit format for commit messages."
35 },
36 {
37 "matcher": "*",
38 "feedback": "Please explain your reasoning before making changes."
39 }
40 ]
41}
42```
43
44## Rule properties
45
46- **matcher**: Tool name pattern (e.g., "Edit", "Write|Edit", "*" for all)
47- **conditions**: Optional key-value pairs to match against tool input
48- **feedback**: The guidance message to send to Claude when this rule matches
49
50## Instructions
51
521. Ask the user what kind of feedback rules they want to configure
532. Help them create appropriate rules based on their needs
543. Save the configuration to the appropriate location
55
56## Common use cases
57
581. **Code style guidance**: Provide style guidelines when editing specific file types
592. **Git workflow**: Add commit message format requirements for git operations
603. **Safety reminders**: Add warnings when working with sensitive files
614. **Project conventions**: Enforce project-specific patterns and practices
62
63## Example interaction
64
65User: "I want to always remind Claude to add tests when editing Python files"
66
67You would create:
68```json
69{
70 "rules": [
71 {
72 "matcher": "Edit|Write",
73 "conditions": {
74 "file_path": ".py"
75 },
76 "feedback": "Remember to add or update tests for any code changes."
77 }
78 ]
79}
80```