Skip to content

Commit 1e616f9

Browse files
ZenterFlowclaude
andcommitted
feat: Initial Claude Code plugin template
Complete plugin template with: - Marketplace and plugin configuration - Example skill demonstrating structure - Validation framework (naming, JSON, frontmatter) - GitHub Actions CI/CD - Security scanning - ShellCheck integration - Git hooks - Comprehensive documentation - Interactive setup script Features: ✅ Zero-warning ShellCheck compliance ✅ Automated validation ✅ Production-ready workflows ✅ Placeholder replacement system ✅ Quality standards enforcement Usage: 1. Click "Use this template" on GitHub 2. Run ./scripts/setup.sh 3. Customize skills/ 4. Push to GitHub 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
0 parents  commit 1e616f9

21 files changed

Lines changed: 2286 additions & 0 deletions

.claude-plugin/marketplace.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "{{PLUGIN_NAME}}-marketplace",
3+
"version": "1.0.0",
4+
"description": "Marketplace for {{PLUGIN_NAME}} plugin",
5+
"owner": {
6+
"name": "{{AUTHOR_NAME}}",
7+
"email": "{{AUTHOR_EMAIL}}",
8+
"url": "https://github.com/{{GITHUB_USERNAME}}"
9+
},
10+
"plugins": [
11+
{
12+
"name": "{{PLUGIN_NAME}}",
13+
"source": ".",
14+
"description": "{{PLUGIN_DESCRIPTION}}",
15+
"version": "1.0.0"
16+
}
17+
]
18+
}

.claude-plugin/plugin.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"name": "{{PLUGIN_NAME}}",
3+
"version": "1.0.0",
4+
"description": "{{PLUGIN_DESCRIPTION}}",
5+
"author": {
6+
"name": "{{AUTHOR_NAME}}",
7+
"email": "{{AUTHOR_EMAIL}}",
8+
"url": "https://github.com/{{GITHUB_USERNAME}}"
9+
},
10+
"license": "MIT",
11+
"keywords": [
12+
"claude-code",
13+
"plugin",
14+
"{{KEYWORD_1}}",
15+
"{{KEYWORD_2}}"
16+
],
17+
"category": "tools",
18+
"repository": {
19+
"type": "git",
20+
"url": "https://github.com/{{GITHUB_USERNAME}}/{{REPO_NAME}}.git"
21+
},
22+
"homepage": "https://github.com/{{GITHUB_USERNAME}}/{{REPO_NAME}}#readme",
23+
"bugs": {
24+
"url": "https://github.com/{{GITHUB_USERNAME}}/{{REPO_NAME}}/issues"
25+
}
26+
}

.gitattributes

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Enforce LF line endings (not CRLF) for shell scripts and text files
2+
# This prevents SC1017 errors in Linux/macOS environments
3+
4+
*.sh text eol=lf
5+
*.md text eol=lf
6+
*.json text eol=lf
7+
*.yml text eol=lf
8+
*.yaml text eol=lf
9+
*.txt text eol=lf
10+
11+
# Binary files
12+
*.png binary
13+
*.jpg binary
14+
*.jpeg binary
15+
*.gif binary
16+
*.ico binary
17+
*.mov binary
18+
*.mp4 binary
19+
*.mp3 binary
20+
*.flv binary
21+
*.fla binary
22+
*.swf binary
23+
*.gz binary
24+
*.zip binary
25+
*.7z binary
26+
*.ttf binary
27+
*.eot binary
28+
*.woff binary
29+
*.woff2 binary

.github/template-settings.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "claude-code-plugin-template",
3+
"description": "Production-ready template for Claude Code plugins with validation, testing, and CI/CD",
4+
"template": {
5+
"name": "Claude Code Plugin Template",
6+
"description": "High-quality plugin template with built-in validation, ShellCheck integration, GitHub Actions, and comprehensive documentation",
7+
"owner": "ZenterFlow",
8+
"topics": [
9+
"claude-code",
10+
"plugin-template",
11+
"template",
12+
"validation",
13+
"shellcheck",
14+
"ci-cd",
15+
"github-actions"
16+
]
17+
}
18+
}

