惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

H
Hackread – Cybersecurity News, Data Breaches, AI and More
博客园 - 三生石上(FineUI控件)
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
B
Blog
D
DataBreaches.Net
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
V
Vulnerabilities – Threatpost
Jina AI
Jina AI
T
Threat Research - Cisco Blogs
The Hacker News
The Hacker News
Latest news
Latest news
博客园_首页
T
Tenable Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
酷 壳 – CoolShell
酷 壳 – CoolShell
Apple Machine Learning Research
Apple Machine Learning Research
Spread Privacy
Spread Privacy
Martin Fowler
Martin Fowler
Y
Y Combinator Blog
P
Privacy & Cybersecurity Law Blog
C
Cisco Blogs
I
InfoQ
The Cloudflare Blog
J
Java Code Geeks
C
Cybersecurity and Infrastructure Security Agency CISA
量子位
P
Proofpoint News Feed
C
Cyber Attacks, Cyber Crime and Cyber Security
Last Week in AI
Last Week in AI
T
Tailwind CSS Blog
AWS News Blog
AWS News Blog
Stack Overflow Blog
Stack Overflow Blog
Hugging Face - Blog
Hugging Face - Blog
The Register - Security
The Register - Security
M
MIT News - Artificial intelligence
G
Google Developers Blog
Simon Willison's Weblog
Simon Willison's Weblog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
T
The Exploit Database - CXSecurity.com
A
Arctic Wolf
D
Darknet – Hacking Tools, Hacker News & Cyber Security
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
V
Visual Studio Blog
Project Zero
Project Zero
P
Privacy International News Feed
Engineering at Meta
Engineering at Meta
G
GRAHAM CLULEY
博客园 - Franky
C
CERT Recently Published Vulnerability Notes

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
GitHub Copilot Prompts vs Skills vs Instructions: What's the Difference and When to Use Each
Luke Hackett · 2026-05-18 · via DEV Community

You've been using GitHub Copilot for a while. It's great out of the box, but you keep catching yourself repeating the same context. "We use Vitest, not Jest.", "Always use server actions, not API routes.", "Run migrations with this specific command."

GitHub Copilot now has three primitives that let you codify this kind of knowledge: Instructions, Prompts, and Skills. They overlap just enough to be confusing, but once you see how each one works, the choice becomes obvious.

Let's break them down.


Instructions: The Always-On Rules

instructions.md are Markdown files that passively shape Copilot's behavior. Think of them as the coding standards document your team actually reads - because the AI reads it for them.

Where they live:

  • .github/copilot-instructions.md - project-wide rules, loaded on every interaction
  • .github/instructions/*.instructions.md - file-specific or task-specific rules, loaded on-demand

When to use instructions

Use instructions when the guidance applies broadly and should always be in play without anyone explicitly asking for it.

Example 1: Project-wide standards

.github/copilot-instructions.md:

# Project Guidelines

## Code Style
- Use functional components with hooks, never class components
- Prefer named exports over default exports
- Use `pnpm`, not `npm` or `yarn`

## Architecture
- API routes live in `src/app/api/`
- All database access goes through the repository pattern in `src/lib/db/`
- Never import server-only modules in client components

## Testing
- Run tests with `pnpm test`
- Use Vitest, not Jest
- Co-locate test files next to source: `Button.test.tsx` beside `Button.tsx`

Enter fullscreen mode Exit fullscreen mode

This file is loaded into every Copilot interaction. When you ask it to write a test, it'll reach for Vitest. When it scaffolds a component, it'll use a named export. No reminders needed.

Example 2: File-specific rules loaded automatically

.github/instructions/react-components.instructions.md:

---
description: "Standards for React components"
applyTo: "src/components/**/*.tsx"
---

# React Component Standards

- Use the `cn()` utility from `@/lib/utils` for conditional classes
- Props types go above the component, named `{ComponentName}Props`
- Use `forwardRef` for any component that wraps a native element

Enter fullscreen mode Exit fullscreen mode

The applyTo glob means this loads automatically whenever Copilot is working on files in src/components/. You never invoke it — it just shows up when relevant.

Example 3: On-demand task instructions

.github/instructions/database-migrations.instructions.md:

---
description: "Use when writing database migrations, schema changes, or data transformations"
---

# Migration Guidelines

- Always create reversible migrations with explicit `up` and `down`
- Never drop a column in the same release as the code removal
- Add indexes concurrently: `CREATE INDEX CONCURRENTLY`
- Test rollback locally before pushing

Enter fullscreen mode Exit fullscreen mode

No applyTo here. Instead, the description tells Copilot when this instruction is relevant. When you ask Copilot to help with a migration, it reads the description, recognizes the match, and pulls in the instructions automatically.

Key Takeaway

Instructions are passive.

They shape behavior without you thinking about them. The best instructions are ones your team writes once and then forgets exist — because Copilot just does the right thing.


Prompts: The Reusable Tasks

What they are: Template files for specific, repeatable tasks you trigger on-demand. They're like saved chat messages with superpowers — you can pin them to specific models, restrict their tools, and parameterize inputs.

