Skip to content

docs(commit): Add agent-specific Co-Authored-By attribution#72

Open
philprime wants to merge 1 commit intomainfrom
philprime/fix-ai-attribution-in-commit
Open

docs(commit): Add agent-specific Co-Authored-By attribution#72
philprime wants to merge 1 commit intomainfrom
philprime/fix-ai-attribution-in-commit

Conversation

@philprime
Copy link
Member

Replace the hardcoded Claude attribution in the commit skill's
"AI-Generated Changes" section with a mapping table that supports
multiple agents (Claude Code, Cursor).

Previously, the skill always instructed agents to use
Co-Authored-By: Claude <noreply@anthropic.com> regardless of which
agent was executing the skill. This was incorrect when used from Cursor
or other non-Claude agents. The new table lets each agent infer the
correct attribution from its own runtime context.

Replace the hardcoded Claude attribution in the AI-Generated Changes
section with a mapping table that covers multiple agents (Claude Code,
Cursor). The executing agent should infer the correct attribution from
its own runtime context rather than always using Claude's.

Co-Authored-By: Cursor <noreply@cursor.com>
@philprime philprime marked this pull request as ready for review February 27, 2026 08:40
| Claude Code | `Co-Authored-By: Claude <noreply@anthropic.com>` |
| Cursor | `Co-Authored-By: Cursor <noreply@cursor.com>` |

Infer the correct agent from your own runtime context — do not ask the user which agent they are using.
Copy link

Choose a reason for hiding this comment

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

Bug: The new agent attribution table is incomplete, missing entries for agents like Cline and GitHub Copilot which are documented as supported in the README.
Severity: HIGH

Suggested Fix

Either expand the table to include all officially supported agents mentioned in the README (like Cline and GitHub Copilot), or adopt a more flexible pattern that doesn't require a hardcoded list. For example, instruct the agent to use its own name and a placeholder email, similar to the pattern found in agents-md/SKILL.md.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: plugins/sentry-skills/skills/commit/SKILL.md#L93

Potential issue: The `commit` skill uses a hardcoded table for `Co-Authored-By`
attribution that only includes 'Claude Code' and 'Cursor'. However, the project's README
states support for additional agents like 'Cline' and 'GitHub Copilot'. When an agent
not listed in the table executes this skill, it cannot find its attribution string. The
skill's instructions explicitly forbid asking the user for this information, leaving the
agent with no way to generate the correct `Co-Authored-By` line. This will result in
incorrect or missing commit attribution for any supported agent not present in the
table.

Did we get this right? 👍 / 👎 to inform future reviews.

@dcramer
Copy link
Member

dcramer commented Mar 4, 2026

there's something we do in agents.md that might be a better pattern to follow here vs the explicit mapping

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants