Skip to content

feat(skills): add title tag normalization maintainer skill - #2292

Merged
ericksoa merged 4 commits into
mainfrom
feat/normalize-title-tags-skill
Apr 23, 2026
Merged

ericksoa merged 4 commits into
mainfrom
feat/normalize-title-tags-skill

Conversation

@cv

@cv cv commented Apr 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

Add a maintainer skill for normalizing bracketed NemoClaw tags in issue and PR titles. The skill provides a dry-run workflow, a reusable TypeScript helper that matches tags case-insensitively anywhere in the title, and verification guidance so maintainers can apply the cleanup safely.

Changes

  • Add .agents/skills/nemoclaw-maintainer-normalize-title-tags/SKILL.md with a dry-run-first workflow for previewing, applying, and verifying title tag cleanup
  • Add .agents/skills/nemoclaw-maintainer-normalize-title-tags/scripts/normalize-title-tags.ts to find and remove bracketed nemoclaw tags case-insensitively from GitHub issue and PR titles
  • Update .agents/skills/nemoclaw-skills-guide/SKILL.md to include the new maintainer skill in the catalog

Type of Change

  • Code change (feature, bug fix, or refactor)
  • Code change with doc updates
  • Doc only (prose changes, no code sample modifications)
  • Doc only (includes code sample changes)

Verification

  • npx prek run --all-files passes
  • npm test passes
  • Tests added or updated for new or changed behavior
  • No secrets, API keys, or credentials committed
  • Docs updated for user-facing behavior changes
  • make docs builds without warnings (doc changes only)
  • Doc pages follow the style guide (doc changes only)
  • New doc pages include SPDX header and frontmatter (new pages only)

AI Disclosure

  • AI-assisted — tool: OpenAI Codex

Signed-off-by: Carlos Villela cvillela@nvidia.com

Summary by CodeRabbit

  • New Features

    • Added a new maintainer skill to preview and bulk remove bracketed title tags containing "NemoClaw" from GitHub issues and pull requests, with dry-run preview and optional apply execution modes.
  • Documentation

    • Added comprehensive documentation for the new title-tag normalization skill with step-by-step usage instructions and behavioral guidelines.

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
@cv cv self-assigned this Apr 22, 2026
@coderabbitai

coderabbitai Bot commented Apr 22, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

A new maintainer skill for normalizing GitHub issue and PR title bracket tags is introduced, consisting of documentation, a TypeScript script that integrates with GitHub CLI to scan and optionally remove bracket-enclosed nemoclaw tags from titles, and an updated skills guide reflecting the addition.

Changes

Cohort / File(s) Summary
New Skill Implementation
.agents/skills/nemoclaw-maintainer-normalize-title-tags/SKILL.md, .agents/skills/nemoclaw-maintainer-normalize-title-tags/scripts/normalize-title-tags.ts
Introduces a new maintainer skill with documentation describing a workflow for previewing and applying bulk cleanup of bracketed nemoclaw title tags from GitHub issues/PRs, plus a TypeScript script that scans titles via gh api, identifies matching tags (case-insensitive), outputs a dry-run summary, and optionally applies patches and verifies changes.
Skills Guide Update
.agents/skills/nemoclaw-skills-guide/SKILL.md
Adds the new nemoclaw-maintainer-normalize-title-tags skill to the maintainer bucket, incrementing maintainer skill count from 17 to 18.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 A rabbit hops through titles grand,
With brackets neat, the tags expand—
But now we brush them all away,
Normalize the GitHub day!
Nemoclaw tags? Begone, I say,
Fresh and tidy titles play! 🎉

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat(skills): add title tag normalization maintainer skill' clearly and concisely summarizes the main change: adding a new maintainer skill for normalizing title tags.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/normalize-title-tags-skill

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (3)
.agents/skills/nemoclaw-maintainer-normalize-title-tags/scripts/normalize-title-tags.ts (3)

