Initial commit
This commit is contained in:
12
.claude-plugin/plugin.json
Normal file
12
.claude-plugin/plugin.json
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"name": "hello-world",
|
||||||
|
"description": "Simple example plugin demonstrating basic slash commands",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"author": {
|
||||||
|
"name": "Matthew Pazaryna",
|
||||||
|
"email": "[email protected]"
|
||||||
|
},
|
||||||
|
"commands": [
|
||||||
|
"./commands"
|
||||||
|
]
|
||||||
|
}
|
||||||
3
README.md
Normal file
3
README.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# hello-world
|
||||||
|
|
||||||
|
Simple example plugin demonstrating basic slash commands
|
||||||
345
commands/hello.md
Normal file
345
commands/hello.md
Normal file
@@ -0,0 +1,345 @@
|
|||||||
|
---
|
||||||
|
description: Greet the user with a contextual, helpful welcome message
|
||||||
|
shortcut: h
|
||||||
|
category: utility
|
||||||
|
difficulty: beginner
|
||||||
|
estimated_time: instant
|
||||||
|
version: 2.0.0
|
||||||
|
---
|
||||||
|
|
||||||
|
<!-- DESIGN DECISIONS -->
|
||||||
|
<!-- This command serves as the first interaction many users have with Claude Code.
|
||||||
|
It must demonstrate professional quality while remaining warm and approachable.
|
||||||
|
The greeting adapts based on context to provide immediate value. -->
|
||||||
|
|
||||||
|
<!-- ALTERNATIVES CONSIDERED -->
|
||||||
|
<!-- Simple static greeting: Rejected as it provides no contextual value
|
||||||
|
Overly complex analysis: Rejected as it would slow down a simple greeting
|
||||||
|
No examples: Rejected as this is an example plugin that teaches patterns -->
|
||||||
|
|
||||||
|
<!-- KNOWN LIMITATIONS -->
|
||||||
|
<!-- Cannot detect user's specific project goals without additional context
|
||||||
|
Time zone detection is based on system time, not user preference
|
||||||
|
Project type detection is heuristic-based and may not be 100% accurate -->
|
||||||
|
|
||||||
|
# Hello Command
|
||||||
|
|
||||||
|
Provides a warm, professional greeting that acknowledges the user's current context and offers relevant assistance. This command demonstrates best practices for contextual awareness and helpful responses while serving as an exemplary template for other commands.
|
||||||
|
|
||||||
|
## When to Use
|
||||||
|
|
||||||
|
Use this command when:
|
||||||
|
- Starting a new development session to get oriented
|
||||||
|
- Wanting a quick overview of available capabilities
|
||||||
|
- Testing if Claude Code is responsive and working correctly
|
||||||
|
- Needing suggestions for what to work on in the current context
|
||||||
|
- Beginning work in an unfamiliar project or directory
|
||||||
|
- After a long break to re-engage with your project
|
||||||
|
|
||||||
|
Do NOT use this command for:
|
||||||
|
- Getting specific technical help (use specialized commands instead)
|
||||||
|
- Project analysis (use `/analyze` or audit commands)
|
||||||
|
- Generating code (use generation commands for your framework)
|
||||||
|
|
||||||
|
## Prerequisites
|
||||||
|
|
||||||
|
Before running this command, ensure:
|
||||||
|
- [ ] Claude Code is properly installed and configured
|
||||||
|
- [ ] You are in the directory where you want to work
|
||||||
|
- [ ] No specific prerequisites - this command works anywhere
|
||||||
|
|
||||||
|
## Process
|
||||||
|
|
||||||
|
### Step 1: Analyze Current Context
|
||||||
|
The command examines your current environment to provide relevant suggestions:
|
||||||
|
- Identifies the current working directory path
|
||||||
|
- Detects project type by checking for configuration files (package.json, pom.xml, etc.)
|
||||||
|
- Notes the time of day for appropriate greeting tone
|
||||||
|
- Checks for recently modified files to understand current work
|
||||||
|
- Identifies available tools and frameworks
|
||||||
|
|
||||||
|
### Step 2: Construct Personalized Greeting
|
||||||
|
Based on the context analysis, creates a greeting that includes:
|
||||||
|
- Time-appropriate salutation (Good morning/afternoon/evening)
|
||||||
|
- Acknowledgment of the current project type if detected
|
||||||
|
- Recognition of the working directory location
|
||||||
|
- A warm but professional tone that encourages engagement
|
||||||
|
|
||||||
|
### Step 3: Offer Contextual Assistance
|
||||||
|
Provides 3-5 relevant suggestions based on what was detected:
|
||||||
|
- For identified project types: Framework-specific actions
|
||||||
|
- For unknown contexts: General development capabilities
|
||||||
|
- For error states: Troubleshooting and recovery options
|
||||||
|
- Always ends with an open question to encourage user engagement
|
||||||
|
|
||||||
|
## Output Format
|
||||||
|
|
||||||
|
The command will produce output in this format:
|
||||||
|
|
||||||
|
```
|
||||||
|
[Time-based greeting]! I'm Claude Code, ready to help with your [project type/development] work.
|
||||||
|
|
||||||
|
I notice you're [context observation]. I can help you with:
|
||||||
|
• [Relevant capability 1 - specific to context]
|
||||||
|
• [Relevant capability 2 - specific to context]
|
||||||
|
• [Relevant capability 3 - specific to context]
|
||||||
|
[Optional: • Additional capabilities if relevant]
|
||||||
|
|
||||||
|
[Optional: Contextual tip or observation]
|
||||||
|
|
||||||
|
What would you like to work on today?
|
||||||
|
```
|
||||||
|
|
||||||
|
**Output Fields Explained:**
|
||||||
|
- `[Time-based greeting]`: "Good morning", "Good afternoon", or "Good evening" based on system time
|
||||||
|
- `[project type/development]`: Specific framework/language detected or generic "development"
|
||||||
|
- `[context observation]`: What Claude Code notices about the current directory/project
|
||||||
|
- `[Relevant capabilities]`: 3-5 specific actions that make sense in this context
|
||||||
|
- `[Contextual tip]`: Optional helpful tip specific to the detected environment
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
|
||||||
|
### Example 1: React Project Context
|
||||||
|
|
||||||
|
**Scenario:** User runs `/hello` in a React project with recent component changes
|
||||||
|
|
||||||
|
**User Input:**
|
||||||
|
```
|
||||||
|
/hello
|
||||||
|
```
|
||||||
|
|
||||||
|
**Context:**
|
||||||
|
- Working directory: `/home/user/projects/my-react-app`
|
||||||
|
- Project type: React (detected via package.json)
|
||||||
|
- Recent changes: Components modified in last hour
|
||||||
|
|
||||||
|
**Command Execution:**
|
||||||
|
```bash
|
||||||
|
# Step 1: Context detection
|
||||||
|
pwd # Returns: /home/user/projects/my-react-app
|
||||||
|
ls -la # Finds: package.json, src/, public/
|
||||||
|
cat package.json | grep react # Confirms React project
|
||||||
|
find . -type f -mmin -60 # Finds recently modified components
|
||||||
|
|
||||||
|
# Step 2: Greeting construction based on findings
|
||||||
|
# Step 3: Capability matching to React context
|
||||||
|
```
|
||||||
|
|
||||||
|
**Output:**
|
||||||
|
```
|
||||||
|
Good morning! I'm Claude Code, ready to help with your React development.
|
||||||
|
|
||||||
|
I notice you're in a React project with recent component changes. I can help you with:
|
||||||
|
• Creating new components or custom hooks
|
||||||
|
• Setting up tests for your recent changes
|
||||||
|
• Optimizing bundle size and performance
|
||||||
|
• Implementing state management patterns
|
||||||
|
• Debugging React DevTools warnings
|
||||||
|
|
||||||
|
I see you've been working on components recently - would you like help with testing or documentation?
|
||||||
|
|
||||||
|
What would you like to work on today?
|
||||||
|
```
|
||||||
|
|
||||||
|
**Result:** User receives a contextual greeting that acknowledges their React project and recent work, offering specific React-related assistance.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Example 2: Python Data Science Project
|
||||||
|
|
||||||
|
**Scenario:** User runs `/hello` in a Jupyter notebook directory
|
||||||
|
|
||||||
|
**User Input:**
|
||||||
|
```
|
||||||
|
/h
|
||||||
|
```
|
||||||
|
|
||||||
|
**Context:**
|
||||||
|
- Working directory: `/home/user/data-analysis`
|
||||||
|
- Files present: Multiple .ipynb files, requirements.txt, data/ folder
|
||||||
|
- Virtual environment detected
|
||||||
|
|
||||||
|
**Command Execution:**
|
||||||
|
```bash
|
||||||
|
# Context detection finds Jupyter notebooks and data files
|
||||||
|
ls *.ipynb # Finds notebook files
|
||||||
|
test -d data && echo "Data folder found"
|
||||||
|
test -f requirements.txt && echo "Python project detected"
|
||||||
|
```
|
||||||
|
|
||||||
|
**Output:**
|
||||||
|
```
|
||||||
|
Good afternoon! I'm Claude Code, ready to help with your data science work.
|
||||||
|
|
||||||
|
I notice you're in a Python data analysis project with Jupyter notebooks. I can help you with:
|
||||||
|
• Writing data processing pipelines
|
||||||
|
• Creating visualizations with matplotlib/seaborn
|
||||||
|
• Optimizing pandas operations
|
||||||
|
• Setting up machine learning models
|
||||||
|
• Documenting your analysis workflow
|
||||||
|
|
||||||
|
I see you have a data folder - need help with data cleaning or exploratory analysis?
|
||||||
|
|
||||||
|
What would you like to work on today?
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Example 3: Unknown Project Type
|
||||||
|
|
||||||
|
**Scenario:** User runs `/hello` in home directory with no specific project
|
||||||
|
|
||||||
|
**User Input:**
|
||||||
|
```
|
||||||
|
/hello
|
||||||
|
```
|
||||||
|
|
||||||
|
**Context:**
|
||||||
|
- Working directory: `/home/user`
|
||||||
|
- No project files detected
|
||||||
|
- General development environment
|
||||||
|
|
||||||
|
**Output:**
|
||||||
|
```
|
||||||
|
Hello! I'm Claude Code, your AI development assistant.
|
||||||
|
|
||||||
|
I notice you're in your home directory. I can help you with:
|
||||||
|
• Starting a new project in any language or framework
|
||||||
|
• Exploring existing codebases in subdirectories
|
||||||
|
• Setting up development environments
|
||||||
|
• Learning new programming concepts
|
||||||
|
• Automating repetitive tasks
|
||||||
|
|
||||||
|
Would you like to start a new project or work on something existing?
|
||||||
|
|
||||||
|
What would you like to work on today?
|
||||||
|
```
|
||||||
|
|
||||||
|
## Error Handling
|
||||||
|
|
||||||
|
### Error: Permission Denied in Current Directory
|
||||||
|
**Symptoms:** Cannot read directory contents
|
||||||
|
**Cause:** Insufficient permissions
|
||||||
|
**Solution:**
|
||||||
|
```
|
||||||
|
Good morning! I'm Claude Code, though I notice I can't fully analyze this directory due to permissions.
|
||||||
|
|
||||||
|
I can still help you with:
|
||||||
|
• General coding questions and solutions
|
||||||
|
• Creating new files you have permission to write
|
||||||
|
• Planning project architecture
|
||||||
|
• Debugging code you share with me
|
||||||
|
|
||||||
|
Would you like to move to a different directory or continue here?
|
||||||
|
```
|
||||||
|
**Prevention:** Run Claude Code with appropriate permissions or work in user-owned directories
|
||||||
|
|
||||||
|
### Error: Extremely Large Project (10,000+ files)
|
||||||
|
**Symptoms:** Context analysis takes too long
|
||||||
|
**Cause:** Project too large for quick analysis
|
||||||
|
**Solution:**
|
||||||
|
```
|
||||||
|
Hello! I'm Claude Code. This appears to be a large project that would take time to fully analyze.
|
||||||
|
|
||||||
|
I can help you with:
|
||||||
|
• Focused work on specific components
|
||||||
|
• Architecture-level discussions
|
||||||
|
• Code review for specific files
|
||||||
|
• Performance optimization strategies
|
||||||
|
|
||||||
|
What specific part of this project would you like to focus on today?
|
||||||
|
```
|
||||||
|
|
||||||
|
### Error: System Time Unavailable
|
||||||
|
**Symptoms:** Cannot determine time of day
|
||||||
|
**Cause:** System clock issue or permission restriction
|
||||||
|
**Solution:** Default to neutral "Hello" greeting and continue normally
|
||||||
|
|
||||||
|
## Configuration Options
|
||||||
|
|
||||||
|
The hello command behavior can be influenced by:
|
||||||
|
|
||||||
|
### Environment Variable: `CLAUDE_CODE_GREETING_STYLE`
|
||||||
|
- **Purpose:** Adjusts greeting formality
|
||||||
|
- **Values:** `formal`, `friendly` (default), `brief`
|
||||||
|
- **Example:** `export CLAUDE_CODE_GREETING_STYLE=brief`
|
||||||
|
|
||||||
|
### Project-level `.claude/config.json`
|
||||||
|
- **Purpose:** Customize greeting for specific project
|
||||||
|
- **Example:**
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"greeting": {
|
||||||
|
"projectType": "Custom Framework",
|
||||||
|
"suggestions": ["Run tests", "Check CI/CD", "Review PRs"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Best Practices
|
||||||
|
|
||||||
|
✅ **DO:**
|
||||||
|
- Run `/hello` when starting a session for contextual orientation
|
||||||
|
- Use the shortcut `/h` for quick access
|
||||||
|
- Pay attention to the suggestions as they're context-aware
|
||||||
|
- Use this as a conversation starter for your development session
|
||||||
|
|
||||||
|
❌ **DON'T:**
|
||||||
|
- Expect technical problem-solving from this command
|
||||||
|
- Run repeatedly in the same session (context doesn't change much)
|
||||||
|
- Ignore the contextual suggestions - they're tailored to your situation
|
||||||
|
|
||||||
|
💡 **TIPS:**
|
||||||
|
- The greeting adapts to your project - try it in different directories
|
||||||
|
- Use this command to test if Claude Code is working properly
|
||||||
|
- The suggestions can help you discover commands you didn't know about
|
||||||
|
|
||||||
|
## Related Commands
|
||||||
|
|
||||||
|
- `/analyze` - Deep analysis of your project structure and health
|
||||||
|
- `/help` - Comprehensive help and command listing
|
||||||
|
- `/status` - Check Claude Code configuration and capabilities
|
||||||
|
- `/suggest` - Get specific suggestions for your current task
|
||||||
|
|
||||||
|
## Performance Considerations
|
||||||
|
|
||||||
|
- **Typical execution time:** <1 second
|
||||||
|
- **Resource usage:** Minimal - only reads directory structure
|
||||||
|
- **Scaling notes:** May be slightly slower in very large projects
|
||||||
|
- **Optimization tips:** Use in project root for best context detection
|
||||||
|
|
||||||
|
## Security Notes
|
||||||
|
|
||||||
|
⚠️ **Security Considerations:**
|
||||||
|
- No sensitive information is collected or transmitted
|
||||||
|
- Directory analysis is read-only
|
||||||
|
- No files are modified or created
|
||||||
|
- Project detection uses only filename patterns, not file contents
|
||||||
|
|
||||||
|
## Troubleshooting
|
||||||
|
|
||||||
|
### Issue: Greeting doesn't recognize my project type
|
||||||
|
**Solution:** Ensure project configuration files are in the root directory (package.json, pom.xml, etc.)
|
||||||
|
|
||||||
|
### Issue: Suggestions aren't relevant
|
||||||
|
**Solution:** Check you're in the correct directory and project files are standard
|
||||||
|
|
||||||
|
### Issue: Command not found
|
||||||
|
**Solution:** Verify the hello-world plugin is installed with `/plugin list`
|
||||||
|
|
||||||
|
### Getting Help
|
||||||
|
- Try the examples above for common scenarios
|
||||||
|
- Report issues at: https://github.com/anthropics/claude-code/issues
|
||||||
|
- Check documentation: `/help hello`
|
||||||
|
|
||||||
|
## Version History
|
||||||
|
|
||||||
|
- **v2.0.0** - Complete rewrite with contextual awareness and examples
|
||||||
|
- **v1.0.0** - Initial basic greeting implementation
|
||||||
|
|
||||||
|
## Credits
|
||||||
|
|
||||||
|
- Rewritten to Anthropic quality standards by Claude Code Quality System
|
||||||
|
- Original concept from hello-world example template
|
||||||
|
- Context detection patterns inspired by VS Code and IntelliJ
|
||||||
|
|
||||||
45
plugin.lock.json
Normal file
45
plugin.lock.json
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
{
|
||||||
|
"$schema": "internal://schemas/plugin.lock.v1.json",
|
||||||
|
"pluginId": "gh:mpazaryna/claude-toolkit:plugins/hello-world",
|
||||||
|
"normalized": {
|
||||||
|
"repo": null,
|
||||||
|
"ref": "refs/tags/v20251128.0",
|
||||||
|
"commit": "da3a2676275efada7cb13626221e81ae7e61b8b9",
|
||||||
|
"treeHash": "5c5b31def639dbcd46ffd82f38339fb57d352e6e328486ef5eb0a27365f6e828",
|
||||||
|
"generatedAt": "2025-11-28T10:27:10.944374Z",
|
||||||
|
"toolVersion": "publish_plugins.py@0.2.0"
|
||||||
|
},
|
||||||
|
"origin": {
|
||||||
|
"remote": "git@github.com:zhongweili/42plugin-data.git",
|
||||||
|
"branch": "master",
|
||||||
|
"commit": "aa1497ed0949fd50e99e70d6324a29c5b34f9390",
|
||||||
|
"repoRoot": "/Users/zhongweili/projects/openmind/42plugin-data"
|
||||||
|
},
|
||||||
|
"manifest": {
|
||||||
|
"name": "hello-world",
|
||||||
|
"description": "Simple example plugin demonstrating basic slash commands",
|
||||||
|
"version": "1.0.0"
|
||||||
|
},
|
||||||
|
"content": {
|
||||||
|
"files": [
|
||||||
|
{
|
||||||
|
"path": "README.md",
|
||||||
|
"sha256": "575dae474e5479cdcefd5eceb61b32c737df58edcc0b3783172d4aab29c320dc"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": ".claude-plugin/plugin.json",
|
||||||
|
"sha256": "68fe24341cacb671a8c4b349651380bb03966726b5fe3262d319f06c6abce589"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "commands/hello.md",
|
||||||
|
"sha256": "00fe7ad8d980c9e8fc1bdc653bd7d3bd52a00913cbcccfdc3f5a15a8e1f35efc"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"dirSha256": "5c5b31def639dbcd46ffd82f38339fb57d352e6e328486ef5eb0a27365f6e828"
|
||||||
|
},
|
||||||
|
"security": {
|
||||||
|
"scannedAt": null,
|
||||||
|
"scannerVersion": null,
|
||||||
|
"flags": []
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user