Blog / / 8 min read

How I build frontend with AI using Claude Code

My Claude Code workflow: six stages, a model for each, and a rule that the AI has to prove what it did.

By Thor Remiendo, software engineer in Baguio City

  • Claude Code
  • Workflow
  • Angular
  • TDD

I write frontend for city and provincial government systems, an enterprise energy platform, a startup, and my own running app, usually several of them in the same week. Claude Code writes most of the first drafts now. What makes that work isn’t a clever prompt. It’s a pipeline that makes the AI prove what it did before anything reaches a branch.

The one rule

Whenever I share this workflow with others, I end on the same line: understand every line you submit. AI doesn’t change that; it raises the stakes. A model can produce a plausible Angular component faster than I can read it, so the workflow’s whole job is to keep me reading, and to give me evidence (a failing test, a screenshot, a diff) instead of a confident summary.

So I stopped treating Claude as a chat window and started treating it like a junior engineer on a very strict process: small steps, written handoffs, and nothing called done until it’s shown working.

Six stages, one direction

Every piece of work, from a Jira ticket at work to a feature on my own tools, goes through the same six skills. They live in ~/.claude/skills, and each one writes a file into .work/<work-id>/ in the repo.

/discover: shape the ask, writes brief.md(01)/discovershape the askmy session model → brief.md/ticket: settle the ACs, writes ticket.md(02)/ticketsettle the ACsmy session model → ticket.md/plan: ordered, reviewed, writes plan.md(03)/planordered, reviewedOpus · xhigh → plan.md/spec: failing tests first, writes spec.md(04)/specfailing tests firstOpus · high → spec.md/execute: strict TDD, writes tests + code(05)/executestrict TDDSonnet · high → tests + code/e2e: prove it in the app, writes screenshots(06)/e2eprove it in the appSonnet · medium → screenshots/security: XSS, CSP, sanitising, writes fixes(07)security passXSS, CSP, sanitisingsecurity-coder skill → fixes/clear between stages; files in .work/<id>/ are the handoff./discover: shape the ask, writes brief.md(01)/discovershape the askmy session model → brief.md/ticket: settle the ACs, writes ticket.md(02)/ticketsettle the ACsmy session model → ticket.md/plan: ordered, reviewed, writes plan.md(03)/planordered, reviewedOpus · xhigh → plan.md/spec: failing tests first, writes spec.md(04)/specfailing tests firstOpus · high → spec.md/execute: strict TDD, writes tests + code(05)/executestrict TDDSonnet · high → tests + code/e2e: prove it in the app, writes screenshots(06)/e2eprove it in the appSonnet · medium → screenshots/security: XSS, CSP, sanitising, writes fixes(07)security passXSS, CSP, sanitisingsecurity-coder skill → fixes/clear between stages; files are the handoff.
Six skills of my own, always in this order, and I type every one. Only /execute is allowed to touch source code. A security skill reviews the result after /e2e.
  1. /discover: for anything fuzzy. A subagent scans the codebase first, so the raw search output never floods my context, and I’m only asked what the code can’t answer. The brief tags every draft acceptance criterion [confirmed], [inferred] or [assumed]. Untagged ACs aren’t accepted, which is what keeps guesses from turning into requirements.
  2. /ticket: settles those assumed ACs with me and pushes the ticket to the tracker, which is Jira for most of my projects.
  3. /plan: an ordered implementation plan, reviewed by an advisor model before I see it. No code yet.
  4. /spec: for each behaviour, the trigger, the expected result, and the test that will prove it. This is where most bad ideas die, cheaply.
  5. /execute: strict TDD. Write the failing test, run it, and show it failing for the right reason (not a typo, not a missing import), then make it pass. One behaviour at a time.
  6. /e2e: prove it in the running app: dev server, a real login, and a screenshot for every AC that the model actually opens and looks at. Then a ticket comment, the status move, and the merge to staging.
  7. frontend-security-coder: once /e2e is green, a security pass over the same diff before it goes anywhere near production. It checks for XSS and unsafe DOM writes, how user input is sanitised, Content Security Policy, clickjacking protection and redirect validation. Government forms take a lot of citizen input, so this is the pass I’d least like to skip.

Two details matter more than they look. First, the skills are marked disable-model-invocation, so Claude can’t start the next stage by itself. I type /plan; it can only tell me that’s what comes next. Second, I run /clear between stages. The files are the handoff, not the conversation, so every stage starts with a clean, cheap context and a document it can’t misremember.

