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
| 1 | # Example Plugin Settings File |
| 2 | |
| 3 | ## Template: Basic Configuration |
| 4 | |
| 5 | **.claude/my-plugin.local.md:** |
| 6 | |
| 7 | ```markdown |
| 8 | --- |
| 9 | enabled: true |
| 10 | mode: standard |
| 11 | --- |
| 12 | |
| 13 | # My Plugin Configuration |
| 14 | |
| 15 | Plugin is active in standard mode. |
| 16 | ``` |
| 17 | |
| 18 | ## Template: Advanced Configuration |
| 19 | |
| 20 | **.claude/my-plugin.local.md:** |
| 21 | |
| 22 | ```markdown |
| 23 | --- |
| 24 | enabled: true |
| 25 | strict_mode: false |
| 26 | max_file_size: 1000000 |
| 27 | allowed_extensions: [".js", ".ts", ".tsx"] |
| 28 | enable_logging: true |
| 29 | notification_level: info |
| 30 | retry_attempts: 3 |
| 31 | timeout_seconds: 60 |
| 32 | custom_path: "/path/to/data" |
| 33 | --- |
| 34 | |
| 35 | # My Plugin Advanced Configuration |
| 36 | |
| 37 | This project uses custom plugin configuration with: |
| 38 | - Standard validation mode |
| 39 | - 1MB file size limit |
| 40 | - JavaScript/TypeScript files allowed |
| 41 | - Info-level logging |
| 42 | - 3 retry attempts |
| 43 | |
| 44 | ## Additional Notes |
| 45 | |
| 46 | Contact @team-lead with questions about this configuration. |
| 47 | ``` |
| 48 | |
| 49 | ## Template: Agent State File |
| 50 | |
| 51 | **.claude/multi-agent-swarm.local.md:** |
| 52 | |
| 53 | ```markdown |
| 54 | --- |
| 55 | agent_name: database-implementation |
| 56 | task_number: 4.2 |
| 57 | pr_number: 5678 |
| 58 | coordinator_session: team-leader |
| 59 | enabled: true |
| 60 | dependencies: ["Task 3.5", "Task 4.1"] |
| 61 | additional_instructions: "Use PostgreSQL, not MySQL" |
| 62 | --- |
| 63 | |
| 64 | # Task Assignment: Database Schema Implementation |
| 65 | |
| 66 | Implement the database schema for the new features module. |
| 67 | |
| 68 | ## Requirements |
| 69 | |
| 70 | - Create migration files |
| 71 | - Add indexes for performance |
| 72 | - Write tests for constraints |
| 73 | - Document schema in README |
| 74 | |
| 75 | ## Success Criteria |
| 76 | |
| 77 | - Migrations run successfully |
| 78 | - All tests pass |
| 79 | - PR created with CI green |
| 80 | - Schema documented |
| 81 | |
| 82 | ## Coordination |
| 83 | |
| 84 | Depends on: |
| 85 | - Task 3.5: API endpoint definitions |
| 86 | - Task 4.1: Data model design |
| 87 | |
| 88 | Report status to coordinator session 'team-leader'. |
| 89 | ``` |
| 90 | |
| 91 | ## Template: Feature Flag Pattern |
| 92 | |
| 93 | **.claude/experimental-features.local.md:** |
| 94 | |
| 95 | ```markdown |
| 96 | --- |
| 97 | enabled: true |
| 98 | features: |
| 99 | - ai_suggestions |
| 100 | - auto_formatting |
| 101 | - advanced_refactoring |
| 102 | experimental_mode: false |
| 103 | --- |
| 104 | |
| 105 | # Experimental Features Configuration |
| 106 | |
| 107 | Current enabled features: |
| 108 | - AI-powered code suggestions |
| 109 | - Automatic code formatting |
| 110 | - Advanced refactoring tools |
| 111 | |
| 112 | Experimental mode is OFF (stable features only). |
| 113 | ``` |
| 114 | |
| 115 | ## Usage in Hooks |
| 116 | |
| 117 | These templates can be read by hooks: |
| 118 | |
| 119 | ```bash |
| 120 | # Check if plugin is configured |
| 121 | if [[ ! -f ".claude/my-plugin.local.md" ]]; then |
| 122 | exit 0 # Not configured, skip hook |
| 123 | fi |
| 124 | |
| 125 | # Read settings |
| 126 | FRONTMATTER=$(sed -n '/^---$/,/^---$/{ /^---$/d; p; }' ".claude/my-plugin.local.md") |
| 127 | ENABLED=$(echo "$FRONTMATTER" | grep '^enabled:' | sed 's/enabled: *//') |
| 128 | |
| 129 | # Apply settings |
| 130 | if [[ "$ENABLED" == "true" ]]; then |
| 131 | # Hook is active |
| 132 | # ... |
| 133 | fi |
| 134 | ``` |
| 135 | |
| 136 | ## Gitignore |
| 137 | |
| 138 | Always add to project `.gitignore`: |
| 139 | |
| 140 | ```gitignore |
| 141 | # Plugin settings (user-local, not committed) |
| 142 | .claude/*.local.md |
| 143 | .claude/*.local.json |
| 144 | ``` |
| 145 | |
| 146 | ## Editing Settings |
| 147 | |
| 148 | Users can edit settings files manually: |
| 149 | |
| 150 | ```bash |
| 151 | # Edit settings |
| 152 | vim .claude/my-plugin.local.md |
| 153 | |
| 154 | # Changes take effect after restart |
| 155 | exit # Exit Claude Code |
| 156 | claude # Restart |
| 157 | ``` |
| 158 | |
| 159 | Changes require Claude Code restart - hooks can't be hot-swapped. |