Kiedy AI ma zadawać pytania

Agent przestaje pytać o rzeczy, które sam może znaleźć, i przestaje zgadywać tam, gdzie pomyłka kosztuje.

Operacje, dla początkujących. Opublikowano

Co robi

Ten skill daje agentowi dwa kroki przed każdym zadaniem. Najpierw agent przeszukuje miejsca, które wskażesz w pliku kontekstu: rozmowę, notatki, listę zadań, dokumenty, logi i podłączone narzędzia. Klucze dostępu też sprawdza sam, w Twoim menedżerze haseł i plikach .env. Dopiero gdy nic nie znajdzie, pyta Cię, i zaczyna od jednego zdania, gdzie szukał. Potem agent ocenia zadanie na dwóch osiach: czy wynik łatwo wyrzucić i zrobić od nowa, i ile różnych wyników pasuje do prośby. Pytania padają tylko przy zadaniu trudnym do cofnięcia, z wieloma możliwymi wynikami i co najmniej dwiema krytycznymi lukami. Wtedy agent zadaje najwyżej dwa pytania, najlepiej z gotowymi opcjami. Przy jednej luce zapisuje swoje założenie i działa dalej.

Kiedy używać

Kiedy używać

  • Twój agent zadaje pytania, na które odpowiedź leży w Twoich plikach.
  • Agent zgaduje ważne szczegóły i musisz potem przerabiać całą pracę.
  • Agent prosi Cię o klucz API, który już jest w Twoim menedżerze haseł.
  • Chcesz, żeby agent przed startem wiedział, po czym pozna, że skończył.

Kiedy nie używać

  • Pojedyncze pytania o fakty, gdzie agent i tak od razu szuka.
  • Czysta burza mózgów, gdzie każdy wynik możesz odrzucić bez kosztu.
  • Przepływy, w których inny proces już zbiera wymagania, na przykład formularz zlecenia.

Tabela decyzyjna

SytuacjaCo robi agent
Odpowiedź leży w notatkach lub dokumentachSzuka i działa, nie pyta
Brakuje klucza dostępuSprawdza menedżer haseł i pliki .env, a jeśli klucza tam nie ma, pyta Cię, gdzie leży. Nigdy go nie wymyśla ani nie zapisuje
Zadanie łatwe do powtórzeniaDziała od razu, przy wielu możliwych wynikach zapisuje założenia
Trudne do cofnięcia, wiele wyników, dwie lub więcej lukZadaje najwyżej dwa pytania z opcjami
Mówisz „zdecyduj sam”Nie pyta, otwiera odpowiedź listą założeń

Szablon

Metoda: najpierw szukaj, potem test dwóch osi, siedem luk i najwyżej dwa pytania.

SKILL.mdPobierzSKILL.md
---
name: clarify-before-acting
description: Decides whether to ask the human a question or just act. Use before any non-trivial task, and any time you are about to ask the human something: search first, ask only what no search can answer, and cap questions at two.
---

# Clarify Before Acting

Two failures waste a human's time. One is asking a question you could have answered by looking.
The other is charging ahead on a task where a wrong guess forces a full redo. This skill prevents
both, in that order: search first, then decide whether a question is worth asking at all.

Read `CONTEXT.md` before you start. It sits next to this file, or, if this text was pasted into AGENTS.md or a rules file (Codex, Cursor), next to that file. It lists where this operator keeps
information, where access keys live, and their standing preferences.

If `CONTEXT.md` is missing, or a field you need is still a blank line, do not guess it. Ask the
human to fill it, in the language they write to you in, naming the field. For example, in English:
"Add the places I should search before asking you anything: notes folder, task board, docs."
In Polish: „Dodaj miejsca, które mam przeszukać, zanim o coś zapytam: folder notatek, lista zadań, dokumenty.”

## Before you start / What you need

