Coding & Refactoringlow risk
metagit-campaign
Plan and track cross-project multi-repo campaigns — YAML overlays, repo rollups, objective fan-out, and MR status. Use for umbrella-scale coordinated work.
metagit-ai/metagit-cli·src/metagit/data/skills/metagit-campaign/SKILL.md
75/ 100品質分
匯入這個 Skill
選擇你的 coding agent,複製專案級或個人級安裝指令。
匯入目前專案.agents/skills/metagit-campaign
npx skills add https://github.com/metagit-ai/metagit-cli/tree/482dfb3b7a407ca5e541657a6fcc9af619818243/src/metagit/data/skills/metagit-campaign -a codex -y匯入個人環境~/.agents/skills/metagit-campaign
npx skills add https://github.com/metagit-ai/metagit-cli/tree/482dfb3b7a407ca5e541657a6fcc9af619818243/src/metagit/data/skills/metagit-campaign -a codex -g -y匯入目前專案.claude/skills/metagit-campaign
npx skills add https://github.com/metagit-ai/metagit-cli/tree/482dfb3b7a407ca5e541657a6fcc9af619818243/src/metagit/data/skills/metagit-campaign -a claude-code -y匯入個人環境~/.claude/skills/metagit-campaign
npx skills add https://github.com/metagit-ai/metagit-cli/tree/482dfb3b7a407ca5e541657a6fcc9af619818243/src/metagit/data/skills/metagit-campaign -a claude-code -g -y匯入目前專案.agents/skills/metagit-campaign
npx skills add https://github.com/metagit-ai/metagit-cli/tree/482dfb3b7a407ca5e541657a6fcc9af619818243/src/metagit/data/skills/metagit-campaign -a github-copilot -y匯入個人環境~/.copilot/skills/metagit-campaign
npx skills add https://github.com/metagit-ai/metagit-cli/tree/482dfb3b7a407ca5e541657a6fcc9af619818243/src/metagit/data/skills/metagit-campaign -a github-copilot -g -y匯入目前專案.agents/skills/metagit-campaign
npx skills add https://github.com/metagit-ai/metagit-cli/tree/482dfb3b7a407ca5e541657a6fcc9af619818243/src/metagit/data/skills/metagit-campaign -a cursor -y匯入個人環境~/.cursor/skills/metagit-campaign
npx skills add https://github.com/metagit-ai/metagit-cli/tree/482dfb3b7a407ca5e541657a6fcc9af619818243/src/metagit/data/skills/metagit-campaign -a cursor -g -y匯入目前專案.agents/skills/metagit-campaign
npx skills add https://github.com/metagit-ai/metagit-cli/tree/482dfb3b7a407ca5e541657a6fcc9af619818243/src/metagit/data/skills/metagit-campaign -a gemini-cli -y匯入個人環境~/.gemini/skills/metagit-campaign
npx skills add https://github.com/metagit-ai/metagit-cli/tree/482dfb3b7a407ca5e541657a6fcc9af619818243/src/metagit/data/skills/metagit-campaign -a gemini-cli -g -yNative Gemini CLI
gemini skills install https://github.com/metagit-ai/metagit-cli.git --scope workspace --path src/metagit/data/skills/metagit-campaign⚠ 安裝指令使用開源 skills CLI。執行前請檢查來源、腳本與權限。
Skill 指令
在 GitHub 查看原始檔案 ↗# Metagit campaign skill
<!-- modality:native_campaigns -->
<!-- modality:objective_mr_approval_binding -->
<!-- modality:coordination_events_scope -->
Use when coordinating **many repos** under one intent (rollout, migration, tier stamp) with a committed, diffable status overlay.
Docs: [campaigns.md](https://metagit-ai.github.io/metagit-cli/reference/campaigns/) · Registry: [modality-feature-registry.md](https://metagit-ai.github.io/metagit-cli/reference/modality-feature-registry/)
## When to use
- One selection query → frozen repo list → per-repo status/MR tracking
- Fan-out spine objectives for parallel agents (`campaign expand`)
- Rollup: merged vs open MR vs blocked without manual spreadsheets
## Configuration
```yaml
# metagit.config.yaml
workspace:
campaigns_path: _campaigns # default; or knowledge/campaigns
```
Env: `METAGIT_WORKSPACE_CAMPAIGNS_PATH`
## Lifecycle
```bash
export METAGIT_AGENT_MODE=true
# 1. Create from find query (+ optional tags)
metagit campaign new --slug tier-full --title "Full-tier rollout" \
--query "platform" --tag agent_tier=full
# 2. Validate atlas references
metagit campaign validate
# 3. Optional: one objective per repo for spine tracking
metagit campaign expand --slug tier-full --dry-run
metagit campaign expand --slug tier-full
# 4. Work repos; update status as MRs land
metagit campaign set --slug tier-full --repo platform/api \
--status mr-open --mr "https://gitlab.example.com/…/merge_requests/42"
metagit campaign set --slug tier-full --repo platform/api --status merged
# 5. Rollup
metagit campaign status --slug tier-full --json
```
## Agent posture before repo work
When repos declare `agent_profile`, provision before dispatch:
```bash
metagit agent profile show -p platform -n api --json
metagit agent apply --vendor claude_code --project platform --repo api
```
Skill: `metagit-cli` · Doc: [agent-profile.md](https://metagit-ai.github.io/metagit-cli/reference/agent-profile/)
## Orchestrator polling
```bash
metagit context events --campaign tier-full --since "<iso-cursor>" --json
metagit context handoff list --json
```
## Objective MR binding
When an objective produces an MR or approval, record linkage:
```bash
echo '{"id":"campaign-tier-full-platform-api","mr_url":"https://…","approval_id":"abc"}' \
| metagit context objective set
```
## Safety
- Commit `_campaigns/` (or configured path) to git
- Run `metagit campaign validate` in CI alongside `metagit config validate`
- Use `campaign expand --dry-run` before writing many objectives
## Related skills
- `metagit-multi-repo` — implement changes across expanded repos
- `metagit-control-center` — dispatch loop with profile apply
- `metagit-context-pack` — tier-2 session boundary before large fan-out