GitHub Copilot · Prompts · Agent Mode

Mejores prompts para GitHub Copilot: 52 prompts para programar con IA

Biblioteca práctica con 52 prompts para GitHub Copilot diseñados para programar, analizar repositorios, implementar funcionalidades, encontrar bugs, crear tests, revisar seguridad, trabajar con Git, APIs, bases de datos, frontend, Agent Mode, Copilot CLI, Cloud Agent, MCP, Code Review, WordPress y WooCommerce.

52 prompts 13 categorías Botón copiar Buscador
Respuesta rápida

¿Cómo escribir un buen prompt para GitHub Copilot?

Un buen prompt para GitHub Copilot debería indicar qué quieres conseguir, qué contexto debe revisar, qué restricciones debe respetar, cómo debería trabajar, cómo debe verificar el resultado y qué información debe entregar al terminar. Para tareas complejas, es mejor describir el objetivo claramente y permitir que el agente investigue el repositorio antes de modificarlo.

01 Objetivo
02 Contexto
03 Restricciones
04 Proceso
05 Verificación
06 Salida
Prompt engineering

La estructura que mejora los prompts de programación

No necesitas escribir prompts enormes para cada tarea, pero sí eliminar ambigüedades importantes.

1. Explica el resultado

Di qué comportamiento debería existir cuando la tarea esté terminada.

2. Indica límites

Compatibilidad, seguridad, archivos que no deben tocarse o APIs que deben conservarse.

3. Exige evidencia

Tests, lint, build, diff o reproducción real antes de aceptar el resultado.

Ejemplo

Prompt débil vs prompt útil

Débil

“Arregla este código”

No define problema, alcance, restricciones ni criterios de verificación.

Mejor

“Encuentra la causa raíz antes de editar”

Indica cómo investigar, qué preservar y cómo demostrar que el bug quedó solucionado.

Publicidad
Mejor forma de pedir

Goal → Context → Constraints → Work → Verify

01 · GOAL

Objetivo

Qué debe quedar funcionando.

02 · CONTEXT

Contexto

Qué archivos debe investigar.

03 · CONSTRAINTS

Restricciones

Qué debe preservar.

04 · VERIFY

Evidencia

Cómo demostrar que funciona.

Publicidad
Biblioteca Ciborg

52 prompts para GitHub Copilot

Puedes copiar cualquier prompt, adaptarlo a tu proyecto o utilizar el buscador y los filtros.

Mostrando 52 prompts.
No encontramos prompts con ese filtro. Prueba otra palabra.
Categoría 1

Fundamentos y comprensión de código

4 prompts
01 Comprender

Explicar código antes de modificarlo

Úsalo: cuando entres a una parte del proyecto que todavía no conoces.
Prompt
Explain this code before making any changes.

Describe:

- its purpose
- inputs and outputs
- main execution flow
- external dependencies
- side effects
- error handling
- security-sensitive behavior
- assumptions it relies on

Then identify
the functions or modules
that interact with it.

Do not modify code yet.
02 Data Flow

Seguir el flujo de datos

Úsalo: para entender de dónde viene un dato y dónde termina.
Prompt
Trace the complete data flow
for [FEATURE / VALUE].

Start at the external input
and follow it through:

1. request or event
2. validation
3. business logic
4. persistence
5. downstream calls
6. response or UI output

For each step identify:

- file
- function
- data transformation
- trust boundary
- possible failure point

Do not change anything.
03 Impacto

Analizar una función antes de tocarla

Úsalo: antes de modificar una función utilizada por muchas partes del sistema.
Prompt
Analyze the function [FUNCTION NAME].

Find:

- every caller
- important downstream calls
- public behavior
- implicit assumptions
- error paths
- tests covering it
- data it mutates
- compatibility constraints

Then explain
what could break
if its behavior changes.

Do not edit the function.
04 Legacy

Entender código legacy

Úsalo: cuando el código sea antiguo, confuso o tenga poca documentación.
Prompt
Analyze this legacy code
without refactoring it.

Reconstruct:

