Compare commits

..

6 Commits

Author SHA1 Message Date
Boris Cherny
ceb9b72b4c Add code-simplifier plugin
Adds a code simplification agent that:
- Simplifies and refines code for clarity and maintainability
- Preserves all functionality while improving code structure
- Follows project-specific best practices from CLAUDE.md
- Focuses on recently modified code unless instructed otherwise
2026-01-08 16:17:19 -08:00
Daisy S. Hollman
113b335d11 Merge pull request #161 from clackbib/habib/add_kotlin_lsp
Add Kotlin LSP plugin for code intelligence
2026-01-07 14:21:25 -08:00
Habib
2fee5cd9bf Add Kotlin LSP plugin for code intelligence
- Add kotlin-lsp entry to marketplace.json with support for .kt and .kts files
- Create README with installation instructions (brew install kotlin-lsp)
- Configure LSP server to use --stdio mode with 120s startup timeout
2026-01-07 15:06:39 -05:00
Noah Zweben
b97f6eadd9 Use collaborator permission check instead of org membership (#147) 2026-01-06 19:25:24 -08:00
Noah Zweben
76334d1f67 Add write permissions for external PR workflow (#143)
* Add write permissions for external PR workflow

* Use pulls.createReview instead of issues.createComment

* Revert to issues.createComment with proper permissions
2026-01-06 17:09:02 -08:00
Noah Zweben
44328beed4 Rename ralph-wiggum plugin to ralph-loop per legal guidance (#142)
- Rename plugin from "ralph-wiggum" to "ralph-loop" to avoid trademark concerns
- Update all internal references to use "Ralph Loop" as the prominent name
- Keep explanatory text noting it "implements the Ralph Wiggum technique" (allowed)
- Rename plugin directory from plugins/ralph-wiggum to plugins/ralph-loop
- Update marketplace.json with new plugin name and source path
- Update plugin-dev documentation references

This change follows legal's recommendation to replace "Wiggum" with "Loop"
in the plugin name while still explaining the technique origin.

Slack thread: https://anthropic.slack.com/archives/C09KU300P7F/p1767741142753959

Co-authored-by: Claude <noreply@anthropic.com>
2026-01-06 15:22:54 -08:00
5 changed files with 140 additions and 25 deletions

View File

@@ -167,6 +167,29 @@
}
}
},
{
"name": "kotlin-lsp",
"description": "Kotlin language server for code intelligence",
"version": "1.0.0",
"author": {
"name": "Anthropic",
"email": "support@anthropic.com"
},
"source": "./plugins/kotlin-lsp",
"category": "development",
"strict": false,
"lspServers": {
"kotlin-lsp": {
"command": "kotlin-lsp",
"args": ["--stdio"],
"extensionToLanguage": {
".kt": "kotlin",
".kts": "kotlin"
},
"startupTimeout" : 120000
}
}
},
{
"name": "csharp-lsp",
"description": "C# language server for code intelligence",
@@ -294,6 +317,17 @@
"category": "productivity",
"homepage": "https://github.com/anthropics/claude-plugins-public/tree/main/plugins/code-review"
},
{
"name": "code-simplifier",
"description": "Agent that simplifies and refines code for clarity, consistency, and maintainability while preserving functionality. Focuses on recently modified code.",
"author": {
"name": "Anthropic",
"email": "support@anthropic.com"
},
"source": "./plugins/code-simplifier",
"category": "productivity",
"homepage": "https://github.com/anthropics/claude-plugins-official/tree/main/plugins/code-simplifier"
},
{
"name": "explanatory-output-style",
"description": "Adds educational insights about implementation choices and codebase patterns (mimics the deprecated Explanatory output style)",

View File

@@ -4,40 +4,44 @@ on:
pull_request_target:
types: [opened]
permissions:
pull-requests: write
issues: write
jobs:
check-membership:
if: vars.DISABLE_EXTERNAL_PR_CHECK != 'true'
runs-on: ubuntu-latest
steps:
- name: Check if author is org member
- name: Check if author has write access
uses: actions/github-script@v7
with:
script: |
const org = 'anthropics';
const author = context.payload.pull_request.user.login;
try {
await github.rest.orgs.checkMembershipForUser({
org: org,
username: author
});
console.log(`${author} is an org member, allowing PR`);
} catch (e) {
if (e.status === 404) {
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.pull_request.number,
body: `Thanks for your interest! This repo only accepts contributions from Anthropic team members. If you'd like to submit a plugin to the marketplace, please submit your plugin [here](https://docs.google.com/forms/d/e/1FAIpQLSdeFthxvjOXUjxg1i3KrOOkEPDJtn71XC-KjmQlxNP63xYydg/viewform).`
});
const { data } = await github.rest.repos.getCollaboratorPermissionLevel({
owner: context.repo.owner,
repo: context.repo.repo,
username: author
});
await github.rest.pulls.update({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number,
state: 'closed'
});
console.log(`Closed PR from external contributor: ${author}`);
}
if (['admin', 'write'].includes(data.permission)) {
console.log(`${author} has ${data.permission} access, allowing PR`);
return;
}
console.log(`${author} has ${data.permission} access, closing PR`);
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.pull_request.number,
body: `Thanks for your interest! This repo only accepts contributions from Anthropic team members. If you'd like to submit a plugin to the marketplace, please submit your plugin [here](https://docs.google.com/forms/d/e/1FAIpQLSdeFthxvjOXUjxg1i3KrOOkEPDJtn71XC-KjmQlxNP63xYydg/viewform).`
});
await github.rest.pulls.update({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number,
state: 'closed'
});

