github-setup
Set up GitHub MCP server authentication. Use when user says "setup github", "configure github token", "github mcp setup", or needs help configuring their GitHub Personal Access Token for the GitHub MCP server.
What this skill does
# GitHub MCP Setup
Guide users through configuring their GitHub Personal Access Token (PAT) for the GitHub MCP server integration.
## When to Activate
- User wants to set up GitHub MCP integration
- User mentions GitHub token configuration
- User asks about GitHub authentication for Claude Code
- GitHub MCP server fails due to missing token
## Overview
The GitHub MCP server provides repository management, file operations, issue tracking, and PR functionality directly within Claude Code. It requires a GitHub Personal Access Token (PAT) for authentication.
## Setup Process
### Step 1: Check Current Token Status
First, check if the token is already configured:
```bash
# Check if GITHUB_PERSONAL_ACCESS_TOKEN is set
if [ -n "$GITHUB_PERSONAL_ACCESS_TOKEN" ]; then
echo "GitHub token is configured (length: ${#GITHUB_PERSONAL_ACCESS_TOKEN} chars)"
else
echo "GitHub token is NOT configured"
fi
```
### Step 2: Create a GitHub Personal Access Token
If no token exists, guide the user:
1. **Navigate to GitHub Token Settings**:
- Go to: <https://github.com/settings/tokens?type=beta>
- Or: GitHub Settings > Developer settings > Personal access tokens > Fine-grained tokens
2. **Create New Token**:
- Click "Generate new token"
- Give it a descriptive name (e.g., "Claude Code MCP")
- Set expiration (recommend 90 days or custom)
- Select repository access (recommend "All repositories" or specific repos)
3. **Required Permissions** (minimum for full functionality):
- **Repository permissions**:
- Contents: Read and write
- Issues: Read and write
- Pull requests: Read and write
- Metadata: Read-only (automatically selected)
- **Account permissions** (optional):
- Email addresses: Read-only
4. **Generate and Copy Token**:
- Click "Generate token"
- Copy the token immediately (it won't be shown again)
### Step 3: Configure Environment Variable
Add the token to your shell profile for persistence:
**For Zsh (default on macOS):**
```bash
echo 'export GITHUB_PERSONAL_ACCESS_TOKEN="ghp_your_token_here"' >> ~/.zshrc
source ~/.zshrc
```
**For Bash:**
```bash
echo 'export GITHUB_PERSONAL_ACCESS_TOKEN="ghp_your_token_here"' >> ~/.bashrc
source ~/.bashrc
```
**For Fish:**
```fish
set -Ux GITHUB_PERSONAL_ACCESS_TOKEN "ghp_your_token_here"
```
### Step 4: Verify Configuration
After setting the token, restart Claude Code and verify:
```bash
# Verify token is set
echo "Token configured: $([ -n \"$GITHUB_PERSONAL_ACCESS_TOKEN\" ] && echo 'Yes' || echo 'No')"
```
Then run `/mcp` in Claude Code to see the GitHub MCP server listed.
## Troubleshooting
### Token Not Found
If the GitHub MCP server reports a missing token:
1. Verify the environment variable is set:
```bash
echo $GITHUB_PERSONAL_ACCESS_TOKEN
```
2. If empty, check your shell profile contains the export
3. Source your profile or restart the terminal:
```bash
source ~/.zshrc # or ~/.bashrc
```
4. Restart Claude Code to pick up the new environment
### Token Invalid or Expired
If you get authentication errors:
1. Check token expiration at <https://github.com/settings/tokens>
2. Generate a new token if expired
3. Update your shell profile with the new token
4. Restart Claude Code
### Insufficient Permissions
If certain operations fail:
1. Review token permissions at <https://github.com/settings/tokens>
2. Edit the token to add required permissions
3. Note: Some actions require specific scopes (e.g., `workflow` for GitHub Actions)
## Security Best Practices
1. **Never commit tokens**: Add your shell profile to `.gitignore`
2. **Use fine-grained tokens**: Prefer fine-grained over classic tokens for better security
3. **Limit scope**: Only grant permissions you actually need
4. **Set expiration**: Use short-lived tokens when possible
5. **Rotate regularly**: Regenerate tokens periodically
6. **Use secrets managers**: Consider 1Password, Keychain, or similar for token storage
## Available GitHub MCP Tools
Once configured, you'll have access to:
- **Repository Management**: Create, fork, search repositories
- **File Operations**: Read, create, update files and directories
- **Issue Tracking**: Create, update, search, comment on issues
- **Pull Requests**: Create PRs, add reviewers, merge
- **Branch Management**: Create, list, delete branches
- **Search**: Search code, issues, PRs, users across GitHub
## Quick Reference
| Item | Value |
| -------------------- | ------------------------------------- |
| Environment Variable | `GITHUB_PERSONAL_ACCESS_TOKEN` |
| Token Settings URL | <https://github.com/settings/tokens> |
| Token Type | Fine-grained (recommended) or Classic |
| MCP Server | Hosted at `api.githubcopilot.com/mcp` |
## Next Steps
After successful setup:
1. Run `/mcp` to verify the GitHub server is connected
2. Try a simple command like "list my GitHub repositories"
3. Explore available tools with "what GitHub tools are available?"
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.