- what problem it solves
- current observable behavior
- important invariants
- hidden coupling
- global state
- side effects
- external integrations
- backwards compatibility requirements

Separate:

1. verified facts from the code
2. reasonable hypotheses
3. unknowns that require testing

Do not modernize anything yet.
Categoría 2

Repositorios y arquitectura

4 prompts
05 Repository

Analizar un repositorio completo

Úsalo: como primer prompt al abrir un proyecto desconocido.
Prompt
Analyze this repository
before making changes.

Identify:

- application purpose
- important directories
- entry points
- architectural layers
- data stores
- external services
- authentication
- authorization
- build commands
- test commands
- lint / typecheck commands
- deployment-related files
- project-specific conventions

Then produce
a concise architecture map.

Do not modify files.
06 Architecture

Detectar deuda arquitectónica

Úsalo: para descubrir acoplamiento, duplicación y límites poco claros.
Prompt
Review this repository
for architectural debt.

Look for:

- circular dependencies
- duplicated abstractions
- unclear module boundaries
- business logic in transport layers
- persistence leaking into UI
- excessive global state
- tightly coupled services
- abstractions used only once
- inconsistent architectural patterns

Rank findings by:

1. maintenance cost
2. defect risk
3. difficulty to improve

Do not recommend a rewrite.
07 Navigation

Encontrar todos los archivos de una feature

Úsalo: antes de implementar un cambio transversal.
Prompt
Find every important file
involved in [FEATURE].

Include:

- entry points
- routes
- controllers / handlers
- domain logic
- database access
- frontend components
- tests
- configuration
- documentation

Explain the role
of each file
and how they connect.

Do not edit anything.
08 Onboarding

Crear un onboarding técnico

Úsalo: para comprender rápidamente cómo trabajar en el proyecto.
Prompt
Create a technical onboarding guide
for a developer joining this repository.

Cover:

- what the system does
- architecture
- important directories
- local setup
- required environment variables
- database setup
- how to run tests
- how to run lint / build
- important conventions
- common development workflows
- risky areas of the codebase

Only include information
supported by the repository.

Mark unknowns explicitly.
Categoría 3

Implementación y refactoring

4 prompts
09 Feature

Implementar una feature correctamente

Úsalo: para una funcionalidad que toca varios archivos.
Prompt
Implement [FEATURE].

Before coding:

1. inspect the existing architecture
2. find similar functionality
3. identify affected public interfaces
4. identify tests
5. propose the smallest safe plan

Requirements:

[REQUIREMENTS]

Constraints:

[CONSTRAINTS]

After implementation:

- run relevant tests
- run lint / typecheck / build
  when available
- inspect the complete diff
- verify backwards compatibility
- report anything not verified.
10 Minimal

Hacer el cambio mínimo seguro

Úsalo: cuando no quieras que Copilot refactorice medio proyecto.
Prompt
Make the smallest safe change
that solves [PROBLEM].

Do not:

- rename unrelated symbols
- reformat unrelated files
- introduce a new abstraction
  unless necessary
- change public APIs
- change behavior outside scope

Reuse existing project patterns.

After the change,
show why each modified file
was necessary.

Run the narrowest relevant tests.
11 Refactor

Refactorizar sin cambiar comportamiento

Úsalo: cuando quieras mejorar estructura sin alterar funcionalidad.
Prompt
Refactor [TARGET]
without changing observable behavior.

First identify:

- current public behavior
- existing tests
- callers
- side effects
- compatibility constraints

Then refactor incrementally.

Do not mix
behavioral changes
with structural cleanup.

Run the relevant tests
before and after.

Report any behavior
that could not be verified.
12 Cleanup

Eliminar duplicación sin sobrearquitectura

Úsalo: cuando existan bloques parecidos pero no quieras una abstracción excesiva.
Prompt
Review the duplicated code
in [FILES / FEATURE].

Determine whether
the duplication represents:

- the same concept
- coincidentally similar code
- different behavior
  that may diverge later

Only extract an abstraction
if it represents
a stable shared concept.

Prefer clarity
over reducing line count.

Preserve all existing behavior
and run relevant tests.
Publicidad
Categoría 4

