AGENT SKILL

be-recall

Recall development rules and check for violations.

License 许可
MIT
最近更新
2026-11-13
Stars
★ 2
Forks
0

01 前言 Front Matter

name
be-recall
description
Recall development rules and check for violations.
allowed-tools
Read, Write, Edit, Glob, Grep, Bash
argument-hint
[commit | tdd | build | coding | api | jpa]
user-invocable
true

03 SKILL.md 正文

Recall Rules

Display development rules and check recent work for violations.

Instructions

Step 0: Validate Configuration

  1. Read .claude/backend-springboot-plugin.json
  2. If missing, show general rules from ${CLAUDE_PLUGIN_ROOT}/skills/be-spring-shared/SKILL.md (no project-specific checks)

Step 1: Parse Argument

Map argument to section:

Argument Section Source
(none) All rules summary be-spring-shared (all sections)
commit Commit Standards be-spring-shared § Commit Standards
tdd TDD Process + Test Scenario Writing be-spring-shared § Test-Driven Development
build Build Standards be-spring-shared § Build Standards
coding Coding Standards + Entity/DTO Conventions be-spring-shared § Coding Standards
api API Conventions + Naming be-spring-shared § API Conventions + Naming Conventions
jpa Entity Conventions ${CLAUDE_PLUGIN_ROOT}/templates/entity-conventions.md

Step 2: Display Rules

Read the relevant section(s) from ${CLAUDE_PLUGIN_ROOT}/skills/be-spring-shared/SKILL.md and display them clearly in the working language.

For each rule, show:

  • The rule statement
  • A brief example (if applicable)

Step 3: Check for Violations

Based on the section, scan recent work for violations:

commit violations:

  • Run git log --oneline -5 and check each message against commit rules
  • Flag: wrong tense, prefix usage, exceeds 50 chars, lowercase start, etc.

tdd violations:

  • Scan test files in {testDir} for:
    • Test methods not using snake_case
    • Missing assertions
    • Test scenario format issues in work documents

build violations:

  • Check if build/ directory exists and has recent output
  • Check for common configuration issues

coding violations:

  • Scan recently modified Java files (from git diff --name-only HEAD~3) for:
    • Missing final newline
    • Class where record should be used (DTOs)
    • Non-standard naming (check against naming conventions table)

api violations:

  • Scan controller classes for:
    • Wrong HTTP method mapping
    • Non-kebab-case URLs
    • Missing @ResponseStatus
    • Singular resource names in URLs

jpa violations:

  • Scan entity classes for:
    • Missing BaseEntity extension
    • Missing sequence + id dual key pattern
    • Missing @Table annotation
    • Non-snake_case table names

Step 4: Report

Display violations found with:

  • File path and line number
  • Rule violated
  • Suggested fix

If no violations found:

"No violations detected. All rules are being followed."

If violations can be auto-fixed (e.g., missing final newline):

"Auto-fixable violations found. Apply fixes? (y/n)"

Apply fixes only with user confirmation.

04 同仓库更多 Skills