Files
ai-proj-helper/SETUP.md

123 lines
3.2 KiB
Markdown

# Claude Code Marketplace Setup
本页只描述 Claude Code marketplace。Codex 用户直接运行 `./install-skills.sh`,技能默认安装到 `~/.agents/skills`
## 1. Clone the Gitea Repository
```bash
git clone https://gitea.pipexerp.com/pipexerp/ai-proj-helper.git
cd ai-proj-helper
```
## 2. Test Installation
### Add the marketplace
```bash
# SSH
/plugin marketplace add ssh://git@gitea.pipexerp.com:10022/pipexerp/ai-proj-helper.git
# OR HTTPS (requires credential configuration)
/plugin marketplace add https://gitea.pipexerp.com/pipexerp/ai-proj-helper.git
```
### List available plugins
```bash
/plugin marketplace list coolbuy-claude-plugins
```
### Install a plugin
```bash
/plugin install ai-proj-plugin@coolbuy-claude-plugins
```
### Test the plugin
```bash
# Skills are auto-invoked by Claude when relevant, or use:
/help
# Check for your installed plugins
```
## 3. Update Plugins Later
When you make changes and push updates:
```bash
cd /path/to/ai-proj-helper
# Make changes to plugins
# ...
# Regenerate marketplace.json if needed
python3 generate-marketplace.py
# Commit and push
git add .
git commit -m "Update plugins"
git push
```
Users update with:
```bash
/plugin marketplace update coolbuy-claude-plugins
/plugin update ai-proj-plugin@coolbuy-claude-plugins
```
## 4. Repository Authentication
If your Gitea repo is private, users need authentication:
**For manual operations** (install, update):
- SSH: Configure SSH keys in Gitea
- HTTPS: Will prompt for credentials
**For background auto-updates**:
```bash
# Add to ~/.zshrc or ~/.bashrc
export GITEA_TOKEN="your-gitea-personal-access-token"
```
To create a Gitea token:
1. Go to https://gitea.pipexerp.com/user/settings/applications
2. Generate New Token
3. Give it "Read repository" permissions
4. Copy the token and add to your environment
## 5. Structure Overview
```
ai-proj-helper/
├── .claude-plugin/
│ └── marketplace.json # Catalog of all plugins
├── skills-core/ # Core plugins
├── skills-dev/ # Development and release plugins
├── skills-req/ # Requirement plugins
├── skills-integration/ # Integration plugins
├── skills-biz/ # Business plugins
├── README.md # User documentation
├── SETUP.md # This file
├── generate-marketplace.py # Marketplace generator
└── install-skills.sh # Versioned local installer
```
## Next Steps
1. ✅ Test locally: `/plugin marketplace add <url>`
2. ✅ Install plugins: `/plugin install <name>@coolbuy-claude-plugins`
3. ✅ Share with team: Send them the repository URL
## Troubleshooting
**"Failed to clone repository"**
- Check SSH key configuration: `ssh -T git@gitea.pipexerp.com -p 10022`
- Or use HTTPS with credentials
**"Plugin not found"**
- Verify marketplace added: `/plugin marketplace list`
- Check plugin name is correct
- Ensure marketplace.json is valid: `cat .claude-plugin/marketplace.json | jq`
**"Skills not working in Claude Code"**
- Skills are Agent Skills (auto-invoked by Claude when relevant)
- They don't create slash commands
- Check plugin installation: `/plugin list`