mattpocock/skills

repository·main·Indexed 31 days ago

https://github.com/mattpocock/skills

A collection of engineering-focused prompts and workflows for AI coding agents like Claude Code and Codex. Includes user-invoked orchestration commands (e.g., /triage, /to-spec, /implement) and model-invoked engineering disciplines (e.g., TDD, debugging, domain modeling) designed to ensure high-quality software engineering practices and prevent 'vibe coding'.

Tokens
47.4K
Snippets
55
Records
173
Agent score
99%

What's inside mattpocock-skills

  1. Overview of Engineering Skills

    main

    The mattpocock/skills repository provides a set of user-invoked and model-invoked skills designed to improve AI agent performance in software engineering tasks.

    User-Invoked Skills (Orchestration)

    These are triggered manually by the user via commands:

    • /ask-matt: A router to help find the right skill for your current situation.
    • /grill-with-docs: A grilling session that builds a project's domain model, updates CONTEXT.md, and manages ADRs to ensure alignment and shared language.
    • /triage: Manages issues through a state machine of triage roles.
    • /improve-codebase-architecture: Scans the codebase for design improvements and generates an HTML report.
    • /setup-matt-pocock-skills: One-time configuration for issue trackers, triage labels, and doc layouts.
    • /to-spec: Synthesizes current discussions into a formal specification.
    • /to-tickets: Breaks plans or specs into actionable tickets (local files or tracker links).
    • /implement: Executes work based on specs/tickets, driving /tdd and concluding with /code-review.
    • /wayfinder: Plans large-scale work by creating a map of investigation tickets on an issue tracker.

    Model-Invoked Skills (Discipline)

    These are reusable patterns that the agent can invoke automatically or when prompted to maintain engineering discipline (e.g., TDD, debugging, or architectural adherence).

  2. Understand the domain model for building great skills

    main

    The writing-great-skills project defines a domain model for creating high-quality AI skills. The core goal is Predictability: ensuring an agent behaves the same way on every run (consistent process, even if output varies).

    Skills are optimized using four axes:

    1. Invocation: How a skill is reached (Model-Invoked vs. User-Invoked).
    2. Information Hierarchy: How content is arranged (Steps vs. Reference).
    3. Steering: How agent behavior is shaped (Branches, Leading Words).
    4. Pruning: How skills are kept lean (Progressive Disclosure).

    Use this glossary to diagnose failure modes like Sprawl (excessive length) or high Cognitive Load (too many skills for a human to remember).

  3. Manage notes in the Obsidian Vault

    main

    Use the obsidian-vault skill to search, create, and organize notes within the Obsidian vault. The vault is located at /mnt/d/Obsidian Vault/AI Research/ and follows a flat structure without folders. Organization is achieved through linking and index notes rather than directory hierarchies.

    Naming Conventions

    • Title Case: All note names must use Title Case.
    • Index Notes: Use index notes to aggregate related topics (e.g., Skills Index.md). These notes consist of lists of [[wikilinks]].

    Linking Strategy

    • Use Obsidian [[wikilinks]] syntax: [[Note Title]].
    • Place links to dependencies or related notes at the bottom of the note.
    • Index notes serve as central hubs containing lists of these links.
  4. Use the codebase-design skill for module architecture

    main

    The codebase-design skill provides a shared vocabulary and set of principles for designing or restructuring deep modules. Use this skill when you need to:

    • Design or improve a module's interface.
    • Find opportunities to increase module depth.
    • Decide where to place a seam.
    • Make code more testable or AI-navigable.
    • Improve locality for maintainers and leverage for callers.
  5. Explore in-progress engineering and writing skills

    main

    The in-progress directory contains experimental skills that are still under development. These skills may have rough edges, breaking changes, or may be abandoned. They are not yet included in the official plugin or the stable top-level README.

    User-invoked experimental skills:

    • loop-me: A session-based skill to grill yourself into implementable workflow specs using the current directory as a stateful workspace.
    • wizard: Generates an interactive bash wizard to walk a human through manual procedures (e.g., setup, migrations, state transitions), including opening URLs and writing .env or GitHub Actions secrets.
    • claude-handoff: Uses claude --bg to hand off the current conversation to a fresh background agent seeded with a handoff summary.
    • setup-ts-deep-modules: Configures dependency-cruiser in a TypeScript repo to enforce deep module patterns (hiding implementation in subfolders).
    • to-questionnaire: Converts undecided decisions into a Markdown questionnaire for asynchronous or meeting-based input.
    • batch-grill-me: A design-tree interview that asks multiple questions per round based on settled prerequisites.

    Writing-focused experimental skills:

    • writing-beats: Shapes articles as a journey of beats using a choose-your-own-adventure style.
    • writing-fragments: A grilling session that mines heterogeneous writing nuggets and appends them to a single document.
    • writing-shape: Transforms raw markdown material into a structured article paragraph by paragraph.
  6. Understand the domain-modeling skill purpose and file structure

    main

    The domain-modeling skill is used to actively build and sharpen a project's domain model. Use it when you need to pin down domain terminology (ubiquitous language), record architectural decisions, or maintain the domain model during other engineering tasks.

    File Structure Patterns

    Single Context Repository: Most repositories use a single context located at the root:

    /
    ├── CONTEXT.md
    ├── docs/
    │   └── adr/
    │       └── [ADR-FILES].md
    └── src/

    Multi-Context Repository: If a CONTEXT-MAP.md exists at the root, the repository uses multiple contexts. The map points to specific sub-directory CONTEXT.md files and their local docs/adr/ directories:

    /
    ├── CONTEXT-MAP.md
    ├── docs/
    │   └── adr/                          ← system-wide decisions
    └── src/
        ├── ordering/
        │   ├── CONTEXT.md
        │   └── docs/adr/                 ← context-specific decisions
        └── billing/
            ├── CONTEXT.md
            └── docs/adr/                 ← context-specific decisions

    Lazy Creation: Create files only when necessary. Create CONTEXT.md when the first term is resolved, and create docs/adr/ when the first ADR is required.

  7. What is a beat in the writing-beats skill

    main

    A beat is a single move in a narrative journey. It performs one specific function: setting a scene, landing a point, asking a question, dropping an aside, or twisting an angle.

    Sizing a Beat

    A beat's length is determined by the requirements of the move:

    • Single sentence: For quick moves (e.g., "And then nothing happened for three weeks.").
    • Short paragraph: For moves requiring setup.
    • Multiple paragraphs: For self-contained vignettes, arguments, or examples.

    Constraint: If a section requires multiple subheadings or spans too many paragraphs to feel like a single move, it is not a beat; it should be split into multiple beats.

  8. What is the Wayfinder skill?

    main

    Wayfinder is a planning skill designed for large-scale engineering efforts that exceed the capacity of a single agent session. Instead of executing work immediately, it charts a shared map of decision tickets on an issue tracker.

    Core Mental Model:

    • Goal: Finding the path to a destination (a spec, a decision, or a migration), not charging at it.
    • The Map: A single canonical issue (labeled wayfinder:map) that acts as an index of decisions made and a guide for what remains to be decided.
    • Decision Tickets: Child issues of the map that represent specific questions or investigations. A ticket is resolved when a decision is reached, not when a feature is built.
    • The Frontier: The set of open, unblocked, and unclaimed child tickets. This represents the edge of the known path.
    • Fog of War: In-scope work that is currently too vague to be turned into a specific ticket. This is tracked in the Not yet specified section of the map.
    # Wayfinder Concept
    - Map = Index of decisions
    - Ticket = A single decision/investigation
    - Frontier = Unblocked, unclaimed tickets
    - Fog = In-scope but unspecifiable work
  9. What is a Wizard and when to use one

    main

    A wizard is a bash script designed to walk a human through manual, tedious, or complex procedures step-by-step. It is used to bridge the gap between what an AI agent can do and what requires human interaction (e.g., navigating third-party dashboards, handling MFA, or performing one-off migrations).

    Use a wizard for:

    • Provisioning infrastructure.
    • Setting up credentials or CI secrets.
    • Walking through unfamiliar third-party dashboards.
    • Running one-off migrations or system cutovers.

    Do NOT use a wizard for:

    • Steps that an AI agent can perform autonomously.
  10. What is a wizard and when to use it

    main

    A wizard is an interactive bash script generated by an AI agent to walk a human through manual, step-by-step procedures that automation cannot perform alone. This includes wiring up third-party services, running one-off migrations, or moving a project from state A to state B.

    Key Characteristics

    • Human-driven, Agent-authored: The agent writes the script, but you run it on your local machine. The agent never executes the script itself.
    • Stateful: It tracks progress through stages and can write captured values directly to .env files or GitHub Actions secrets/variables.
    • Ephemeral or Permanent: Use it as a one-off script in a scripts/ folder and delete it, or commit it to the repo to provide a standardized setup path for other developers.

    When to use it

    Reach for /wizard when you encounter a task requiring dashboard interaction or manual configuration:

    • Service Configuration: Opening multiple dashboards to capture API keys and writing them to .env and CI.
    • One-off Migrations: Sequencing irreversible steps behind confirmation gates.
    • State Transitions: Walking a project through a transition and reporting failures.
    • Documentation Replacement: Creating an executable version of a README setup guide to prevent documentation rot.
  11. When to use mocks in testing

    main

    To maintain test reliability and avoid brittle tests, only mock at system boundaries.

    Mock these:

    • External APIs (e.g., payment gateways, email services)
    • Databases (though using a dedicated test database is often preferred)
    • Time and randomness
    • The file system (use with caution)

    Do NOT mock these:

    • Your own classes or modules
    • Internal collaborators
    • Anything that is within your direct control/codebase
  12. Configure Domain Docs layout

    main

    The domain docs configuration defines how CONTEXT.md and Architecture Decision Records (ADRs) are structured and read. The setup skill offers two layouts:

    • single-context (Default): Uses one CONTEXT.md and a docs/adr/ directory at the repository root. This is recommended for most repositories.
    • multi-context: Uses a root CONTEXT-MAP.md that points to individual CONTEXT.md files within specific sub-contexts. This is intended for monorepos.

    Configuration details are recorded in docs/agents/domain.md.