- Home
- Skills
- Testing & Debugging
- Plan First, Code Second
Plan First, Code Second
Your AI agent plans, writes the tests, then makes the smallest change that passes. No surprise rewrites.
Free
Works with the AI Agents you already use
Plan First, Code Second
Example session with this skill installed
Plan and implement a new 'resend-invite' endpoint in the auth-service and the corresponding button in the admin-ui repo. Use branch 'fix-invite-flow'.
- Read your context and instructions
- Compiled the plan first code
I have initialized the work for the fix-invite-flow branch across auth-service and admin-ui. I have analyzed the existing patterns for endpoint validation and UI component styling.
Proposed Implementation Plan
I have generated PLAN.md in the docs/planning/ directory. This plan details the transition from the current manual DB entry method to a triggered API event.
Target Behavior
| Actor | Action | Result |
|---|---|---|
| Admin | Clicks "Resend" | UI triggers POST /invites/:id/resend |
| Auth Service | Validates ID/Permissions | Generates new token, sends email, returns 204 |
| Auth Service | Rate Limit Hit | Returns 429 with retry-after header |
Gate 3: Assumptions for Approval
- Rate Limiting: I assume a 60-second cooldown per user invite is acceptable.
- Permissions: I assume only users with
role: 'admin'can trigger this, as perauth-service/permissions.ts.
UI State: The button will enter a loading state and disable itself for 5 seconds after a successful click to prevent double-submits.
4. Email Provider: I will reuse the existing SESMailer utility without modification.
Next steps
- Review the full
PLAN.mdfor technical specificities. - Please accept, reject, or advise on the 4 assumptions above.
- Once approved, I will proceed to Gate 4 to write the failing integration tests.
Connects securely to your tools. The creator never sees your data.
About this skill
Works in Claude Code, Codex and GitHub Copilot. The agent branches from main, writes a deep plan that follows your existing code's rules, lists its assumptions and waits for your approval. It then writes failing tests first, makes the smallest change that passes them, and audits the diff so no unrelated lines change. Use it: "Use plan-first-tdd-change to add <feature> on branch <name>." Source: github.com/subhannaeem/universal-agent-skills (MIT © Muhammad Subhan)
Requires a clean git status to start. Only runs tests in the project's existing style. Does not handle deployments or PR creation automatically.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed today
- Free with an Agensi account
- Software
Git