100-108: Consider validating the --repo format.

The --repo argument accepts any string but the GitHub API expects OWNER/REPO format. Invalid formats will fail at API call time with a less clear error.

💡 Optional format validation
     if (arg === "--repo") {
       const value = argv[i + 1];
       if (!value || value.startsWith("--")) {
         throw new Error("--repo requires OWNER/REPO");
       }
+      if (!/^[\w.-]+\/[\w.-]+$/.test(value)) {
+        throw new Error("--repo must be in OWNER/REPO format");
+      }
       options.repo = value;
       i += 1;
       continue;
     }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
@.agents/skills/nemoclaw-maintainer-normalize-title-tags/scripts/normalize-title-tags.ts
around lines 100 - 108, The --repo parsing currently accepts any string; add
validation after assigning options.repo to ensure it matches OWNER/REPO (e.g.
one non-empty segment, a single slash, then another non-empty segment). In the
normalize-title-tags.ts command-line parsing block (the branch that checks arg
=== "--repo" and sets options.repo), validate options.repo against a simple
pattern like "^[^/]+/[^/]+$" and if it fails throw a clear Error("--repo
requires OWNER/REPO") (or augment the existing message) so invalid values are
rejected early with a helpful message.

76-78: Consider handling JSON parse errors more gracefully.

If gh api returns an error response or malformed JSON, JSON.parse will throw a generic SyntaxError. Wrapping this with a try-catch to provide a more descriptive error message would improve debuggability.

💡 Optional improvement
 function ghJson(args: string[]): unknown {
-  return JSON.parse(run("gh", args));
+  const output = run("gh", args);
+  try {
+    return JSON.parse(output);
+  } catch {
+    throw new Error(`Failed to parse GitHub API response: ${output.slice(0, 200)}`);
+  }
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
@.agents/skills/nemoclaw-maintainer-normalize-title-tags/scripts/normalize-title-tags.ts
around lines 76 - 78, The ghJson function currently calls JSON.parse(run("gh",
args)) which will throw a generic SyntaxError on malformed or error responses;
wrap the parse call in a try-catch inside ghJson, capture the raw output from
run("gh", args), and on parse failure throw or return a new Error that includes
a clear message with the failing args (args), the raw output, and the original
error (e.g., `new Error(\`ghJson parse failed for args=${JSON.stringify(args)}:
${err.message} - output=${raw}\`)`) so callers can diagnose API errors more
easily while preserving the original error information.

254-266: Consider rate limiting and partial failure handling.

When applying changes to many items, rapid sequential API calls could trigger GitHub's secondary rate limits. Additionally, if a PATCH fails mid-way, the script exits without reporting which items were successfully updated.

💡 Optional: Add delay and track successful updates
-function applyMatches(options: Options, matches: Match[]): void {
+function applyMatches(options: Options, matches: Match[]): number {
+  let updated = 0;
   for (const match of matches) {
-    run("gh", [
-      "api",
-      "-X",
-      "PATCH",
-      `repos/${options.repo}/issues/${match.number}`,
-      "-f",
-      `title=${match.newTitle}`,
-    ]);
-    console.log(`UPDATED #${match.number}: ${match.oldTitle} -> ${match.newTitle}`);
+    try {
+      run("gh", [
+        "api",
+        "-X",
+        "PATCH",
+        `repos/${options.repo}/issues/${match.number}`,
+        "-f",
+        `title=${match.newTitle}`,
+      ]);
+      console.log(`UPDATED #${match.number}: ${match.oldTitle} -> ${match.newTitle}`);
+      updated += 1;
+    } catch (error) {
+      console.error(`FAILED #${match.number}: ${error instanceof Error ? error.message : error}`);
+    }
   }
+  return updated;
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
@.agents/skills/nemoclaw-maintainer-normalize-title-tags/scripts/normalize-title-tags.ts
around lines 254 - 266, The applyMatches function currently fires run("gh", ...)
calls in a tight loop which can hit GitHub secondary rate limits and stops on
the first failure; modify applyMatches to perform each PATCH inside a try/catch
around run, implement a small delay/throttle between iterations (e.g.,
sleep/backoff) to avoid rate limiting, record successes and failures (e.g.,
arrays of match.number or Match objects) so you can report which items were
updated and which failed, and optionally implement a simple retry for transient
errors before marking a failure; reference applyMatches, Match, Options, and the
run call to locate where to add the delay, error handling, retry and final
reporting/logging instead of unguarded console.log.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In
@.agents/skills/nemoclaw-maintainer-normalize-title-tags/scripts/normalize-title-tags.ts:
- Around line 100-108: The --repo parsing currently accepts any string; add
validation after assigning options.repo to ensure it matches OWNER/REPO (e.g.
one non-empty segment, a single slash, then another non-empty segment). In the
normalize-title-tags.ts command-line parsing block (the branch that checks arg
=== "--repo" and sets options.repo), validate options.repo against a simple
pattern like "^[^/]+/[^/]+$" and if it fails throw a clear Error("--repo
requires OWNER/REPO") (or augment the existing message) so invalid values are
rejected early with a helpful message.
- Around line 76-78: The ghJson function currently calls JSON.parse(run("gh",
args)) which will throw a generic SyntaxError on malformed or error responses;
wrap the parse call in a try-catch inside ghJson, capture the raw output from
run("gh", args), and on parse failure throw or return a new Error that includes
a clear message with the failing args (args), the raw output, and the original
error (e.g., `new Error(\`ghJson parse failed for args=${JSON.stringify(args)}:
${err.message} - output=${raw}\`)`) so callers can diagnose API errors more
easily while preserving the original error information.
- Around line 254-266: The applyMatches function currently fires run("gh", ...)
calls in a tight loop which can hit GitHub secondary rate limits and stops on
the first failure; modify applyMatches to perform each PATCH inside a try/catch
around run, implement a small delay/throttle between iterations (e.g.,
sleep/backoff) to avoid rate limiting, record successes and failures (e.g.,
arrays of match.number or Match objects) so you can report which items were
updated and which failed, and optionally implement a simple retry for transient
errors before marking a failure; reference applyMatches, Match, Options, and the
run call to locate where to add the delay, error handling, retry and final
reporting/logging instead of unguarded console.log.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: bbb1fb54-9c20-4645-a5eb-6a0ec8941975

📥 Commits

Reviewing files that changed from the base of the PR and between d50452a and f63f7ab.

📒 Files selected for processing (3)
  • .agents/skills/nemoclaw-maintainer-normalize-title-tags/SKILL.md
  • .agents/skills/nemoclaw-maintainer-normalize-title-tags/scripts/normalize-title-tags.ts
  • .agents/skills/nemoclaw-skills-guide/SKILL.md

@jyaunches

Copy link
Copy Markdown
Contributor

Heads up — the pr-self-hosted test-e2e-sandbox failure was a runner environment issue, not your code. Fixed in #2294 (merged). Rebase onto main or push a new commit to pick up the fix and get a green run.

@ericksoa ericksoa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean utility — dry-run default, post-apply verification, case-insensitive matching. LGTM.

@ericksoa
ericksoa merged commit 5fec344 into main Apr 23, 2026
13 checks passed
@cv
cv deleted the feat/normalize-title-tags-skill branch May 27, 2026 21:16
@wscurran wscurran added feature PR adds or expands user-visible functionality area: skills Skills, agent behaviors, prompts, or skill packaging area: project-management Taxonomy, triage, workflow, roadmap, or project process and removed project management labels Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: project-management Taxonomy, triage, workflow, roadmap, or project process area: skills Skills, agent behaviors, prompts, or skill packaging feature PR adds or expands user-visible functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants