Get the FREE Ultimate OpenClaw Setup Guide →

hotfix

npx machina-cli add skill skullninja/coco-workflow/hotfix --openclaw
Files (1)
SKILL.md
3.9 KB

Coco Hotfix Skill

Lightweight workflow for single-issue fixes and small changes that don't warrant full epic tracking.

When to Use

  • Bug fixes that affect a single area
  • Small enhancements (< 1 day of work)
  • Quick changes where dependency tracking isn't needed
  • Any work that maps to a single issue tracker entry

For multi-session features with dependencies, use the execute skill instead.

Workflow

1. Setup

Read .coco/config.yaml for issue tracker configuration.

If $ARGUMENTS contains an issue key/ID, load it. Otherwise, create a new issue:

If "linear":

Use: mcp__plugin_linear_linear__create_issue
Parameters:
  title: "{fix description}"
  team: {from config}
  labels: {from config}
  state: "In Progress"

If "github":

gh issue create --title "{fix description}" --label {labels}

If github.use_projects is true: check .coco/state/gh-projects.json for an active feature project. If one exists, add the issue to it and set status to "In Progress":

gh project item-add {project_number} --owner {github.owner} --url {issue_url}
gh project item-edit --project-id {project_id} --id {item_id} --field-id {status_field_id} --single-select-option-id {status_options["In Progress"]}

If "none": Skip issue creation.

2. Create Branch

git checkout -b fix/{short-name}

3. Implement Fix

  • Understand the issue (read related code, reproduce if bug)
  • Write tests if appropriate (especially for bugs -- reproduce the bug in a test first)
  • Implement the fix
  • Run test suite to verify no regressions

4. Pre-Commit Validation

Check pre_commit.ui_patterns from config against staged files. If matches found and pre-commit-tester agent is configured, invoke it.

5. Commit

git add {specific-files}
git commit -m "$(cat <<'EOF'
{fix description}. Completes {issue_key}

{What was wrong and how it was fixed}

Co-Authored-By: Claude <noreply@anthropic.com>
EOF
)"

6. Create PR and Review

Read pr config from .coco/config.yaml.

If pr.enabled:

git push -u origin fix/{short-name}
gh pr create --base main --head fix/{short-name} --title "{issue_key}: {fix description}" --body-file - <<'EOF'
## Fix Summary

{What was wrong and how it was fixed}

Resolves {issue_key}

## Test Results

{test output summary}
EOF

If github.use_projects is true and the issue was added to a project, add the PR to the project board:

gh pr view --json url -q .url

Use the URL from the output:

gh project item-add {project_number} --owner {github.owner} --url "{PR_URL}"

If pr.review.enabled:

  • Invoke code-reviewer agent on the PR
  • If CHANGES REQUESTED: fix critical findings, push, re-review (same loop as /coco:execute)
  • After approval: merge PR
gh pr merge {pr-number} --{pr.issue_merge_strategy} --delete-branch

If pr.enabled is false:

  • Push branch and suggest creating a PR manually

7. Update Issue Tracker

Triggered by PR merge (or by commit if PRs disabled). This is when the issue resolves.

If "linear":

  • Update state to status_map.completed (default: "Done")
  • Add implementation summary to issue description
  • Post comment with details

If "github":

  • Add comment with fix details
  • Closes #N in PR body auto-closes the issue (if using PRs)
  • If github.use_projects is true and the issue was added to a project: set status to "Done":
    gh project item-edit --project-id {project_id} --id {item_id} --field-id {status_field_id} --single-select-option-id {status_options["Done"]}
    

If "none": Skip

8. Report

Output:

  • Branch name
  • Issue key (if created)
  • PR number (if created)
  • Commit hash
  • Files changed

Source

git clone https://github.com/skullninja/coco-workflow/blob/main/skills/hotfix/SKILL.mdView on GitHub

Overview

Hotfix provides a lightweight, single-issue workflow for quick fixes and small changes that don’t warrant full epic tracking. It creates a fix branch, implements the change, commits with an issue-tracked message, and closes the issue when the work is merged.

How This Skill Works

Setup reads the issue tracker config (.coco/config.yaml) and loads an existing issue if an ID is provided, or creates a new one using either the linear plugin or GitHub, or skips issue creation entirely. A branch named fix/{short-name} is created, the fix is implemented and tested, and pre-commit validations are run. The fix is committed with a message that includes the issue key, a PR is opened and reviewed, and the issue tracker is updated on merge.

When to Use It

  • Bug fixes that affect a single area
  • Small enhancements (< 1 day of work)
  • Quick changes where dependency tracking isn't needed
  • Any work that maps to a single issue tracker entry
  • For multi-session features with dependencies, use the execute skill instead

Quick Start

  1. Step 1: Read .coco/config.yaml to determine issue tracking (linear, github, or none) and load or create an issue accordingly
  2. Step 2: Create the branch with: git checkout -b fix/{short-name}, implement the fix, run tests and pre-commit validations
  3. Step 3: Stage and commit with a multi-line message including the fix description and issue key, push, create a PR, and update the issue tracker on merge

Best Practices

  • Keep the issue key in commit messages and PR titles
  • Follow the configured issue creation flow (linear or github)
  • Name branches clearly: fix/{short-name}
  • Run tests and pre-commit validations before committing
  • Update the issue tracker and PRs on merge

Example Use Cases

  • Fix a bug in the login flow that only impacts a single authentication module
  • Apply a small UI tweak in a single component without touching other features
  • Correct a mislabel in translations for a specific screen
  • Add a focused unit test for a single function to prevent regressions
  • Apply a minor performance tweak in one module without cross-module effects

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers