Aller au contenu
Skillpedia
Programmation générale48k · #3821

ask-copilot

Ce qu’il fait

Cet outil vous permet de demander à GitHub Copilot de vous aider à comprendre, relire ou générer du code. Il fonctionne sans interaction directe de votre part, en n'envoyant que les informations nécessaires.

Quand l’utiliser

  • ✓Lorsque vous souhaitez un second avis sur un extrait de code.
  • ✓Pour demander à Copilot d'expliquer un code que vous ne comprenez pas.
  • ✓Si vous avez besoin que Copilot génère un morceau de code à partir d'une description.

Lien du skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/ask-copilot/SKILL.md

Copiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.

Comment l’utiliser

Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.

Message prêt à coller

Utilise ce skill pour m’aider : https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/ask-copilot/SKILL.md Lis le fichier SKILL.md de ce lien et suis ses instructions pour ma tâche.
Envie que votre IA trouve seule des skills comme celui-ci ?Installez le MCP gratuit de Skillpedia : une ligne, et elle cherche parmi 15 000+ skills avant chaque tâche.Installer en 1 minute →

Exemple de demande à votre IA

“Copilot, relisez cet extrait de code pour repérer d'éventuelles erreurs.”

5 nouveaux skills par semaine. 1 minute de lecture.

Comment ça marche

L'outil envoie votre demande et le code concerné à GitHub Copilot. Copilot traite la demande en arrière-plan et renvoie sa réponse, sans que vous ayez à taper des commandes complexes.

Contenu technique (SKILL.md original)

Texte original de l’auteur, en anglais, directement depuis GitHub.

Ask Copilot

Overview

This skill allows the agent to interact with GitHub Copilot CLI (copilot) in a non-interactive (headless) mode. Use this skill when the user explicitly wants secondary advice, code reviews, explanations, or code generation from GitHub Copilot's models.

Use source: self and source_type: self when the skill is original to this repository and does not require README external-source credit.

Copilot is an external service. Treat prompts, file paths, snippets, repository content, command output, and generated suggestions as data that may leave the local environment.

When to Use This Skill

  • User Request Only: Use this skill ONLY when the user explicitly asks to "consult Copilot", "ask Copilot", "review with Copilot", or explicitly requests a second opinion using Copilot.
  • Do NOT Invoke Automatically: To comply with privacy policies, the agent must not invoke this skill automatically for its own second opinions or checks without explicit user consent.

How It Works

Step 1: Request Explicit User Consent

Before executing any command that references local files, repository paths, snippets, command output, secrets-adjacent config, or private project context, you MUST obtain explicit user consent to send that material to GitHub Copilot.

Ask for separate approval before allowing Copilot to run tools, execute shell commands, edit files, install packages, or mutate the workspace.

Step 2: Execute with Minimal Permitted Flags

To prevent TUI lockups, execute the copilot command with headless flags. Do not use blanket bypasses such as --yolo, --allow-all-tools, or --allow-all-paths for routine Q&A or review.

  • For Read-Only / General Q&A: Send only the user-approved, redacted text in the prompt. Do not grant Copilot broad local-path access; it is not needed when the prompt already contains the approved context.
  • For Trusted Mutation Tasks: Prefer a scoped permission flag if the CLI supports one. Use blanket mutation bypasses only after the user explicitly authorizes Copilot to execute tools and mutate the workspace for the specific task.

Step 3: Use Session Management (Optional)

To maintain conversation context, use --name and --resume flags, or pass a --session-id on subsequent calls.

Examples

Example 1: General Question (Read-Only)

Does not require repository path access or mutation permissions.

copilot -p "Explain how to implement a debounce function in TypeScript" -s

Example 2: Code Review (Approved File Excerpt)

Always confirm the exact file and excerpt with the user before executing. Keep the path in a quoted variable; build the prompt from a static instruction plus the approved excerpt. Shell does not re-evaluate command-substitution output, so metacharacters inside the reviewed file remain prompt text rather than shell syntax:

review_file="path/to/file.ts"
test -f "$review_file" || { echo "File not found: $review_file" >&2; exit 1; }
copilot -p "$(printf '%s\n\n' 'Review this approved excerpt for potential memory leaks:'; sed -n '1,220p' -- "$review_file")" -s

Never construct a shell command by interpolating user-controlled prompt text, paths, issue content, or filenames into shell source. Use fixed command structure, quoted variables, and approved file content only.

Example 3: Named Session Management

copilot -p "Remember this session label for follow-up questions." -s --name "my-session-name"
copilot -p "Summarize the prior advice in this session." -s --resume "my-session-name"

Best Practices

  • ✅ Do: Ask for user consent before uploading any project files to third-party endpoints.
  • ✅ Do: Send only the approved, redacted excerpt; keep Copilot out of the broader workspace.
  • ✅ Do: Keep untrusted values in quoted variables or command input, never in shell source.
  • ✅ Do: Use -s (silent) to suppress metadata and statistics, leaving only clean output.
  • ❌ Don't: Automatically trigger this skill for background second opinions without the user's explicit ask.
  • ❌ Don't: Send files, logs, environment details, or private repository context to Copilot without explicit approval.
  • ❌ Don't: use --allow-all-paths for a review, or interpolate untrusted text inside copilot -p "...".
  • ❌ Don't: Run copilot without permission-bypass flags in background tasks, as it will hang waiting for interactive input.

Limitations

…

Questions fréquentes

Que se passe-t-il si Copilot a besoin de plus d'informations ?

Si Copilot demande davantage de détails ou l'autorisation d'accéder à quelque chose, l'outil vous demandera votre accord avant de poursuivre, afin de protéger votre confidentialité.

Puis-je l'utiliser avec n'importe quel code ?

Soyez prudent et n'envoyez pas d'informations sensibles comme des mots de passe ou des clés d'API à Copilot. Vérifiez toujours ce qui est envoyé.

Copilot modifiera-t-il mon code de lui-même ?

Non, l'outil ne fera des modifications que si vous donnez votre accord explicite. Il est conçu pour proposer des conseils et des suggestions.

Détails

Description originale de l’auteur

Use GitHub Copilot CLI in non-interactive mode to ask questions, review code, or generate snippets without manual interaction.

repo: sickn33/agentic-awesome-skills

Popularité

Étoiles GitHub
48k
Position au classement
#3821
Licence
MIT
Mis à jour
15/10/2026

Ce skill vous est-il utile ?

0

Connectez-vous pour voter.

Commentaires

  • …

Autres skills de ce dépôt

Skills similaires