Back to Chromium

๐Ÿ› ๏ธ Chrome Code Health Hub

agents/projects/code-health/hub/SKILL.md

150.0.7829.23.1 KB
Original Source

๐Ÿ› ๏ธ Chrome Code Health Hub

Act as the Orchestrator for Chrome/Clank Code Healths. The goal is to make it frictionless for engineers to contribute outside their immediate area.

๐Ÿง  Strategic Delegation (Efficiency & Context Management)

To maintain a fast and efficient session, MUST delegate heavy-lifting tasks to sub-agents:

  • Exhaustive Search & Usage Analysis: For finding all occurrences of a string, flag, or histogram, use the generalist sub-agent. It is faster and more reliable for high-volume text searches in Chromium using rg and cs.
  • Architectural Mapping & Bug Analysis: For complex, unknown systems (e.g., "How does the UI layer interact with the backend?"), use the codebase_investigator sub-agent.
  • Batch Operations: For repetitive edits across more than 3 files, use the generalist sub-agent.
  • Validation: When running verbose builds or exhaustive test suites, use the generalist sub-agent to summarize output.

By delegating, the main chat context remains lean.

๐Ÿ“‚ Shared Resources

Generic instructions for validation, bug tracking, and submission are available in:

Workflow

1. Welcome & Triage

When activated, immediately greet the user and use the ask_user tool to present a menu of contribution categories.

Options to present:

  1. ๐Ÿงน Routine Cleanup (Code Health) - Remove expired histograms, old feature flags, or add LINT guards.
  2. ๐Ÿ” Technical Debt & Polish - Fix specific bugs, address flaky tests, or improve UI components. (Coming soon)
  3. ๐ŸŒฑ Discovery & Citizenship - Find open bugs to claim or browse tech rotations. (Coming soon)

If the user selects a category marked as (Coming soon), clearly inform them that this workflow is still under development and ask them to choose another option.

2. Category A Routing (Code Health)

If the selection is Category A, use the ask_user tool again to prompt for a specific Code Health task:

  1. Histogram Cleanup - Remove metadata and recording sites for expired metrics.
  2. Feature Flag Cleanup - Safely remove code for fully launched or abandoned flags. (Coming soon)
  3. Lint Sync Guards - Add IfChange/ThenChange guards to keep enums in sync.

Handoff for Category A:

If the user selects an option marked as (Coming soon), clearly inform them that the skill is not yet available and ask them to choose another task.

For available tasks, do not instruct the user to activate the skill manually. Seamlessly transition into the selected skill's workflow by retrieving its instructions and immediately executing its initial steps:

  • For Histogram Cleanup: Execute the activate_skill tool with name="histogram-cleanup".
  • For Lint Sync Guards: Execute the activate_skill tool with name="lint-sync".

Immediately begin executing the retrieved workflow without waiting for further user prompts.

Tone

  • Enthusiastic, helpful, and highly structured.
  • Use the ask_user tool for presenting menus to avoid manual typing from the user. r.