toenobu-agent 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +27 -0
- package/package.json +24 -0
- package/skills/code-simplifier/SKILL.md +44 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 toenobu
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Agent Stuff
|
|
2
|
+
|
|
3
|
+
Skills and extensions for the [Pi](https://buildwithpi.ai/) coding agent.
|
|
4
|
+
|
|
5
|
+
Published on npm as `toenobu-agent`.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
Add to your `~/.pi/agent/settings.json`:
|
|
10
|
+
|
|
11
|
+
```json
|
|
12
|
+
{
|
|
13
|
+
"packages": [
|
|
14
|
+
"npm:toenobu-agent"
|
|
15
|
+
]
|
|
16
|
+
}
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Skills
|
|
20
|
+
|
|
21
|
+
| Skill | Description |
|
|
22
|
+
|-------|-------------|
|
|
23
|
+
| `/code-simplifier` | Simplifies and refines code for clarity, consistency, and maintainability |
|
|
24
|
+
|
|
25
|
+
## License
|
|
26
|
+
|
|
27
|
+
MIT
|
package/package.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "toenobu-agent",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "toenobu's pi coding agent skills and extensions",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://gitlab.com/toenobu/agent-stuff.git"
|
|
8
|
+
},
|
|
9
|
+
"readme": "README.md",
|
|
10
|
+
"type": "module",
|
|
11
|
+
"keywords": [
|
|
12
|
+
"pi-package",
|
|
13
|
+
"pi-skill"
|
|
14
|
+
],
|
|
15
|
+
"pi": {
|
|
16
|
+
"skills": [
|
|
17
|
+
"./skills"
|
|
18
|
+
]
|
|
19
|
+
},
|
|
20
|
+
"peerDependencies": {
|
|
21
|
+
"@mariozechner/pi-coding-agent": "*"
|
|
22
|
+
},
|
|
23
|
+
"license": "MIT"
|
|
24
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Simplifies and refines code for clarity, consistency, and maintainability while preserving all functionality
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Code Simplifier
|
|
6
|
+
|
|
7
|
+
Use this skill when the user asks to simplify, refine, or clean up code.
|
|
8
|
+
|
|
9
|
+
## Instructions
|
|
10
|
+
|
|
11
|
+
You are an expert code simplification specialist focused on enhancing code clarity, consistency, and maintainability while preserving exact functionality.
|
|
12
|
+
|
|
13
|
+
Analyze the code and apply refinements that:
|
|
14
|
+
|
|
15
|
+
1. **Preserve Functionality**: Never change what the code does - only how it does it. All original features, outputs, and behaviors must remain intact.
|
|
16
|
+
|
|
17
|
+
2. **Enhance Clarity**: Simplify code structure by:
|
|
18
|
+
- Reducing unnecessary complexity and nesting
|
|
19
|
+
- Eliminating redundant code and abstractions
|
|
20
|
+
- Improving readability through clear variable and function names
|
|
21
|
+
- Consolidating related logic
|
|
22
|
+
- Removing unnecessary comments that describe obvious code
|
|
23
|
+
- Avoid nested ternary operators - prefer switch statements or if/else chains
|
|
24
|
+
- Choose clarity over brevity - explicit code is often better than overly compact code
|
|
25
|
+
|
|
26
|
+
3. **Maintain Balance**: Avoid over-simplification that could:
|
|
27
|
+
- Reduce code clarity or maintainability
|
|
28
|
+
- Create overly clever solutions that are hard to understand
|
|
29
|
+
- Combine too many concerns into single functions
|
|
30
|
+
- Prioritize "fewer lines" over readability
|
|
31
|
+
|
|
32
|
+
4. **Apply Best Practices**:
|
|
33
|
+
- Follow project coding standards from AGENTS.md/CLAUDE.md if present
|
|
34
|
+
- Use proper error handling patterns
|
|
35
|
+
- Maintain consistent naming conventions
|
|
36
|
+
- Use appropriate language idioms
|
|
37
|
+
|
|
38
|
+
## Process
|
|
39
|
+
|
|
40
|
+
1. Identify the code sections to simplify
|
|
41
|
+
2. Analyze for opportunities to improve elegance and consistency
|
|
42
|
+
3. Apply best practices and coding standards
|
|
43
|
+
4. Ensure all functionality remains unchanged
|
|
44
|
+
5. Verify the refined code is simpler and more maintainable
|