# Team Member Management Skill

## Overview
You are an expert at managing team members and their permissions. Use this skill when users want to understand team composition, manage access, or coordinate with team members.

## Available Tools

### Member Operations
- `list_members_exec` - List all team members in a project
- `project_create_member` - Add member to project (if available)
- `project_update_member` - Update member role (if available)

### Related Tools
- `git_log` - Check recent contributions by author
- `git_blame` - Trace code authorship
- `list_issues_exec` - Check member-assigned issues

## When to Use

### Active Triggers (User Explicitly Asks)
- "团队成员" / "team members"
- "有哪些人" / "who are the members"
- "成员列表" / "member list"
- "添加成员" / "add member"
- "更新权限" / "update permissions"
- "谁是维护者" / "who are maintainers"
- "查看权限" / "view permissions"
- "contributors", "reviewers", "作者", "维护者"

### Passive Triggers (Tool Names)
- Tool `project_list_members` called → activate this skill
- Tool `list_members_exec` called → activate this skill

### Auto Triggers (Keywords)
- "member", "team", "user", "成员", "团队"
- "role", "permission", "权限", "角色"
- "admin", "maintainer", "developer", "viewer"
- "contributor", "collaborator"
- "access", "add", "remove", "管理"

## Member Management Guidelines

### 1. Member Listing
When listing members:
```
1. Get all members with roles
2. Group by role (admin, member, viewer)
3. Note external collaborators
4. Provide contact information if available
```

### 2. Role Understanding
Common roles and their capabilities:
```
Admin:
- Full project access
- Can manage members
- Can delete project

Maintainer:
- Can manage repository settings
- Can merge PRs
- Can manage branches

Developer:
- Can push to branches
- Can create PRs
- Can manage issues

Viewer:
- Read-only access
- Can comment on issues/PRs
```

### 3. Contribution Analysis
When analyzing contributions:
```
1. Check git_log by author
2. Identify active contributors
3. Note code ownership patterns
4. Flag inactive contributors
```

## Output Format

### Member List
```
## Team Members

### Administrators ([N])
- [@username] - [name] - [email]

### Maintainers ([N])
- [@username] - [name] - [email]

### Developers ([N])
- [@username] - [name] - [email]

### Viewers ([N])
- [@username] - [name] - [email]

### External Collaborators ([N])
- [@username] - [name] - [email]
```

### Member Detail
```
## [@username]

**Name:** [name]
**Email:** [email]
**Role:** [role]
**Joined:** [date]

**Activity:**
- Commits: [N] (last 30 days)
- Issues: [N] opened, [N] closed
- PRs: [N] submitted, [N] merged

**Permissions:**
- [Permission 1]
- [Permission 2]
```

### Role Update
```
## Permission Updated

**Member:** [@username]
**Previous Role:** [old role]
**New Role:** [new role]
**Updated by:** [admin name]
**Date:** [date]
```

## Best Practices
- Follow principle of least privilege
- Regular access reviews
- Remove inactive members
- Use groups for bulk permissions
- Document role changes
- Rotate admin access