Debugging y resolución de errores

4 prompts
13 Root Cause

Encontrar la causa raíz de un bug

Úsalo: como prompt principal para debugging serio.
Prompt
Investigate this bug
before editing code.

Problem:
[DESCRIBE BUG]

First:

1. reproduce the failure
2. collect the exact error
3. inspect relevant logs
4. trace the execution path
5. identify the first incorrect state
6. form a root-cause hypothesis
7. find evidence supporting it

Then explain:

- root cause
- affected code
- why it fails
- smallest safe fix
- regression test required

Only implement after
the cause is supported by evidence.
14 Failing Test

Diagnosticar un test que falla

Úsalo: cuando Copilot podría caer en la tentación de cambiar el test.
Prompt
Investigate the failing test.

Do not modify
the test or implementation yet.

Determine:

- what behavior the test expects
- whether that expectation
  matches the intended contract
- the exact failing assertion
- the code path producing
  the unexpected result
- whether the failure is
  implementation,
  test,
  fixture,
  environment,
  or timing related

Do not weaken assertions
just to make the suite pass.
15 Regression

Encontrar qué cambio introdujo una regresión

Úsalo: cuando algo funcionaba antes y dejó de hacerlo.
Prompt
Investigate this regression.

Known good behavior:
[DESCRIPTION]

Current broken behavior:
[DESCRIPTION]

Use git history
and relevant tests
to identify the smallest change
that introduced the regression.

Compare:

- behavior before
- behavior after
- assumptions that changed

Do not revert unrelated work.

Propose the smallest fix
that restores the intended behavior.
16 Intermittent

Investigar un error intermitente

Úsalo: para race conditions, estados inconsistentes o tests flaky.
Prompt
Investigate this intermittent failure.

Do not assume
the first plausible explanation
is correct.

Look for:

- race conditions
- shared mutable state
- retries
- caching
- ordering assumptions
- time dependencies
- async operations
- network dependencies
- test pollution
- database isolation problems

Design a way
to increase reproduction frequency.

Only propose a fix
after identifying evidence
for the failure mechanism.
Categoría 5

Testing y verificación

4 prompts
17 Unit Test

Generar tests útiles, no tests decorativos

Úsalo: para cubrir comportamiento real y casos límite.
Prompt
Create focused tests
for [TARGET].

Test observable behavior,
not private implementation details.

Cover:

- normal path
- invalid input
- boundary values
- error path
- regression scenario
- important security condition

Reuse existing test helpers
and project conventions.

Avoid tests
that simply duplicate
the implementation logic.
18 Regression

Crear un test antes de arreglar el bug

Úsalo: para demostrar que el bug existe y que no regrese.
Prompt
Before fixing this bug,
write the smallest regression test
that reproduces it.

Requirements:

- fail for the current bug
- test observable behavior
- avoid private implementation details
- isolate the failing condition

Run it
and confirm it fails
for the expected reason.

Then implement the fix
and prove the same test passes.
19 Coverage

Encontrar huecos de cobertura importantes

Úsalo: para priorizar tests que realmente reducen riesgo.
Prompt
Review the tests
for [FEATURE].

Do not optimize
for coverage percentage.

Find high-risk behavior
that is not tested.

Prioritize:

- authorization failures
- destructive operations
- edge cases
- error handling
- backwards compatibility
- concurrency
- external API failures
- previous bug-prone paths

Recommend
the smallest set of tests
that most improves confidence.
20 Verify

Verificar una tarea antes de terminar

Úsalo: al final de una implementación grande.
Prompt
Verify the implementation
before declaring the task complete.

Run the checks
available in this repository:

- targeted tests
- broader related tests
- lint
- typecheck
- build
- syntax checks

Then inspect git diff.

Confirm:

- requirements are satisfied
- no unrelated files changed
- no debug code remains
- public behavior is preserved

List anything
you could not verify.
Categoría 6

Seguridad

4 prompts
21 Audit

Auditoría de seguridad general

Úsalo: para revisar una feature o servicio antes de producción.
Prompt
Perform a security review
of [TARGET].

