Skip to content

Latest commit

Β 

History

History
568 lines (401 loc) Β· 11.6 KB

File metadata and controls

568 lines (401 loc) Β· 11.6 KB

Advanced Usage Guide

Advanced installation methods, configuration options, and workflows for MAG Claude Plugins.


πŸ“š Table of Contents


🌍 Global Plugin Installation

Overview

Global installation makes plugins available in all projects without per-project configuration.

When to Use

βœ… Use global installation when:

  • Individual developer working alone
  • Testing a plugin before adding to team projects
  • Personal projects without team coordination
  • Quick experimentation

❌ Avoid global installation for:

  • Team projects (causes environment drift)
  • Production projects (not tracked in version control)
  • Projects requiring specific plugin versions

Installation Steps

# Step 1: Add marketplace globally (one-time)
/plugin marketplace add MadAppGang/claude-code

# Step 2: Install plugin globally
/plugin install frontend@mag-claude-plugins

# Step 3: Verify installation
/plugin list

Trade-offs

Advantages:

  • βœ… Available in all projects immediately
  • βœ… No per-project configuration needed
  • βœ… Quick to test and experiment

Disadvantages:

  • ❌ Not tracked in version control
  • ❌ Team members must install manually
  • ❌ Can cause environment drift across team
  • ❌ Harder to manage plugin versions
  • ❌ No project-specific plugin selection

Uninstalling Global Plugins

# Uninstall a plugin
/plugin uninstall frontend@mag-claude-plugins

# Verify removal
/plugin list

πŸ’» Local Development

Overview

Test plugins from your local filesystem without publishing to a marketplace.

Use Cases

  • πŸ”§ Developing new plugins
  • πŸ› Debugging plugin issues
  • πŸ§ͺ Testing plugin changes before committing
  • πŸ“¦ Contributing to existing plugins

Setup

1. Add Local Marketplace

Point to your local clone of the repository:

/plugin marketplace add /Users/you/path/to/claude-code

2. Install Plugin from Local Source

/plugin install frontend@mag-claude-plugins

3. Make Changes to Plugin Files

Edit agents, commands, skills, or configurations in your local directory.

4. Reload Plugin

/plugin reload frontend@mag-claude-plugins

Note: Some changes may require a full Claude Code restart.

Development Workflow

# 1. Clone repository
git clone https://github.com/MadAppGang/claude-code.git
cd claude-code

# 2. Create feature branch
git checkout -b feature/my-new-agent

# 3. Make changes
# Edit plugins/frontend/agents/my-new-agent.md

# 4. Add to plugin.json
# Update plugins/frontend/plugin.json

# 5. Test locally
/plugin marketplace add /path/to/claude-code
/plugin install frontend@mag-claude-plugins

# 6. Verify changes work
# Test your new agent

# 7. Reload after changes
/plugin reload frontend@mag-claude-plugins

# 8. Commit and push
git add .
git commit -m "Add my-new-agent"
git push origin feature/my-new-agent

Debugging Tips

Plugin not loading:

# Check marketplace is added
/plugin marketplace list

# Reinstall plugin
/plugin remove frontend@mag-claude-plugins
/plugin install frontend@mag-claude-plugins

# Verify plugin files exist
ls -la /path/to/claude-code/plugins/frontend

Changes not appearing:

# Reload plugin
/plugin reload frontend@mag-claude-plugins

# Or restart Claude Code completely

Agent/Command not found:

# Verify in plugin.json
cat /path/to/claude-code/plugins/frontend/plugin.json

# Check file exists
cat /path/to/claude-code/plugins/frontend/agents/your-agent.md

πŸ“ Project-Specific Marketplace

Overview

Include marketplace configuration directly in project settings instead of adding it globally.

When to Use

  • πŸ” Projects with restricted marketplace access
  • 🏒 Enterprise environments with custom marketplaces
  • 🎯 Projects requiring specific marketplace versions

Configuration

Add marketplace to .claude/settings.json:

{
  "extraKnownMarketplaces": {
    "mag-claude-plugins": {
      "source": {
        "source": "github",
        "repo": "MadAppGang/claude-code"
      }
    }
  },
  "enabledPlugins": {
    "frontend@mag-claude-plugins": true,
    "code-analysis@mag-claude-plugins": true
  }
}

Trust Requirements

Important: This approach requires each developer to trust the project folder.

Why this is not recommended:

  • ❌ Requires manual trust action per developer
  • ❌ More complex than global marketplace approach
  • ❌ Can cause confusion for team members
  • ❌ Trust dialogs can be overlooked

Recommended approach instead:

  • βœ… Add marketplace globally (one-time per developer)
  • βœ… Enable plugins in project settings
  • βœ… Simpler, clearer, fewer steps

πŸ”’ Version Management

Specifying Versions in Marketplace

Control plugin versions in marketplace.json:

{
  "plugins": [
    {
      "name": "frontend",
      "version": "2.3.0",
      "source": "./plugins/frontend"
    }
  ]
}

Installing Specific Versions

# Install latest version
/plugin install frontend@mag-claude-plugins

# Install specific version
/plugin install frontend@mag-claude-plugins@2.2.0

# Verify installed version
/plugin list

Version Pinning

In project settings:

Currently, Claude Code enables the latest available version from the marketplace. Version pinning in project settings is not yet supported.

