AGENT SKILL

to-questionnaire

Turn a decision you can't fully answer into a self-saving HTML questionnaire someone else fills in and sends back as JSON.

License 许可
MIT
最近更新
2026-10-29
Stars
★ 1
Forks
0

01 前言 Front Matter

name
to-questionnaire
description
Turn a decision you can't fully answer into a self-saving HTML questionnaire someone else fills in and sends back as JSON.
disable-model-invocation
true

02 资源文件 5

03 SKILL.md 正文

Turn something the user can't answer alone into a questionnaire: one self-contained HTML file (no CDN, no server) the user hands to one person. The recipient opens it in a browser, clicks through closed answers, and sends back a .json file with their answers. The recipient holds knowledge the user lacks; the questionnaire pulls it out of them with as little typing as possible.

The look and the mechanics live in TEMPLATE.html. Your only job is to write the data file. Never edit the template for one questionnaire.

Grill the send, not the subject. Interview the user only about the send, which they can always answer: who it goes to, and what they need back. Never ask the user to answer the questions themselves — if they could, there would be no questionnaire.

Steps

  1. Who is it going to? Find, from the source or by asking in one exchange: the recipient's name, role, what they know that the user doesn't, the register (tu or vous — check existing exchanges with that person when the repo has them), and the channel (Teams, mail…). Done when you know who, how to address them, and how the file travels.

  2. What do you need back? If the user hands a document of questions (a .md note, a list), that document is the content: skip to step 3 and reproduce it. Otherwise ask, in one exchange, the decisions or facts the user needs, and sort each into:

    • fiches: things to judge one by one with the same question (passages, cases, answers). One section with a defaut (shared question, choices, suite), one question per item with its verbatim citation.
    • questions: general questions grouped into sections. Prefer closed choices; free text only where a choice list would be a guess. Done when every item is a fiche or a question.
  3. Write the data file. A JSON file in the OS temp directory, following exemple.json (shape below). Rules:

    • Respect the source. When the user gives a document, every sentence of it appears on screen, word for word, in the same order: same numbering (num: Q1, Q2…), same section letters and titles, same rubrics (Aujourd'hui, Pourquoi ça compte, La question…), same choice letters and labels, the user's proposals included. Never trim, merge, split, reword or drop a passage. Only change what the format forces (a « Choix » list becomes choix; numbered sub-questions become points), and say what you added.
    • The user speaks. Text you write (intro, pourquoi, rappel, placeholders) is first person singular from the user (« je »), in the recipient's register. Never the user's name in the third person.
    • No verdict of yours. A proposition appears only when the user wrote one; give it the user's own label ("label": "Notre proposition") and its choix so the recipient can take it in one click. A fix you would suggest goes in a fiche's piste, which only shows once the recipient picks suite.quand.
    • « Je ne sais pas » is added to every choice list automatically; say in the intro that it is a real, useful answer.
    • One idea per question, most important first. Context goes in rubriques, not in the title.
    • No internal jargon in text you write: no ticket numbers, decision codes, field names, ids. (Text from the user's source stays as is.) Ids live in the data and come back in the export only.
    • Verbatim citations for fiches: quote the material word for word in citation; say in the intro where it comes from.
    • A rappel on items the recipient already flagged before (« Tu avais pointé… Je vérifie juste que je t'ai bien compris. »).
    • Honest effort: about 40 seconds per fiche, 1 minute per open question, 1 to 2 minutes per question with long context; put it in meta.
    • pourquoi: why this questionnaire and why this person, in the user's words when they gave them. blocs: how to read and answer (keep the source's own intro there, verbatim), ending with « clique sur « Enregistrer mes réponses » et envoie-moi le fichier .json qui arrive dans tes Téléchargements ».
    • Vous register: override the ui strings that say « tu » (confirmation, sauveAuto, finTexte, enregistre, manque, copie, placeholderPoint, placeholderLibre, dernierMot, pisteQuestion). Done when every item from step 2 (or every passage of the source) is covered exactly once.
  4. Generate. node <this skill dir>/generer.mjs <data.json> <output.html>. It validates the data and inlines it into the template. Output name: questionnaire-<slug>.html, where the user works — unless the content is confidential or must stay out of Git (company documents, personal data): then write it next to that data, outside the repo, and follow the project's rules. Delete the temp data file afterwards if it holds such content.

  5. Verify. From a directory where Playwright is installed: node <this skill dir>/verifier.mjs <output.html>. It answers a question (opening its suite), takes a proposal, fills a point and a free text, reloads, downloads the .json and checks every answer in it, checks the text export, then checks that cancelling « Tout effacer » keeps the answers and confirming it empties them for good, and that the mobile bar shows. All lines must read OK. Then take a screenshot of one or two question cards and look at them. When the source was a document, also check that every sentence of it is on the page. Without Playwright, do the same loop by hand and say so.

  6. Hand over. Report the path (and the Windows path under WSL: \\wsl.localhost\<distro>\…), then a ready-to-send message in the recipient's register: download the file, open it in Edge or Chrome (not in the Teams or mail preview), answer, click « Enregistrer mes réponses », send back the .json from Téléchargements; « Copier en texte » and paste in a message if the file is blocked. End by telling the user what to do with the reply.

Data shape

{
  "slug": "kebab-case",                  // download name and browser autosave key
  "titre": "…", "titreCourt": "…",       // titreCourt (optional) heads the side rail
  "pour": "Rodolphe", "de": "Fabien",
  "meta": "De la part de Fabien, le 28 octobre. Vingt questions, environ vingt-cinq minutes.",
  "pourquoi": ["paragraph", "…"],        // plain text, shown large under the title
  "blocs": [{ "titre": "…", "html": "<p>…</p>" }],     // trusted HTML, written by you or copied from the source
  "sections": [{
    "titre": "Notes et évaluation",
    "lettre": "A",                       // optional, defaults to A, B, C…
    "defaut": { },                       // optional: any question field shared by the whole section (fiches)
    "questions": [{
      "id": "q1",                        // letter first, then letters, digits, - or _
      "num": "Q1",                       // optional; all or none; defaults to Q1, Q2… across sections
      "titre": "…",
      "rappel": "…",                     // optional, plain text
      "citation": "verbatim",            // optional, plain text, the material to judge
      "rubriques": [                     // optional context, label on the left, text on the right
        { "label": "Aujourd'hui", "html": "<p>…</p>" },
        { "label": "La question", "html": "<p>…</p>", "cle": true },          // cle: shown bold
        { "label": "Les questions", "html": "<p>…</p>", "points": ["html", "…"] } // one answer field per point
      ],
      "points": ["html"],                // optional, answer fields after the rubrics
      "choixTitre": "Choix",             // legend above the choices
      "choix": [["a", "Non : …"], ["b", "Oui : …"]],   // [value, label HTML, key?]; key defaults to the value
                                         // in capitals when it is one letter, else a check mark; « nsp » is added
      "nsp": false,                      // optional: no « Je ne sais pas » (avoid)
      "suite": {                         // optional, opens on one answer
        "quand": "non", "question": "…", "cases": [["code", "label"]],
        "piste": { "titre": "Mon idée pour la corriger :", "question": "Ça te va ?" }
      },
      "piste": "…",                      // per item: the fix shown inside the open suite
      "proposition": { "html": "<p>C. …</p>", "choix": "c", "label": "Notre proposition" },
      "placeholder": "…",                // comment or free-text placeholder
      "commentaire": false,              // optional: no comment box
      "facultatif": true                 // not counted in progress
    }]
  }],
  "fin": { "titre": "…", "texte": "…" }, // optional closing box
  "ui": { }                              // optional overrides of on-screen strings (see TEMPLATE.html, `UI`); "dernierMot": null removes the last free field
}

A question with neither choix nor points is free text. A question with choix or points gets a folded comment box.

What the file does (do not rebuild it)

  • Side rail: progress (« 7 sur 20 répondues »), last autosave time, the list of questions with the answer chosen, and the buttons. On a phone the rail becomes a bottom bar.
  • Every change autosaves in the browser (localStorage), so closing and reopening the same file keeps the answers.
  • « Je prends cette proposition » checks the proposal's choice.
  • « Enregistrer mes réponses » downloads questionnaire-<slug>-reponses-<date>.json.
  • « Copier en texte » puts a readable summary, with num and [id], on the clipboard.
  • « Tout effacer » asks for confirmation first, then empties every answer. Small and red on purpose: it must never look like the main action.
  • The closing box lists the questions still unanswered, with links.

Reading the answers back

The returned .json holds reponses, one entry per question in order: id, num, question, then as relevant choix (value or "nsp"), lettre, libelle, propositionRetenue, cases (labels), piste and avisPiste, points ([{ point, intitule, reponse }]), texte, commentaire; plus dernierMot and majLe. From pasted text, use the [id] on each line. Never put words in the recipient's mouth: an unanswered or « nsp » item stays undecided.

04 同仓库更多 Skills

Rabot-Dutilleul
Rabot-Dutilleul/Fabien-skills

anti-sleep

Keep the Windows machine awake from WSL for a set duration or while a process runs.

★ 1
Rabot-Dutilleul
Rabot-Dutilleul/Fabien-skills

anti-sleep

Keep the user's MacBook awake reliably with macOS caffeinate for a set duration or while a process runs. Use for "don't let my Mac sleep", "keep the screen on", "anti-sleep", "caffeinate", overnight work, or long builds. Unlike a normal background job, it survives temporary agent-shell cleanup.

★ 1
Rabot-Dutilleul
Rabot-Dutilleul/Fabien-skills

security-audit

Security guidance and vulnerability review for codebases, APIs, services, CLI tools, libraries, and daemons. Use for security questions, focused reviews, vulnerability research, security audits, or pen tests. Run the complete workflow only for explicit codebase audit or pen-test requests, full/comprehensive/end-to-end reviews, or requested report artifacts.

★ 1
Rabot-Dutilleul
Rabot-Dutilleul/Fabien-skills

storm-research

Use when someone asks to run Storm Research, use the storm-research skill, run the STORM method on a topic, says "storm research this" / "storm report on X" / "give me a STORM briefing on X", or wants a multi-perspective, citation-verified HTML research briefing on a topic. Runs a 4-phase pipeline: five expert lenses (Practitioner, Academic, Skeptic, Economist, Historian) -> contradiction map -> synthesized HTML report -> adversarial peer review + primary-source verification. Best for topics where multiple viewpoints and fact-checked claims matter; overkill for a simple factual lookup.

★ 1
Rabot-Dutilleul
Rabot-Dutilleul/Fabien-skills

research

Investigate a question against high-trust primary sources and capture the findings as a Markdown file in the repo. Use when the user wants a topic researched, docs or API facts gathered, or reading legwork delegated to a background agent.

★ 1
Rabot-Dutilleul
Rabot-Dutilleul/Fabien-skills

last30days

Research what people actually say about any topic in the last 30 days. Pulls posts and engagement from Reddit, X, YouTube, TikTok, Hacker News, Polymarket, GitHub, and the web. Includes a doctor health check to diagnose broken or missing sources.

★ 1