- **An AI coding agent (required).** Claude Code (https://code.claude.com/docs/en/overview),
  Codex CLI (https://developers.openai.com/codex/cli) or Cursor (https://cursor.com/docs),
  opened in the folder that holds your notes and docs.
- **One place for access keys (optional, pick one).**
  1Password CLI (https://developer.1password.com/docs/cli/get-started/),
  Bitwarden CLI (https://bitwarden.com/help/cli/), or a `.env` file listed in `.gitignore`
  (https://git-scm.com/docs/gitignore) so it never reaches the repository.
  Write only the store's name or the file path in `CONTEXT.md`, never a value.
- **Connected tools (optional).** If you want the agent to search live data (store admin,
  analytics, inbox), connect those tools to your agent, for example through a Model Context
  Protocol server (https://modelcontextprotocol.io/), and list them in `CONTEXT.md`.

Give the agent its own scoped access, never your whole vault. A personal sign-in reaches every
vault you own, so a separate vault on its own limits nothing:

- 1Password: create a vault that holds only this agent's keys, then a service account with read
  access to that one vault (https://developer.1password.com/docs/service-accounts/). Put the
  service account's token into the agent's shell environment yourself, under the variable name
  the 1Password docs give, and never sign that shell in with your personal account. On the
  agent's machine, turn off the desktop app's CLI integration, or never approve a 1Password
  prompt raised from the agent's terminal.
- Bitwarden: create a separate Bitwarden account that holds only this agent's keys, and sign the
  agent's shell in with that account only. Point the agent's `bw` at its own data directory (the
  app data setting in the Bitwarden CLI docs), so your own login is never present there. Teams can use Bitwarden's machine-account CLI (bws),
  scoped to one project, instead.
- A `.env` file: a separate file that holds only this agent's keys, listed in `.gitignore`.

Never paste a key, token or password into the chat, and never print one. That includes the two
login tokens in the agent's environment: the 1Password service account token and the Bitwarden
session key. The agent passes a key
straight into the command that needs it:

- 1Password: `op run --env-file=agent.env -- <command>`, where `agent.env` holds only
  `op://vault/item/field` references, never values. `op run` masks the values it resolves.
- Bitwarden: `my_key="$(bw get password <item>)" <command>` as one command, never `bw get` on its
  own. The command reads `my_key` from its environment. This form has no masking: never run it
  with `-v`, `--verbose`, debug or trace flags, never use `set -x`, and never echo the variable.
- A `.env` file: let the tool that needs it load it, never `cat` it or show it in the reply.

To check that a key exists, look for its name only: `op item list --vault <vault>` (titles only),
`bw get item <item> >/dev/null 2>&1 && echo found` (never without the redirect), or
`grep -cE '^(export )?my_key=' .env`.

## Part 1: Search before you ask

Never ask the human a question that a search would answer. Every question costs their attention,
and a question about something already written down tells them you did not look.

### The search order

Before asking anything, work through every search surface listed in `CONTEXT.md` under
"Search surfaces", in the order given there. A typical order:

1. The current conversation, including earlier turns and pasted material.
2. The operator's notes and memory files.
3. Their task tracker or board.
4. Their docs, specs and reference files.
5. Logs, daily summaries and previous reports.
6. Earlier research you or another agent saved.
7. A file-content search (grep, glob) across the relevant folders.
8. Connected tools that hold live platform data (analytics, customer records, inbox, store admin).

Keep going until the list is exhausted or the answer turns up. The bar is coverage of the list,
not a count of searches.

### Access-key self-check

Check the credential stores listed in `CONTEXT.md` before you ask about a missing key, token or
connection string:

1. Check the credential manager named in `CONTEXT.md` for the key's name (list items, never read a value).
2. Check any local credential files `CONTEXT.md` lists, by variable name only.
3. Check the setup notes for connected tools in `CONTEXT.md`.
4. Check `.env.example` for the variable name, and whether `.env` defines it (`grep -cE`), never print `.env`.

Never print a credential value to the terminal or the reply. Pass it into the command that needs
it as shown in "Before you start".

If all four come back empty, ask the human where the key lives or to provide it. Never invent a
credential and never write one into a file, a message or `CONTEXT.md`. Create a key yourself only
when `CONTEXT.md` explicitly grants that; provider-issued keys, paid accounts and consent screens
belong to the human.

This does not change what stays human. Typing a password into a sign-in form, entering an MFA
or one-time code, solving a CAPTCHA, and giving consent on a first-time authorization screen are
the human's to do. Ask for those in one sentence, wait, then continue the rest yourself.

### The evidence line

When a search comes back empty and you still need to ask, open the question with one sentence
naming where you looked:

> Searched the notes folder, the task board, the project docs and the inbox: the restock date
> for this supplier is not recorded anywhere.

The human can then see the question is real, and can point you to a source you missed.

### When asking is allowed

- The data does not exist anywhere you can reach, and the evidence line says so.
- The answer is a preference or a decision only the human can make (taste, priority, budget,
  approval, who to contact).
- It concerns something happening right now that nobody has written down yet.

### When asking is not allowed

- "What tone do you want?" when earlier messages or the style notes already show it.
- "What is our refund window?" when the returns policy page exists.
- "Which project do you mean?" when the tracker shows exactly one active project of that kind.
- "What is the access key?" before running the self-check above. After it comes back empty, ask where the key lives.

Before typing a question, ask yourself: could a search answer this? If yes, search.

## Part 2: Decide whether to ask at all

Once searching is done, some gaps remain. Most of them do not justify a question. Decide with
the two-axis test, silently, on every non-trivial request.

### The two-axis test

**Reversibility:** can the output be thrown away and redone cheaply? A lookup or a brainstorm
costs nothing to redo. A sent message, a commit, a deployed change, or a long implementation
costs real time.

**Divergence:** how many meaningfully different outputs could satisfy the request? "Check the
order status" has one right answer. "Write me a landing page" has dozens.

| | Low divergence | High divergence |
|---|---|---|
| **High reversibility** | Act immediately | Act, and note your assumptions |
| **Low reversibility** | Act (the path is clear) | Clarify before acting |

Only the bottom-right cell can produce questions, and only when two or more critical gaps exist.

### The seven gap dimensions

Check the request against these seven:

1. **Output shape:** format, length, file type, where it goes.
2. **Goal and reader:** what the output is for, who reads or uses it.
3. **Constraints:** budget, tools, deadlines, things that must not change.
4. **Scope:** what is in, what is out, how far to go.
5. **Tone and audience:** only for content meant for other people.
6. **Urgency:** a quick first pass, or the finished version.
7. **Success condition:** how the human will judge it done.

A dimension counts as a gap only if it is both missing and load-bearing: getting it wrong would
force a full redo. A gap you can fill from `CONTEXT.md` or from the search is not a gap.

### The count decides

- **Two or more critical gaps:** ask.
- **Exactly one:** state your assumption in one line and proceed.
- **Zero:** act.

## Part 3: How to ask

- **At most two questions.** Three only when the task spans several unrelated areas.
- **Binary or multiple choice beats open-ended.** "A launch announcement or a restock notice to
  past buyers?" beats "What is this for?"
- **Every question resolves a real fork.** If you would do the same work whichever way they
  answer, do not ask it.
- **No preamble.** Write "Two things before I start: [question 1] [question 2]" and stop.
- **Put the evidence line first** when the question exists because a search came back empty.

Example, for a request to "write the launch email" from a small online shop:

> Two things before I start: Is this going to the full customer list or only to people who
> bought in the last quarter? Should it offer a discount code, or announce the product only?

Both answers change the email. The product details, the brand voice and the sender name are in
`CONTEXT.md` and the shop's docs, so those are not questions.

## Part 4: When to skip clarifying entirely

Skip the whole test and act when:

- The request is a lookup or a status check.
- Earlier turns in this conversation already filled the gaps.
- The human granted creative latitude ("any approach is fine", "pick what you think works").
- The human signalled urgency ("quick", "urgent", "rough draft is fine"): ask one question at most.
- The task goes to another agent or workflow that does its own scoping.
- Only one gap exists and it is low-stakes.
- The request matches a routine the operator listed in `CONTEXT.md` under "Never ask for".

## Part 5: The override

When the human says "just do it", "use your judgment" or "any approach is fine", ask nothing.
Open your reply with the assumptions you made instead:

> Assumptions: English, one page, written for existing customers, no discount code.

Stating the assumptions is not optional. The override suppresses questions, not disclosure.

## Part 6: Know what done looks like

On any task with more than one action, decide before you start what evidence would show each
part worked, and check against it before you report. A vague goal lets the work stop at the
first change that looks plausible. A stated success condition makes it stop when the thing is
actually done.

Examples of evidence:

- "The page loads at the preview address and the new form submits without an error."
- "The report file exists and every section has a filled table."
- "The test that reproduced the bug now passes, and the rest of the suite still passes."

Plan the work however suits it. The requirement is the verification, not a numbered format.

## Failure modes to watch for

- **The lazy question:** asking what a search would answer. Fix: run the search order first, every time.
- **The silent guess:** filling a load-bearing gap with a plausible value and never saying so.
  Fix: one gap means one stated assumption, in the reply, where the human will see it.
- **The questionnaire:** five questions before any work. Fix: the cap is two, and each one must
  change the output.
- **The open-ended question:** "What do you want?" Fix: offer the two or three real options.
- **The buried question:** a question at the end of a long reply, below the fold. Fix: put it at
  the top, or next to the conclusion it affects.
- **Asking for a key you could have found:** Fix: run the access-key self-check first, then ask where it lives.

Pozostałe pliki

CONTEXT.template.mdSzablon kontekstu: gdzie agent szuka, gdzie leżą klucze dostępu, Twoje stałe preferencje.
CONTEXT.template.mdPobierzCONTEXT.template.md
# Clarify Before Acting: Context

Copy this file to CONTEXT.md next to SKILL.md (Claude Code) or next to your AGENTS.md or rules file (Codex, Cursor), and fill in every blank. The agent asks you for any blank it needs. Never put passwords, access keys or card numbers here.

## Search surfaces, in order

(List every place the agent should search before asking you anything, most useful first. Give a folder, a tool name or a URL for each.)

Example: 1. This conversation. 2. notes/ folder. 3. The task board in the project tracker. 4. docs/ folder. 5. logs/daily/ folder. 6. research/ folder. 7. The shop admin, through the connected tool.

1. ______
2. ______
3. ______
4. ______
5. ______

## Where access keys live

(Name the credential manager or vault you use, and where project config lives. Locations only, never the values.)

Example: Keys live in the 1Password vault "agent-keys", read through a service account. Project keys are in each repo's .env file, which is listed in .gitignore.

- Credential manager (for example a 1Password vault name, or the name of a separate Bitwarden account): ______
- Where project config lives (for example the path to the .env file): ______
- Setup notes for connected tools: ______

## What stays human

(Actions the agent must hand back to you. The defaults below always apply; add your own.)

- Typing passwords into sign-in forms
- MFA or one-time codes
- CAPTCHAs
- First-time consent screens
- ______

## Standing preferences the agent should never ask about

(Defaults you have already decided, so they never become questions.)

Example: Language: English. Tone: plain, friendly, no exclamation marks. Default length for emails: one short screen. Currency: EUR.

- Language: ______
- Tone and style notes (or a path to a style guide): ______
- Default output format: ______
- Other defaults: ______

## Never ask for

(Routine requests the agent should act on without clarifying.)

Example: Daily sales summary, weekly backup check, reformatting a draft I paste in.

- ______
- ______

## Decisions only you make

(Kinds of question the agent may always bring to you, because no search can answer them.)

Example: Anything that spends money, any message to a client, changes to prices, deleting data.

- ______
- ______

## Urgency words

(Phrases you use when you want a fast first pass with at most one question.)

Example: "quick", "rough", "urgent".

- ______

Czego potrzebujesz

  • An AI coding agent: Claude Code, Codex CLI or Cursor (otwiera się w nowej karcie)

    Wymagane · Aplikacja

    Skill to plik instrukcji w markdown. Potrzebujesz agenta, który go czyta i ma dostęp do Twoich plików.

    1. Zainstaluj jednego agenta: Claude Code (https://code.claude.com/docs/en/overview (otwiera się w nowej karcie)), Codex CLI (https://developers.openai.com/codex/cli (otwiera się w nowej karcie)) albo Cursor (https://cursor.com/docs (otwiera się w nowej karcie)).
    2. Otwórz agenta w folderze, w którym trzymasz notatki i dokumenty.
    3. Zainstaluj skill według kroków z sekcji instalacji.
  • 1Password CLI (otwiera się w nowej karcie)

    Opcjonalne · CLI · Licencja proprietary

    Jedno z miejsc na klucze dostępu, które agent sprawdza, zanim Cię o klucz zapyta. Wybierz jedno miejsce, nie potrzebujesz wszystkich trzech.

    1. Zainstaluj CLI według oficjalnego przewodnika.
    2. Utwórz osobny sejf tylko z kluczami, których potrzebuje ten agent. Zwykłe logowanie na Twoje konto sięga do wszystkich Twoich sejfów, więc sam osobny sejf nic nie ogranicza.
    3. Utwórz konto usługowe (service account) z dostępem do odczytu tylko tego jednego sejfu: https://developer.1password.com/docs/service-accounts/ (otwiera się w nowej karcie).
    4. Sam wpisz token konta usługowego do środowiska powłoki agenta, pod nazwą zmiennej podaną w dokumentacji 1Password. Nigdy nie loguj tej powłoki na swoje osobiste konto i nigdy nie wklejaj tokenu do czatu.
    5. Na komputerze agenta wyłącz integrację CLI w aplikacji 1Password albo nigdy nie zatwierdzaj prośby o dostęp, którą wywołał terminal agenta. Nigdy nie wypisuj tokenu konta usługowego.
    6. Agent przekazuje klucz prosto do polecenia przez op run --env-file=agent.env -- <polecenie>, gdzie agent.env zawiera tylko odwołania op://sejf/wpis/pole, nigdy wartości. op run maskuje wartości, które rozwiązuje.
    7. Wpisz do CONTEXT.md tylko nazwę sejfu.
  • Bitwarden CLI (otwiera się w nowej karcie)

    Opcjonalne · CLI · Licencja GPL-3.0 (CLI)

    Druga możliwość na klucze dostępu, jeśli używasz Bitwarden.

    1. Zainstaluj CLI według oficjalnej dokumentacji.
    2. Załóż osobne konto Bitwarden tylko z kluczami, których potrzebuje ten agent. Sesja CLI odszyfrowuje cały sejf konta, więc folder ani kolekcja na Twoim koncie niczego nie ograniczają. Zespoły mogą zamiast tego użyć CLI Bitwarden dla kont maszynowych (bws), ograniczonego do jednego projektu.
    3. Zaloguj powłokę agenta tylko na to osobne konto, nigdy na swoje. Ustaw dla bw agenta osobny katalog danych (ustawienie katalogu danych aplikacji z dokumentacji Bitwarden CLI), żeby Twoje własne logowanie nigdy tam nie trafiło. Nigdy nie wypisuj klucza sesji.
    4. Agent wstawia wartość prosto do polecenia w jednej linii: my_key="$(bw get password <wpis>)" <polecenie>, a polecenie czyta my_key ze swojego środowiska. Nigdy nie uruchamia samego bw get, które wypisuje wartość.
    5. Ta forma niczego nie maskuje: nigdy nie uruchamiaj takiego polecenia z -v, --verbose, flagami debug lub trace, nigdy nie używaj set -x i nigdy nie wypisuj zmiennej.
    6. Wpisz do CONTEXT.md tylko nazwę tego konta. Nigdy nie wklejaj klucza, tokenu ani hasła do czatu.
  • A .env file listed in .gitignore (otwiera się w nowej karcie)

    Opcjonalne · Środowisko

    Najprostsza możliwość: klucze projektu w lokalnym pliku .env, którego Git nigdy nie wysyła do repozytorium.

    1. Utwórz osobny plik .env tylko z kluczami tego agenta i wpisz je sam, w edytorze.
    2. Dodaj linię .env do pliku .gitignore, zanim zrobisz pierwszy commit.
    3. Wpisz do CONTEXT.md tylko ścieżkę do pliku, nigdy wartości. Plik wczytuje narzędzie, które go potrzebuje. Agent nigdy nie wyświetla jego zawartości.
  • Model Context Protocol servers for your tools (otwiera się w nowej karcie)

    Opcjonalne · Serwer MCP

    Pozwala agentowi przeszukać dane na żywo, na przykład panel sklepu, analitykę albo skrzynkę, zanim o coś zapyta.

    1. Sprawdź w dokumentacji swojego agenta, jak podłącza się serwer MCP.
    2. Podłączaj tylko serwery od dostawcy narzędzia albo z zaufanego, publicznego źródła.
    3. Dopisz podłączone narzędzia do listy miejsc do przeszukania w CONTEXT.md.

Instalacja

  1. Claude Code: skopiuj folder do .claude/skills/clarify-before-acting/ w projekcie albo do ~/.claude/skills/clarify-before-acting/ dla wszystkich projektów. Claude wczyta skill, gdy opis pasuje do zadania, albo gdy wpiszesz /clarify-before-acting.
  2. Codex: wklej treść SKILL.md do pliku AGENTS.md w katalogu głównym repozytorium albo do ~/.codex/AGENTS.md.
  3. Cursor: dodaj treść SKILL.md jako regułę projektu albo do AGENTS.md.
  4. Inny agent: wklej SKILL.md do pliku instrukcji projektu lub promptu systemowego.
  5. Skopiuj CONTEXT.template.md jako CONTEXT.md obok SKILL.md (Claude Code) albo obok pliku AGENTS.md lub pliku reguł (Codex, Cursor) i uzupełnij wszystkie pola.

Działa, jeśli

  • Zapytaj agenta o coś, co jest zapisane w Twoich notatkach. Agent odpowiada z pliku i nie zadaje pytania.
  • Poproś o coś, czego nigdzie nie ma. Pytanie zaczyna się od zdania, gdzie agent szukał.
  • Przy złożonym zadaniu agent zadaje najwyżej dwa pytania i każde ma gotowe opcje do wyboru.
  • Po „zdecyduj sam” pierwsza linia odpowiedzi to lista założeń.
  • Przy zadaniu z kilkoma krokami agent przed startem wypisuje, po czym sprawdzi, że każdy krok działa.

Wymagania

  • Agent, który czyta plik instrukcji w markdown.
  • Dostęp agenta do plików, w których trzymasz notatki i dokumenty.
  • Uzupełniony plik CONTEXT.md.

Pytania

Czy agent przestanie pytać całkiem?

Nie. Agent pyta, gdy danych nigdzie nie ma, gdy chodzi o Twoją preferencję lub decyzję, albo gdy sprawa dzieje się teraz i nikt jej nie zapisał.

Czy mam wpisać klucze API do CONTEXT.md?

Nie. Wpisz tylko, gdzie leżą: nazwę menedżera haseł i ścieżki do plików .env. Agent przekazuje je stamtąd prosto do polecenia, które ich potrzebuje, i nigdy ich nie wyświetla.

Co z hasłem przy logowaniu albo kodem MFA?

To zostaje po Twojej stronie. Agent prosi o to jednym zdaniem, czeka, a resztę robi sam.

Czemu limit to dwa pytania?

Każde pytanie kosztuje Twoją uwagę. Dwa pytania z opcjami rozstrzygają realne rozwidlenia, a resztę agent pokrywa jawnym założeniem, które możesz poprawić.

Gdzie to pasuje

Ten skill działa na wejściu każdego zadania, więc dobrze łączy się z pozostałymi szablonami. Szablon orkiestratora może go używać, zanim podzieli pracę na części. Szablon przeglądu adwersarialnego sprawdza wynik na końcu, a ten skill dba o to, żeby wynik od początku dotyczył właściwego zadania.

Wszystkie skille

Źródła

Pytania o wdrożenie zadajesz na Discordzie.Dołącz za darmo