.github/workflows/security.yml

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
name: Security Scan
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
paths:
7+
- '**/*.sh'
8+
- '.github/workflows/security.yml'
9+
schedule:
10+
- cron: '0 9 * * 1' # Every Monday at 9 AM UTC
11+
workflow_dispatch:
12+
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
shellcheck:
18+
name: ShellCheck Security Analysis
19+
runs-on: ubuntu-latest
20+
21+
steps:
22+
- name: Checkout code
23+
uses: actions/checkout@v4
24+
25+
- name: Install ShellCheck
26+
run: |
27+
sudo apt-get update
28+
sudo apt-get install -y shellcheck
29+
30+
- name: Run ShellCheck with security focus
31+
run: |
32+
echo "🔒 Running security-focused ShellCheck analysis..."
33+
echo ""
34+
35+
SCRIPTS=$(find . -name "*.sh" -type f)
36+
37+
for script in $SCRIPTS; do
38+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
39+
echo "Analyzing: $script"
40+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
41+
42+
shellcheck \
43+
--severity=warning \
44+
--shell=bash \
45+
--format=gcc \
46+
"$script"
47+
48+
echo ""
49+
done
50+
51+
echo "✅ Security analysis complete!"
52+
53+
secrets:
54+
name: Secret Detection
55+
runs-on: ubuntu-latest
56+
57+
steps:
58+
- name: Checkout code
59+
uses: actions/checkout@v4
60+
61+
- name: Check for secrets in code
62+
run: |
63+
echo "🔍 Checking for accidentally committed secrets..."
64+
65+
SECRETS_FOUND=0
66+
67+
if grep -r "GITHUB_TOKEN=[A-Za-z0-9_-]\{20,\}" . \
68+
--exclude-dir=.git \
69+
--exclude-dir=.github \
70+
--exclude="*.md"; then
71+
echo "⚠️ Found potential GitHub token!"
72+
SECRETS_FOUND=1
73+
fi
74+
75+
if grep -r "password\s*=\s*['\"][A-Za-z0-9_-]\{8,\}['\"]" . \
76+
--exclude-dir=.git \
77+
--exclude-dir=.github \
78+
--exclude="*.md"; then
79+
echo "⚠️ Found potential password!"
80+
SECRETS_FOUND=1
81+
fi
82+
83+
if grep -r "api[_-]key\s*=\s*['\"][A-Za-z0-9_-]\{20,\}['\"]" . \
84+
--exclude-dir=.git \
85+
--exclude-dir=.github \
86+
--exclude="*.md"; then
87+
echo "⚠️ Found potential API key!"
88+
SECRETS_FOUND=1
89+
fi
90+
91+
if [ $SECRETS_FOUND -eq 0 ]; then
92+
echo "✅ No secrets detected"
93+
else
94+
echo "❌ Potential secrets found! Please review."
95+
exit 1
96+
fi

.github/workflows/validate.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Validate Plugin
2+
3+
on:
4+
push:
5+
branches: [ main, develop ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
validate:
14+
name: Plugin Validation
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v4
20+
21+
- name: Install ShellCheck
22+
run: |
23+
sudo apt-get update
24+
sudo apt-get install -y shellcheck
25+
26+
- name: Install jq
27+
run: |
28+
sudo apt-get install -y jq
29+
30+
- name: Run validation scripts
31+
run: |
32+
chmod +x scripts/*.sh
33+
./scripts/validate-all.sh
34+
35+
- name: Validation Summary
36+
if: always()
37+
run: |
38+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
39+
echo "🔍 Validation Complete"
40+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
41+
echo ""
42+
echo "Repository: ${{ github.repository }}"
43+
echo "Branch: ${{ github.ref_name }}"
44+
echo "Commit: ${{ github.sha }}"
45+
echo ""

.gitignore

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
# Claude Code local settings
2+
.claude/
3+
4+
# OS files
5+
.DS_Store
6+
Thumbs.db
7+
desktop.ini
8+
9+
# IDE files
10+
.vscode/
11+
.idea/
12+
*.swp
13+
*.swo
14+
*~
15+
16+
# Temporary files
17+
*.log
18+
*.tmp
19+
*.temp
20+
21+
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
22+
# SECURITY: Secrets and Sensitive Data
23+
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
24+
25+
# Environment files
26+
.env
27+
.env.*
28+
!.env.example
29+
*.env
30+
31+
# Secrets and keys
32+
secrets/
33+
*.key
34+
*.pem
35+
*.p12
36+
*.pfx
37+
*.cer
38+
*.crt
39+
*_rsa
40+
*_dsa
41+
*_ecdsa
42+
*_ed25519
43+
44+
# Credentials
45+
credentials.json
46+
credentials.yml
47+
credentials.yaml
48+
auth.json
49+
token.txt
50+
*.credentials
51+
52+
# API Keys
53+
*apikey*
54+
*api_key*
55+
*api-key*
56+
57+
# GPG
58+
secring.*
59+
*.gpg
60+
!*.gpg.asc
61+
62+
# SSH
63+
known_hosts
64+
authorized_keys
65+
66+
# Cloud provider credentials
67+
.aws/
68+
.azure/
69+
.gcloud/
70+
71+
# Database
72+
*.db
73+
*.db-journal
74+
*.sqlite
75+
*.sqlite3
76+
77+
# Backup files
78+
*.bak
79+
*.backup
80+
*.old
81+
82+
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
83+
# DEVELOPMENT
84+
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
85+
86+
# Node modules (if using JavaScript tooling)
87+
node_modules/
88+
package-lock.json
89+
yarn.lock
90+
91+
# Python (if using Python validation)
92+
__pycache__/
93+
*.py[cod]
94+
*$py.class
95+
.Python
96+
venv/
97+
env/
98+
99+
# Test coverage
100+
coverage/
101+
.coverage
102+
htmlcov/
103+
104+
# Build artifacts
105+
dist/
106+
build/
107+
*.egg-info/
108+
109+
# Development notes
110+
notes/
111+
scratch/
112+
*.draft.md

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) {{CURRENT_YEAR}} {{AUTHOR_NAME}}
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)