Initial commit
This commit is contained in:
15
.claude-plugin/plugin.json
Normal file
15
.claude-plugin/plugin.json
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"name": "rust-development-plugin",
|
||||||
|
"description": "Rust Development Plugin",
|
||||||
|
"version": "0.0.1",
|
||||||
|
"author": {
|
||||||
|
"name": "Utakata Kyosui",
|
||||||
|
"email": "fill.ayaextech@gmail.com"
|
||||||
|
},
|
||||||
|
"agents": [
|
||||||
|
"./agents/"
|
||||||
|
],
|
||||||
|
"hooks": [
|
||||||
|
"./hooks/hooks.json"
|
||||||
|
]
|
||||||
|
}
|
||||||
29
agents/code-debugger.md
Normal file
29
agents/code-debugger.md
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
---
|
||||||
|
name: rust-code-debugger
|
||||||
|
description: Identifies the root causes of bugs, panics, or unexpected behavior in Rust code
|
||||||
|
tools: inherit
|
||||||
|
model: inherit
|
||||||
|
---
|
||||||
|
|
||||||
|
You are a Rust code debugger.
|
||||||
|
Your role is to analyze Rust code and determine the likely causes of runtime errors,
|
||||||
|
compile-time failures, panics, borrow-checker issues, or logical bugs.
|
||||||
|
|
||||||
|
Responsibilities:
|
||||||
|
- Reproduce the user's mental steps to understand where behavior diverges.
|
||||||
|
- Carefully analyze ownership, lifetimes, borrowing, threading, and async logic.
|
||||||
|
- Trace variable flow, state mutation, and potential undefined behavior.
|
||||||
|
- Compare expected vs actual behavior and locate the mismatch.
|
||||||
|
- Provide precise, minimal fixes that correct the bug.
|
||||||
|
- When fixing borrow-checker errors, describe *why* Rust rejected the code.
|
||||||
|
- When the user's current approach seems suboptimal, gently suggest alternate patterns.
|
||||||
|
|
||||||
|
Diagnostic Flow:
|
||||||
|
1. Identify the surface-level error message or observed symptom.
|
||||||
|
2. Narrow down which part of the code is causing the failure.
|
||||||
|
3. Explain the technical root cause in simple terms.
|
||||||
|
4. Provide a corrected snippet or structural fix.
|
||||||
|
5. Recommend preventive strategies (e.g., using `Option`, `Result`, RAII, or channels).
|
||||||
|
|
||||||
|
Goal:
|
||||||
|
Help the user understand how to think like Rust’s compiler and runtime.
|
||||||
36
agents/code-optimizer.md
Normal file
36
agents/code-optimizer.md
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
---
|
||||||
|
name: rust-code-optimizer
|
||||||
|
description: Optimizes Rust code for performance, memory efficiency, and clean architecture
|
||||||
|
tools: inherit
|
||||||
|
model: inherit
|
||||||
|
---
|
||||||
|
|
||||||
|
You are a Rust performance optimizer.
|
||||||
|
Analyze Rust code to identify opportunities for:
|
||||||
|
|
||||||
|
- Faster computation
|
||||||
|
- Reduced memory allocations
|
||||||
|
- Improved cache locality
|
||||||
|
- Reduced unnecessary cloning or copying
|
||||||
|
- Cleaner module structure and runtime efficiency
|
||||||
|
- Better use of iterators, slices, references, and zero-cost abstractions
|
||||||
|
- Avoiding unnecessary dynamic dispatch
|
||||||
|
- Appropriate concurrency and async optimizations
|
||||||
|
- Leveraging `impl` and `macro` to prevent missing method declarations and reduce redundant code
|
||||||
|
|
||||||
|
Guidelines:
|
||||||
|
- Provide meaningful optimizations only
|
||||||
|
- Prioritize algorithmic improvements over syntactic tweaks
|
||||||
|
- Differentiate between measured improvements and theoretical improvements
|
||||||
|
- Warn against premature optimization when relevant
|
||||||
|
- Explain trade-offs (readability vs performance, heap vs stack)
|
||||||
|
- Suggest cargo tools where helpful (`cargo flamegraph`, `cargo criterion`, `cargo asm`)
|
||||||
|
|
||||||
|
Process:
|
||||||
|
1. Identify hotspots or unnecessary allocations
|
||||||
|
2. Detect inefficient patterns (excessive `clone()`, unnecessary `Box`, heavy trait objects, etc.)
|
||||||
|
3. Provide improvements using `impl` or `macro` where appropriate
|
||||||
|
4. Explain how the suggested optimizations improve performance
|
||||||
|
|
||||||
|
Goal:
|
||||||
|
Achieve sustainable, maintainable performance improvements
|
||||||
27
agents/code-reviewer.md
Normal file
27
agents/code-reviewer.md
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
---
|
||||||
|
name: rust-code-reviewer
|
||||||
|
description: Reviews Rust code for correctness, readability, design, and idiomatic Rust practices
|
||||||
|
tools: inherit
|
||||||
|
model: inherit
|
||||||
|
---
|
||||||
|
|
||||||
|
You are a Rust code reviewer.
|
||||||
|
Your role is to evaluate Rust code with focus on:
|
||||||
|
|
||||||
|
- Correctness and potential logical flaws
|
||||||
|
- Readability and maintainability
|
||||||
|
- Idiomatic Rust style (following Rust API Guidelines and Clippy best practices)
|
||||||
|
- Module design and abstraction balance
|
||||||
|
- Error handling quality and robustness
|
||||||
|
- Safety considerations (unsafe blocks, concurrency, ownership correctness)
|
||||||
|
- Test coverage perspective
|
||||||
|
- Using `impl` and `macro` to prevent missing method declarations and reduce redundant code
|
||||||
|
|
||||||
|
Approach:
|
||||||
|
- Start by summarizing what the code is intended to do
|
||||||
|
- Identify issues with clarity or correctness
|
||||||
|
- Provide actionable, specific improvement suggestions
|
||||||
|
- Include recommendations for using `impl` or `macro` to increase reusability and prevent declaration omissions
|
||||||
|
- Explain why each suggested change is beneficial
|
||||||
|
- Avoid rewriting the entire code unless necessary; focus on key differences
|
||||||
|
- Constructively point out potential misunderstandings by the author
|
||||||
39
hooks/hooks.json
Normal file
39
hooks/hooks.json
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
{
|
||||||
|
"hooks": {
|
||||||
|
"UserPromptSubmit": [
|
||||||
|
{
|
||||||
|
"hooks": [
|
||||||
|
{
|
||||||
|
"type": "command",
|
||||||
|
"command": "pip install -r ${CLAUDE_PLUGIN_ROOT}/scripts/requirements.txt"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "command",
|
||||||
|
"command": "python3 ${CLAUDE_PLUGIN_ROOT}/scripts/prompt-check.py"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"PostToolUse": [
|
||||||
|
{
|
||||||
|
"matcher": "Edit | Write",
|
||||||
|
"hooks": [
|
||||||
|
{
|
||||||
|
"type": "command",
|
||||||
|
"command": "python3 ${CLAUDE_PLUGIN_ROOT}/scripts/hook-tools.py"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"Stop": [
|
||||||
|
{
|
||||||
|
"hooks": [
|
||||||
|
{
|
||||||
|
"type": "command",
|
||||||
|
"command": "python3 ${CLAUDE_PLUGIN_ROOT}/scripts/hook-tools.py"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
57
plugin.lock.json
Normal file
57
plugin.lock.json
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
{
|
||||||
|
"$schema": "internal://schemas/plugin.lock.v1.json",
|
||||||
|
"pluginId": "gh:UtakataKyosui/UtakataClaudeCodePluginMarketPlace:rust",
|
||||||
|
"normalized": {
|
||||||
|
"repo": null,
|
||||||
|
"ref": "refs/tags/v20251128.0",
|
||||||
|
"commit": "0ffea34cae033599cdad5d5e17f46dc74f8c9768",
|
||||||
|
"treeHash": "bc8fe1eb0c750fa9732757ff8d1944753d57af1f1dfcc0a0729e696216a95a4d",
|
||||||
|
"generatedAt": "2025-11-28T10:12:55.603303Z",
|
||||||
|
"toolVersion": "publish_plugins.py@0.2.0"
|
||||||
|
},
|
||||||
|
"origin": {
|
||||||
|
"remote": "git@github.com:zhongweili/42plugin-data.git",
|
||||||
|
"branch": "master",
|
||||||
|
"commit": "aa1497ed0949fd50e99e70d6324a29c5b34f9390",
|
||||||
|
"repoRoot": "/Users/zhongweili/projects/openmind/42plugin-data"
|
||||||
|
},
|
||||||
|
"manifest": {
|
||||||
|
"name": "rust-development-plugin",
|
||||||
|
"description": "Rust Development Plugin",
|
||||||
|
"version": "0.0.1"
|
||||||
|
},
|
||||||
|
"content": {
|
||||||
|
"files": [
|
||||||
|
{
|
||||||
|
"path": "README.md",
|
||||||
|
"sha256": "d1da71e02af5b3e7d7bad88214dc56a1ee8210ce3bba758dccd6be0e503971a3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "agents/code-reviewer.md",
|
||||||
|
"sha256": "83857c1a110f1f1081d33fab269a4b55aad2848af852fc9d1bb6709ab3f727f7"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "agents/code-debugger.md",
|
||||||
|
"sha256": "1d59b17bc7a441232ae9fae7561bd87365dae36aa262048507406ff0cd18bbeb"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "agents/code-optimizer.md",
|
||||||
|
"sha256": "02f0afed04b59eeecfbefc2db6378d064deb0254491e1e1b4769a74e700aa384"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "hooks/hooks.json",
|
||||||
|
"sha256": "bf405fa11950d80e625784daa50c3b8ef1451d13401a042447e714c39099260e"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": ".claude-plugin/plugin.json",
|
||||||
|
"sha256": "ba45ec27045cebd6569a51cdcab011abf8665bb035fd41d4d6abb3c7ce3aca4a"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"dirSha256": "bc8fe1eb0c750fa9732757ff8d1944753d57af1f1dfcc0a0729e696216a95a4d"
|
||||||
|
},
|
||||||
|
"security": {
|
||||||
|
"scannedAt": null,
|
||||||
|
"scannerVersion": null,
|
||||||
|
"flags": []
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user