Codestyle
Code template retrieval and generation via jar-based CLI tool.
Skill Location
Jar file: scripts/codestyle-server.jar (relative to this SKILL.md)
Installation paths:
- •Personal:
~/.claude/skills/codestyle/scripts/codestyle-server.jar - •Project:
.claude/skills/codestyle/scripts/codestyle-server.jar - •Plugin:
<plugin-path>/skills/codestyle/scripts/codestyle-server.jar
Workflow
- •Initialize project config (REQUIRED): You MUST create
.codestyle/cfg.jsonin the current working directory (project root) before executing any search or get command:bashmkdir -p .codestyle && cat > .codestyle/cfg.json << 'EOF' { "repository": { "repository-dir": "cache", "remote-path": "https://api.codestyle.top", "remote-search-enabled": false, "remote-search-timeout-ms": 5000, "api-key": "" } } EOF - •Locate skill directory (where this SKILL.md is located)
- •Execute
search "keyword"based on user requirements - •Parse returned directory tree, select matching template path
- •Execute
get "full-path"to retrieve template content - •List variables, request user confirmation, generate code
Commands
Replace <SKILL_DIR> with actual skill installation path.
Search templates:
java -jar <SKILL_DIR>/scripts/codestyle-server.jar search "keyword"
Get template content:
java -jar <SKILL_DIR>/scripts/codestyle-server.jar get "path"
Search Keyword Formats
| Format | Description | Example |
|---|---|---|
| Keyword | Full-text search | CRUD, login, export |
| groupId/artifactId | Exact match | continew/crud-plus |
| Mixed | Combined search | user CRUD |
Result Types
Single result: Returns directory tree directly. Select path and execute get.
Multiple results: Returns matching list. Ask user to choose or use groupId/artifactId for exact search.
No result: Not found locally. Suggest synonyms or enable remote search (remote-search-enabled: true).
Path Format
Template path: groupId/artifactId/version/filePath/filename.ftl
Example: continew/crud-plus/1.0.0/src/main/java/controller/Controller.ftl
Configuration
Config loading order (later overrides former):
- •
jar-directory/cfg.json(global) - •
current-working-directory/.codestyle/cfg.json(project)
Reference Files
| File | Purpose |
|---|---|
| references/config.md | Configuration options |
| references/template-syntax.md | Output format parsing & variable handling |