prototype

Construisez un prototype jetable pour étoffer une conception avant de vous y engager. Achemine entre deux branches — une application terminal exécutable pour les questions d'état/logique métier, ou plusieurs variations d'interface utilisateur radicalement différentes, basculables depuis une seule route. À utiliser lorsque l'utilisateur souhaite prototyper, vérifier la cohérence d'un modèle de données ou d'une machine d'état, maquetter une interface utilisateur, explorer des options de conception, ou dit « prototype ceci », « laisse-moi jouer avec », « essaie quelques designs ».

npx skills add https://github.com/mattpocock/skills --skill prototype

Prototype

A prototype is throwaway code that answers a question. The question decides the shape.

Pick a branch

Identify which question is being answered — from the user's prompt, the surrounding code, or by asking if the user is around:

  • "Does this logic / state model feel right?"LOGIC.md. Build a tiny interactive terminal app that pushes the state machine through cases that are hard to reason about on paper.
  • "What should this look like?"UI.md. Generate several radically different UI variations on a single route, switchable via a URL search param and a floating bottom bar.

The two branches produce very different artifacts — getting this wrong wastes the whole prototype. If the question is genuinely ambiguous and the user isn't reachable, default to whichever branch better matches the surrounding code (a backend module → logic; a page or component → UI) and state the assumption at the top of the prototype.

Rules that apply to both

  1. Throwaway from day one, and clearly marked as such. Locate the prototype code close to where it will actually be used (next to the module or page it's prototyping for) so context is obvious — but name it so a casual reader can see it's a prototype, not production. For throwaway UI routes, obey whatever routing convention the project already uses; don't invent a new top-level structure.
  2. One command to run. Whatever the project's existing task runner supports — pnpm <name>, python <path>, bun <path>, etc. The user must be able to start it without thinking.
  3. No persistence by default. State lives in memory. Persistence is the thing the prototype is checking, not something it should depend on. If the question explicitly involves a database, hit a scratch DB or a local file with a clear "PROTOTYPE — wipe me" name.
  4. Skip the polish. No tests, no error handling beyond what makes the prototype runnable, no abstractions. The point is to learn something fast.
  5. Surface the state. After every action (logic) or on every variant switch (UI), print or render the full relevant state so the user can see what changed.
  6. Capture it when done. Fold any validated decision into the real code, then capture the prototype itself as a primary source: commit it to a throwaway branch, out of main, and leave a context pointer to that branch on the implementation issue. Capture the answer too — the verdict and the question it settled — in the issue or a commit. The main branch keeps only the validated decision.

Plus de skills de mattpocock

improve-codebase-architecture
mattpocock
Trouver des opportunités d'approfondissement dans une base de code, en s'appuyant sur le langage du domaine dans CONTEXT.md et les décisions dans docs/adr/. Utiliser lorsque l'utilisateur souhaite améliorer l'architecture, trouver des opportunités de refactorisation, consolider des modules fortement couplés, ou rendre une base de code plus testable et navigable par l'IA.
developmentcode-reviewapi
tdd
mattpocock
Développement piloté par les tests avec boucle rouge-vert-refactorisation. À utiliser lorsque l'utilisateur souhaite développer des fonctionnalités ou corriger des bugs en utilisant le TDD, mentionne "rouge-vert-refactorisation", veut des tests d'intégration, ou demande un développement test-first.
developmenttesting
handoff
mattpocock
Compacter la conversation actuelle en un document de transfert pour qu’un autre agent puisse le reprendre.
communicationproject-managementdocument
triage
mattpocock
Trier les problèmes via une machine à états pilotée par des rôles de triage. Utiliser lorsque l'utilisateur souhaite créer un problème, trier des problèmes, examiner les bogues entrants ou les demandes de fonctionnalités, préparer des problèmes pour un agent AFK, ou gérer le flux de travail des problèmes.
developmentproject-managementcommunication
obsidian-vault
mattpocock
Rechercher, créer et gérer des notes dans le coffre Obsidian avec des wikiliens et des notes d’index. Utiliser lorsque l’utilisateur souhaite trouver, créer ou organiser des notes dans Obsidian.
productivitydocument
edit-article
mattpocock
Modifier et améliorer des articles en restructurant les sections, en améliorant la clarté et en resserrant la prose. À utiliser lorsque l'utilisateur souhaite éditer, réviser ou améliorer un brouillon d'article.
documentcreative
writing-great-skills
mattpocock
Référence pour bien rédiger et éditer des compétences — le vocabulaire et les principes qui rendent une compétence prévisible.
documentdevelopment
implement
mattpocock
Implémenter un travail basé sur un PRD ou un ensemble de tickets.
developmentcode-reviewproject-management