First map:

- trust boundaries
- attacker-controlled input
- authentication
- authorization
- secrets
- persistence
- external calls
- output surfaces

Then look for:

- injection
- authorization bypass
- privilege escalation
- IDOR
- XSS
- CSRF
- SSRF
- insecure deserialization
- secret exposure
- path traversal
- unsafe file handling

Only report findings
with a concrete failure path.
22 Authorization

Buscar fallos de autorización

Úsalo: en endpoints, paneles administrativos y recursos por usuario.
Prompt
Audit authorization
for [FEATURE / API].

For every state-changing operation
identify:

- authenticated actor
- target resource
- required permission
- ownership relationship
- authorization check
- location of enforcement

Look for:

- missing authorization
- authentication-only checks
- IDOR
- tenant isolation failures
- privilege escalation

For each issue,
describe a realistic
unauthorized request.
23 Secrets

Buscar secretos y credenciales expuestas

Úsalo: antes de publicar un repositorio o desplegar.
Prompt
Review the repository
for accidental secret exposure.

Look for:

- API keys
- access tokens
- private keys
- database credentials
- passwords
- webhook secrets
- credentials in tests
- secrets in example files
- sensitive logging

Do not print secret values
in your response.

Report:

- file
- secret type
- exposure risk
- remediation
- whether rotation is required.
24 Dependencies

Revisar riesgo de dependencias

Úsalo: cuando se agregue o actualice una librería importante.
Prompt
Review the dependency changes
in this diff.

Identify:

- newly added dependencies
- major version changes
- transitive impact
- runtime vs development usage
- duplicated functionality
- unnecessary permissions
- lockfile changes

Determine whether
each new dependency
is actually needed.

Do not remove anything
until compatibility
and usage are verified.
Publicidad
Categoría 7

Git, commits y Pull Requests

4 prompts
25 Diff

Revisar el diff antes del commit

Úsalo: antes de confirmar cambios locales.
Prompt
Review the current git diff
before I commit.

Check for:

- accidental changes
- unrelated refactors
- debug statements
- commented-out code
- missing error handling
- security regressions
- backwards compatibility
- missing tests
- generated files
  that should not be committed

Do not change anything.

Return a prioritized checklist.
26 Commit

Generar un buen mensaje de commit

Úsalo: después de revisar los cambios.
Prompt
Inspect the staged changes
and write a concise commit message.

The message should explain:

- what changed
- why it changed

Do not list
every modified file.

Do not claim
tests were run
unless they actually were.

Use the repository's
existing commit style
if one is clearly established.
27 Pull Request

Crear una descripción de Pull Request

Úsalo: para dar contexto útil a reviewers humanos y Copilot.
Prompt
Create a pull request description
from this branch's diff.

Use this structure:

## Problem
What was wrong or missing?

## Solution
What approach was implemented?

## Important decisions
What tradeoffs matter?

## Verification
What tests or checks were actually run?

## Risk
What could still go wrong?

## Review focus
Which areas deserve
extra reviewer attention?

Only state verified facts.
28 Merge

Resolver un conflicto de merge con contexto

Úsalo: cuando ambas ramas contienen cambios legítimos.
Prompt
Analyze this merge conflict
before resolving it.

Determine:

- intent of our branch
- intent of the incoming branch
- whether both behaviors
  are still required
- tests covering each side
- public contracts involved

Resolve the conflict
by preserving
the intended behavior
of both changes
when compatible.

Do not simply choose
one side based on recency.

Run relevant tests afterward.
Categoría 8

APIs, backend y bases de datos

4 prompts
29 API

Crear un endpoint correctamente

Úsalo: para endpoints REST o HTTP nuevos.
Prompt
Implement an endpoint for:

[GOAL]

Before coding,
find existing endpoint patterns.

Define:

- HTTP method
- route
- request schema
- authentication
- authorization
- validation
- response schema
- error responses
- idempotency requirements

Preserve existing API conventions.

Add tests for:

- success
- invalid input
- unauthenticated access
- unauthorized access
- missing resource.
30 Contract

Revisar compatibilidad de una API

