Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问clear审计未展示

backend-implementation后端实现

Agent Skill

backend-implementation 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

5,865

周安装

193

GitHub Stars

公开资料未说明

下载量

1,126
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:backend-implementation(后端实现)
来源仓库:https://github.com/jpicklyk/task-orchestrator
仓库路径:skills/backend-implementation
安装命令:
npx skills add jpicklyk/task-orchestrator --skill "backend-implementation"
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

AgentSkills.tonpx skills
npx skills add jpicklyk/task-orchestrator --skill "backend-implementation"

简介

发现并安装 AI 代理的技能。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中根据关键词、任务场景快速定位候选结果时使用。
  • 可结合来源仓库和原始 README 核验具体用法,建议确认权限范围和维护状态。
  • 安装命令:npx skills add jpicklyk/task-orchestrator --skill "backend-implementation"。
  • 注意是否会触发联网、命令执行或文件读写,确保操作安全可控。

SKILL.md

name
Backend Implementation
description
Backend development with Kotlin, Spring Boot, REST APIs. Use for backend, api, service, kotlin, rest tags. Provides validation commands, testing patterns, and blocker scenarios.
allowed-tools
Read, Write, Edit, Bash, Grep, Glob

Backend Implementation Skill

Domain-specific guidance for backend API development, service implementation, and business logic.

When To Use This Skill

Load this Skill when task has tags:

  • backend, api, service, kotlin, rest
  • spring, spring-boot, controller, repository

Validation Commands

Run Tests

# Full test suite
./gradlew test

# Specific test class
./gradlew test --tests "UserServiceTest"

# Single test method
./gradlew test --tests "UserServiceTest.shouldCreateUser"

# With build
./gradlew clean test

Build Project

# Build JAR
./gradlew build

# Build without tests (for quick syntax check)
./gradlew build -x test

Run Application

# Local development
./gradlew bootRun

# With specific profile
./gradlew bootRun --args='--spring.profiles.active=dev'

Success Criteria (Before Completing Task)

ALL tests MUST pass (0 failures, 0 errors) ✅ Build MUST succeed without compilation errors ✅ Code follows project conventions (existing patterns) ✅ API endpoints tested (integration tests) ✅ Error handling implemented (try-catch, validation)

Common Backend Tasks

REST API Endpoints

  • Controller with request mapping
  • Request/response DTOs
  • Service layer business logic
  • Repository integration
  • Error handling (400, 401, 404, 500)
  • Validation (@Valid annotations)

Service Implementation

  • Business logic in service classes
  • Transaction management (@Transactional)
  • Error handling and exceptions
  • Dependency injection (@Autowired, constructor injection)

Database Integration

  • Repository interfaces (JPA, Exposed ORM)
  • Entity mapping
  • Query methods
  • Transaction boundaries

Testing Principles for Backend

Use Real Infrastructure for Integration Tests

AVOID mocking repositories in integration tests:

// BAD - Mocking repositories misses SQL errors, constraints
@Mock private lateinit var userRepository: UserRepository
when(userRepository.findById(any())).thenReturn(mockUser)

USE real in-memory database:

// GOOD - Tests actual integration
@SpringBootTest
@Transactional  // Auto-rollback after each test
class UserApiTest {
    @Autowired private lateinit var userRepository: UserRepository
    @Autowired private lateinit var userService: UserService
    // Tests real database, serialization, constraints
}

Test Incrementally, Not in Batches

Avoid: Write 200 lines code + 15 tests → run all → 12 failures → no idea which code caused which failure

Do:

  1. Write basic implementation
  2. Write ONE happy path test
  3. Run ONLY that test: ./gradlew test --tests "ToolTest.shouldHandleBasicCase"
  4. Fix until passes
  5. Add ONE edge case test
  6. Run ONLY that test
  7. Repeat

Benefits: Feedback in seconds, isolates root cause immediately.

Debug with Actual Output

When test fails:

  1. Read error message carefully - tells you what's wrong
  2. Print actual output:
   println("Full response: $result")
   println("Response keys: ${result.jsonObject.keys}")
  1. Verify assumptions about test data - count manually
  2. Fix root cause, not symptoms

Create Complete Test Entities

BAD - Missing required fields:

val task = Task(
    id = UUID.randomUUID(),
    title = "Test Task",
    status = TaskStatus.PENDING
    // Missing: summary, priority, complexity, timestamps
)
taskRepository.create(task)  // FAILS: NOT NULL constraint

GOOD - Complete entity:

val task = Task(
    id = UUID.randomUUID(),
    title = "Test Task",
    summary = "Test summary",               // Required
    status = TaskStatus.PENDING,            // Required
    priority = Priority.HIGH,               // Required
    complexity = 5,                         // Required
    tags = listOf("test"),
    projectId = testProjectId,
    createdAt = Instant.now(),              // Required
    modifiedAt = Instant.now()              // Required
)

How to find required fields: Check migration SQL or ORM model definition.

Common Blocker Scenarios

Blocker 1: Missing Database Schema

Issue: Tests expect column that doesn't exist

SQLSyntaxErrorException: Unknown column 'users.password_hash'

What to try:

  • Check migration files - is column defined?
  • Review prerequisite database tasks - marked complete but incomplete?
  • Check if column was renamed

If blocked: Report to orchestrator - database task may need reopening

Blocker 2: NullPointerException in Service

