Skip to content

[refactoring] Extract "Safe Outputs Bot Identity Messages" into shared component #15035

@github-actions

Description

@github-actions

Skill Overview

A common pattern across workflows is the configuration of bot identity messages in safe-outputs. These messages provide consistent, professional communication when workflows interact with users through GitHub comments and status updates.

Why this should be shared: Currently, 31 workflows manually configure these message templates with slight variations. This creates inconsistency in bot communication style and makes it difficult to update messaging globally. A shared component would ensure all workflows use consistent, professional messaging.

Current Usage

This skill appears in the following workflows (sample of 10):

  • bot-detection.md - "🤖 Bot detection analysis by..."
  • security-guard.md - "🛡️ Security posture analysis by..."
  • archie.md - Bot identity messages
  • brave.md - Bot identity messages
  • breaking-change-checker.md - Bot identity messages
  • ci-doctor.md - Bot identity messages
  • cloclo.md - Bot identity messages
  • craft.md - Bot identity messages
  • daily-fact.md - Bot identity messages
  • delight.md - Bot identity messages

Total: 31 workflows use this pattern

Proposed Shared Component

File: .github/workflows/shared/bot-identity-messages.md

Configuration:

---
safe-outputs:
  messages:
    footer: "> 🤖 *Analysis by [{workflow_name}]({run_url})*"
    run-started: "🔄 [{workflow_name}]({run_url}) is analyzing..."
    run-success: "✅ [{workflow_name}]({run_url}) completed analysis."
    run-failure: "⚠️ [{workflow_name}]({run_url}) {status} during analysis."
---

# Bot Identity Messages

This shared component provides consistent bot identity messaging for workflows that interact with users through comments and status updates.

### Message Templates

The following message templates are configured:

- **footer**: Appears at the bottom of all bot comments
- **run-started**: Posted when the workflow begins
- **run-success**: Posted when the workflow completes successfully
- **run-failure**: Posted when the workflow encounters an error

### Customization

Workflows can override these defaults by providing their own `safe-outputs.messages` configuration. The shared component provides sensible defaults that work for most analysis and automation workflows.

### Best Practices

- Keep footer messages concise and professional
- Use emojis sparingly (one per message type)
- Include workflow name and run URL for traceability
- Use consistent tone across all message types

Usage Example:

# In a workflow
imports:
  - shared/bot-identity-messages.md

safe-outputs:
  add-comment:
    max: 1
  # Messages are inherited from shared component
  # Override if needed:
  # messages:
  #   footer: "> 🔍 *Custom footer*"

Impact

  • Workflows affected: 31 workflows
  • Lines saved: ~20-30 lines per workflow = 620-930 total lines
  • Maintenance benefit:
    • Single location to update bot messaging style
    • Ensures consistent professional communication
    • Reduces copy-paste errors in message templates
    • Makes it easy to add new message types (e.g., run-warning, run-skipped)

Implementation Plan

  1. Create shared component at .github/workflows/shared/bot-identity-messages.md
  2. Define default message templates for common bot interactions
  3. Update 5-10 high-traffic workflows as proof-of-concept
  4. Document override patterns for workflows needing custom messages
  5. Gradually migrate remaining workflows
  6. Monitor for consistency and adjust templates based on feedback

Example Before/After

Before (in every workflow):

safe-outputs:
  add-comment:
    max: 1
  messages:
    footer: "> 🤖 *Bot detection analysis by [{workflow_name}]({run_url})*"
    run-started: "🔍 [{workflow_name}]({run_url}) is analyzing account activity..."
    run-success: "✅ [{workflow_name}]({run_url}) completed bot detection analysis."
    run-failure: "⚠️ [{workflow_name}]({run_url}) {status} during bot detection."

After (in every workflow):

imports:
  - shared/bot-identity-messages.md

safe-outputs:
  add-comment:
    max: 1
  # Messages inherited from shared component

Related Analysis

This recommendation comes from the Workflow Skill Extractor analysis run on 2026-02-11. See the full analysis report in discussions.

Design Notes

Flexibility: Workflows can still override messages when needed for specialized communication patterns (e.g., security alerts need different tone).

Consistency: The default templates follow established patterns:

  • Use emojis strategically (one per message)
  • Include workflow name and run URL for traceability
  • Use professional, friendly tone
  • Keep messages concise

Evolution: As new message types are needed (e.g., rate-limiting warnings, permission issues), they can be added to the shared component and immediately available to all workflows.

AI generated by Workflow Skill Extractor

  • expires on Feb 14, 2026, 12:05 AM UTC

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions