Commit Graph

48 Commits

Author SHA1 Message Date
lcian d1730c5f6a feat(skills): Add rust-development skill for Rust PR review
Add a skill that reviews Rust code changes against Sentry's Rust
conventions. Covers error handling, iterator patterns, async code,
field visibility, import organization, naming, documentation, and
versioning. Designed to be invoked when validating or finishing a PR.

Based on https://develop.sentry.dev/engineering-practices/rust.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 15:28:18 +01:00
David Cramer 8ac472aae0 feat(skill-creator): Add skill synthesis guide and upstream best practices (#52)
* feat(skill-creator): Synthesize upstream best practices into skill-creator

Research and incorporate patterns from Anthropic's and OpenAI's
skill-creators, the Agent Skills spec, and best practices docs.
Adds planning step, description guidelines, validation script,
Claude Code extension docs, workflow/output patterns, and
expanded anti-patterns.

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

* docs: Add skill synthesis guide

Document the agent-driven workflow for researching upstream
implementations and best practices when creating new skills.
Pairs with the skill-creator skill — synthesis handles research,
skill-creator handles implementation.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-02-18 03:55:37 -08:00
David Cramer 8ab6891ab3 feat(skills): Strengthen commit and create-pr skill descriptions (#47)
Add strong steering to both skill descriptions so they are always
triggered in their respective contexts. Update commit skill to
default to creating a feature branch when on main/master unless
the user explicitly asks otherwise.

Co-authored-by: Claude <noreply@anthropic.com>
2026-02-17 13:04:10 -08:00
David Cramer 87eb794bbb feat(iterate-pr): Distinguish review bots from informational bots (#46)
Review bots (Sentry, Warden, Cursor, Bugbot, CodeQL, etc.) post
actionable code feedback that was being silently ignored because all
bot comments were dumped into a single "bot" bucket. Split bot
classification so review bot feedback flows through LOGAF content
categorization into high/medium/low with a review_bot flag, while
informational bots (Codecov, Dependabot, etc.) remain in the bot
bucket for silent skipping.

Co-authored-by: Claude <noreply@anthropic.com>
2026-02-17 11:36:40 -08:00
Greg Pstrucha 4f25feeb4f feat: add warden-lint-judge skill
Second-pass Warden skill that evaluates first-pass findings and proposes
deterministic lint rules to permanently catch the same patterns. Requires
Warden's multi-pass pipeline (phase 2).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 16:33:24 -08:00
David Cramer 9c0e34277f fix(skills): Standardize allowed-tools format and remove model attribute (#43)
* fix(skills): Standardize allowed-tools to comma-separated format

Claude Code docs specify comma-separated format for allowed-tools.
Update all skill frontmatters, documentation, and the scan_skill.py
parser to use and support comma-separated tool lists.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(skills): Remove model attribute from skill documentation

Skills should not hardcode model overrides — let users control
which model runs their skills.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 14:57:28 -08:00
David Cramer d7d96bd6cd fix(skills): Fix broken frontmatter and remove hardcoded model overrides (#41)
Quote the description in django-access-review to fix YAML parse failure
caused by unescaped colons. Remove hardcoded model overrides from
django-access-review, django-perf-review, security-review, and
code-simplifier so skills use the user's default model.

Co-authored-by: Claude <noreply@anthropic.com>
2026-02-10 12:34:37 -08:00
David Cramer 708bcc5f87 feat(skills): Add skill-scanner skill for agent skill security analysis (#40)
Scan agent skills for prompt injection, malicious scripts, excessive
permissions, secret exposure, and supply chain risks before adoption.
Uses a hybrid approach: Python script for deterministic static analysis
(regex patterns, encoding detection, YAML parsing) and agent for
semantic analysis (intent evaluation, false-positive filtering).

Co-authored-by: Claude <noreply@anthropic.com>
2026-02-10 11:50:51 -08:00
David Cramer c8881564e7 feat(skills): Add skill-creator skill for guided skill authoring (#39)
* feat(skills): Add skill-creator skill for guided skill authoring

Adds a new skill that walks agents through creating skills for this
repository, covering requirements gathering, writing SKILL.md with
proper frontmatter, creating supporting files, and completing all
registration steps.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* ref(skill-creator): Generalize skill to work in any repository

Remove sentry-skills-specific paths and registration steps. The skill
now teaches general Agent Skills spec conventions and defers to the
target repository's CLAUDE.md for project-specific registration.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 11:09:00 -08:00
David Cramer 934d1e8b24 fix directory 2026-02-04 17:53:21 -08:00
David Cramer 2168cd83c1 fix(iterate-pr): Fix regex pattern error and clarify script paths (#37)
- Fix re.PatternError when combining patterns with inline (?i) flags by
  using re.IGNORECASE flag in re.search() instead
- Add note that scripts must run from repository root directory
- Update all script references to use ${CLAUDE_SKILL_ROOT} for full paths

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 12:15:06 -08:00
David Cramer 90fff38a84 fix(iterate-pr): Add PEP 723 requires-python metadata to scripts (#36)
Without explicit Python version metadata, uv defaults to requiring
Python 3.13+, which may not be installed. Adding requires-python = ">=3.9"
ensures compatibility with the Python version the scripts were designed for.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 09:59:53 -08:00
David Cramer d4d8757434 fix(iterate-pr): Handle workflow field as string from gh CLI (#35)
The gh pr checks --json workflow field returns a string, not an object.
The previous code assumed it was a dict with a "name" key, causing an
AttributeError when accessing .get("name") on a string.

Also update SKILL.md to use uv run instead of python directly, and add
skill design guideline to AGENTS.md for consistent script invocation.

Co-authored-by: Claude <noreply@anthropic.com>
2026-02-03 10:05:57 -08:00
David Cramer 569c8b6f0b fix(iterate-pr): Add future annotations for Python 3.9 compatibility
The union syntax (dict | list) requires Python 3.10+. Adding
`from __future__ import annotations` enables this syntax on 3.7+.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-02-02 18:26:49 -08:00
David Cramer 3d3c0689e7 feat(iterate-pr): Add scripts for structured CI and feedback data (#34)
* feat(iterate-pr): Add scripts for structured CI and feedback data

Add helper scripts that pre-process GitHub API data to reduce token
usage and improve feedback categorization:

- fetch_pr_checks.py: Fetches CI checks and extracts relevant failure
  snippets using pattern matching instead of full logs
- fetch_pr_feedback.py: Categorizes PR feedback as blocking, suggestion,
  bot, or resolved

Update SKILL.md to:
- Reference the optional helper scripts with fallback to gh commands
- Add Step 6 for handling subjective feedback with user prompts
- Present suggestion-type feedback as numbered list for user selection

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

* ref(iterate-pr): Make scripts primary, reduce verbosity

Restructure SKILL.md to follow OpenAI skill patterns:
- Scripts are now the primary approach, not optional
- Reduced from 185 to 131 lines by removing redundant gh CLI docs
- Moved fallback commands to a single section at the end
- Clearer workflow with numbered steps

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

* feat(iterate-pr): Support LOGAF scale for feedback categorization

Update fetch_pr_feedback.py to detect and use Sentry's LOGAF scale:
- h: / [h] / high: → high priority (must fix)
- m: / [m] / medium: → medium priority (should fix)
- l: / [l] / low: → low priority (optional)

Categories renamed from blocking/suggestion to high/medium/low to
align with Sentry's code review guidelines.

Refs: https://develop.sentry.dev/engineering-practices/code-review/#logaf-scale

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-02-02 18:23:51 -08:00
Greg Pstrucha 6cddc6e044 fix(code-simplifier): Move attribution comment after frontmatter
YAML frontmatter must be at the very beginning of the file for parsers
to detect it correctly.
2026-01-31 15:18:58 -08:00
Greg Pstrucha 818d59c6a2 feat(code-simplifier): Add code-simplifier as skill for Warden
Sync the code-simplifier agent as a skill to make it directly usable in
Warden. Adds SKILL.md with frontmatter, examples, and refinement
principles based on Anthropic's official code-simplifier agent.
2026-01-31 15:06:22 -08:00
Greg Pstrucha 899fc7be1d fix(django-perf-review): Allow missing select_related as LOW finding
Remove from "What NOT to Report" - can be useful feedback if reported
with appropriate low severity.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-30 13:51:46 -08:00
Greg Pstrucha 0f49005b49 fix(django-perf-review): Fix JSON syntax and remove micro-optimization
- Add missing quotes around skill name in JSON example
- Remove "Missing Prefetch on Single Object" category - 2 queries vs 1
  on a single fetch is a micro-optimization not worth reporting
- Add explicit guidance in "What NOT to Report" section

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-30 13:11:42 -08:00
Greg Pstrucha cd0ec45a83 feat(django-perf-review): Add Django performance review skill
Add skill for reviewing Django code for validated performance issues:
- N+1 queries with full data flow tracing
- Unbounded querysets and pagination
- Missing database indexes
- Write loops (bulk_create/update patterns)
- Missing prefetch on single object fetches

Includes validation requirements and false positive guidance to ensure
only real, impactful issues are reported.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-30 13:01:51 -08:00
Greg Pstrucha 42ad74e89f Expand security review 2026-01-29 15:20:12 -08:00
David Cramer 70e209a3ba fix(security-review): Move frontmatter to start of file
The skills CLI parser expects YAML frontmatter to be at the very
beginning of the file. The HTML attribution comment was preventing
the skill from being detected.

Also updated docs to clarify frontmatter positioning requirements.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 12:58:18 -08:00
David Cramer dd0e2234f6 feat(security-review): Add security review skill with OWASP references
Add a focused security code review skill that evaluates specific files
or changes against OWASP vulnerability patterns.

Features:
- 10 security categories: Injection, XSS, Auth, Authorization, Crypto,
  Data Exposure, SSRF, Deserialization, File Operations, Modern Threats
- Reference files with detailed patterns and remediation guidance
- Reports only actual vulnerabilities, not best-practice suggestions
- Focused on single file/change review, not codebase mapping

Reference material derived from OWASP Cheat Sheet Series (CC BY-SA 4.0).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 11:51:37 -08:00
David Cramer e88725d074 fix(create-pr): Create draft PRs and skip repo templates (#27)
Create PRs in draft state by default, giving authors time to review
before requesting feedback. Skip fetching repository PR templates in
favor of the skill's own consistent format.

Co-authored-by: Claude <noreply@anthropic.com>
2026-01-27 14:58:46 -08:00
Josh Ferge 9024c783a8 feat: Add doc-coauthoring skill
Add the doc-coauthoring skill from anthropics/skills to help Sentry
employees with structured documentation workflows for proposals,
technical specs, decision docs, and similar content.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 15:22:27 -05:00
David Cramer a5c3762d7a feat: Add brand-guidelines skill for Sentry brand guidelines (#25)
Add a new skill that helps write copy following Sentry's brand
guidelines. Covers both Plain Speech (default for UI) and Sentry Voice
(personality-rich) tones, with guidance on tone selection, word choices,
dash usage, UI element guidelines, and anti-patterns.

Co-authored-by: Claude <noreply@anthropic.com>
2026-01-20 10:39:11 -08:00
David Cramer a76283aaea fix(create-pr): Replace broken gh pr edit with gh api (#22)
* fix(create-pr): Replace broken gh pr edit with gh api

The `gh pr edit` command fails with a GraphQL error about Projects
(classic) deprecation, even when editing unrelated fields like title
or body. Use `gh api` PATCH requests instead which bypass this issue.

- Remove Step 5 "Add Reviewers" section that used gh pr edit
- Add new "Editing Existing PRs" section with working gh api commands

Co-authored-by: Claude <noreply@anthropic.com>
2026-01-15 15:49:40 -08:00
David Cramer c4fb3e72c3 Swap deslop for code-simplifier agent (#20)
* Replace deslop skill with code-simplifier

- Add new code-simplifier skill with comprehensive simplification guidelines
- Remove old deslop skill directory
- Update README.md to reference code-simplifier instead of deslop
- Update .claude/settings.json with code-simplifier permission
- Update claude-settings-audit skill to include code-simplifier in recommendations

The code-simplifier skill is based on Anthropic's approach and provides more comprehensive code simplification beyond just removing slop, including simplifying complex logic, removing unnecessary abstractions, and improving code readability while maintaining functionality.

Co-authored-by: david <david@sentry.io>

* Convert code-simplifier from skill to subagent

- Create agents/ directory for subagents
- Add code-simplifier.md subagent using Anthropic's official version
- Remove code-simplifier from skills directory
- Update README.md to document subagents separately from skills
- Update .claude/settings.json to remove code-simplifier skill permission (subagents don't require permissions)
- Update claude-settings-audit to not recommend code-simplifier skill
- Update repository structure documentation

The code-simplifier is now a proper subagent following Anthropic's official implementation from claude-plugins-official repo.

Co-authored-by: david <david@sentry.io>

* Add attribution for code-simplifier subagent

- Add source attribution comment to code-simplifier.md pointing to Anthropic's official repo
- Create agents/README.md to document subagents and their sources
- Ensures proper credit and traceability for externally sourced subagents

Co-authored-by: david <david@sentry.io>

* Update attribution to note prior art without license

- Changed attribution from license reference to prior art acknowledgment
- Verified that anthropics/claude-plugins-official has no license file
- Updated both code-simplifier.md and agents/README.md accordingly
- Clarifies we're noting this as prior art from Anthropic rather than claiming any specific license

Co-authored-by: david <david@sentry.io>

* Simplify attribution to just note source

- Remove license commentary from code-simplifier.md
- Remove license mention from agents/README.md
- Keep clean attribution showing it's based on Anthropic's subagent

Co-authored-by: david <david@sentry.io>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-01-14 10:32:10 -08:00
Daniel Szoke 08057261de feat(create-pr): Add PR template support
Fetch the repository's PR template using `gh repo view --json
pullRequestTemplates` before writing the PR description. This ensures
PRs follow the repo's expected format and fill in required sections.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-12 17:23:50 +01:00
David Cramer 65aa458f2c feat: Add agents-md skill for maintaining AGENTS.md files
New skill that guides agents to create and maintain concise AGENTS.md
documentation with CLAUDE.md as a symlink. Enforces minimal style with
headers, bullets, and skill references instead of verbose prose.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 10:45:27 -08:00
Josh Ferge f2fa7afe84 fix(create-pr, find-bugs): Use dynamic base branch detection
Apply the same gh repo view pattern for consistency across all skills
that diff against the default branch.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 18:03:29 -05:00
Josh Ferge be09e6dc1b refactor: Use gh repo view for simpler default branch detection
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 17:59:28 -05:00
Josh Ferge 818ff8731e fix(deslop): Support repos using master instead of main
Dynamically detect the default branch using git symbolic-ref instead of
hardcoding "main". Falls back to "main" if detection fails.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 17:54:02 -05:00
David Cramer e311628a98 docs(commit): Add Co-Authored-By guidance for AI-generated changes
Document that commits with changes primarily generated by a coding agent
should include the Co-Authored-By attribution in the footer. Clarify that
this is the only indicator of AI involvement that should appear in commits.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-07 16:50:55 -08:00
David Cramer d76d61e30e fix(claude-settings-audit): Use correct Sentry MCP HTTP configuration
The skill was recommending a command-based MCP server using uvx, but
Sentry MCP is a hosted service using streaming HTTP. Update to use
the correct URL-based configuration with type "http".

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-06 18:57:22 -08:00
David Cramer 6ef251d038 feat(skills): Add prerequisite checks to commit and create-pr skills
Add workflow prerequisites to ensure proper git hygiene:
- commit skill: Check if on main/master and prompt to create feature branch
- create-pr skill: Check for uncommitted changes and invoke commit skill first
- AGENTS.md: Add step to include new skills in .claude/settings.json allowlist

These changes help enforce the expected workflow where changes are made on
feature branches and properly committed before creating PRs.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-06 10:59:23 -08:00
David Cramer 5555fb4b69 fix(iterate-pr): Use explicit branch name in git push command
Bare `git push` may push all tracked branches depending on git config.
Specify origin and current branch explicitly to ensure only the
working branch is pushed.
2026-01-06 10:26:06 -08:00
David Cramer 79adde273c fix(claude-settings-audit): Add skills allowlist for Sentry projects
- Add Skill() permissions for all sentry-skills to the recommendation
- Update AGENTS.md to remind contributors to update the skills list
  when adding new skills

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-06 10:19:18 -08:00
David Cramer f892d4142d fix(claude-settings-audit): Improve recommendation accuracy
- Never suggest commands with user-specific absolute paths
- Never suggest custom scripts that may have side effects
- Only include the package manager actually used by the project
  (e.g., if pnpm is detected, don't suggest npm/yarn commands)
- Reorganize stack-specific commands by detection criteria
- Add explicit "Package Manager Rules" table for clarity

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-06 10:11:07 -08:00
David Cramer ea591e9b22 feat: Add claude-settings-audit skill
Analyzes repositories to generate recommended Claude Code settings.json
permissions based on detected tech stack:
- Detects languages (Python, Node, Go, Rust, Ruby, Java)
- Detects build tools (Docker, Make, Terraform)
- Suggests baseline commands (git, gh, file exploration)
- Suggests framework-specific WebFetch domains
- Suggests MCP servers (Sentry, Linear) when applicable

Also updates this repo's settings.json with recommended allow list.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-06 09:52:57 -08:00
David Cramer 1b0a0e00fa Merge pull request #3 from getsentry/add-create-pr-skill
feat: Add create-pr skill for Sentry PR conventions
2026-01-05 16:53:13 -08:00
David Cramer c32f22bd94 feat: Add create-pr skill for Sentry PR conventions
New skill that guides PR creation following Sentry's engineering practices:
- PR description structure (what, why, alternatives, context)
- Title format following commit conventions
- Issue reference syntax (Fixes/Refs)
- Guidelines on PR scope and reviewer assignment

Notably excludes "Test plan" sections per Sentry conventions.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-05 16:52:04 -08:00
David Cramer c17f830b14 Add iterate-pr skill for automated PR iteration
New skill that automates the CI feedback loop:
- Checks CI status first, waits for bot checks (sentry/codecov/cursor/bugbot/seer)
- Gathers review feedback from humans and bots
- Investigates failures via gh run view --log-failed
- Validates feedback before acting on it
- Commits fixes and waits for CI to complete
- Repeats until all checks pass

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-05 16:42:17 -08:00
David Cramer 00739f740b Supposedly version is optional, lets test it 2026-01-05 16:07:21 -08:00
Josh Ferge 3f6c5851d9 Merge pull request #1 from getsentry/joshferge/desloppify
feat: Add deslop skill for removing AI-generated code slop
2026-01-05 19:00:32 -05:00
David Cramer b8cab86eac add find-bugs and update docs 2026-01-05 15:55:29 -08:00
Josh Ferge e5fc9c5178 feat: Add deslop skill for removing AI-generated code slop
Adds a skill to identify and remove common AI code patterns like
unnecessary comments, defensive checks, any casts, and inline imports.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-05 18:54:35 -05:00
David Cramer 118ea92ac4 oops 2026-01-05 14:49:03 -08:00