share-skill
Automatically share skills, migrate local skills to code repositories, open source skills, skill version management, configure git remote
What this skill does
# Share Skill
Migrate user's locally created temporary skills to a project repository via symlinks, and initialize Git for version tracking.
## Usage
| Command | Description |
|---------|-------------|
| `/share-skill <skill-name>` | Migrate specified skill to code repository and initialize git |
| `/share-skill config` | Configure code_root and other settings |
| `/share-skill <skill-name> --remote <url>` | Migrate and configure remote URL |
| `/share-skill list` | List all local skills available for migration |
| `/share-skill remote <alias> <endpoint>` | Configure Git remote alias |
| `/share-skill remote list` | List configured remote aliases |
| `/share-skill docs` | Generate documentation website for the repository |
| `/share-skill docs --style <name>` | Generate docs with specified design style |
| `/share-skill docs --skill <ui-skill>` | Use specified UI skill to design docs |
| `/share-skill docs config` | Configure default design style or UI skill |
| `/share-skill allow` | One-time authorization for this skill's permissions |
| Natural language | e.g., "Help me open source port-allocator and push to github" |
## Configuration File
All settings are stored in `~/.claude/share-skill-config.json`:
```json
{
"code_root": "~/Codes",
"skills_repo": "skills",
"github_username": "guo-yu",
"remotes": {
"github": "[email protected]:guo-yu/skills",
"gitlab": "[email protected]:guo-yu/skills"
},
"default_remote": "github",
"auto_detected": true,
"docs": {
"style": "botanical",
"custom_skill": null,
"custom_domain": null
}
}
```
**Configuration Fields:**
| Field | Description | Default |
|-------|-------------|---------|
| `code_root` | Base directory for code repositories | `~/Codes` |
| `skills_repo` | Name of skills repository folder | `skills` |
| `github_username` | GitHub username for URLs | Auto-detected |
| `remotes` | Git remote aliases | Auto-configured |
| `docs.custom_domain` | Custom domain for docs site | `null` (use GitHub Pages) |
**Path Variables:**
Throughout this document, the following variables are used:
- `{code_root}` → Value of `code_root` config (e.g., `~/Codes`)
- `{skills_repo}` → Value of `skills_repo` config (e.g., `skills`)
- `{skills_path}` → `{code_root}/{skills_repo}` (e.g., `~/Codes/skills`)
- `{username}` → Value of `github_username` config
## Plugin Marketplace
share-skill automatically creates a Claude Code Plugin Marketplace structure, enabling users to install skills via the `/plugin` command.
### Installation via Marketplace
Once your skills repository is set up, users can install skills with:
```bash
# Add the marketplace (one-time setup)
/plugin marketplace add {username}/{skills_repo}
# Install individual skills
/plugin install port-allocator@{username}-{skills_repo}
/plugin install share-skill@{username}-{skills_repo}
```
### Marketplace Structure
The repository requires two types of manifest files:
**1. Root marketplace.json** (`{skills_path}/.claude-plugin/marketplace.json`):
```json
{
"name": "{username}-{skills_repo}",
"owner": {
"name": "{display-name}",
"email": "{username}@users.noreply.github.com"
},
"metadata": {
"description": "A collection of productivity skills for Claude Code",
"version": "1.0.0"
},
"plugins": [
{
"name": "skill-name",
"source": "./skill-name",
"description": "Skill description from SKILL.md frontmatter"
}
]
}
```
**2. Plugin manifest** (`{skills_path}/<skill-name>/.claude-plugin/plugin.json`):
```json
{
"name": "skill-name",
"description": "Skill description",
"version": "1.0.0"
}
```
### Directory Structure with Plugin Support
```
{skills_path}/
├── .claude-plugin/
│ └── marketplace.json # Root marketplace config
├── port-allocator/
│ ├── .claude-plugin/
│ │ └── plugin.json # Plugin manifest
│ ├── SKILL.md
│ └── ...
├── share-skill/
│ ├── .claude-plugin/
│ │ └── plugin.json
│ ├── SKILL.md
│ └── ...
└── docs/
└── ...
```
### Marketplace Commands Reference
| Command | Description |
|---------|-------------|
| `/plugin marketplace add <repo>` | Add a marketplace (GitHub: `owner/repo`) |
| `/plugin marketplace update` | Update all marketplace indexes |
| `/plugin install <name>@<marketplace>` | Install a plugin from marketplace |
| `/plugin validate .` | Validate marketplace structure |
### Auto-detection on First Run
On first invocation of share-skill, it automatically detects settings:
**Auto-detection Logic:**
1. **Check if config file exists**
```bash
if [ ! -f ~/.claude/share-skill-config.json ]; then
# First run, perform auto-detection
fi
```
2. **Detect code_root directory**
```bash
# Check common code directory locations in order
for dir in ~/Codes ~/Code ~/Projects ~/Dev ~/Development ~/repos; do
if [ -d "$dir" ]; then
CODE_ROOT="$dir"
break
fi
done
# If none found, default to ~/Codes
CODE_ROOT="${CODE_ROOT:-~/Codes}"
```
3. **Read Git global config for username**
```bash
# Try to get username
USERNAME=$(git config --global user.name)
# If username contains spaces, try extracting from GitHub email
if [[ "$USERNAME" == *" "* ]]; then
EMAIL=$(git config --global user.email)
# Extract from [email protected]
USERNAME=$(echo "$EMAIL" | grep -oP '^\d+-?\K[^@]+(?=@users\.noreply\.github\.com)')
fi
# If still unable to determine, try extracting from remote URL
if [ -z "$USERNAME" ]; then
USERNAME=$(git config --global --get-regexp "url.*github.com" | grep -oP 'github\.com[:/]\K[^/]+' | head -1)
fi
```
4. **Generate default config**
```json
{
"code_root": "<detected-code-root>",
"skills_repo": "skills",
"github_username": "<detected-username>",
"remotes": {
"github": "[email protected]:<detected-username>/skills"
},
"default_remote": "github",
"auto_detected": true,
"docs": {
"style": "botanical",
"custom_skill": null,
"custom_domain": null
}
}
```
5. **Output detection result**
```
First run, auto-detecting settings...
Detected settings:
Code root: ~/Codes
GitHub username: guo-yu
Auto-configured:
Skills path: ~/Codes/skills
Remote: [email protected]:guo-yu/skills
Config file: ~/.claude/share-skill-config.json
To modify, use:
/share-skill config
```
### Command: `/share-skill config`
Interactive configuration for share-skill settings:
**TUI Interface (AskUserQuestion):**
```
Configure share-skill settings:
Code root directory:
Current: ~/Codes
[ ] ~/Codes
[ ] ~/Code
[ ] ~/Projects
[ ] Other... (enter custom path)
Custom domain for documentation:
Current: (none - using GitHub Pages)
[ ] No custom domain (use {username}.github.io/{repo})
[ ] Enter custom domain...
```
**Implementation:**
```bash
# Read current config
CONFIG=$(cat ~/.claude/share-skill-config.json 2>/dev/null || echo '{}')
# After user selection, update config
# Example: Update code_root
jq --arg root "$NEW_CODE_ROOT" '.code_root = $root' <<< "$CONFIG" > ~/.claude/share-skill-config.json
```
### Handling Detection Failure
If settings cannot be auto-detected, prompt user to configure:
```
Unable to auto-detect settings
Please configure manually:
/share-skill config
Or specify when migrating:
/share-skill <skill-name> --remote [email protected]:your-username/skills.git
```
## Natural Language Invocation
When user invokes via natural language, intelligent analysis is needed:
### 1. Identify User's Referenced Skill
User might say:
- "Help me open source xxx skill" -> Extract skill name `xxx`
- "Share the skill I just created" -> Find most recently modified skill
- "Migrate this skill to repository" -> Determine from current context
- "Open source port-allocator" -> Use name directly
### 2. Identify Remote Address
**Default behavior:** Use auto-detected username + defauRelated in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.