AgentSkillsCN

ai-review

审查代码更改,重点关注AI最佳实践和安全性

SKILL.md
--- frontmatter
name: ai-review
description: Review code changes with focus on AI best practices and security
license: MIT
compatibility: opencode
metadata:
  audience: developers
  workflow: code-review

What I do

  • Review code changes for AI-specific best practices
  • Check for common security issues in AI integrations
  • Verify proper error handling and API key management
  • Ensure documentation meets AI project standards
  • Validate testing approaches for AI components

When to use me

Use this skill when reviewing pull requests or code changes that involve:

  • AI model integrations
  • API calls to AI services
  • Configuration changes for AI tools
  • New AI agent implementations

Ask clarifying questions if the scope of changes is unclear or if specific security concerns should be prioritized.

Review checklist

  1. Security

    • No hardcoded API keys or secrets
    • Environment variables used properly
    • Input validation for AI responses
  2. Error Handling

    • Graceful degradation when AI services fail
    • Proper timeout handling
    • Retry logic where appropriate
  3. Documentation

    • Clear usage examples
    • API key requirements documented
    • Configuration options explained
  4. Testing

    • Mock AI responses in tests
    • Test error scenarios
    • Validate edge cases