Úsalo: antes de modificar respuestas, parámetros o errores.
Prompt
Review this API change
for backwards compatibility.

Compare the previous
and new contract.

Check:

- required parameters
- optional parameters
- response fields
- field types
- status codes
- error format
- pagination
- sorting
- authentication
- authorization

Identify clients
that may break.

Prefer additive changes
when possible.
31 Database

Revisar una consulta SQL

Úsalo: para seguridad y rendimiento de consultas críticas.
Prompt
Review this database query.

Analyze:

- correctness
- parameterization
- injection risk
- indexes likely used
- full table scans
- joins
- sorting
- pagination
- result-set size
- locking
- concurrency
- N+1 behavior

Separate:

1. correctness issues
2. security issues
3. performance concerns

Do not optimize
without evidence
that behavior remains equivalent.
32 Migration

Diseñar una migración de base de datos

Úsalo: antes de tocar datos reales.
Prompt
Design a database migration plan.

Do not execute it.

Document:

- current schema
- target schema
- expected data volume
- compatibility during rollout
- backfill strategy
- batching
- idempotency
- locking risk
- timeout risk
- rollback strategy
- application deployment order

Identify
the most dangerous step
and how to reduce its risk.
Categoría 9

Frontend, UX y rendimiento

4 prompts
33 Frontend

Depurar un problema visual o JavaScript

Úsalo: para problemas que solo aparecen en navegador.
Prompt
Investigate this frontend bug.

Before editing:

- reproduce the behavior
- inspect browser console
- inspect network requests
- inspect relevant DOM state
- identify event handlers
- identify data entering the component
- check duplicate initialization
- check race conditions

Explain the root cause
before modifying code.

After fixing,
verify the user flow
in the browser.
34 Responsive

Corregir responsive sin romper desktop

Úsalo: para layouts que fallan solo en ciertos tamaños.
Prompt
Fix this responsive layout issue.

First identify
the CSS rule
that creates the failure.

Test the layout at:

- small mobile
- large mobile
- tablet
- laptop
- wide desktop

Preserve existing desktop behavior.

Avoid:

- arbitrary pixel overrides
- unnecessary !important
- duplicating entire style blocks

Make the smallest
responsive change
that fixes the underlying constraint.
35 Accessibility

Revisar accesibilidad de una interfaz

Úsalo: en formularios, modales, menús y controles interactivos.
Prompt
Review this UI
for accessibility.

Check:

- semantic HTML
- keyboard navigation
- focus order
- visible focus
- form labels
- error announcements
- modal focus management
- button vs link semantics
- aria-expanded
- aria-controls
- dynamic status messages

Prefer native HTML semantics.

Do not add ARIA
when a native element
already solves the problem.
36 Performance

Auditar rendimiento frontend

Úsalo: cuando la interfaz sea lenta o cargue demasiado JavaScript.
Prompt
Review this frontend
for measurable performance risks.

Look for:

- unnecessary JavaScript
- duplicate network requests
- render-blocking resources
- large bundles
- unnecessary rerenders
- unbounded DOM work
- expensive event handlers
- oversized images
- layout shifts
- work executed before needed

For each finding explain
which user-visible metric
or behavior it can affect.

Do not optimize
purely theoretical issues.
Publicidad
Categoría 10

Agent Mode y Copilot CLI

4 prompts
37 Agent Mode

Prompt maestro para Agent Mode

Úsalo: para tareas grandes de varios pasos.
Prompt
Complete this task:

[GOAL]

Work autonomously,
but keep the scope focused.

Process:

1. inspect the relevant code
2. understand existing patterns
3. create a short implementation plan
4. implement incrementally
5. run the narrowest relevant tests
6. fix failures caused by your change
7. run broader verification
8. inspect git diff

Do not:

- hide failing tests
- change unrelated behavior
- claim verification
  that was not performed

Finish with:

- files changed
- tests run
- result
- remaining uncertainty.
38 CLI

Investigar desde Copilot CLI

Úsalo: cuando trabajes casi completamente desde terminal.
Prompt
Investigate [PROBLEM]
from the command line.

You may use
read-only inspection commands
without changing files first.

Inspect:

- repository status
- relevant source
- configuration
- test output
- logs
- dependency state

Explain your diagnosis
before applying changes.

Ask for approval
before any destructive command.
39 Tools

Controlar uso de herramientas

Úsalo: cuando quieras autonomía, pero con límites claros.
Prompt
Use available tools
to complete this task.

You may freely perform:

- code search
- file reads
- test execution
- lint
- build
- git diff/status

Ask before:

- deleting files
- resetting git state
- modifying remote systems
- deploying
- publishing
- rotating credentials
- destructive database operations

Prefer the least privileged
tool that can complete
each step.
40 Planning

Planificar una tarea antes de implementarla

Úsalo: para features sensibles o arquitectura compleja.
Prompt
Create an implementation plan
for [GOAL].

Do not modify code.

Investigate enough
to make the plan repository-specific.

Include:

- affected files
- existing patterns to reuse
- data-flow changes
- public API impact
- database impact
- security considerations
- tests required
- rollout concerns

Prefer the smallest design
that satisfies the requirements.

Call out assumptions explicitly.
Categoría 11

Copilot Cloud Agent

4 prompts
41 Cloud Agent

Delegar un Issue completo

Úsalo: cuando el objetivo y criterios de aceptación estén claros.
Prompt
Implement this issue:

[ISSUE]

Acceptance criteria:

[CRITERIA]

Before coding:

- inspect existing architecture
- find related implementation
- identify tests

Constraints:

[CONSTRAINTS]

After implementation:

- run relevant tests
- run lint / build
- inspect diff
- ensure no unrelated changes

Open a pull request
with:

- problem
- solution
- verification
- remaining risk.
42 Bug Fix

Delegar un bug al Cloud Agent

Úsalo: para bugs reproducibles con alcance claro.
Prompt
Fix this bug:

[BUG]

Expected behavior:
[EXPECTED]

Current behavior:
[CURRENT]

First reproduce
and identify the root cause.

Add a regression test
that fails before the fix.

Implement the smallest safe fix.

Run relevant tests.

Do not change unrelated behavior.

Open a pull request
explaining:

- root cause
- fix
- regression test
- verification.
43 Refactor

Delegar un refactor seguro

Úsalo: si los tests existentes permiten comprobar equivalencia.
Prompt
Refactor [TARGET]
without changing behavior.

Before editing:

- identify public contracts
- identify callers
- run relevant tests
- document current behavior

Refactor incrementally.

Do not mix
new functionality
with the cleanup.

Run the same tests
afterward.

Open a pull request
focused only
on this refactor.
44 Docs

Actualizar documentación desde el código real

Úsalo: cuando la documentación haya quedado atrás.
Prompt
Update the documentation
for [FEATURE].

Use the current implementation
as the source of truth.

Verify:

- setup steps
- configuration
- API examples
- command names
- defaults
- limitations
- error cases

Do not invent behavior
that is not supported
by the code.

Keep the change
limited to documentation.
Publicidad
Categoría 12

Code Review y MCP

4 prompts
45 Code Review

Review de alta señal

Úsalo: para evitar comentarios cosméticos y concentrarse en defectos reales.
Prompt
Review this change
as if it were going to production.

Prioritize:

1. functional bugs
2. security vulnerabilities
3. authorization failures
4. data loss
5. race conditions
6. API contract breaks
7. backwards incompatibility
8. missing regression tests

For every finding include:

- severity
- affected code
- concrete failure scenario
- impact
- smallest safe fix

Ignore cosmetic preferences
without behavioral impact.
46 GitHub MCP

Investigar un Issue usando MCP

Úsalo: para conectar requisito, historial y código.
Prompt
Use GitHub MCP
to investigate issue #[NUMBER].

Read:

- issue description
- comments
- labels
- linked pull requests
- relevant repository history

Then inspect the codebase
and determine:

- likely affected area
- root cause hypothesis
- files involved
- tests needed
- implementation risk

Do not modify code yet.
47 Browser MCP

Verificar una feature en navegador