View File

@@ -0,0 +1,9 @@
{
"name": "code-simplifier",
"version": "1.0.0",
"description": "Agent that simplifies and refines code for clarity, consistency, and maintainability while preserving functionality",
"author": {
"name": "Anthropic",
"email": "support@anthropic.com"
}
}

View File

@@ -0,0 +1,52 @@
---
name: code-simplifier
description: Simplifies and refines code for clarity, consistency, and maintainability while preserving all functionality. Focuses on recently modified code unless instructed otherwise.
model: opus
---
You are an expert code simplification specialist focused on enhancing code clarity, consistency, and maintainability while preserving exact functionality. Your expertise lies in applying project-specific best practices to simplify and improve code without altering its behavior. You prioritize readable, explicit code over overly compact solutions. This is a balance that you have mastered as a result your years as an expert software engineer.
You will analyze recently modified code and apply refinements that:
1. **Preserve Functionality**: Never change what the code does - only how it does it. All original features, outputs, and behaviors must remain intact.
2. **Apply Project Standards**: Follow the established coding standards from CLAUDE.md including:
- Use ES modules with proper import sorting and extensions
- Prefer `function` keyword over arrow functions
- Use explicit return type annotations for top-level functions
- Follow proper React component patterns with explicit Props types
- Use proper error handling patterns (avoid try/catch when possible)
- Maintain consistent naming conventions
3. **Enhance Clarity**: Simplify code structure by:
- Reducing unnecessary complexity and nesting
- Eliminating redundant code and abstractions
- Improving readability through clear variable and function names
- Consolidating related logic
- Removing unnecessary comments that describe obvious code
- IMPORTANT: Avoid nested ternary operators - prefer switch statements or if/else chains for multiple conditions
- Choose clarity over brevity - explicit code is often better than overly compact code
4. **Maintain Balance**: Avoid over-simplification that could:
- Reduce code clarity or maintainability
- Create overly clever solutions that are hard to understand
- Combine too many concerns into single functions or components
- Remove helpful abstractions that improve code organization
- Prioritize "fewer lines" over readability (e.g., nested ternaries, dense one-liners)
- Make the code harder to debug or extend
5. **Focus Scope**: Only refine code that has been recently modified or touched in the current session, unless explicitly instructed to review a broader scope.
Your refinement process:
1. Identify the recently modified code sections
2. Analyze for opportunities to improve elegance and consistency
3. Apply project-specific best practices and coding standards
4. Ensure all functionality remains unchanged
5. Verify the refined code is simpler and more maintainable
6. Document only significant changes that affect understanding
You operate autonomously and proactively, refining code immediately after it's written or modified without requiring explicit requests. Your goal is to ensure all code meets the highest standards of elegance and maintainability while preserving its complete functionality.

View File

@@ -0,0 +1,16 @@
Kotlin language server for Claude Code, providing code intelligence, refactoring, and analysis.
## Supported Extensions
`.kt`
`.kts`
## Installation
Install the Kotlin LSP CLI.
```bash
brew install JetBrains/utils/kotlin-lsp
```
## More Information
- [kotlin LSP](https://github.com/Kotlin/kotlin-lsp)