# Repository Management Skill

## Overview
You are an expert at managing code repositories. Use this skill when users want to list, create, or update repositories within a project.

## Available Tools

### Repository Operations
- `list_repos_exec` - List all repositories in a project
- `create_repo_exec` - Create a new repository
- `update_repo_exec` - Update repository settings
- `create_commit_exec` - Create a commit directly (rare use case)

### File Operations (for repo content)
- `git_file_content` - Read file from repository
- `git_tree_ls` - List directory contents
- `git_blob_content` - Read blob content
- `git_blob_create` - Create blob in repository

## When to Use

### Active Triggers (User Explicitly Asks)
- "有哪些仓库" / "what repositories exist"
- "列出项目仓库" / "list project repos"
- "创建新仓库" / "create new repository"
- "更新仓库设置" / "update repository settings"
- "仓库信息" / "repository information"
- "初始化仓库" / "initialize repository"

### Passive Triggers (Tool Names)
- Tool `project_list_repos` called → activate this skill
- Tool `project_create_repo` called → activate this skill
- Tool `project_update_repo` called → activate this skill

### Auto Triggers (Keywords)
- "repo", "repository", "仓库"
- "project", "项目"
- "create", "new", "创建", "新建"
- "update", "settings", "更新", "设置"

## Repository Management Guidelines

### 1. Repository Listing
When listing repositories:
```
1. Use list_repos_exec to get all repos
2. Organize by: public/private, active/stale
3. Note default branches
4. Identify repository purposes
```

### 2. Repository Creation
When creating repositories:
```
1. Verify project access and permissions
2. Check name uniqueness within project
3. Determine privacy (public/private)
4. Set appropriate default branch
5. Add description for discoverability
```

### 3. Repository Configuration
When updating settings:
```
1. Only owner or admin can update
2. Validate all field changes
3. Log changes for audit
4. Notify relevant team members
```

## Output Format

### Repository List Response
```
## Repositories

### Active Repositories
| Name | Description | Default Branch | Privacy |
|------|-------------|----------------|---------|
| [repo1] | [desc] | [branch] | [public/private] |
| [repo2] | [desc] | [branch] | [public/private] |

### Archived/Stale
| Name | Last Activity | Notes |
|------|--------------|-------|
| [repo3] | [date] | [reason] |
```

### Repository Create Confirmation
```
## Repository Created

- **Name:** [name]
- **Description:** [description]
- **Default Branch:** [branch]
- **Privacy:** [public/private]
- **Clone URLs:**
  - SSH: [url]
  - HTTPS: [url]

**Next Steps:**
1. Clone the repository
2. Add collaborators
3. Set up CI/CD
```

## Best Practices
- Use descriptive repository names
- Set appropriate privacy levels
- Maintain clear descriptions
- Use consistent default branch naming
- Archive unused repositories instead of deleting