Úsalo: después de una modificación de UI o flujo web.
Prompt
Use the browser tools
to verify [FEATURE].

Test the real user flow:

1. open the application
2. perform the normal path
3. test one invalid-input path
4. inspect console errors
5. inspect failed network requests
6. verify visible success state
7. verify error state

Do not infer success
only from the implementation.

Report the behavior
you actually observed.
48 MCP Context

Revisar código contra documentación externa

Úsalo: si la implementación debe cumplir un estándar interno o API externa.
Prompt
Review this implementation
against the documentation
available through [MCP SERVER].

First retrieve
only the relevant requirements.

Then compare them
with the changed code.

Separate findings into:

- definite violations
- potential incompatibilities
- documentation ambiguities

Cite the requirement
that supports each finding.

Do not invent requirements
not present in the source.
Categoría 13

WordPress y WooCommerce

4 prompts
49 WordPress

Analizar un plugin WordPress

Úsalo: antes de modificar un plugin existente.
Prompt
Analyze this WordPress plugin
before changing anything.

Identify:

- plugin entry point
- classes
- actions
- filters
- AJAX handlers
- REST routes
- shortcodes
- custom tables
- $wpdb usage
- cron jobs
- WooCommerce integration
- admin assets
- frontend assets
- security-sensitive code
- tests

Explain the architecture
and data flow.

Do not modify files.
50 WP Security

Auditar seguridad WordPress

Úsalo: para plugins con AJAX, REST API, formularios o escritura de datos.
Prompt
Perform a WordPress security audit.

Inspect:

- wp_ajax_*
- wp_ajax_nopriv_*
- register_rest_route()
- admin_post_*
- forms
- shortcodes
- file operations
- $wpdb queries

Check:

- authentication
- capabilities
- ownership
- nonce usage
- permission_callback
- validation
- sanitization
- output escaping
- SQL injection
- XSS
- CSRF
- privilege escalation

Remember:
nonce is not authorization.
51 WooCommerce

Revisar compatibilidad HPOS

Úsalo: en extensiones que consultan o modifican pedidos.
Prompt
Audit this WooCommerce extension
for HPOS compatibility.

Find all order reads and writes.

Flag:

- direct wp_posts access
- direct wp_postmeta access
  for orders
- get_post_meta() on orders
- update_post_meta() on orders
- WP_Query used for orders
- SQL tied to legacy storage
- internal WooCommerce APIs

Prefer:

- wc_get_order()
- wc_get_orders()
- WC_Order getters/setters
- supported WooCommerce CRUD APIs

Explain each required change.
52 WP Debug

Debugging completo de WordPress

Úsalo: para AJAX, PHP errors, REST, formularios y problemas frontend.
Prompt
Investigate this WordPress bug.

Do not edit code immediately.

First inspect:

- failing user flow
- browser console
- network request
- HTTP response
- PHP errors
- debug.log
- AJAX or REST handler
- nonce
- authentication
- capabilities
- input data
- database operation
- response generation

Identify the first incorrect state.

Then:

1. explain the root cause
2. write a regression test when practical
3. implement the smallest fix
4. run relevant checks
5. verify the user flow again.
Publicidad
Reutilización

¿Conviene guardar estos prompts como .prompt.md?

Actualmente: úsalo con criterio

GitHub todavía documenta los archivos .prompt.md como prompts reutilizables en determinados IDE, pero VS Code ya los considera un mecanismo en transición para las sesiones del nuevo Agent Host.

Para un workflow realmente importante y reutilizable, especialmente si tiene varios pasos, hoy conviene considerar convertirlo en una Agent Skill.

Prompt file

Ejemplo de un prompt reutilizable en VS Code

Cuando tu versión y modo de VS Code aún utilicen Prompt Files, su ubicación tradicional es:

.github/
└── prompts/
    └── debug.prompt.md
---
name: debug
description: Find the root cause of a software bug before editing code.
agent: agent
argument-hint: "[describe the bug]"
---

Investigate:

${input:problem:Describe the problem}

Do not edit code immediately.

First:

