Commit Graph

85 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 5d49db8eb2 Merge pull request #44 from getsentry/feat/warden-lint-judge
feat: add warden-lint-judge skill
2026-02-13 16:57:33 -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 599e462104 fix(ci): Add WARDEN_SENTRY_DSN env to Warden workflow
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 11:34:16 -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 14bf32af82 feat: Set up Warden for automated skill security scanning (#42)
* feat: Set up Warden for automated skill security scanning

Adds warden.toml config, GitHub Actions workflow, and .agents/skills
symlink so Warden discovers and runs skill-scanner on PRs that modify
skills.

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

* fix: Remove paths filter from Warden workflow

Warden.toml already handles path filtering; the workflow should run on
all PRs.

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

* fix: Use Warden GitHub Action instead of npx

Switch to getsentry/warden@v0 action and match the convention from the
warden repo for env vars and token handling.

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

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 13:50:10 -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
Greg Pstrucha 4da4bede25 Merge pull request #38 from getsentry/django-access-review
feat(skills): Add Django access control and IDOR security review skill
2026-02-04 14:46:36 -08:00
Greg Pstrucha d77957c670 feat(skills): Add Django access control and IDOR security review skill
Introduces a new skill for reviewing Django codebases for access control
vulnerabilities, with focus on IDOR detection. Unlike pattern-matching
scanners, this skill emphasizes investigation-based review: understanding
the authorization model, tracing data flows, and confirming gaps through
code analysis.

Includes reference docs for Django ORM, views, DRF permissions, and
tenant isolation patterns.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-02-04 14:41:54 -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 b93f7e9d30 Merge pull request #33 from getsentry/sync-code-simplifier-as-skill
feat(code-simplifier): Add code-simplifier as skill for Warden
2026-01-31 15:12:46 -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 d79895a764 Merge pull request #32 from getsentry/fix/django-perf-low-finding
Allow missing select_related as LOW finding
2026-01-30 14:44:27 -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 48835645c2 Merge pull request #31 from getsentry/security-review-revamp
Add Django performance review skill
2026-01-30 13:20:04 -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 bb366a0678 Merge pull request #30 from getsentry/security-review-revamp
Expand security review
2026-01-29 15:47:25 -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 438087c0a3 docs: Restructure README installation and contributing sections (#29)
Simplify installation to two primary methods (Claude Code marketplace
and skills.sh) and consolidate all developer content under Contributing.
Apply Plain Speech guidelines with concise, direct language.

Co-authored-by: Claude <noreply@anthropic.com>
2026-01-29 12:58:14 -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
David Cramer b92d637523 docs: Add guidance on where skills should live
Explains the three-tier approach for skill placement:
- Global skills in sentry-skills plugin
- Domain-specific skills in dedicated plugins (e.g., infra-skills)
- Repo-specific skills in the repository itself

Also documents how the marketplace structure works - this repo can
host multiple plugins that users install independently.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 14:57:56 -08:00
David Cramer 817cea320c docs: Add vendoring skills guidelines
Explains why we vendor skills (consistency, customization, reliability)
and how to retain attribution via comments and LICENSE files.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 14:56:29 -08:00
Josh Ferge 20886b3f82 Merge pull request #24 from getsentry/jferg/add-doc-coauthoring-skill
feat: Add doc-coauthoring skill
2026-01-20 15:23:00 -05: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 ec9e0a3d76 feat(create-pr): Add PR template support
Update the create-pr skill to fetch and respect the repository's PR template before writing the PR description.

Previously, the skill would always use its default structure for PR descriptions. Now it first checks for a PR template using gh repo view --json pullRequestTemplates and instructs the agent to follow that template's structure when one exists.

This ensures PRs created by the agent match the expected format for each repository and fill in all required sections defined by the repo maintainers.
2026-01-13 14:20:46 +01: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 0189f2ed17 Merge pull request #17 from getsentry/docs/contributing-guidelines
docs: Add contributor guidelines
2026-01-10 11:06:54 -08:00
David Cramer fc5a75b467 Merge pull request #16 from getsentry/feat/agents-md-skill
feat: Add agents-md skill for maintaining AGENTS.md files
2026-01-10 11:03:41 -08:00
David Cramer 99623274f6 docs: Add contributor guidelines
Establish contribution philosophy emphasizing incremental change and
self-review as the default workflow. Include instructions for testing
skills locally and a checklist for adding new skills.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-10 11:02:46 -08: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
David Cramer ff7dcae620 Merge pull request #14 from getsentry/armcknight/fix/local-clone-installation
fix(README): local clone plugin installation
2026-01-10 10:32:16 -08:00
David Cramer 5e453ffb20 Merge pull request #15 from getsentry/fix/deslop-base-branch
fix: Use dynamic base branch detection across skills
2026-01-10 10:32:12 -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