Where they live:

  • .github/prompts/*.prompt.md — workspace-scoped
  • ~/.config/github-copilot/prompts/*.prompt.md — personal, follows you across projects

When to use prompts

Use prompts when you have a single, focused task you do repeatedly and want consistent output every time.

Example 1: Generating tests from code

.github/prompts/generate-tests.prompt.md:

---
description: "Generate test cases for the selected code"
agent: "agent"
---

Generate comprehensive test cases for the provided code:

- Include happy path, edge cases, and error scenarios
- Follow existing test patterns in this codebase
- Use descriptive test names that read like specifications
- Mock external dependencies, never hit real APIs

Enter fullscreen mode Exit fullscreen mode

Now type /generate-tests in chat, and you get consistent, well-structured tests every time. No re-explaining your preferences.

Example 2: Writing a changelog entry

.github/prompts/changelog.prompt.md:

---
description: "Draft a changelog entry from recent git commits"
agent: "agent"
tools: [terminal]
---

Review the git log since the last tag and draft a changelog entry.

Format:
## [version] - YYYY-MM-DD
### Added
### Changed
### Fixed

Group by type. Use past tense. Link PR numbers. Keep entries to one line.

Enter fullscreen mode Exit fullscreen mode

Example 3: PR description generator

.github/prompts/pr-description.prompt.md:

---
description: "Generate a PR description from the current branch diff"
agent: "agent"
tools: [terminal]
---

Generate a pull request description based on the current branch's diff against main.

Include:
1. **Summary** — what changed and why (2-3 sentences)
2. **Changes** — bullet list of notable changes
3. **Testing** — how this was tested
4. **Screenshots** — placeholder if UI changed

Use the conventional commits in the log to understand intent.

Enter fullscreen mode Exit fullscreen mode

Key Takeaway

Prompts are active.

You invoke them deliberately when you want to run a specific task. They're your saved workflows — small, focused, and reusable. If you're reaching for the same chat prompt more than twice, it should be a prompt file.


Skills: The Multi-Step Workflows

What they are: Folders containing instructions, scripts, templates, and reference docs that Copilot loads on-demand for complex, multi-step tasks. Skills are the heavy machinery — they bundle everything the agent needs to execute a sophisticated workflow.

Where they live:

  • .github/skills/<skill-name>/SKILL.md — workspace-scoped
  • ~/.copilot/skills/<skill-name>/SKILL.md — personal

When to use skills

Use skills when you need a multi-step workflow with bundled assets — scripts to run, templates to fill, reference docs to consult. If a prompt is a recipe card, a skill is the entire cookbook chapter with ingredients included.

Example 1: A deployment verification skill

.github/skills/verify-deployment/
├── SKILL.md
├── scripts/
│   └── smoke-test.sh
└── references/
    └── endpoints.md

Enter fullscreen mode Exit fullscreen mode

SKILL.md:

---
name: verify-deployment
description: 'Verify a deployment is healthy. Use when deploying, after deploy, smoke test, health check.'
---

# Deployment Verification

## Procedure
1. Ask which environment (staging/production)
2. Run the [smoke test script](./scripts/smoke-test.sh) against the environment
3. Check each endpoint listed in [endpoints reference](./references/endpoints.md)
4. Report results as a table: endpoint, status, response time
5. Flag any endpoint returning non-200 or responding > 2s

Enter fullscreen mode Exit fullscreen mode

This bundles the smoke test script and endpoint list with the instructions. The agent doesn't need to search for them or ask you where they are.

Example 2: A component scaffolding skill

.github/skills/new-component/
├── SKILL.md
└── assets/
    ├── component.tsx.template
    ├── component.test.tsx.template
    └── component.stories.tsx.template

Enter fullscreen mode Exit fullscreen mode

SKILL.md:

---
name: new-component
description: 'Scaffold a new React component with tests and stories. Use when creating components, new UI element, add component.'
---

# New Component

## Procedure
1. Ask for the component name and directory
2. Create from [component template](./assets/component.tsx.template)
3. Create test from [test template](./assets/component.test.tsx.template)
4. Create story from [stories template](./assets/component.stories.tsx.template)
5. Add barrel export to the directory's `index.ts`

Enter fullscreen mode Exit fullscreen mode

Key Takeaway

Skills are orchestrations.

They package complex workflows with their dependencies. The bar for creating a skill is higher — you need a folder structure, and the task needs to be complex enough to justify it. But for workflows you run regularly, they're transformative.


Decisions, Decisions, Decisions

The examples above should help

You've seen all three, but you're probably still wondering which option best fits your usecase.

Don't overthink it — ask yourself these questions:

Question Answer Use
Should this apply without anyone asking? Yes Instructions
Is it a single, focused task? Yes Prompt
Does it need scripts, templates, or multi-step orchestration? Yes Skill
Does it apply to specific file types? Yes Instructions (with applyTo)
Do I want it as a slash command? Yes Prompt or Skill
Is it project-wide context? Yes Instructions (copilot-instructions.md)

Remember:

  • Instructions = "Always do this" (passive)
  • Prompts = "Do this now" (active, simple)
  • Skills = "Do this now, and here's everything you need" (active, complex)

Getting Started

Don't try to build all three at once.

  1. Start with copilot-instructions.md — write down the things you keep correcting Copilot on. "Use Vitest.", "We use pnpm.", "Components go here." This takes five minutes and pays off immediately.

  2. Notice your repeated prompts — if you've typed "write tests for this using our patterns" more than twice, make it a .prompt.md file.

  3. Graduate to skills when you feel the friction — when a prompt isn't enough because you need to reference a script or template, that's your signal to create a skill folder.

The goal isn't to configure Copilot perfectly on day one. It's to gradually encode your team's knowledge so the AI gets smarter about your codebase over time.