.agents/workflow-utilities/SKILL.md
Shared utilities for file deprecation, directory structure creation, TODO file updates, workflow lifecycle management, archive management, and VCS abstraction (GitHub/Azure DevOps PR feedback methods). Used by all other skills. Use when: Need shared utilities, deprecating files, updating TODO, registering/archiving workflows, managing TODO.md manifest, VCS operations, PR feedback handling Triggers: deprecate, archive, update TODO, create directory, register workflow, archive workflow, sync manifest, VCS operations, PR feedback
npx skillsauth add stharrold/finder workflow-utilitiesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Provides reusable Python utilities for common workflow tasks that are used across multiple skills.
Archive deprecated files with timestamp into ARCHIVED/ directory.
python .claude/skills/workflow-utilities/scripts/deprecate_files.py \
<todo_file> <description> <file1> [file2 ...]
Arguments:
todo_file: Path to TODO file (for timestamp extraction)description: Short description (e.g., 'old-auth-flow')files: One or more file paths to deprecateCreates:
ARCHIVED/YYYYMMDDTHHMMSSZ_<description>.zipCreate standard directory structure with required files.
python .claude/skills/workflow-utilities/scripts/directory_structure.py \
<directory>
Arguments:
directory: Path to directory to create/populateCreates:
CLAUDE.md - Context-specific guidanceREADME.md - Human-readable documentationARCHIVED/ subdirectory (with its own CLAUDE.md and README.md)Update task status and workflow progress in TODO file.
python .claude/skills/workflow-utilities/scripts/todo_updater.py \
<todo_file> <task_id> <status> [context_usage]
Arguments:
todo_file: Path to TODO filetask_id: Task ID (e.g., 'impl_003')status: New status ('pending' | 'complete' | 'blocked')context_usage (optional): Context usage percentageUpdates:
completed_at timestampworkflow_progress.last_taskworkflow_progress.last_updateList and extract archived files.
# List archives
python .claude/skills/workflow-utilities/scripts/archive_manager.py list [directory]
# Extract archive
python .claude/skills/workflow-utilities/scripts/archive_manager.py extract <archive> [output_dir]
Register new workflow in TODO.md master manifest.
python .claude/skills/workflow-utilities/scripts/workflow_registrar.py \
<todo_file> <workflow_type> <slug> [--title TITLE]
Arguments:
todo_file: Path to TODO_*.md fileworkflow_type: Workflow type ('feature' | 'release' | 'hotfix')slug: Workflow slug--title (optional): Workflow title (auto-generated if not provided)Updates:
TODO.md workflows.active[] arrayTODO.md last_update timestampWhen to use:
Archive completed workflow and update TODO.md manifest.
python .claude/skills/workflow-utilities/scripts/workflow_archiver.py \
<todo_file> [--summary SUMMARY] [--version VERSION]
Arguments:
todo_file: Path to TODO_*.md file to archive--summary (optional): Summary of what was completed--version (optional): Semantic version (e.g., '1.5.0')Actions:
When to use:
Synchronize TODO.md manifest with filesystem state.
# Preview changes
python .claude/skills/workflow-utilities/scripts/sync_manifest.py --dry-run
# Sync TODO.md
python .claude/skills/workflow-utilities/scripts/sync_manifest.py
Actions:
When to use:
Warning: Replaces TODO.md arrays with filesystem state. Manual metadata edits may be lost.
Provides unified interface for GitHub and Azure DevOps operations via CLI adapters.
Purpose:
Location: .claude/skills/workflow-utilities/scripts/vcs/
Key files:
provider.py - Auto-detect VCS provider from git remote URLbase_adapter.py - Base adapter interface (abstract methods)github_adapter.py - GitHub CLI (gh) adapter implementationazure_adapter.py - Azure DevOps CLI (az) adapter implementationconfig.py - VCS configurationProvider Detection:
from .vcs.provider import detect_from_remote, VCSProvider
# Auto-detect from git remote
provider = detect_from_remote()
# Returns: VCSProvider.GITHUB or VCSProvider.AZURE_DEVOPS
# Manual detection from URL
provider = detect_from_url("https://github.com/user/repo.git")
# Returns: VCSProvider.GITHUB
Base Adapter Interface:
All adapters implement these methods:
class BaseVCSAdapter(ABC):
@abstractmethod
def create_pr(self, title: str, body: str, source_branch: str, target_branch: str) -> str:
"""Create pull request, returns PR URL."""
pass
@abstractmethod
def fetch_pr_comments(self, pr_number: int) -> list:
"""Fetch review comments from a pull request.
Returns:
List of comment dictionaries with keys:
- author: Comment author
- body: Comment text
- file: File path (if file comment)
- line: Line number (if file comment)
- created_at: Comment timestamp
"""
pass
@abstractmethod
def update_pr(self, pr_number: int, title: str = None, body: str = None) -> None:
"""Update pull request title or description."""
pass
@abstractmethod
def get_pr_status(self, pr_number: int) -> dict:
"""Get pull request status (approval, merge state).
Returns:
Dictionary with keys:
- state: PR state (open/closed/merged)
- mergeable: Boolean indicating if PR can be merged
- approved: Boolean indicating if PR is approved
- reviews_required: Number of approvals required
"""
pass
GitHub Adapter (github_adapter.py):
Uses GitHub CLI (gh) for all operations.
from .vcs.github_adapter import GitHubAdapter
adapter = GitHubAdapter()
# Create PR
pr_url = adapter.create_pr(
title="feat: auth system (v1.6.0)",
body="PR body content",
source_branch="feature/20251103T143000Z_auth",
target_branch="contrib/stharrold"
)
# Returns: "https://github.com/user/repo/pull/94"
# Fetch PR comments
comments = adapter.fetch_pr_comments(94)
# Returns: [
# {
# 'author': 'reviewer1',
# 'body': 'Please add error handling here',
# 'file': 'src/auth.py',
# 'line': 42,
# 'created_at': '2025-11-08T10:30:00Z'
# },
# ...
# ]
# Update PR
adapter.update_pr(94, title="feat: auth system (v1.7.0)")
# Get PR status
status = adapter.get_pr_status(94)
# Returns: {
# 'state': 'open',
# 'mergeable': True,
# 'approved': True,
# 'reviews_required': 1
# }
Azure DevOps Adapter (azure_adapter.py):
Uses Azure CLI (az) for all operations.
from .vcs.azure_adapter import AzureDevOpsAdapter
adapter = AzureDevOpsAdapter()
# Create PR
pr_url = adapter.create_pr(
title="feat: auth system (v1.6.0)",
body="PR body content",
source_branch="feature/20251103T143000Z_auth",
target_branch="contrib/stharrold"
)
# Returns: "https://dev.azure.com/org/project/_git/repo/pullrequest/94"
# Fetch PR comments (threads)
comments = adapter.fetch_pr_comments(94)
# Returns: [
# {
# 'author': '[email protected]',
# 'body': 'Please add error handling here',
# 'file': 'src/auth.py',
# 'line': 42,
# 'created_at': '2025-11-08T10:30:00Z',
# 'status': 'active' # Azure-specific: active/pending/resolved
# },
# ...
# ]
# Update PR
adapter.update_pr(94, title="feat: auth system (v1.7.0)")
# Get PR status
status = adapter.get_pr_status(94)
# Returns: {
# 'state': 'active', # Azure-specific: active/completed/abandoned
# 'mergeable': True,
# 'approved': True,
# 'reviews_required': 2
# }
PR Feedback Methods (Added v5.2.0):
Three new methods for PR feedback handling:
fetch_pr_comments(pr_number)
gh pr view --json reviews,commentsaz repos pr show --query threadsgenerate_work_items_from_pr.py to extract unresolved conversationsupdate_pr(pr_number, title, body)
gh pr editaz repos pr updateget_pr_status(pr_number)
gh pr view --json state,mergeable,reviewsaz repos pr show --query status,mergeStatusIntegration Example (from git-workflow-manager):
from pathlib import Path
import sys
# Add vcs module to path
vcs_path = Path('.claude/skills/workflow-utilities/scripts')
sys.path.insert(0, str(vcs_path))
from vcs.provider import detect_from_remote, VCSProvider
from vcs.github_adapter import GitHubAdapter
from vcs.azure_adapter import AzureDevOpsAdapter
# Auto-detect provider
provider = detect_from_remote()
# Initialize adapter
if provider == VCSProvider.GITHUB:
adapter = GitHubAdapter()
elif provider == VCSProvider.AZURE_DEVOPS:
adapter = AzureDevOpsAdapter()
else:
raise ValueError(f"Unsupported VCS provider: {provider}")
# Fetch unresolved PR comments
comments = adapter.fetch_pr_comments(94)
unresolved = [c for c in comments if not c.get('resolved', False)]
# For each unresolved comment, create work-item
for i, comment in enumerate(unresolved, start=1):
# ... create GitHub issue or Azure DevOps task
pass
When to use VCS abstraction:
Key features:
import subprocess
# Deprecate old implementation files
subprocess.run([
'python',
'.claude/skills/workflow-utilities/scripts/deprecate_files.py',
'TODO_feature_20251022T143022Z_json-validator.md',
'old-validator',
'src/old_validator.py',
'tests/test_old_validator.py'
], check=True)
import subprocess
# Create planning directory with standard structure
subprocess.run([
'python',
'.claude/skills/workflow-utilities/scripts/directory_structure.py',
'planning/json-validator'
], check=True)
import subprocess
# Mark task as complete
subprocess.run([
'python',
'.claude/skills/workflow-utilities/scripts/todo_updater.py',
'TODO_feature_20251022T143022Z_json-validator.md',
'impl_003',
'complete',
'35' # context usage percentage
], check=True)
import subprocess
# Register new workflow in TODO.md (Phase 1/2)
subprocess.run([
'python',
'.claude/skills/workflow-utilities/scripts/workflow_registrar.py',
'TODO_feature_20251103T143000Z_auth.md',
'feature',
'auth',
'--title', 'User Authentication System'
], check=True)
# Archive completed workflow (Phase 4.3)
subprocess.run([
'python',
'.claude/skills/workflow-utilities/scripts/workflow_archiver.py',
'TODO_feature_20251103T143000Z_auth.md',
'--summary', 'Implemented OAuth2 authentication with Google and GitHub',
'--version', '1.5.0'
], check=True)
# Sync TODO.md with filesystem (recovery)
subprocess.run([
'python',
'.claude/skills/workflow-utilities/scripts/sync_manifest.py'
], check=True)
All directories created by these utilities follow the standard structure:
directory/
├── CLAUDE.md # Context for Claude Code
├── README.md # Human-readable documentation
└── ARCHIVED/ # Deprecated files (except if directory IS archived)
├── CLAUDE.md
└── README.md
All skills can use these helper functions:
# Example from bmad-planner
from pathlib import Path
import subprocess
def create_planning_with_structure(feature_name):
"""Create planning directory with standard structure."""
planning_dir = Path('planning') / feature_name
# Create directory structure
subprocess.run([
'python',
'.claude/skills/workflow-utilities/scripts/directory_structure.py',
str(planning_dir)
], check=True)
# Now create planning documents
# ...
development
Orchestrates git workflow for Python feature/release/hotfix development. Loads and coordinates other skills based on current context. Includes PR feedback handling via work-item generation. Use when: - User says "next step?" or "continue workflow" - Working in git repo with TODO_[feature|release|hotfix]_*.md files - Need to determine workflow phase and load appropriate skills - Handling PR feedback via work-items Triggers: next step, continue, what's next, workflow status, PR feedback Coordinates: tech-stack-adapter, git-workflow-manager, bmad-planner, speckit-author, quality-enforcer, workflow-utilities Context management: Prompt user to run /context when context usage is high, then /init to reset before continuing workflow.
development
Detects Python project configuration and provides commands for testing, building, coverage, and containerization. Use when: Starting workflow, detecting project stack, need TEST_CMD Triggers: detect stack, what commands, initial setup Outputs: TEST_CMD, BUILD_CMD, COVERAGE_CMD, COVERAGE_CHECK, MIGRATE_CMD
testing
Creates SpecKit specifications (spec.md, plan.md) in feature/release/hotfix worktrees. Detailed implementation guidance. Use when: In worktree, need specifications, implementation planning Triggers: write spec, create plan, feature specification
development
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.