スキル一覧に戻る
weholt

agent-ops-git

by weholt

0🍴 0📅 2026年1月25日
GitHubで見るManusで実行

SKILL.md


name: agent-ops-git description: "Manage git operations safely. Includes stale state detection, branch/commit management. Never pushes without explicit user confirmation." category: git invokes: [agent-ops-tasks] invoked_by: [agent-ops-state, agent-ops-implementation, agent-ops-validation] state_files: read: [constitution.md, focus.md, issues/*.md] write: [focus.md]

Git Workflow (active-safe)

Works with or without aoc CLI installed. Issue tracking can be done via direct file editing.

Git Commands

OperationCommandNotes
Check current branchgit branch --show-current
Check current commitgit rev-parse --short HEAD
Check uncommitted changesgit status --porcelain
Create branchgit checkout -b <branch>From constitution branch policy
Stage changesgit add <files>
Commitgit commit -m "..."Use structured message format
Stash workgit stash push -m "..."
Unstash workgit stash pop
View stashgit stash list
Revert commitgit revert <commit>Requires confirmation

Issue Integration (File-Based — Default)

OperationHow to Do It
Start workEdit issue in .agent/issues/{priority}.md: set status: in_progress
Close issueSet status: done, add log entry with commit hash

CLI Integration (when aoc is available)

When aoc CLI is detected in .agent/tools.json:

# Update issue when starting work
aoc issues update <ID> --status in-progress --log "Started work"

# Close issue when committing
aoc issues close <ID> --log "Fixed in commit abc123"

Never Auto-Execute

# These require explicit user confirmation:
git push           # Never auto-push
git push --force   # Never force push
git branch -D      # Never delete branches

Scope

  • ✅ Detect stale state (authoritative source)
  • ✅ Create feature branches
  • ✅ Commit checkpoints with structured messages
  • ✅ Detect uncommitted changes
  • ✅ Stash/unstash work in progress
  • ✅ Revert agent's own commits (with confirmation)
  • ❌ Never push without explicit user request
  • ❌ Never force push
  • ❌ Never delete remote branches

Stale State Detection (authoritative)

Called by agent-ops-state at session start. This is the single source of truth for staleness.

Procedure

  1. Read .agent/focus.md session info:

    • branch: expected branch name
    • last_commit: expected HEAD commit (short hash)
    • last_updated: timestamp
  2. Get current git state:

    git branch --show-current    # current branch
    git rev-parse --short HEAD   # current commit
    git status --porcelain       # uncommitted changes
    
  3. Compare and categorize:

    CheckMismatchSeverityAction
    Branch changedfocus says main, now on feature-x⚠️ WARNAsk user
    Commit changedfocus says abc123, HEAD is def456⚠️ WARNAsk user
    Uncommitted changesgit status shows changesℹ️ INFONote, may continue
    All match✅ OKContinue
  4. If any WARN:

    ⚠️ State may be stale.
    - Expected branch: X, actual: Y
    - Expected commit: A, actual: B
    
    Options:
    A) Continue anyway (I made these changes)
    B) Update focus.md to current state
    C) Stop and investigate
    

Branch Strategy

Read .agent/constitution.md for project-specific rules:

  • Branch naming pattern
  • When to create branches
  • Whether to work on main directly

Commit Message Format

Follow constitution format. Default:

[AgentOps] <type>: <short summary>

<body - what and why>

Task: T-XXXX

Types: feat, fix, docs, refactor, test, chore

Issue Reference in Commits

Every commit should reference an issue ID:

[AgentOps] fix: Resolve login timeout

Fixed the session expiry logic that was causing premature logouts.

Issue: BUG-0023@efa54f

If no issue exists for the work being committed:

⚠️ No issue found for this commit.

Create an issue first? [Y]es / [N]o, commit without issue

Note: All work should be tracked for auditability.

Checkpoint Commits

Create commits at these moments:

  • Before risky changes (labeled [checkpoint])
  • After each implementation step completes successfully
  • Before switching tasks

Rollback Procedure

When rolling back:

  1. List commits made by agent (search for [AgentOps] prefix)
  2. Show user what will be reverted
  3. Ask for confirmation
  4. Use git revert (not reset) to preserve history

スコア

総合スコア

50/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です