I added a comment section to my blog in one conversation with AI. Zero dependencies.

Mar 02, 2026
Share

I use OpenCode, an AI coding agent powered by Claude Sonnet 4.6 through my GitHub Copilot subscription. It lives in my terminal. I type, it builds.

Here is exactly what happened when I asked it to add a comment section to this blog.


The prompt

I typed one sentence:

"I want a simple comment section for each post. plan & then implement. I don't want heavy dependencies"

That was the entire brief. No technical spec. No wireframes. Just that.


It did not start building immediately

This is the part that impressed me.

Before writing a single line, the agent read the entire codebase on its own. Every file. Every existing component. It figured out by itself that this blog is built with Next.js and TinaCMS. Next.js is the framework powering the website. TinaCMS is the content management system that lets me write posts in Markdown without touching a database. The posts you are reading right now live as plain Markdown files in a GitHub repository. The agent discovered all of this without me telling it a thing.

Then it asked me two questions.


The questions

Question 1: What storage approach do you want for comments?

It presented three options:

  • GitHub Discussions via Giscus: zero-dependency embed, comments live on your GitHub repo
  • SQLite via Turso: full control, anonymous or named comments, requires a small database package
  • Vercel KV (Upstash Redis): key-value store, serverless-native

I picked the first one. Giscus stores comments directly in your GitHub repository as Discussions. No monthly bill. No third-party database. Your data, on your own GitHub, forever.

Question 2: Should commenters need to authenticate, or can anyone post anonymously?

I said:

"start with GitHub login, but then we would do anonymous as well. will it work with Giscus?"

And the agent responded:

"Giscus is GitHub-login-only and can't mix anonymous."

Just an honest answer and asked me to chose from these two paths:

  • Ship Giscus now (GitHub login only). Anonymous comments can be added later via a separate custom system.
  • Build a fully custom comment section from scratch with full control.

I chose to ship Giscus now and handle anonymous comments separately later.


What it built

One thing the agent did before writing any code: it created a separate Git worktree for this task. I wrote about why I use Git worktrees in a previous post. The short version is that each task gets its own isolated folder and branch, so I can work on something else in parallel without anything interfering. I have this rule baked into my agent setup, and it followed it without being reminded.

Then it queried my GitHub repository directly to pull the exact configuration details it needed. Then it shipped.

The result: a fully working comment section, wired into every blog post, that automatically switches between light and dark mode to match the site theme, loads lazily so it never slows the page down, and keeps each post's comments completely separate from one another.

Zero new packages added to the project. The comments live as GitHub Discussions on this very repository. If the tool powering the widget ever disappeared, the comments would still be there on GitHub, untouched.


The back-and-forth after

Once the feature was built, I had one small request:

Me:

"We should let users know that to edit comments, click on the timestamp of the comment, which will take you to GitHub Discussion where you can edit your comment."

Done. A small hint appeared below the Comments heading.

One change. Three seconds.


Then it handled everything else

Then I asked it to:

  • Ran a full quality check on the code it had written
  • Created a pull request with a proper description
  • Watched the automated checks run (build, security scan, deployment preview)
  • Merged it once everything passed
  • Cleaned up the temporary workspace it had used
  • Updated the main codebase

Start to finish, one conversation.


Scroll down. The comment section is right there. Try it.

Comments

To edit a comment, click its timestamp. It will open the GitHub Discussion where you can edit your comment.