developer
When writing, modifying, or reviewing application code. Provides code quality standards, SOLID principles, design philosophy, and platform-specific implementation guidance.
- License 许可
- MIT
- 最近更新
- 2026-11-07
- Stars
- ★ 13
- Forks
- 3
01 前言 Front Matter
- name
- developer
- license
- MIT
- description
- When writing, modifying, or reviewing application code. Provides code quality standards, SOLID principles, design philosophy, and platform-specific implementation guidance.
03 SKILL.md 正文
Senior Developer Standards
User Experience First
Every code decision must consider its impact on the end user.
- Performance: Avoid unnecessary allocations, redundant calculations, and blocking the main thread or event loop. Profile before and after significant changes.
- Memory: Be mindful of memory footprint, especially in modules that handle images, large datasets, or streaming data.
- Responsiveness: UI must remain smooth. Offload computation to background threads or async workers.
Design Philosophy
- KISS: Solutions must be straightforward. Avoid over-engineering.
- DRY: Don't repeat yourself. Extract shared logic rather than copying it, but only when the abstraction is genuinely reusable — not just coincidentally similar.
- YAGNI: Don't add speculative features unless the user explicitly requests extensibility or future-proofing. If you believe a feature is likely to be extended, ask the user before defaulting to the simplest implementation.
- Match existing architecture by default. Before writing new code, read 2-3
nearest existing implementations of the same kind and follow their patterns
(file layout, naming, abstraction level, error-handling style). Deviation needs
a reason. If existing architecture looks wrong, do not silently work around
it — surface the concern as a
FLAG: architecture concern — <description>line in the plan so the user can decide whether to fix or proceed. Silent deviation produces drift; flagged deviation produces an informed decision.
SOLID Principles
- Single Responsibility: Each module or function does one thing only.
- Open-Closed: Open for extension, closed for modification.
- Liskov Substitution: Derived classes must be substitutable for base types.
- Interface Segregation: Prefer specific interfaces over general-purpose ones.
- Dependency Inversion: Depend on abstractions, not concrete implementations.
Code Quality
- All public functions must include a concise, purpose-driven doc comment.
- Implement structured error handling with specific failure modes.
- Verify preconditions before executing critical or irreversible operations.
- Long-running operations must implement timeout and cancellation mechanisms.
- File and path operations must verify existence and permissions.
- Don't leave commented-out code. Provide detailed commit messages explaining why.
- Remove unused imports before committing. Organize imports per STYLE_GUIDE.md (Standard library → Third-party → Project, separated by blank lines).
- Remove unused variables, parameters, and local functions. Dead code belongs in git history, not in the working tree.
- After implementation, review your own changes for leftover debug code, temporary comments, and unnecessary whitespace changes.
Platform Standards
<!-- PLATFORM: Android -->
Android / Kotlin
- Use
viewModelScopein ViewModels,lifecycleScopein UI. Never useGlobalScopeunless explicitly justified. - Use
Flowfor reactive streams,suspend funfor one-shot operations. - Prefer non-nullable types. Avoid
!!. Use?.let,?:, orrequireNotNull(). - Use
data classfor pure data holders withvalproperties. - Composables are pure functions of state. Each screen exposes a single
StateFlow<UiState>. Collect withcollectAsStateWithLifecycle(). One-off events viaSharedFlow<UiEvent>orChannel— never inUiState. - Coroutine dispatchers:
Dispatchers.IOfor blocking I/O,Dispatchers.Defaultfor CPU work,Dispatchers.Mainfor UI only. - If the project uses Detekt, run
./gradlew detekt --continuelocally before opening a PR and fix any violations. - If the task touches version/dependency files (
libs.versions.toml,gradle-wrapper.properties,buildSrc/), follow.agents/standards/DEPENDENCY_MANAGEMENT.md. - Comply with
.agents/standards/ANDROID_ARCHITECTURE.mdand.agents/standards/STYLE_GUIDE.md. - For deep platform-specific tasks (R8 keep rule analysis, Camera1→CameraX migration, Jetpack Compose adaptive/theming, AGP build, testing setup), Google maintains the android/skills open-standard skill pack. agentskel suggests installing it on Android projects — see docs/PLATFORM-SKILLS.md. <!-- END PLATFORM: Android -->
<!-- PLATFORM: iOS -->
iOS / Swift
- Use
async/awaitfor new code. Use@MainActorfor UI-bound types. - Prefer
guard letfor early returns. Avoid force unwrapping (!). - SwiftUI views are pure functions of state. Use
@StateObjectfor owned ViewModels,@ObservedObjectfor injected ones. - If the project uses SwiftLint, run it before opening a PR and fix any violations.
- If the task touches
Package.swiftorPodfile, follow.agents/standards/DEPENDENCY_MANAGEMENT.md. - Comply with
.agents/standards/IOS_ARCHITECTURE.mdand.agents/standards/STYLE_GUIDE.md. <!-- END PLATFORM: iOS -->
<!-- PLATFORM: Web -->
Web / Frontend
- Prefer
constoverlet. Never usevar. Use strict TypeScript where available. - Component rendering must be pure. Side effects in hooks/lifecycle methods only.
- Bundle size awareness: lazy-load routes, monitor bundle budgets.
- If the project uses ESLint/Prettier, run it before opening a PR and fix any violations.
- If the task touches
package.json, follow.agents/standards/DEPENDENCY_MANAGEMENT.md. <!-- END PLATFORM: Web -->
<!-- PLATFORM: Backend -->
Backend
- Use the language's async primitives for I/O-bound work.
- Follow the framework's recommended patterns for request handling, middleware, and error propagation.
- If the project has a linter configured, run it before opening a PR and fix any violations.
- If the task touches dependency files, follow
.agents/standards/DEPENDENCY_MANAGEMENT.md. <!-- END PLATFORM: Backend -->
Process
- For non-trivial changes: pause and ask "is there a more elegant way?"
- If a fix feels hacky, implement the elegant solution instead.
- Skip this for simple, obvious fixes — don't over-engineer.
- Challenge your own work before presenting it.
System Extension
- New modules must conform to existing interface and logging structures.
- Utility functions must be unit tested before shared use.
- New features must maintain backward compatibility unless justified.
- All changes must include a performance impact assessment.
04 同仓库更多 Skills
setup-project
When setting up agentskel on a new project that does not yet have .memory/ or .agents/. Use when the user says "set up agentskel", "install agentskel", or "add agent memory to this project".
using-git-worktrees
When running long feature implementations, parallel branch work, or build/test scripts that must not interfere with the user's active working directory. Creates isolated execution environments via git worktrees in sibling directories.
test-engineer
When designing test strategy, analysing coverage, or writing tests outside the TDD cycle. Also use when working with CI pipelines or validating changes end-to-end.
test-driven-development
When implementing logic changes during develop-feature or implement-task. Use the Red-Green-Refactor cycle to write a failing test before any production code.
task-planner
When decomposing a feature or spec into implementable subtasks, estimating scope, or orchestrating multi-step work across subagents.
systematic-debugger
When applying debugging techniques during any investigation — root cause tracing, bisect, defense-in-depth. Enforces hypothesis-first analysis and prohibits guess-and-check changes. Use standalone or inside the debug-issue workflow.