Communitygithub.com

cdcoonce/Portfolio_Website

对代码库中的Bug或问题进行排查,定位根本原因,然后创建一个基于TDD修复计划的GitHub Issue。当用户报告Bug、想要提交Issue、提到“排查”或希望调查并规划问题修复时使用。

Portfolio_Website 是什么?

该技能旨在帮助AI代理对报告的问题进行结构化排查、根本原因分析,并生成包含TDD(测试驱动开发)修复计划的GitHub Issue。其核心是自动化深度代码库探索——使用子代理类型为Explore的Agent工具,执行影响分析、代码路径追踪和回归检测。它遵循一个严格的5步流程:捕获问题(仅限一个初始问题)、通过检查源代码、测试和Git日志进行诊断、设计最小修复方法、制定具体的红-绿测试循环计划,以及创建一个持久的GitHub Issue,该Issue不依赖特定的实现细节(文件路径、行号),而是描述模块行为和契约。该技能适用于Claude Code、Cursor和Codex等平台,其Issue模板确保即使是重大重构后问题依然有用,并且完全自动化——无需用户审批即可创建Issue。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/cdcoonce/Portfolio_Website/tree/HEAD/.claude/skills/triage-issue

在你喜欢的 AI 中提问

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

文档

问题排查

调查报告的问题,找到其根本原因,并创建一个包含TDD修复计划的GitHub Issue。这是一个基本无需干预的工作流——尽量减少向用户提问。

流程

1. 捕获问题

从用户那里获取问题的简要描述。如果他们还没有提供,请只问一个问题:“你看到了什么问题?”

暂不提问后续问题。立即开始调查。

2. 探索与诊断

使用Agent工具(subagent_type=Explore)深入调查代码库。你的目标是找到:

  • Bug在哪里表现(入口点、UI、API响应)
  • 涉及哪些代码路径(跟踪流程)
  • 为什么失败(根本原因,而不仅仅是症状)
  • 存在哪些相关代码(相似模式、测试、相邻模块)

查看:

  • 相关的源文件及其依赖
  • 现有的测试(测试了什么、缺少什么)
  • 对受影响文件的最近更改(相关文件上的git log)
  • 代码路径中的错误处理
  • 代码库其他能正常工作的地方的相似模式

3. 确定修复方法

基于你的调查,确定:

  • 修复根本原因所需的最小更改
  • 哪些模块/接口受到影响
  • 需要通过测试验证哪些行为
  • 这是回归、缺失功能还是设计缺陷

4. 设计TDD修复计划

创建具体有序的RED-GREEN循环列表。每个循环是一个垂直切片:

  • RED:描述一个捕捉破坏/缺失行为的特定测试
  • GREEN:描述使该测试通过的最小代码更改

规则:

  • 测试通过公共接口验证行为,而非实现细节
  • 一次一个测试,垂直切片(非先所有测试,再所有代码)
  • 每个测试应在内部重构后依然有效
  • 如果需要,包含最终的重构步骤
  • 持久性:仅建议能在重大代码库变更后依然成立的修复。描述行为和契约,而非内部结构。测试断言可观察到的结果(API响应、UI状态、用户可见的效果),而非内部状态。好的建议读起来像一份规范;差的建议读起来像一份差异。

5. 创建GitHub Issue

使用gh issue create并附带以下模板创建GitHub Issue。不要要求用户在创建前审查——直接创建并分享URL。

问题

对Bug或问题的清晰描述,包括:

  • 实际发生了什么(实际行为)
  • 应该发生什么(期望行为)
  • 如何复现(如果适用)

根本原因分析

描述你在调查中发现的内容:

  • 涉及的代码路径
  • 当前代码为何失败
  • 任何促成因素

不要包含特定的文件路径、行号或与当前代码布局耦合的实现细节。而是描述模块、行为和契约。即使在重大重构后,该Issue也应保持有用。

TDD修复计划

RED-GREEN循环的编号列表:

  1. RED:编写测试 [描述期望的行为] GREEN:[使其通过的最小更改]

  2. RED:编写测试 [描述下一个行为] GREEN:[使其通过的最小更改]

...

REFACTOR:[所有测试通过后需要的任何清理工作]

验收标准

  • 标准1
  • 标准2
  • 所有新测试通过
  • 现有测试仍然通过

创建Issue后,打印Issue URL和一行摘要说明根本原因。

Individual skills in this repo

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

cdcoonce/Portfolio_Website

Git commit workflow with enforced conventional commit style. Use when Claude needs to stage and commit changes, craft commit messages, or the user asks to commit, make a commit, or save their work. Ensures consistent commit message format, proper scoping, and atomic commits across the project.

cdcoonce/Portfolio_Website

AI-powered code quality analysis for Python, Markdown, and Mermaid diagrams. Use this skill when: (1) reviewing code for quality issues, (2) checking Python files for PEP8 violations, unused code, missing type hints, docstring problems, complexity issues, or potential runtime errors, (3) validating Markdown documentation for broken links, heading structure, or formatting issues, (4) validating Mermaid diagram syntax, (5) the user asks for a "code review" or "quality check", (6) analyzing code snippets pasted in conversation, or (7) suggesting and applying fixes for code quality issues.

