Community编程与开发github.com

alfathafp/portofolio-web-design

在完成任务、实现主要功能或合并代码前,用于验证工作是否符合要求。

portofolio-web-design 是什么?

该技能用于在开发流程中自动触发代码评审,帮助捕捉问题,避免其扩大化。核心原则是尽早并频繁进行评审。它通过分派一个专门的评审子代理来工作,该子代理接收精心构建的上下文(如代码变更的起始和结束提交SHA、任务描述和计划/需求),而不会暴露整个会话历史,从而保持评审的聚焦和高效。技能支持在子代理驱动的开发中每个任务后、完成主要功能后以及合并到主分支前强制进行评审;在遇到难题、重构前或修复复杂bug后也推荐使用。用户通过获取git SHA、使用模板化指令分派子代理并处理反馈(立即修复关键问题、修复重要问题后再继续、记下次要问题)来执行评审流程。技能还提供了常见合理化的反驳(如避免自行审查差异)和明确的红旗行为(如因“简单”跳过评审),以确保评审的质量和一致性。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/alfathafp/portofolio-web-design/tree/HEAD/.agents/skills/requesting-code-review

Installed? Explore more 编程与开发 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

请求代码评审

分派一个代码评审子代理,在问题扩大化之前将其捕捉。该评审者会接收精心构建的上下文用于评估——绝不会包含你的会话历史。

核心原则: 尽早评审,经常评审。

何时请求评审

强制:

  • 在子代理驱动的开发中每个任务之后
  • 完成主要功能后
  • 合并到主分支之前

可选但有价值:

  • 遇到瓶颈时(获得新视角)
  • 重构前(基线检查)
  • 修复复杂bug后

如何请求

1. 获取git SHA:

BASE_SHA=$(git rev-parse HEAD~1)  # 或:git merge-base origin/main HEAD
HEAD_SHA=$(git rev-parse HEAD)

2. 分派代码评审子代理:

分派一个 general-purpose 子代理,填充 code-reviewer.md 中的模板

占位符:

  • {DESCRIPTION} - 你构建内容的简要总结
  • {PLAN_OR_REQUIREMENTS} - 它应该做什么
  • {BASE_SHA} - 起始提交
  • {HEAD_SHA} - 结束提交

3. 处理反馈:

  • 立即修复关键问题
  • 在继续之前修复重要问题
  • 记下次要问题留待后续处理
  • 如果评审者错了,提出反驳(附上推理)

示例

[刚刚完成任务2:添加验证函数]

你:让我在继续之前请求代码评审。

BASE_SHA=$(git log --oneline | grep "任务1" | head -1 | cut -d' ' -f1)
HEAD_SHA=$(git rev-parse HEAD)

[分派代码评审子代理]
  DESCRIPTION: 添加了 verifyIndex() 和 repairIndex(),包含4种问题类型
  PLAN_OR_REQUIREMENTS: docs/superpowers/plans/deployment-plan.md 中的任务2
  BASE_SHA: a7981ec
  HEAD_SHA: 3df7661

[子代理返回]:
  优势:架构清晰,有真实测试
  问题:
    重要:缺少进度指示器
    次要:报告间隔使用了魔法数字 (100)
  评估:可以继续

你:[修复进度指示器]
[继续执行任务3]

常见合理化借口

借口现实
“我直接审查差异就行了,不用分派评审者”你是协调者——内联审查差异会消耗你需要推进工作的上下文窗口。分派一个评审子代理:差异和评估都在它的上下文中,只有评审结果返回给你。
“评审者需要了解我整个会话历史才能理解变更”交给它精心构建的上下文,绝不包含你的会话历史。这能让评审者专注于工作产品,而不是你的思考过程。

红旗信号

绝对不要:

  • 因为“它很简单”跳过评审
  • 忽略关键问题
  • 在重要问题未修复的情况下继续推进
  • 针对有效的技术反馈进行争论

如果评审者错了:

  • 用技术推理反驳
  • 展示证明它能正常工作的代码/测试
  • 请求澄清

参见模板:code-reviewer.md

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

alfathafp/portofolio-web-design

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).

alfathafp/portofolio-web-design

Tests in real browsers via Chrome DevTools MCP. Use when building or debugging anything that runs in a browser. Use when you need to inspect the DOM, capture console errors, analyze network requests, profile performance, or verify visual output with real runtime data. Requires the chrome-devtools MCP server to be configured.

