--- title: "Guide: Single Skill Execution" description: Detailed guide for single-domain tasks in oh-my-agent — when to use, preflight checklist, prompt template with explanation, real examples for frontend, backend, mobile, and database tasks, expected execution flow, quality gate checklist, and escalation signals. --- # Single Skill Execution Single skill execution is the fast path — one agent, one domain, one focused task. No orchestration overhead, no multi-agent coordination. The skill auto-activates from your natural language prompt. --- ## When to Use Single Skill Use this when your task meets ALL of these criteria: - **Owned by one domain** — the entire task belongs to frontend, backend, mobile, database, design, infrastructure, or another single domain - **Self-contained** — no cross-domain API contract changes, no backend changes needed for a frontend task - **Clear scope** — you know what the output should be (a component, an endpoint, a schema, a fix) - **No coordination** — other agents do not need to run before or after **Examples of single-skill tasks:** - Build one UI component - Add one API endpoint - Fix one bug in one layer - Design one database table - Write one Terraform module - Translate one set of i18n strings - Create one design system section **Switch to multi-agent** (`/work` or `/orchestrate`) when: - UI work needs a new API contract (frontend + backend) - One fix cascades across layers (debug + implementation agents) - The feature spans frontend, backend, and database - Scope grows beyond one domain after the first iteration --- ## Preflight Checklist Before prompting, answer these four questions (they map to the [Prompt Structure](/docs/core-concepts/skills) four elements): | Element | Question | Why It Matters | |---------|----------|----------------| | **Goal** | What specific artifact should be created or changed? | Prevents ambiguity — "add a button" vs "add a form with validation" | | **Context** | What stack, framework, and conventions apply? | Agent detects from project files, but explicit is better | | **Constraints** | What rules must be followed? (style, security, performance, compatibility) | Without constraints, agents use defaults that may not match your project | | **Done When** | What acceptance criteria will you check? | Gives the agent a target and you a verification checklist | If any element is missing from your prompt, the agent will either: - **LOW uncertainty:** Apply defaults and list assumptions - **MEDIUM uncertainty:** Present 2-3 options and proceed with the most likely - **HIGH uncertainty:** Block and ask questions (will not write code) --- ## Prompt Template ```text Build using . Constraints: . Acceptance criteria: 1) 2) 3) Add tests for: . ``` ### Template Breakdown | Part | Purpose | Example | |------|---------|---------| | `Build ` | The Goal — what to create | "Build a user registration form component" | | `using ` | The Context — tech stack | "using React + TypeScript + Tailwind CSS" | | `Constraints:` | Rules the agent must follow | "accessible labels, no external form libraries, client-side validation only" | | `Acceptance criteria:` | Done When — verifiable outcomes | "1) email format validation 2) password strength indicator 3) submit disabled while invalid" | | `Add tests for:` | Test requirements | "valid/invalid submit paths, edge cases for email validation" | --- ## Real Examples ### Frontend: Login Form ```text Create a login form component in React + TypeScript + Tailwind CSS. Constraints: accessible labels, client-side validation with Zod, no external form library beyond @tanstack/react-form, shadcn/ui Button and Input components. Acceptance criteria: 1) Email validation with meaningful error messages 2) Password minimum 8 characters with feedback 3) Disabled submit button while form is invalid 4) Keyboard and screen-reader friendly (ARIA labels, focus management) 5) Loading state while submitting Add unit tests for: valid submission path, invalid email, short password, loading state. ``` **Expected execution flow:** 1. **Skill activation:** `oma-frontend` activates (keywords: "form", "component", "Tailwind CSS", "React") 2. **Difficulty assessment:** Medium (2-3 files, some design decisions around validation UX) 3. **Resources loaded:** - `execution-protocol.md` (always) - `snippets.md` (form + Zod patterns) - `component-template.tsx` (React structure) 4. **CHARTER_CHECK output:** ``` CHARTER_CHECK: - Clarification level: LOW - Task domain: frontend - Must NOT do: backend API, database, mobile screens - Success criteria: form validation, accessibility, loading state, tests - Assumptions: Next.js App Router, @tanstack/react-form + Zod, shadcn/ui, FSD-lite architecture ``` 5. **Implementation:** - Creates `src/features/auth/components/login-form.tsx` (Client Component with `"use client"`) - Creates `src/features/auth/utils/login-schema.ts` (Zod schema) - Creates `src/features/auth/components/skeleton/login-form-skeleton.tsx` - Uses shadcn/ui `