Issue: NPE at runtime in service class

NullPointerException: Cannot invoke method on null object

What to try:

  • Check dependency injection - is @Autowired present?
  • Check constructor injection - all parameters provided?
  • Check @Configuration on config class
  • Check @Service or @Component on service class
  • Add null safety (Kotlin: use ? operator, nullable types)

Common causes:

  • Missing @Configuration annotation
  • Spring not scanning package
  • Circular dependency

Blocker 3: Integration Test Failures

Issue: Integration tests pass locally but fail in CI or for others

What to try:

  • Check test isolation - are tests cleaning up state?
  • Check @Transactional with rollback
  • Check test order dependencies (tests should be independent)
  • Check H2/in-memory DB configuration matches production DB type
  • Check test data initialization

Blocker 4: Architectural Conflict

Issue: Task requirements conflict with existing architecture

Task requires middleware auth but project uses annotation-based security

What to try:

  • Review existing patterns in codebase
  • Check architecture documentation
  • Look for similar implementations

If blocked: Report to orchestrator - may need architectural decision or task revision

Blocker 5: External Dependency Bug

Issue: Third-party library has known bug

JWT library v3.2.1 has refresh token bug - expires immediately

What to try:

  • Check library changelog - is fix available in newer version?
  • Search for known issues in library's issue tracker
  • Try workaround if documented

If blocked: Report to orchestrator - may need to wait for library update or use alternative

Blocker Report Format

⚠️ BLOCKED - Requires Senior Engineer

Issue: [Specific problem - NPE at UserService.kt:42, missing column, etc.]

Attempted Fixes:
- [What you tried #1]
- [What you tried #2]
- [Why attempts didn't work]

Root Cause (if known): [Your analysis]

Partial Progress: [What work you DID complete]

Context for Senior Engineer:
- Error output: [Paste error]
- Test results: [Test failures]
- Related files: [Files involved]

Requires: [What needs to happen - Senior Engineer investigation, etc.]

Quick Reference

Spring Boot Patterns

Controller:

@RestController
@RequestMapping("/api/users")
class UserController(private val userService: UserService) {

    @PostMapping
    fun createUser(@Valid @RequestBody request: CreateUserRequest): User {
        return userService.createUser(request)
    }

    @GetMapping("/{id}")
    fun getUser(@PathVariable id: UUID): User {
        return userService.findById(id)
            ?: throw NotFoundException("User not found")
    }
}

Service:

@Service
@Transactional
class UserService(
    private val userRepository: UserRepository,
    private val passwordEncoder: PasswordEncoder
) {
    fun createUser(request: CreateUserRequest): User {
        val user = User(
            email = request.email,
            passwordHash = passwordEncoder.encode(request.password)
        )
        return userRepository.save(user)
    }
}

Repository:

@Repository
interface UserRepository : JpaRepository<User, UUID> {
    fun findByEmail(email: String): User?
}

Error Handling

@RestControllerAdvice
class GlobalExceptionHandler {

    @ExceptionHandler(NotFoundException::class)
    fun handleNotFound(ex: NotFoundException): ResponseEntity<ErrorResponse> {
        return ResponseEntity
            .status(HttpStatus.NOT_FOUND)
            .body(ErrorResponse(ex.message))
    }

    @ExceptionHandler(ValidationException::class)
    fun handleValidation(ex: ValidationException): ResponseEntity<ErrorResponse> {
        return ResponseEntity
            .status(HttpStatus.BAD_REQUEST)
            .body(ErrorResponse(ex.message))
    }
}

Common Patterns to Follow

  1. Controller → Service → Repository layering
  2. Constructor injection over field injection
  3. @Transactional on service layer for database operations
  4. DTO pattern for request/response (don't expose entities)
  5. Exception handling with @RestControllerAdvice
  6. Validation with @Valid and constraint annotations
  7. Testing with real database for integration tests

What NOT to Do

❌ Don't mock repositories in integration tests ❌ Don't skip tests and mark task complete ❌ Don't expose entities directly in API responses ❌ Don't put business logic in controllers ❌ Don't forget @Transactional for database operations ❌ Don't hardcode configuration (use application.yml)

Focus Areas

When reading task sections, prioritize:

  • requirements - What API endpoints need to be built
  • technical-approach - How to implement (patterns, libraries)
  • implementation - Specific implementation details
  • testing-strategy - How to test the implementation

Remember

  • Run tests incrementally - one test at a time for fast feedback
  • Use real infrastructure - in-memory database for integration tests
  • Debug with actual output - print what you got, don't assume
  • Report blockers promptly - don't wait, communicate to orchestrator
  • Follow existing patterns - check codebase for similar implementations
  • Complete test entities - all required fields must be populated
  • Validation is mandatory - ALL tests must pass before completion

Additional Resources

For deeper patterns and examples, see:

  • PATTERNS.md - Spring Security, REST API design patterns (load if needed)
  • BLOCKERS.md - Detailed blocker scenarios with solutions (load if stuck)
  • examples.md - Complete working examples (load if uncertain)

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Antigravity

28.56%
按下载量换算322

windsurf

22.28%
按下载量换算251

OpenCode

16.06%
按下载量换算181

Codex

11.17%
按下载量换算126

Claude Code

8.35%
按下载量换算94

Gemini CLI

3.08%
按下载量换算35

安全审计

暂无安全审计结果可展示。

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills