Community编程与开发github.com

github/generate-custom-instructions-from-codebase

GitHub Copilot 的迁移与代码演进指令生成器。通过分析两个项目版本(分支、提交或发行版)之间的差异,生成精确的指令,使 Copilot 在技术迁移、大型重构或框架版本升级中保持一致性。

generate-custom-instructions-from-codebase 是什么?

该技能旨在为 GitHub Copilot 自动生成“自定义指令”,以帮助其在代码库发生重大变更(如技术迁移、框架升级或大规模重构)时保持编码风格、模式和实践的一致性。用户提供新旧两个版本的代码库(通过分支、提交或标签指定),技能将分析两者间的所有差异——包括新引入的 API、废弃的用法、依赖关系变更、新增或修改的配置以及代码范例——并 output 一份结构化文档。该文档可直接用作 Copilot 的 `.github/copilot-instructions.md`,从而确保 Copilot 之后的代码生成遵循迁移后的新规范。它支持所有 Git 仓库,通过 diff 分析精准捕捉迁移关键点,是团队进行技术现代化、依赖升级或代码基底重构时保持 Copilot 行为对齐的有效工具。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/github/awesome-copilot/tree/main/skills/generate-custom-instructions-from-codebase

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

在你喜欢的 AI 中提问

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

文档

generate-custom-instructions-from-codebase 是做什么的?

GitHub Copilot 的迁移与代码演进指令生成器。通过分析两个项目版本(分支、提交或发行版)之间的差异,生成精确的指令,使 Copilot 在技术迁移、大型重构或框架版本升级中保持一致性。

概述

该技能自动为 GitHub Copilot 生成自定义指令,以应对重大的代码库变更。输入两个 Git 提交、分支或标签,即可获得一份可直接用作 .github/copilot-instructions.md 的文档,指导 Copilot 理解并应用新旧代码库之间的模式差异。

使用方法

  1. 提供对比信息:指定两个 Git 引用(例如 HEAD 与 main,或 v1.0 与 v2.0)。
  2. 技能进行分析:对比两者的差异,提取变更的 API、配置、依赖关系、代码范例等关键元素。
  3. 生成指令:输出结构化的 Markdown 文档,包含:
    • 迁移上下文说明
    • 新 API 与废弃 API 的映射
    • 替换代码范例
    • 配置与依赖变更
    • 编码风格或约定更新
  4. 应用指令:将生成的文档保存到项目仓库的 .github/copilot-instructions.md 中,GitHub Copilot 将自动加载并遵循这些指令。

示例场景

  • 框架升级:从 React 16 升级到 React 18,生成指令确保 Copilot 使用 createRoot 而非 render。
  • API 重构:将数据库访问层从回调改为 async/await,让 Copilot 自动采用新模式。
  • 依赖替换:库如 lodash 迁移到原生 ES 方法,更新所有相关代码建议。
  • 编码规范变更:团队决定从 CommonJS 转为 ES Modules,保持所有新生成代码的一致性。

支持平台

  • GitHub Copilot(通过 .github/copilot-instructions.md)
  • 任何基于 Git 的项目

工作原理

技能内部执行 git diff 分析,自动识别以下变更类型:

  • 导入/导出语句:检测模块语法变化。
  • 函数/方法签名:注意参数、返回类型或名称的变更。
  • 配置模式:如 webpack.config.js 到 vite.config.ts 的迁移。
  • 测试框架:从 Jest 到 Vitest 的迁移。
  • 类型系统变更:TypeScript 配置或类型定义的变化。

然后,它将差异转化为可读的规则和示例,打包为 Copilot 可消费的 Markdown。

Individual skills in this repo

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

github/acquire-codebase-knowledge

Use this skill when the user explicitly asks to map, document, or onboard into an existing codebase. Trigger for prompts like "map this codebase", "document this architecture", "onboard me to this repo", or "create codebase docs". Do not trigger for routine feature implementation, bug fixes, or narrow code edits unless the user asks for repository-level discovery.

github/add-educational-comments

Add educational comments to the file specified, or prompt asking for file to comment if one is not provided.

github/agent-governance

Patterns and techniques for adding governance, safety, and trust controls to AI agent systems. Use this skill when: - Building AI agents that call external tools (APIs, databases, file systems) - Implementing policy-based access controls for agent tool usage - Adding semantic intent classification to detect dangerous prompts - Creating trust scoring systems for multi-agent workflows - Building audit trails for agent actions and decisions - Enforcing rate limits, content filters, or tool restrictions on agents - Working with any agent framework (PydanticAI, CrewAI, OpenAI Agents, LangChain, AutoGen)

github/agentic-eval

Patterns and techniques for evaluating and improving AI agent outputs. Use this skill when: - Implementing self-critique and reflection loops - Building evaluator-optimizer pipelines for quality-critical generation - Creating test-driven code refinement workflows - Designing rubric-based or LLM-as-judge evaluation systems - Adding iterative improvement to agent outputs (code, reports, analysis) - Measuring and improving agent response quality

github/agent-owasp-compliance

Check any AI agent codebase against the OWASP Agentic Security Initiative (ASI) Top 10 risks. Use this skill when: - Evaluating an agent system's security posture before production deployment - Running a compliance check against OWASP ASI 2026 standards - Mapping existing security controls to the 10 agentic risks - Generating a compliance report for security review or audit - Comparing agent framework security features against the standard - Any request like "is my agent OWASP compliant?", "check ASI compliance", or "agentic security audit"

github/ai-prompt-engineering-safety-review

Comprehensive AI prompt engineering safety review and improvement prompt. Analyzes prompts for safety, bias, security vulnerabilities, and effectiveness while providing detailed improvement recommendations with extensive frameworks, testing methodologies, and educational content.

github/appinsights-instrumentation

Instrument a webapp to send useful telemetry data to Azure App Insights

github/apple-appstore-reviewer

Serves as a reviewer of the codebase with instructions on looking for Apple App Store optimizations or rejection reasons.

github/architecture-blueprint-generator

Comprehensive project architecture blueprint generator that analyzes codebases to create detailed architectural documentation. Automatically detects technology stacks and architectural patterns, generates visual diagrams, documents implementation patterns, and provides extensible blueprints for maintaining architectural consistency and guiding new development.

github/arch-linux-triage

Triage and resolve Arch Linux issues with pacman, systemd, and rolling-release best practices.

github/arize-ai-provider-integration

Creates, reads, updates, and deletes Arize AI integrations that store LLM provider credentials used by evaluators and other Arize features. Supports any LLM provider (e.g. OpenAI, Anthropic, Azure OpenAI, AWS Bedrock, Vertex AI, Gemini, NVIDIA NIM). Use when the user mentions AI integration, LLM provider credentials, create integration, list integrations, update credentials, delete integration, or connecting an LLM provider to Arize.

github/arize-annotation

Creates and manages annotation configs (categorical, continuous, freeform label schemas) and annotation queues (human review workflows) on Arize. Applies human annotations to project spans via the Python SDK. Use when the user mentions annotation config, annotation queue, label schema, human feedback, bulk annotate spans, update_annotations, labeling queue, annotate record, or human review.

github/arize-dataset

Creates, manages, and queries Arize datasets and examples. Covers dataset CRUD, appending examples, exporting data, and file-based dataset creation using the ax CLI. Use when the user needs test data, evaluation examples, or mentions create dataset, list datasets, export dataset, append examples, dataset version, golden dataset, or test set.

github/arize-evaluator

Handles LLM-as-judge evaluation workflows on Arize including creating/updating evaluators, running evaluations on spans or experiments, managing tasks, trigger-run operations, column mapping, and continuous monitoring. Use when the user mentions create evaluator, LLM judge, hallucination, faithfulness, correctness, relevance, run eval, score spans, score experiment, trigger-run, column mapping, continuous monitoring, or improve evaluator prompt.

github/arize-experiment

Creates, runs, and analyzes Arize experiments for evaluating and comparing model performance. Covers experiment CRUD, exporting runs, comparing results, and evaluation workflows using the ax CLI. Use when the user mentions create experiment, run experiment, compare models, model performance, evaluate AI, experiment results, benchmark, A/B test models, or measure accuracy.

github/arize-instrumentation

Adds Arize AX tracing to an LLM application for the first time. Follows a two-phase agent-assisted flow to analyze the codebase then implement instrumentation after user confirmation. Use when the user wants to instrument their app, add tracing from scratch, set up LLM observability, integrate OpenTelemetry or openinference, or get started with Arize tracing.

github/arize-link

Generates deep links to the Arize UI for traces, spans, sessions, datasets, labeling queues, evaluators, and annotation configs. Produces clickable URLs for sharing Arize resources with team members. Use when the user wants to link to or open a trace, span, session, dataset, evaluator, or annotation config in the Arize UI.

github/arize-prompt-optimization

Optimizes, improves, and debugs LLM prompts using production trace data, evaluations, and annotations. Extracts prompts from spans, gathers performance signal, and runs a data-driven optimization loop using the ax CLI. Use when the user mentions optimize prompt, improve prompt, make AI respond better, improve output quality, prompt engineering, prompt tuning, or system prompt improvement.

github/arize-trace

Downloads, exports, and inspects existing Arize traces and spans to understand what an LLM app is doing or debug runtime issues. Covers exporting traces by ID, spans by ID, sessions by ID, and root-cause investigation using the ax CLI. Use when the user wants to look at existing trace data, see what their LLM app is doing, export traces, download spans, investigate errors, or analyze behavior regressions.

github/aspire

Aspire skill covering the Aspire CLI, AppHost orchestration, service discovery, integrations, MCP server, VS Code extension, Dev Containers, GitHub Codespaces, templates, dashboard, and deployment. Use when the user asks to create, run, debug, configure, deploy, or troubleshoot an Aspire distributed application.

相关技能