alfathafp/portofolio-web-design

Automates CI/CD pipeline setup. Use when setting up or modifying build and deployment pipelines. Use when you need to automate quality gates, configure test runners in CI, or establish deployment strategies.

alfathafp/portofolio-web-design

Conducts multi-axis code review. Use before merging any change. Use when reviewing code written by yourself, another agent, or a human. Use when you need to assess code quality across multiple dimensions before it enters the main branch. Use when asked to review a diff or a pull request, even when the diff is pasted inline.

alfathafp/portofolio-web-design

Simplifies code for clarity. Use when refactoring code for clarity without changing behavior. Use when code works but is harder to read, maintain, or extend than it should be. Use when reviewing code that has accumulated unnecessary complexity.

alfathafp/portofolio-web-design

Establishes a project's quality bar as a written contract and stops agents quietly lowering it. Interviews the user on which dimensions matter, supplies sane default thresholds when they have no number in mind, records everything in CONSTRAINTS.md, and watches the diff for a weakened bar — new @ts-ignore or eslint-disable suppressions, skipped or deleted tests, assertions stripped out, unimplemented stubs, thresholds edited down. Use when no quality bar is written down, when the user says "set up constraints" or "define our standards", when the user wants dimensions they care about — accessibility, web performance, coverage — set up as enforced constraints, when an agent keeps silencing checks or skipping tests to get to green, when you need a coverage or performance threshold and don't know what number to pick, or when an agent writes more code than anyone will read.

alfathafp/portofolio-web-design

Optimizes agent context setup. Use when starting a new session, when agent output quality degrades, when switching between tasks, or when you need to configure rules files and context for a project.

alfathafp/portofolio-web-design

Guides systematic root-cause debugging. Use when tests fail, builds break, something that worked yesterday broke, behavior doesn't match expectations, or you encounter any unexpected error. Use when you need to figure out what broke and why — a systematic approach to finding and fixing the root cause rather than guessing.

alfathafp/portofolio-web-design

Deploy applications and websites to Vercel. Use when the user requests deployment actions like "deploy my app", "deploy and give me the link", "push this live", or "create a preview deployment".

alfathafp/portofolio-web-design

Manages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when migrating a database schema in production, such as renaming or dropping a column without downtime (expand/contract). Use when deciding whether to maintain or sunset existing code.

alfathafp/portofolio-web-design

Use when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.

alfathafp/portofolio-web-design

Use when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies

alfathafp/portofolio-web-design

Records decisions and documentation. Use when you need to document an architecture decision (ADR) or the reasoning behind a design choice, when changing public APIs, shipping features, or when you need to record context that future engineers and agents will need to understand the codebase.

alfathafp/portofolio-web-design

Subjects every non-trivial decision to a fresh-context adversarial review before it stands. Use when you want every assumption cross-examined before proceeding, when stress-testing a plan for hidden failure modes, when correctness matters more than speed, when working in unfamiliar code, when stakes are high (production auth, security-sensitive logic, a high-stakes migration, irreversible operations), or any time a confident output would be cheaper to verify now than to debug later.

alfathafp/portofolio-web-design

Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available

alfathafp/portofolio-web-design

Use when implementation is complete, all tests pass, and you need to decide how to integrate the work

alfathafp/portofolio-web-design

Builds production-quality, accessible, responsive user-facing UIs. Use when building or modifying interfaces and pages, creating components, implementing layouts, meeting WCAG accessibility requirements, managing state, or when the output needs to look and feel production-quality rather than AI-generated.

alfathafp/portofolio-web-design

Structures git workflow practices. Use when making any code change. Use when committing, branching, resolving conflicts, splitting uncommitted work in a messy working tree into clean atomic commits, opening or reviewing a pull request (PR), pushing to a remote, or when you need to organize work across multiple parallel streams. Use when cutting a release, choosing a semantic version bump, tagging, or writing a changelog.

alfathafp/portofolio-web-design

Refines raw ideas into sharp, actionable concepts through structured divergent and convergent thinking. Use when an idea is still vague, when you need to stress-test assumptions before committing to a plan, or when you want to expand options before converging on one. Triggers on "ideate", "refine this idea", or "stress-test my plan".

alfathafp/portofolio-web-design

Guides stable API and interface design. Use when designing APIs, module boundaries, or any public interface. Use when creating REST or GraphQL endpoints, defining type contracts between modules, or establishing boundaries between frontend and backend.

相关技能