AI-Assisted Development: Use Cases, Prompt Practices & Examples for Devs
AI is everywhere. But when it comes to day-to-day development, the benefits aren’t always clear. Ask a group of engineers whether AI tools have made them faster, more focused, or more effective, and you’ll get mixed responses. Some say yes. Many say, “It depends.”
That’s because there’s a gap between what AI promises and how it actually performs in the hands of developers. Much of the online content about AI-assisted software development is vendor-locking, vague, or focused on impressive but impractical demos.
In this article, all of the use cases and practices are based on real devs’ workflows in combination with my experience building CKEditor plugins (ckeditor5-smart-callout and ckeditor5-plotly-integration). Of course neither are finished, but both are working - you can see the link to their deployed version in the repository details.
Use cases: When to use AI-assisted development
Let’s say you’re working on a new feature. You’re juggling unfamiliar APIs, you’ve got scattered documentation, an unclear test plan, and you need to write internal notes by the end of the sprint. It’s late. Your brain’s running on coffee and yesterday’s sync notes. This is exactly when AI becomes more than a shiny new thing; it becomes a companion that helps - so let’s see how to use AI to write code based on a few use cases.
To make things simpler, let’s base the following use cases on a task of creating a new plugin for CKEditor. You know the basics - just create a new class, inherit from Plugin
, implement a few methods, and register the plugin in the CKEditor configuration. But CKEditor’s plugin architecture has its nuances. You’re jumping between internal specs you’d agreed on before, public API docs, and code examples. This is where AI stops being a novelty and starts acting like a real-time teammate.
Language and Docs
You start by sketching the basic functionality. Midway through, you realize you’ll need a solid README, an internal dev note, and a short usage guide. Docs and READMEs most likely come up as the last thing, but as a Developer Advocate, the README is my precious gem I like to start with (ckeditor5-plotly-integration does not have it yet - it is waiting for you to try).
This is where AI jumps in:
-
You paste in your rough idea and get a structured README.
-
AI rewrites your dev notes as a combination of meeting transcripts in a form that is clear enough that even a new hire (me) can follow it and implement the basics.
-
It helps you convert architecture notes into a clean, markdown-based internal wiki.
Research
Next, you dig into CKEditor’s plugin system. You’re trying to remember: do I need to register a command manually, or were there some naming conventions in place? Is this a UIComponentFactory
job or a Plugin.extend()
thingy? Where is that code sample I use all the time?
AI helps you to:
-
Summarize docs or explain specific CKEditor APIs without hopping tabs.
-
Understand what the base
Plugin
class does in plain English. -
Parse through older plugins and summarize their structure quickly.
-
Compare your code to best practices across CKEditor examples.
Code Generation
Good, you found a similar plugin, but you would like to just pick the actual integration logic - it is just these 10 lines of code that do the magic of returning to you the current time in the actual time zone or whatever it was that your plugin should do. So let’s try to draft it out. We will call it a PoC (and then use it as a final code anyway 😉).
AI excels here:
-
It generates plugin stubs from scratch using CKEditor guidelines.
-
It rewrites the code from one language to another, from evergreen JS to TS, or switches from one library to another, like Ava to Vitest.
-
It suggests lint-safe, idiomatic implementations for repeated patterns (this one was generated by AI).
Creating “throwaway” debug scripts
You’re debugging an odd bug where the dropdown vanishes in Safari (new Internet Explorer) when certain styles are applied. You need to quickly simulate editor states and isolate the issue.
With AI, you:
-
Spin up a one-off script that mocks an editor instance with fake content and just this one dropdown.
-
Generate small utilities like queries, CLI snippets, or mock data generators i.e. for debugging APIs, or services. It does not have to be perfect; it needs to work, then you can throw it away.
-
Automate what you’d normally do by hand - saving time and reducing manual trial and error - check out this example.
Testing
You got the research, have your POC functional for the happy path case, and you have decent information in your README, but something is missing. Yep - you did not use TDD once again, so let’s draft the tests so that you can do the actual implementation. Time to write tests - but CKEditor’s setup is complex. Should you mock editor.model.document, or test via integration?
AI supports you by:
-
Scaffolding test templates for your plugin’s command or UI component.
-
Recommending edge cases (e.g., “what happens if the dropdown is triggered mid-selection?”).
-
Suggesting how to isolate plugin behavior from CKEditor’s global state.
Task Planning & analysis
It is great that I suggested the whole workflow of implementing the plugin, but you probably have a completely different workflow in mind. This is exactly where you can consult with AI before you even start. This planning and analysis was the bread and butter of developers for a long time, but you can also take it to the next level and use AI for that. This is too large of a topic for this post, so let’s just focus on the main points.
Here’s how AI can help:
-
Breaking large goals into smaller, actionable steps/technical sub-tasks
-
Drafting implementation plans
-
Reviewing or improving technical specs
Practices: DO’s and DONT’s for working with AI-assisted development
All of the use cases above feel like sunshine and rainbows, right? You might be wondering, how much should I trust this thing? Should I copy-paste what it gives me? How much do I need to supervise?
Having seen these the use cases, let’s get to some concrete practices. These ✅ DOs and 🚫DON’Ts are not abstract tips. They’re guardrails shaped by real devs using AI-assisted software development.
Break Big Tasks Into Small Chunks
Split large tasks into smaller, focused units. Plan the work, then iterate over the smaller steps. AI works best when it (and you) can concentrate on one goal at a time. Smaller prompts mean more accurate results, fewer hallucinations, and easier debugging. It also helps you stay in control of the process-reviewing each step, adjusting direction, and iterating quickly.
Even though the model context window is growing, it is still limited. Trying to solve too much at once often leads to shallow or inconsistent results - let’s be honest, it’s like in the pre-AI development days; it is basically creating subtasks out of your tasks.
Build a plugin that adds an inline color picker, registers a command, syncs it with the model, and includes tests.
Build an inline color picker. Split the work into these steps:
-
Register a UI component - button in the CKEditor 5 toolbar.
-
Implement the button handler to insert fixed color in the hex format
#772EFF
in the text. -
Scaffold a simple test for a plugin command.
-
Rewrite the button to the color picker that will insert color code into the text when selected.
Context is everything
Be precise. Add context using file references, commit examples, architectural explanations, info from well-crafted GitHub issues, or implementation plans. Link the docs if you need to (i.e. something like Plugins docs, or CKEditor 5 Framework docs).
Use integrated links formats (i.e. @file
for Cursor or GitHub copilot - the format varies) to relevant resources (local files, git commits, code parts, external links) or paste snippets directly. The more accurate the context the model has, the better the output. Nowadays, you can see whole frameworks about context engineering and how to format your context, but it all boils down to this: provide the context!
Create callout plugin based on CKEditor 5 block widget tutorial.
Use the CKEditor 5 block widget tutorial as a base for creating a callout widget. The creation will be triggered by callout dropdown in toolbar and it will create widget with styles options for “Note”, “Warning”, and “Success”.
CKEditor 5 specific documentation to use:
I want to implement this plugin using ComponentFactory
, and define a custom model element for schema validation. Can you help me scaffold the new plugin structure and recommend how to handle command registration and dropdown binding?
Be Specific and Directive
Clearly state your goal. What are you trying to achieve? Refactor? Write tests? Learn how something works?
A good prompt has a verb and an outcome: “Refactor X to use Y pattern.” AI can infer intent, but it can’t read minds. Don’t ask open-ended or vague questions without purpose. AI will always respond, but it might not be useful.
We need to style the callout plugin in CKEditor.
I have an existing CKEditor 5 plugin that registers a custom widget called calloutBox
. It currently renders as a <div class="ck-callout">
and supports inserting content blocks, but it doesn’t yet allow choosing different callout styles (like "note", "warning", "success").
Extend this so that the widget supports a style attribute, e.g. <div class="ck-callout ck-callout-warning">
, and the style can be updated dynamically.
I want to:
-
Define an attribute (e.g.
style
) on the widget’s model element -
Bind that attribute to a CSS class in the view using upcast/downcast converters
-
Expose this as an option in the UI dropdown
Use AI to Learn, Not Just Copy-Paste/Blindly Accept
Ask “why” and “how” questions. Let AI explain patterns, suggest docs, or break down unfamiliar concepts. Use it to explore the codebase you are working with. Treat it like StackOverflow with a better UX (and keep using StackOverflow - AI needs training data). When in doubt, ask for sources of information and review them critically. Use “Explain” and “Break down”: “Explain this like a five-year-old” (verified that helped for complicated topics like caching and naming 😉).
Register the Ctrl+Shift+N
shortcut for inserting the callout plugin.
I’m building a CKEditor 5 plugin and want to register a keyboard shortcut for triggering a custom command called insertCalloutBox
. I’ve already registered the command and hooked it into the dropdown UI. It works fine when selected manually.
Now I want to learn:
-
What’s the correct way to register a keystroke using
editor.keystrokes.set()
? -
Where in the plugin lifecycle should this be added—inside init() or after the UI is rendered?
-
How do I avoid overriding built-in CKEditor shortcuts or causing conflicts?
-
Are there any conventions for formatting shortcut strings (e.g.
Ctrl+Shift+N
) to ensure cross-platform support? -
Can the shortcut be made configurable via plugin options?
Explain how keyboard handling works in CKEditor 5, and walk me through the best practice for this use case before showing the code.
Review Everything Critically
AI can sometimes go in a direction you would not expect. Some of the test cases will test the same, some unneeded pieces of logic can appear, and it might be inclined to reinvent the wheel, i.e., generate a function that does exactly the same as you have somewhere else. And the nice example is the reward specification: Aim to test the functionality, not make tests pass by removing the logic. Not mentioning the most general issue of AI - the hallucinations.
Merge code you don’t understand. Ask follow-up questions, refactor, or run the code yourself.
Audit AI output like you would a junior teammate’s PR. Don’t lazy-approve. Be skeptical. When reviewing, ask for resources and do the cross-checks.
Know When to Reset
“If you find yourself in a hole, stop digging.” Inspired by the concept from “Stop Digging”:
Keep rewording or adding patches to a bad conversation. Models tend to reinforce earlier patterns - even wrong ones.
Recognize when a thread is going nowhere. If the conversation gets messy or the model is stuck on the wrong path, or you find yourself in a loop, just start over with a fresh prompt. Context is limited and might get polluted along the way. This is often more effective than trying to correct a broken chain of logic.
Checkpoint Before/After Using LLMs
Keep rewording or adding patches to a bad conversation. Models tend to reinforce earlier patterns - even wrong ones.
Always commit or stash before letting agent-mode touch your code. It may overwrite files or make unreviewed changes, so be careful.
Save & reuse prompts and context
Forget to save the working prompts!
Keep a scratchpad of useful prompt templates or ongoing conversations. Especially helpful for recurring tasks like writing tests, setting up files, or refactoring.
Once you achieve something - ask LLM to summarize what was done and what would be the best prompt/prompt template to get from the use case, or ask how the task was split into the subtasks.
AI-Assisted Development TL;DR
You don’t need to become an AI whisperer overnight. It takes time, and you should start small and with the basics. That is what this article is about. Show you the situation when you might start using AI and then guide you on how to use it in any of these situations.
If you start using these tips, you are going to have a solid foundation you can build on and here is the TL;DR:
Keep up with AI to stay in control
You don’t have to chase every trend, but understand enough to make informed decisions about how AI fits into your development flow.
Start slow
Don’t try to release a new JavaScript framework on day one (we already have plenty). Start with the CKEditor plugin, writing test stubs, drafting a README structure, and generating a debug script. Find the edges where it helps, not hinders.
Make notes
Save what works. Turn good prompts into reusable templates. Share them with your team. Future you will thank you (or hate you if you skip that) when solving a similar problem.
Iterate to be better
As the agile manifesto commanded for years: work incrementally, with checkpoints, clean commits, and reviews. Every mistake is part of the learning loop.
Ready to Try It?
Don’t just take this guide as a best practice - be critical (recursion strikes again) and put it to the test! Try implementing a small feature or UI enhancement in CKEditor using your favorite AI tool.
Start free
You can try it out with CKEditor’s builder and spin up your own local setup with the free trial to get the look and feel of it before you start.
Use AI your way
Whether you prefer Cursor, ChatGPT, GitHub Copilot, or you want to try something more specialized, try to adjust the way you use to your goal.
💡You might wanna use ckeditor5-smart-callout and ckeditor5-plotly-integration as a playground - there are a lot of things that are missing.