iTranslated by AI
How to Share Claude Code Skills and Hooks Internally
Introduction
"I wish I could easily share the useful Claude Code settings our team uses with other members..."
Claude Code has customization features such as Skills, Hooks, and MCP Servers, which allow you to build team-specific development workflows. However, deploying these settings manually to each member is time-consuming.
That's where the Plugin Marketplace feature comes in handy. By simply registering a GitHub repository as a Marketplace, you can easily share and install Skills.
# Register as a Marketplace
/plugin marketplace add your-org/your-skills-repo
# Install Skills
/plugin install your-skill@your-skills-repo
In this article, I will explain specific ways to share Claude Code settings within your team using the Plugin Marketplace feature.
Reference: Claude Code Skills Official Repository
Customization Features That Can Be Shared
There are four main customization features that can be shared in Claude Code. Let's look at the features and use cases for each.
1. Skills
Skills is a feature for adding new commands to Claude Code. By turning repetitive tasks into commands, you can improve the overall productivity of your team.
Use Cases:
-
/deploy- Automate the deployment process to production environments -
/run-migration- Execute database migrations -
/create-pr- Apply templates when creating pull requests
2. Hooks
Hooks are commands that run automatically when specific events occur. They automate development flows and ensure quality.
Use Cases:
- Automatically run Prettier after editing a file
- Automatically run tests and lint before a commit
- Automatically save work logs when a session ends
3. MCP Servers
MCP (Model Context Protocol) servers are a mechanism to extend the capabilities of Claude Code. They enable integration with internal systems.
Use Cases:
- Search for related documents from an internal Wiki
- Integrate with Jira to automatically create tickets
- Reference schema information for internal APIs
4. Rules
Rules are guidelines for customizing Claude Code's behavior. They allow you to automatically apply the team's coding conventions.
Use Cases:
- "React components must be written in TypeScript"
- "New APIs must always have an OpenAPI specification created"
- "Maintain test coverage of 80% or higher"
Sharing Methods Within the Company
Claude Code settings are stored in the .claude/ directory. By managing these settings with Git, you can build a unified development environment for the entire team.
There are three main sharing methods. Choose the one that best fits your project's scale and your team's operational policy.
Method 1: Sharing Settings Per Project
The simplest method is to include the .claude/ directory in each project's repository. New members can start using the same development environment immediately just by running git clone.
Directory Structure Example
your-project/
├── .claude/
│ ├── settings.json # Hooks and MCP server settings
│ ├── skills/ # Project-specific Skills
│ │ ├── deploy/
│ │ │ ├── skill.md
│ │ │ └── deploy.sh
│ │ └── test/
│ │ ├── skill.md
│ │ └── test.sh
│ └── RULES.md # Project rules
├── src/
└── README.md
Configuration Example: .claude/settings.json
{
"hooks": {
"PostToolUse": [
{
"matcher": "Edit|Write|MultiEdit",
"hooks": [
{
"type": "command",
"command": "npm run lint:fix"
}
]
}
]
},
"mcpServers": {
"company-wiki": {
"command": "npx",
"args": ["-y", "@company/mcp-wiki-server"],
"env": {
"WIKI_API_KEY": "${WIKI_API_KEY}"
}
}
}
}
Pros
- ✅ Easy to manage project-specific settings
- ✅ Version control settings with Git
- ✅ Environment is ready for new members just by cloning
Cons
- ❌ Settings are dispersed across projects
- ❌ It's a hassle to deploy common settings to multiple projects
Method 2: Organization-Wide Common Configuration Repository
If you want to use common Skills or MCP servers across multiple projects, manage them in a dedicated repository. Using the Plugin Marketplace feature, you can easily install them.
Directory Structure Example
company-claude-config/
├── README.md
├── skills/
│ ├── deploy/ # Deployment Skill
│ ├── create-ticket/ # Ticket Creation Skill
│ └── db-migration/ # DB Migration Skill
├── mcp-servers/
│ ├── wiki-server/ # Internal Wiki Integration MCP Server
│ ├── jira-server/ # Jira Integration MCP Server
│ └── metrics-server/ # Metrics Acquisition MCP Server
├── hooks/
│ ├── post-edit.sh # Common post-edit processing
│ └── pre-commit.sh # Pre-commit check
└── templates/
├── settings.json # Configuration template
└── RULES.md # Common rules
Setup Script Example
Provide an installation script so that team members can set it up easily.
#!/bin/bash
# Install organization Claude Code settings
CLAUDE_DIR="$HOME/.config/claude"
CONFIG_REPO="https://github.com/your-company/claude-config.git"
CONFIG_DIR="$HOME/.claude-company-config"
# Clone the configuration repository
if [ ! -d "$CONFIG_DIR" ]; then
echo "📦 Cloning company Claude Code config..."
git clone "$CONFIG_REPO" "$CONFIG_DIR"
else
echo "📦 Updating company Claude Code config..."
cd "$CONFIG_DIR" && git pull
fi
# Create symbolic links to global settings
mkdir -p "$CLAUDE_DIR/skills"
ln -sf "$CONFIG_DIR/skills/"* "$CLAUDE_DIR/skills/"
# Install MCP servers
echo "🔧 Installing MCP servers..."
npm install -g @company/mcp-wiki-server
npm install -g @company/mcp-jira-server
# Update global settings
echo "⚙️ Updating global settings..."
cat "$CONFIG_DIR/templates/settings.json" >> "$CLAUDE_DIR/settings.json"
echo "✅ Installation complete! Restart Claude Code to apply changes."
Pros
- ✅ Standardize settings across the entire organization
- ✅ Centralize management of updates
- ✅ Automatically apply best practices
Cons
- ❌ Initial setup is slightly complex
- ❌ Need to be careful about conflicts between global settings and project settings
Method 3: Hybrid Configuration (Recommended)
Combining project-specific settings with organization-wide settings is the most practical approach.
Configuration
# Global settings ($HOME/.config/claude/)
~/.config/claude/
├── settings.json # Organization-wide Hooks and MCP servers
└── skills/ # Organization-wide Skills
├── create-ticket/
└── deploy/
# Project settings (project root/.claude/)
project/.claude/
├── settings.json # Project-specific settings
├── skills/ # Project-specific Skills
│ └── run-migration/
└── RULES.md # Project-specific rules
Precedence of Settings
Claude Code loads settings in the following order of precedence (more specific scopes take priority):
-
Managed Settings (e.g.,
/etc/claude-code/managed-settings.json) - System-level settings deployed by the IT department - Command-line Arguments - Temporary session overrides
-
Local Project Settings (
.claude/settings.local.json) - Personal use, excluded from Git -
Shared Project Settings (
.claude/settings.json) - Team-shared, managed in Git -
User Settings (
~/.claude/settings.json) - Personal global settings
By leveraging this mechanism, you can place organization-wide settings globally and project-specific settings locally.
Reference: Claude Code Settings Official Documentation
Practical Exercise: Creating and Sharing a Skills Repository
In this section, we will walk through the steps to actually create a Skills repository and share it as a Plugin Marketplace.
Step 1: Create a Repository
# Create a repository
mkdir company-claude-skills
cd company-claude-skills
git init
# Create the skills directory
mkdir -p skills
Step 2: Create a Skill
Skills are created as directories containing a SKILL.md file. The filename must be SKILL.md (all uppercase).
---
name: create-ticket
description: Create a ticket in Jira
---
# Ticket Creation Skill
This skill creates a new ticket in Jira.
## Usage
Instruct it to "Create a bug ticket in Jira."
## Environment Variables
- `JIRA_API_KEY`: Jira API Key
- `JIRA_URL`: Jira instance URL
Step 3: Push to GitHub
# Commit changes
git add .
git commit -m "Add create-ticket skill"
# Push to GitHub
git remote add origin git@github.com:your-company/company-claude-skills.git
git push -u origin main
Step 4: Usage by Team Members
Team members can use the Skills by following these steps:
# 1. Register as a Marketplace (first time only)
/plugin marketplace add your-company/company-claude-skills
# 2. Install the Skill
/plugin install create-ticket@company-claude-skills
# 3. Use the Skill
# Simply instruct Claude Code to "Create a bug ticket in Jira"
Once installed, it will be available for use via the /create-ticket command.
Summary
By using the Claude Code Plugin Marketplace feature, you can easily share your team's unique Skills and settings.
- Install Skills directly from GitHub repositories using the Plugin Marketplace feature
- Flexibly manage settings by combining project-specific and global configurations
- Achieve a unified development environment for the entire team through version control with Git
Leverage Claude Code's customization features to improve your team's overall productivity!
Reference Links
Official Documentation
- Claude Code Skills Official Repository
- Claude Code Skills Official Documentation
- Claude Code Settings Official Documentation
- Claude Code Hooks Guide
- MCP (Model Context Protocol) Official Site
Discussion