Workaround:

  • Pin versions in marketplace.json
  • Teams pull the same marketplace version from git

Checking Versions

# List installed plugins with versions
/plugin list

# Check marketplace version
cat .claude-plugin/marketplace.json | grep version

Upgrading Versions

# Update marketplace metadata
/plugin marketplace update mag-claude-plugins

# Reinstall plugin to get latest version
/plugin remove frontend@mag-claude-plugins
/plugin install frontend@mag-claude-plugins

πŸ”„ Plugin Updates

Updating Marketplace

Get the latest marketplace metadata:

/plugin marketplace update mag-claude-plugins

This updates:

  • βœ… Plugin versions
  • βœ… New plugins added to marketplace
  • βœ… Plugin descriptions and metadata
  • βœ… Marketplace version

Does not update:

  • ❌ Already installed plugin files (must reinstall)

Updating Individual Plugins

Method 1: Marketplace Update

# Update marketplace
/plugin marketplace update mag-claude-plugins

# Plugins will update automatically on next use

Method 2: Reinstall Plugin

# Remove and reinstall
/plugin remove frontend@mag-claude-plugins
/plugin install frontend@mag-claude-plugins

Method 3: Reload Plugin

For local development changes:

/plugin reload frontend@mag-claude-plugins

Update Workflow for Teams

For team projects:

# 1. One team member updates marketplace
/plugin marketplace update mag-claude-plugins

# 2. Check what changed
/plugin list

# 3. Test updated plugins

# 4. If all good, other team members run:
/plugin marketplace update mag-claude-plugins

No action needed by team members if:

  • Plugins are enabled in .claude/settings.json
  • Marketplace is already added globally
  • Updates are compatible

βš™οΈ Custom Configuration

Environment Variables

Plugins may require environment variables. Configure them in your shell profile or .env file:

In ~/.zshrc or ~/.bashrc:

# Frontend Plugin
export FIGMA_ACCESS_TOKEN="your-token"
export APIDOG_API_TOKEN="your-token"

# Optional
export CHROME_EXECUTABLE_PATH="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
export CODEX_API_KEY="your-key"

In project .env file:

FIGMA_ACCESS_TOKEN=your-token
APIDOG_API_TOKEN=your-token

Check required variables:

  • See plugin's README.md
  • See plugin's DEPENDENCIES.md
  • Run /configure-mcp command (if available)

MCP Server Configuration

Some plugins include MCP servers that need configuration:

Auto-configuration (Recommended):

/configure-mcp

This command (available in frontend plugin):

  1. Checks existing configuration
  2. Asks for missing environment variables
  3. Validates credentials
  4. Updates MCP server configuration

Manual configuration:

Edit Claude Code's MCP configuration:

{
  "mcpServers": {
    "figma": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-figma"],
      "env": {
        "FIGMA_ACCESS_TOKEN": "your-token"
      }
    }
  }
}

Plugin-Specific Settings

Some plugins support additional configuration in .claude/settings.json:

{
  "enabledPlugins": {
    "frontend@mag-claude-plugins": true
  },
  "pluginConfig": {
    "frontend": {
      "defaultModel": "sonnet",
      "autoReview": true,
      "testingEnabled": true
    }
  }
}

Note: Plugin-specific config support varies by plugin. Check plugin documentation.


🎯 Best Practices

For Individual Developers

  1. Add marketplace globally (one-time setup)
  2. Enable plugins per-project (in .claude/settings.json)
  3. Keep environment variables in shell profile
  4. Update marketplace regularly for latest features

For Teams

  1. Add marketplace globally (each developer, one-time)
  2. Commit .claude/settings.json (team gets plugins automatically)
  3. Document required env vars in project README
  4. Use consistent plugin versions across team

For Plugin Developers

  1. Test with local marketplace during development
  2. Use semantic versioning for releases
  3. Document breaking changes in CHANGELOG
  4. Test updates before publishing

πŸ› Troubleshooting

Marketplace Issues

Marketplace not found:

# List marketplaces
/plugin marketplace list

# Add marketplace
/plugin marketplace add MadAppGang/claude-code

# Update marketplace
/plugin marketplace update mag-claude-plugins

Cannot access marketplace:

# Check internet connection
ping github.com

# Verify marketplace URL
/plugin marketplace list

# Try re-adding
/plugin marketplace remove mag-claude-plugins
/plugin marketplace add MadAppGang/claude-code

Plugin Issues

Plugin not appearing:

# Verify marketplace has plugin
/plugin marketplace list

# Check settings format
cat .claude/settings.json

# Reload Claude Code
# Restart the application

Plugin not working:

# Check plugin status
/plugin list

# Verify environment variables
echo $FIGMA_ACCESS_TOKEN

# Check plugin logs
# (if available in plugin documentation)

# Reinstall plugin
/plugin remove frontend@mag-claude-plugins
/plugin install frontend@mag-claude-plugins

Version Issues

Wrong version installed:

# Check current version
/plugin list

# Update marketplace
/plugin marketplace update mag-claude-plugins

# Reinstall specific version
/plugin remove frontend@mag-claude-plugins
/plugin install frontend@mag-claude-plugins@2.3.0

πŸ“– Related Documentation


πŸ“ž Need Help?