Agent Skillsmastra-ai/mastra › code-standards

code-standards

GitHub

提供结构化代码审查流程,涵盖关键缺陷、代码质量、风格规范及Linting检查,输出包含摘要、问题、建议和肯定反馈的PR评审报告。

templates/template-github-review-agent/workspace/skills/code-standards/SKILL.md mastra-ai/mastra

Trigger Scenarios

需要审查Pull Request 评估代码质量和规范性 检查潜在逻辑错误或风格违规

Install

npx skills add mastra-ai/mastra --skill code-standards -g -y
More Options

Non-standard path

npx skills add https://github.com/mastra-ai/mastra/tree/main/templates/template-github-review-agent/workspace/skills/code-standards -g -y

Use without installing

npx skills use mastra-ai/mastra@code-standards

指定 Agent (Claude Code)

npx skills add mastra-ai/mastra --skill code-standards -a claude-code -g -y

安装 repo 全部 skill

npx skills add mastra-ai/mastra --all -g -y

预览 repo 内 skill

npx skills add mastra-ai/mastra --list

SKILL.md

Frontmatter
{
    "name": "code-standards",
    "version": "1.0.0",
    "metadata": {
        "tags": [
            "code-review",
            "quality",
            "style"
        ]
    },
    "description": "Code quality standards and style guide for reviewing pull requests"
}

Code Standards Review

When reviewing code, follow this structured process:

Step 1: Critical Issues

Check for issues that MUST be fixed before merging:

  • Logic bugs and incorrect behavior
  • Missing error handling for failure cases
  • Race conditions or concurrency issues
  • Unhandled edge cases (null, undefined, empty arrays, boundary values)
  • Breaking API changes without migration path

Step 2: Code Quality

Evaluate overall code quality:

  • Functions should do one thing and be reasonably sized (< 50 lines preferred)
  • Avoid code duplication — look for repeated patterns that should be abstracted
  • Use descriptive, meaningful names for variables, functions, and types
  • Prefer explicit types over any in TypeScript
  • Ensure proper use of async/await (no floating promises, proper error propagation)

Step 3: Style Guide Conformance

Check against the style guide in references/style-guide.md:

  • Naming conventions
  • Code organization and import ordering
  • Comment quality (explain "why", not "what")

Step 4: Linting Flags

Flag these patterns:

  • var usage (should be const or let)
  • Leftover console.log or debugger statements
  • Commented-out code blocks
  • Magic numbers without named constants
  • TODO or FIXME comments without issue references

Output Format

Structure your feedback as:

  1. Summary: 1-2 sentence overview of the changes and overall quality
  2. Critical Issues: Must-fix problems with file path and line numbers
  3. Suggestions: Improvements that would make the code better
  4. Positive Notes: Good patterns and decisions worth acknowledging

Version History

  • fb538c4 Current 2026-08-20 17:28

Same Skill Collection

.agents/skills/label-core-bugs/SKILL.md
.claude/skills/debugging-difficult-bugs/SKILL.md
.claude/skills/docs-audit/SKILL.md
.claude/skills/e2e-tests-studio/SKILL.md
.claude/skills/label-core-bugs/SKILL.md
.claude/skills/mastra-docs/SKILL.md
.claude/skills/mastra-frontend/SKILL.md
.claude/skills/mastra-smoke-test/SKILL.md
.claude/skills/pr-explainer/SKILL.md
.claude/skills/pr-splitter/SKILL.md
.claude/skills/ralph-plan/SKILL.md
.claude/skills/react-best-practices/SKILL.md
.claude/skills/smoke-test/SKILL.md
.claude/skills/tailwind-v4/SKILL.md
.claude/skills/testing-core-processors/SKILL.md
.claude/skills/testing-mastracode-tui/SKILL.md
.mastracode/skills/gh-bulk-issues/SKILL.md
.mastracode/skills/herdr-kit-workflows/SKILL.md
.mastracode/skills/herdr-manager-query/SKILL.md
.mastracode/skills/label-core-bugs/SKILL.md
.mastracode/skills/understand-issue/SKILL.md
.mastracode/skills/understand-pr/SKILL.md
mastracode/factory/factory-skills/configure-factory-rules/SKILL.md
mastracode/factory/factory-skills/factory-complete-issue/SKILL.md
mastracode/factory/factory-skills/factory-plan/SKILL.md
mastracode/factory/factory-skills/factory-rereview/SKILL.md
mastracode/factory/factory-skills/factory-review/SKILL.md
mastracode/factory/factory-skills/factory-triage/SKILL.md
templates/template-claw-assistant/workspace/skills/general-tasks/SKILL.md
templates/template-claw-assistant/workspace/skills/research-tasks/SKILL.md
templates/template-github-review-agent/workspace/skills/performance-review/SKILL.md
templates/template-github-review-agent/workspace/skills/security-review/SKILL.md
.claude/skills/builder-smoke-test/SKILL.md
.claude/skills/playground-msw-tests/SKILL.md
.mastracode/skills/triage-issue/SKILL.md

Metadata

Files
0
Version
fb538c4
Hash
f4ccf455
Indexed
2026-08-20 17:28

Accueil - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-28 22:53
浙ICP备14020137号-1 $Carte des visiteurs$