Compare commits
8 Commits
abf70542c2
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
2625fac6d8
|
|||
|
a7fa29e3ec
|
|||
|
e10bcfa734
|
|||
|
3be04dab3a
|
|||
|
6beb72688e
|
|||
|
b14493d3ad
|
|||
|
caae678e26
|
|||
|
7f43b55b61
|
+20
@@ -1,2 +1,22 @@
|
|||||||
# Local Claude Code configuration (per-machine)
|
# Local Claude Code configuration (per-machine)
|
||||||
.claude/
|
.claude/
|
||||||
|
|
||||||
|
# IDE
|
||||||
|
.idea/
|
||||||
|
.vscode/
|
||||||
|
*.iml
|
||||||
|
*.iws
|
||||||
|
*.ipr
|
||||||
|
.project
|
||||||
|
.classpath
|
||||||
|
.settings/
|
||||||
|
|
||||||
|
# OS
|
||||||
|
.DS_Store
|
||||||
|
Thumbs.db
|
||||||
|
desktop.ini
|
||||||
|
|
||||||
|
# Editor backups
|
||||||
|
*.swp
|
||||||
|
*.swo
|
||||||
|
*~
|
||||||
|
|||||||
@@ -0,0 +1,61 @@
|
|||||||
|
# Contributing
|
||||||
|
|
||||||
|
Guidelines for adding or modifying a skill in this catalogue.
|
||||||
|
|
||||||
|
## Adding a Skill
|
||||||
|
|
||||||
|
1. Pick a short, kebab-case name (`my-skill`).
|
||||||
|
2. Create a directory and a `SKILL.md` inside it:
|
||||||
|
```
|
||||||
|
mkdir my-skill
|
||||||
|
```
|
||||||
|
3. Start `SKILL.md` with the required frontmatter:
|
||||||
|
```yaml
|
||||||
|
---
|
||||||
|
name: my-skill
|
||||||
|
description: ...
|
||||||
|
---
|
||||||
|
```
|
||||||
|
4. Open a pull request against `main`.
|
||||||
|
|
||||||
|
### Frontmatter
|
||||||
|
|
||||||
|
- `name` must match the directory name. Claude Code uses it to identify the skill.
|
||||||
|
- `description` controls when the skill is invoked. Be specific: name the file types, project shapes, and user requests that should trigger it. A vague description (for example, "helps with Java") will fire too often and add noise.
|
||||||
|
- The body of `SKILL.md` is loaded into the conversation when the skill fires. Keep it dense and self-contained.
|
||||||
|
|
||||||
|
## Modifying a Skill
|
||||||
|
|
||||||
|
Edit the skill's `SKILL.md` in place. Open a PR. If the change alters the skill's public contract (the `description`, the rules, or the inputs/outputs the skill expects), call it out in the PR description so reviewers can decide whether the change should also trigger a version bump in any catalogue that consumes it.
|
||||||
|
|
||||||
|
## Style
|
||||||
|
|
||||||
|
- **British English** is the default for all prose, code comments, and commit messages. Use the `british-english` skill to self-review before requesting review.
|
||||||
|
- Use sentence case in headings ("Adding a skill", not "Adding A Skill").
|
||||||
|
- Code samples should be runnable, or marked clearly when truncated for brevity.
|
||||||
|
|
||||||
|
## Commit Messages
|
||||||
|
|
||||||
|
Use conventional commits. For this repository:
|
||||||
|
|
||||||
|
| Type | When |
|
||||||
|
|---|---|
|
||||||
|
| `feat` | A new skill, or a new feature within an existing skill |
|
||||||
|
| `fix` | A behavioural correction |
|
||||||
|
| `docs` | README, CONTRIBUTING, LICENCE, or doc-only edits |
|
||||||
|
| `chore` | Tooling, `.gitignore`, build configuration |
|
||||||
|
|
||||||
|
See the `commit-message` skill for the full format.
|
||||||
|
|
||||||
|
## Review
|
||||||
|
|
||||||
|
Reviewers check for:
|
||||||
|
|
||||||
|
- Frontmatter correctness and specificity
|
||||||
|
- Compliance with any cross-cutting rules (for example, the four-layer architecture in the `spring-boot` skill)
|
||||||
|
- British English conformance
|
||||||
|
- A concrete example for every non-trivial claim
|
||||||
|
|
||||||
|
## Licence
|
||||||
|
|
||||||
|
By contributing, you agree that your contributions are licensed under the MIT Licence (see [`LICENCE`](LICENCE)).
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2026 Onixbyte
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
@@ -4,4 +4,23 @@ This repository stores commonly used skills for Claude Code internally.
|
|||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
Clone this repository into `~/.claude/skills` with `git clone git@git.onixbyte.com:onixbyte/claude-code-skills ~/.claude/skills`.
|
Clone this repository into `~/.claude/skills` with `git clone git@git.onixbyte.com:onixbyte/claude-code-skills ~/.claude/skills`.
|
||||||
|
|
||||||
|
## Available Skills
|
||||||
|
|
||||||
|
| Skill | Description |
|
||||||
|
|---|---|
|
||||||
|
| `british-english` | Apply British English spelling and grammar as a global default for files, commits, and documentation when no project-level language override is set. |
|
||||||
|
| `commit-message` | Produce conventional-commit messages from the current staged diff, with optional gitmoji support. |
|
||||||
|
| `spring-boot` | Conventions for Spring Boot services on Gradle + Java 21 + Spring Boot 3.5: a strict four-layer architecture (Controller → Service → Manager/Client → Mapper/Repository), with an optional Variant layer for multi-implementation strategies. Covers MyBatis + JPA, Spring Validation, global exception handling, TraceId logging, and SpringDoc OpenAPI. |
|
||||||
|
|
||||||
|
## Adding a Skill
|
||||||
|
|
||||||
|
1. Create a directory named after the skill: `mkdir my-skill/`.
|
||||||
|
2. Add a `SKILL.md` inside it, beginning with the required frontmatter (`name`, `description`).
|
||||||
|
3. Open a pull request against `main`.
|
||||||
|
|
||||||
|
## Repository Hygiene
|
||||||
|
|
||||||
|
- Local Claude Code configuration (`.claude/`) is ignored — keep per-machine settings out of version control.
|
||||||
|
- Each skill lives in its own top-level directory named exactly as the `name` field in its `SKILL.md`.
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ description: Apply British English spelling and grammar as a global default when
|
|||||||
|
|
||||||
# British English
|
# British English
|
||||||
|
|
||||||
Conventions for writing in British English, as distinct from American English. Follow these rules consistently throughout a document.
|
Conventions for writing in British English, as distinct from American English.
|
||||||
|
|
||||||
## Spelling
|
## Spelling
|
||||||
|
|
||||||
|
|||||||
+26
@@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
"name": "Claude Code Skills",
|
||||||
|
"skills": [
|
||||||
|
{
|
||||||
|
"name": "british-english",
|
||||||
|
"description": "Apply British English spelling and grammar conventions to project documents and code",
|
||||||
|
"repository": "https://onixbyte.dev/onixbyte/claude-code-skills",
|
||||||
|
"branch": "main",
|
||||||
|
"path": "british-english"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "commit-message",
|
||||||
|
"description": "Generate well-formatted git commit messages following conventional commits",
|
||||||
|
"repository": "https://onixbyte.dev/onixbyte/claude-code-skills",
|
||||||
|
"branch": "main",
|
||||||
|
"path": "commit-message"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "spring-boot",
|
||||||
|
"description": "Add JPA CRUD resources following Spring Boot layered architecture",
|
||||||
|
"repository": "https://onixbyte.dev/onixbyte/claude-code-skills",
|
||||||
|
"branch": "main",
|
||||||
|
"path": "spring-boot"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -507,14 +507,14 @@ A protected no-arg constructor is required by JPA. Static factories (`fromReques
|
|||||||
public interface UserMapper {
|
public interface UserMapper {
|
||||||
|
|
||||||
@Select("""
|
@Select("""
|
||||||
SELECT id, email, display_name AS displayName, status, created_at AS createdAt
|
SELECT id, email, display_name, status, created_at
|
||||||
FROM users
|
FROM users
|
||||||
WHERE id = #{id}
|
WHERE id = #{id}
|
||||||
""")
|
""")
|
||||||
Optional<UserEntity> findById(Long id);
|
Optional<UserEntity> findById(Long id);
|
||||||
|
|
||||||
@Select("""
|
@Select("""
|
||||||
SELECT id, email, display_name AS displayName, status, created_at AS createdAt
|
SELECT id, email, display_name, status, created_at
|
||||||
FROM users
|
FROM users
|
||||||
<where>
|
<where>
|
||||||
<if test="email != null">AND email LIKE CONCAT('%', #{email}, '%')</if>
|
<if test="email != null">AND email LIKE CONCAT('%', #{email}, '%')</if>
|
||||||
@@ -780,12 +780,13 @@ com.example.app/
|
|||||||
│ └── UserMapper.java (MyBatis, when needed)
|
│ └── UserMapper.java (MyBatis, when needed)
|
||||||
├── entity/
|
├── entity/
|
||||||
│ └── UserEntity.java
|
│ └── UserEntity.java
|
||||||
├── request/
|
├── domain/
|
||||||
│ ├── CreateUserRequest.java
|
│ ├── request/
|
||||||
│ ├── UpdateUserRequest.java
|
│ │ ├── CreateUserRequest.java
|
||||||
│ └── UserSearchCriteria.java
|
│ │ ├── UpdateUserRequest.java
|
||||||
├── response/
|
│ │ └── UserSearchCriteria.java
|
||||||
│ └── UserResponse.java
|
│ └── response/
|
||||||
|
│ └── UserResponse.java
|
||||||
└── enums/
|
└── enums/
|
||||||
└── UserStatus.java
|
└── UserStatus.java
|
||||||
```
|
```
|
||||||
@@ -822,4 +823,3 @@ public class App {
|
|||||||
- Spring Data JPA Reference
|
- Spring Data JPA Reference
|
||||||
- Jakarta Bean Validation 3.0
|
- Jakarta Bean Validation 3.0
|
||||||
- springdoc-openapi 2.x
|
- springdoc-openapi 2.x
|
||||||
- 阿里巴巴《Java 开发手册》(层结构、Manager/Client 命名来源)
|
|
||||||
|
|||||||
Reference in New Issue
Block a user