1. reproduce
2. collect evidence
3. trace the execution path
4. identify the first incorrect state
5. explain the root cause

Then implement
the smallest safe fix
and verify it with tests.
Evolución

Cuándo convertir un prompt en Agent Skill

Una sola tarea Necesitas el prompt una vez
Prompt
Uso frecuente Repites el mismo procedimiento
Skill
Regla permanente Debe aplicarse siempre
Instructions
Rol especializado Necesita tools propias
Custom Agent
Sistema externo Necesita otra API o herramienta
MCP
Mejorar resultados

7 reglas para obtener mejores respuestas de Copilot

1

Empieza por el objetivo

Explica qué resultado quieres, no solo qué archivo tocar.

2

Elimina ambigüedad

Nombra funciones, archivos, errores o comportamientos concretos.

3

Entrega contexto relevante

Referencia código y documentación útil, no todo el repositorio indiscriminadamente.

4

Divide tareas complejas

Explorar, planificar, implementar y verificar suele funcionar mejor que una orden vaga.

5

Define restricciones

Compatibilidad, seguridad y alcance reducen cambios innecesarios.

6

Pide evidencia

Tests y observación real son mejores que “parece correcto”.

7

Itera

Corrige supuestos y añade contexto cuando la primera respuesta sea insuficiente.

Fuentes oficiales

Documentación para mejorar tus prompts

VS Code

Prompt Files

Estado actual, variables y migración hacia Skills.

Ver VS Code →
Publicidad
Publicidad
Preguntas frecuentes

FAQ sobre prompts para GitHub Copilot

Define claramente el objetivo, entrega contexto relevante, elimina ambigüedades, establece restricciones y explica cómo debe verificarse el resultado. Para tareas complejas, divide el trabajo en investigación, implementación y verificación.

No necesariamente. Un prompt debe incluir la información que cambia las decisiones del agente. Agregar instrucciones irrelevantes puede aumentar ruido sin mejorar el resultado.

Un buen prompt de debugging debería pedir reproducir el problema, recopilar evidencia, seguir el flujo de ejecución, identificar el primer estado incorrecto y explicar la causa raíz antes de modificar código.

Para Agent Mode conviene definir un objetivo y restricciones claras, permitir que explore el repositorio, pedir implementación incremental y exigir tests, build y revisión del diff antes de terminar.

Indica explícitamente que debe realizar el cambio mínimo, reutilizar patrones existentes, evitar refactors no relacionados y explicar por qué cada archivo modificado era necesario.

Sí, los modos de agente pueden utilizar herramientas y terminal cuando están disponibles. Es recomendable pedir primero el test más específico y después una verificación más amplia.

Sí. Copilot Code Review puede revisar Pull Requests y cambios locales, y puedes personalizarlo mediante Instructions, Agent Skills y MCP.

Sí. Puedes crear prompts específicos para plugins, PHP, AJAX, REST API, seguridad, $wpdb, WooCommerce, HPOS y debugging.

Son archivos Markdown con extensión .prompt.md que permiten guardar prompts reutilizables en determinados IDE. VS Code los está desplazando en los nuevos workflows de Agent Host a favor de Agent Skills.

Un Prompt File es principalmente una plantilla reutilizable que se invoca manualmente. Una Agent Skill puede contener instrucciones, scripts y recursos, y el agente puede descubrirla y cargarla cuando una tarea resulta relevante.

Sí. En los IDE compatibles puedes indicar archivos, carpetas, selecciones y otros elementos de contexto, además de herramientas que permiten al agente buscar información por sí mismo.

Depende. Usa un prompt para una tarea concreta. Utiliza copilot-instructions.md para reglas que deberían aplicarse de forma persistente al proyecto.

Publicidad
Siguiente guía

GitHub Copilot vs Codex: cuál es mejor para programar con IA

Ya conocemos las principales capacidades de GitHub Copilot. El siguiente paso es compararlo directamente con OpenAI Codex en IDE, terminal, autonomía, agentes cloud, repositorios, Code Review, personalización, precio y workflows reales.

Comparar GitHub Copilot vs Codex →
Carrito de compra
Scroll al inicio