Picking the model per stage

Thinking-heavy stages get the big model; typing-heavy stages don’t need it. Instead of switching by hand, each skill pins its own model in its frontmatter:

---
name: plan
disable-model-invocation: true
model: opus
effort: xhigh
---

/plan runs on Opus at extra-high effort and /spec on Opus at high. /execute drops to Sonnet at high, and /e2e to Sonnet at medium. The pin only lasts for that skill’s turn, so when I reply mid-stage the session goes back to its normal model.

I got here the long way. I first set up a quota-aware agent router that asked a ranking model to pick the agent, model and effort for each task. It worked, but it kept hesitating between two near-identical options on exactly the tasks I cared about, like planning and reviews. Then I noticed my stages are fixed, so the routing is fixed too. Six lines of frontmatter replaced a whole service. I retired the router.

Project context, written down once

Each workspace has a CLAUDE.md that loads automatically. Mine for the Origin3 projects has:

  • a project registry: every repo, its stack, and whether it’s web or mobile, so Angular rules never leak into a React Native task;
  • a docs map: what to read before touching each project, and which docs must be updated after a change;
  • git rules: Conventional Commits scoped by project, git mv for renames, and a scan for secrets before every commit;
  • testing rules learned the hard way: guards run inside TestBed.runInInjectionContext, HTTP tests use provideHttpClientTesting(), and standalone components need NO_ERRORS_SCHEMA in both places they’re configured.

The rule I’m proudest of came from an incident. A Playwright spec stubbed the auth call, passed, and meanwhile the real single sign-on flow was broken for users. Now the rules forbid stubbing auth or API responses in SSO flows and require every test to collect CORS errors from the console and assert there are none. A test that passes while a user is stuck is worse than no test, and that sentence is in the file.

The skills and tools I actually use

superpowers
Process skills: brainstorming before building, systematic debugging, TDD. They set the approach before any code skill runs.
frontend-security-coder
The security pass after /e2e: XSS and unsafe DOM writes, sanitisation, CSP, clickjacking and redirect checks. From the community agentic-awesome-skills collection.
impeccable
Design direction and review. This site went through it: a direction round, a build, then a finish review by a separate reviewer agent that sent back a numbered list of fixes.
svg-illustrator
Draws SVG illustrations, then renders and critiques each one instead of drawing blind. I used it for the illustrations in my ITE talk deck.
text-to-lottie · remotion
Motion: Lottie animations from a prompt, and video-style motion graphics when a slide needs more than a CSS transition.
Chrome, Figma, Jira
MCP connections, so the model can drive a real browser to verify, read a design file directly, and comment on the ticket it just closed.
Lavish
Opens an HTML draft as a review page I can annotate, and sends my notes back to Claude. This post was reviewed in it before publishing.
vercel · skill-creator
Deploys from the terminal (this site ships with npx vercel deploy --prod), and helps me write and test new skills.

Tokens: measure before you optimise

I added two token-saving tools: RTK, a hook that compresses command output before the model reads it, and ponytail, a mode that pushes Claude toward the smallest working change. Then I built a small local dashboard that reads Claude Code’s transcripts, to check whether they helped.

The honest result: RTK trims 14–55% off each command’s output, but that works out to only about 1–2% of my total usage. Ponytail didn’t measurably save tokens; its edits just got smaller. The real cost was context size. A long session re-reads hundreds of thousands of tokens on every turn. The biggest saving was the habit I already had: /clear between stages, with the plan on disk.

Running several agents at once

With a couple of repos in flight I often have more than one agent working. I built a local board for that: live agents grouped by workspace, plus one merged “needs me” list pulled from my trackers, so I can see what’s blocked on me instead of flipping through terminals. It’s its own project, built with the same six stages.

If you’re starting out

  1. Write one CLAUDE.md before one prompt. Stack, conventions, how to run tests. It pays back on day one.
  2. Make it prove things. Ask for a failing test first and a screenshot at the end. Evidence beats summaries.
  3. Keep stages small, with written handoffs. Files survive /clear; chat history doesn’t.
  4. Measure before you optimise. My guesses about what cost tokens were wrong.
  5. Read every diff. A dev with AI beats a dev without it, but only if the dev is still the one who understands the code.

Questions about any of this? Email me at thorremiendo@gmail.com. I’m happy to share the skill files.

← All notes