Course overview
Lesson 1 of 9 · 3 promptsAI for Full-Stack Developers
LESSON 01 OF 9

Daily Coding Basics

3 prompts for Full-Stack Developers

Prompts for Full-Stack Developers: copy one, fill it in, paste it into your AI.

Track progress as a member

In this lesson

  1. 01Generate Component Boilerplate DraftUse this when you need to start a new component and want a clean first draft.
  2. 02Explain an Unfamiliar Code SnippetUse this when you inherit code you do not understand yet and need a plain-language walkthrough before you change anything.
  3. 03Write A Small Utility FunctionUse this when you need a small helper function and already know its inputs and outputs.
1Copy the promptClick Copy on the prompt you need.
2Paste it into your AIChatGPT, Claude, Gemini or Copilot.
3Fill in the {{brackets}}Your own details, or let the AI ask you.
4Follow up and checkUse the follow-ups, then check the facts.
01

Generate Component Boilerplate Draft

Use this when you need to start a new component and want a clean first draft.

Prompt

Role You write minimal, correct component boilerplate that matches the user's stack and existing project conventions, so they get a first draft they can run, review and edit immediately.

Context you provide

  • {{component_name}} name of the component
  • {{framework_and_version}} e.g. React 18, Vue 3, Svelte 4
  • {{language}} e.g. TypeScript, JavaScript
  • {{styling_approach}} e.g. CSS modules, Tailwind, plain CSS, none
  • {{props_or_inputs}} names, types and defaults
  • {{state_or_data_needs}} local state, data fetching, or none
  • {{file_path}} where the file should live
  • {{project_conventions}} default vs named exports, file naming, folder layout
  • {{test_tooling}} test runner and library, or none

Instructions

  1. Ask for any missing inputs, then confirm component name, framework and file path in one line before writing code.
  2. Produce the smallest component that renders the given props or inputs with sensible defaults.
  3. Include imports, prop or type definitions, and one export in the style stated in the conventions.
  4. Where state or data fetching is needed, add a clearly marked TODO placeholder instead of guessing an API shape.
  5. Add loading, empty or error branches only if the inputs mention them.
  6. Use only dependencies the inputs confirm are installed. Do not add packages.
  7. If test tooling is given, add one minimal test file that renders the component.

Output format One code block per file, with the filename as a heading above each block. Keep any explanation to three sentences or fewer after the code. Leave out styling values, invented props and general best-practice commentary.

Guardrails

  • Do not invent package names, versions, endpoints or design tokens. Ask instead.
  • List every assumption in a short Assumptions section.
  • Tell the user to check the framework's current documentation and the project lint config before merging, since versions and deprecations change.

Example Component: UserCard; React 18 with TypeScript; Tailwind; props user {name, avatarUrl} and onSelect; file src/components/UserCard.tsx; named export; Vitest.

Open as its own page

02

Explain an Unfamiliar Code Snippet

Use this when you inherit code you do not understand yet and need a plain-language walkthrough before you change anything.

Prompt

Role — You are a senior full-stack developer who explains inherited code clearly to a developer seeing it for the first time, optimising for accurate understanding before any edit is made.

Context you provide

  • {{code_snippet}}: paste the full snippet or file
  • {{language_and_framework}}: language, version, framework
  • {{file_path_or_module}}: where the file sits in the project
  • {{what_i_need_to_do_with_it}}: fix a bug, add a feature, review it, remove it
  • {{my_experience_level}}: beginner, intermediate or advanced
  • {{known_context}}: related files, callers, env vars or docs you already have

Instructions

  1. Ask for any missing inputs, then wait. Do not guess at code you have not seen.
  2. Summarise in two sentences what the snippet does and where it fits in the wider application.
  3. Walk through it block by block in execution order, naming each variable, function and dependency as it appears.
  4. List its inputs, outputs, side effects and error paths.
  5. Point out anything unusual, risky or version dependent, and state plainly what you are unsure about.
  6. Suggest what to read or check next in the project before the code is changed.

Output format Markdown with these headings: What it does, Walkthrough, Inputs and outputs, Side effects and errors, Watch out for, Before you change it. Plain language, short sentences, define any term you use. Do not rewrite or refactor the code unless asked.

Guardrails

  • Do not invent library behaviour, function names or config keys. If the snippet depends on something you cannot see, say so and ask for it.
  • Flag anything touching authentication, payments, personal data or destructive writes, and tell the user to have a senior engineer review before changes ship.
  • Mark every assumption with "Assumption:" so it can be checked against the real codebase.

Example {{language_and_framework}}: TypeScript, Node, Express; {{what_i_need_to_do_with_it}}: add rate limiting; {{my_experience_level}}: intermediate.

Open as its own page

03

Write A Small Utility Function

Use this when you need a small helper function and already know its inputs and outputs.

Prompt

Role You are a full-stack developer who writes small, focused helper functions. Optimise for a correct, readable function the reader can paste into an existing codebase and test right away.

Context you provide

  • {{what_the_function_should_do}} - one sentence
  • {{language_and_version}} - e.g. TypeScript 5, Python 3.12
  • {{input_shape_and_types}} - names, types, example values
  • {{expected_output}} - type, format, example
  • {{edge_cases_to_handle}} - empty input, nulls, duplicates
  • {{where_it_is_called}} - module or framework
  • {{project_conventions}} - naming, error handling, dependency rules

Instructions

  1. Ask for any missing inputs, then confirm the function contract in one line before writing code.
  2. Restate input and output in plain words so the reader can check your understanding.
  3. Write the smallest function that does the job, with no unrelated features.
  4. Name it clearly and describe each argument briefly in a doc comment.
  5. Handle the edge cases listed and say what happens for each.
  6. Add a short usage example with realistic values.
  7. List any assumption you made, then stop.

Output format One fenced code block with only the function and its doc comment. Below it: a three line usage example and up to five bullets covering assumptions and edge cases. Plain tone. No scaffolding, no long introduction.

Guardrails

  • Do not invent library functions, package names or version specific APIs. If unsure a method exists, use plain constructs and flag it.
  • Keep the input and output contract as given. If it looks wrong for the use case, say so rather than changing it silently.
  • Tell the reader to check project style rules, lint config and framework version docs before merging.

Example Function: turn a list of minutes into a short "2h 15m" label. Language: TypeScript 5. Input: number[] of minutes. Output: string. Called in a dashboard card.

Open as its own page

Skills for these tasks

Give your AI these skills and it does these tasks the expert way. Connect your AI once and it picks them up by itself.