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 / plugin-dev / skills / plugin-settings / examples / example-settings.md
159 lines · 2.9 KBPreviewCodeRaw
1# Example Plugin Settings File
2
3## Template: Basic Configuration
4
5**.claude/my-plugin.local.md:**
6
7```markdown
8---
9enabled: true
10mode: standard
11---
12
13# My Plugin Configuration
14
15Plugin is active in standard mode.
16```
17
18## Template: Advanced Configuration
19
20**.claude/my-plugin.local.md:**
21
22```markdown
23---
24enabled: true
25strict_mode: false
26max_file_size: 1000000
27allowed_extensions: [".js", ".ts", ".tsx"]
28enable_logging: true
29notification_level: info
30retry_attempts: 3
31timeout_seconds: 60
32custom_path: "/path/to/data"
33---
34
35# My Plugin Advanced Configuration
36
37This 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
46Contact @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---
55agent_name: database-implementation
56task_number: 4.2
57pr_number: 5678
58coordinator_session: team-leader
59enabled: true
60dependencies: ["Task 3.5", "Task 4.1"]
61additional_instructions: "Use PostgreSQL, not MySQL"
62---
63
64# Task Assignment: Database Schema Implementation
65
66Implement 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
84Depends on:
85- Task 3.5: API endpoint definitions
86- Task 4.1: Data model design
87
88Report status to coordinator session 'team-leader'.
89```
90
91## Template: Feature Flag Pattern
92
93**.claude/experimental-features.local.md:**
94
95```markdown
96---
97enabled: true
98features:
99 - ai_suggestions
100 - auto_formatting
101 - advanced_refactoring
102experimental_mode: false
103---
104
105# Experimental Features Configuration
106
107Current enabled features:
108- AI-powered code suggestions
109- Automatic code formatting
110- Advanced refactoring tools
111
112Experimental mode is OFF (stable features only).
113```
114
115## Usage in Hooks
116
117These templates can be read by hooks:
118
119```bash
120# Check if plugin is configured
121if [[ ! -f ".claude/my-plugin.local.md" ]]; then
122 exit 0 # Not configured, skip hook
123fi
124
125# Read settings
126FRONTMATTER=$(sed -n '/^---$/,/^---$/{ /^---$/d; p; }' ".claude/my-plugin.local.md")
127ENABLED=$(echo "$FRONTMATTER" | grep '^enabled:' | sed 's/enabled: *//')
128
129# Apply settings
130if [[ "$ENABLED" == "true" ]]; then
131 # Hook is active
132 # ...
133fi
134```
135
136## Gitignore
137
138Always 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
148Users can edit settings files manually:
149
150```bash
151# Edit settings
152vim .claude/my-plugin.local.md
153
154# Changes take effect after restart
155exit # Exit Claude Code
156claude # Restart
157```
158
159Changes require Claude Code restart - hooks can't be hot-swapped.