cdcoonce/Portfolio_Website

Deploy the portfolio chat agent Lambda function to AWS. Use when the user asks to deploy, redeploy, push to Lambda, update the chat agent, or after updating context files or lambda_function.py. Rebuilds the knowledge base, packages dependencies, and deploys to AWS Lambda.

cdcoonce/Portfolio_Website

Generate multiple radically different interface designs for a module using parallel sub-agents. Use when user wants to design an API, explore interface options, compare module shapes, or mentions "design it twice".

cdcoonce/Portfolio_Website

Orchestrate the full GitHub-issues-driven development lifecycle. 7-phase pipeline from brainstorm through PR with state tracking and cross-conversation resume. Use when user says "dev cycle", "development workflow", "full development pipeline", or invokes /dev-cycle.

cdcoonce/Portfolio_Website

Production Python coding standards with automatic version detection (3.10-3.13). Use when writing, reviewing, or refactoring Python to ensure adherence to modern type syntax, LBYL exception handling, pathlib operations, ABC-based interfaces, and production-tested patterns. Not Dagster-specific - applies to any Python project.

cdcoonce/Portfolio_Website

Set up Claude Code hooks to block dangerous git commands (push, reset --hard, clean, branch -D, etc.) before they execute. Use when user wants to prevent destructive git operations, add git safety hooks, or block git push/reset in Claude Code.

cdcoonce/Portfolio_Website

GitHub CLI (gh) integration for managing issues, pull requests, branches,

cdcoonce/Portfolio_Website

Interview the user relentlessly about a plan or design until reaching shared understanding, resolving each branch of the decision tree. Use when user wants to stress-test a plan, get grilled on their design, or mentions "grill me".

cdcoonce/Portfolio_Website

Explore a codebase to find opportunities for architectural improvement, focusing on making the codebase more testable by deepening shallow modules. Use when user wants to improve architecture, find refactoring opportunities, consolidate tightly-coupled modules, or make a codebase more AI-navigable.

cdcoonce/Portfolio_Website

CEO/founder-mode plan review. Rethink the problem, find the 10-star product, challenge premises, expand scope when it creates a better product. Three modes: SCOPE EXPANSION (dream big), HOLD SCOPE (maximum rigor), SCOPE REDUCTION (strip to essentials). Use when the user asks for a plan review, CEO review, mega review, or wants a plan challenged/stress-tested before implementation.

cdcoonce/Portfolio_Website

Break a PRD into independently-grabbable GitHub issues using tracer-bullet vertical slices. Use when user wants to convert a PRD to issues, create implementation tickets, or break down a PRD into work items.

cdcoonce/Portfolio_Website

Turn a PRD into a multi-phase implementation plan using tracer-bullet vertical slices, saved as a local Markdown file in docs/plans/. Use when user wants to break down a PRD, create an implementation plan, plan phases from a PRD, or mentions "tracer bullets".

cdcoonce/Portfolio_Website

Generate or update the `.claude/docs/project.md` file that gives Claude project-specific context. Use this skill when the user asks to create, update, regenerate, or refresh project context, or says things like "update project.md", "generate project context", "this repo needs a project.md", or "Claude doesn't know about this project". Also trigger when onboarding Claude to a new repository for the first time.

cdcoonce/Portfolio_Website

Generate comprehensive, high-quality README.md files for code repositories. Use this skill whenever the user asks to create, write, generate, update, or improve a README for any project or repository. Also trigger when the user says things like "document this project", "write docs for this repo", "this repo needs a README", "help me onboard developers to this codebase", or asks for project documentation in markdown. Even if the user just says "README" or "readme" in the context of a codebase, use this skill.

cdcoonce/Portfolio_Website

Create a detailed refactor plan with tiny commits via user interview, then file it as a GitHub issue. Use when user wants to plan a refactor, create a refactoring RFC, or break a refactor into safe incremental steps.

cdcoonce/Portfolio_Website

Set up pre-commit hooks for the current repo. Use when user wants to add pre-commit hooks, configure commit-time linting, formatting, type checking, or testing. Triggers on "pre-commit", "git hooks", "linting hooks", or /setup-pre-commit.

cdcoonce/Portfolio_Website

Test-driven development with red-green-refactor loop. Use when user wants to build features or fix bugs using TDD, mentions "red-green-refactor", wants integration tests, or asks for test-first development.

cdcoonce/Portfolio_Website

Rewrites the prose sections of wiki pages in-place. Reads source files to understand current context, then updates only the content inside <!-- claude:prose --> ... <!-- claude:prose:end --> markers. Never touches <!-- generated:start --> ... <!-- generated:end --> blocks. Supports targeting a single page with /update-wiki {PageName}.

cdcoonce/Portfolio_Website

Create a PRD through user interview, codebase exploration, and module design, then submit as a GitHub issue. Use when user wants to write a PRD, create a product requirements document, or plan a new feature.

相关技能