Learn the Git safety net.
A branch isolates work. A commit records a checkpoint. A diff shows exactly what changed. A pull request gives another person and your automated checks a review surface.
Codex, Claude Code, OpenCode and spec tools differ at the edges. The durable method is the same: make the problem clear, keep changes small, verify the result and let security checks stop unsafe code before production.
This guide starts with your first branch and ends with an evidence-based decision about subscriptions, emergency APIs, open-weight models, DGX hardware and private cloud.
You do not need to be a senior developer. You do need a repository, a small task and a way back when an experiment fails.
A branch isolates work. A commit records a checkpoint. A diff shows exactly what changed. A pull request gives another person and your automated checks a review surface.
The terminal runs with your user permissions. Before approving a command, read its target path and effect. If you cannot explain it, ask the agent to explain it without running it.
Never paste a command containing a password, API key or private token into chat, code or a commit.
Keep build, test and lint commands; important directories; conventions; forbidden paths; and “done” checks in a short repository instruction file. Prefer rules a person or CI job can verify.
See the file each tool reads →Start read-only: “Explain the folder structure, how to run the tests, where authentication lives and which files you would inspect for this task. Do not edit anything.” Check the answer against the repository.
Good context reduces guesswork. Durable project facts belong in repository instructions; the specific goal belongs in this task.
Goal: add an empty-state message to the saved-items page. Context: inspect the page, its existing tests and the shared message component. Constraints: do not add dependencies or change the API. Plan first and ask if the expected wording is missing. Done when: the empty and non-empty cases both pass, the diff is reviewed and no security check regresses.
A line completion and an autonomous terminal agent are not the same risk. Start narrow, widen authority only when the work genuinely needs it, and keep the same definition of done.
Use an inline suggestion for a line, expression or repetitive pattern you already understand. Read it before accepting it.
Authority: suggestion onlyAsk for an explanation, repository map or likely files. Require references and keep the pass read-only.
Authority: read and explainUse a targeted edit when the boundary is visible: add validation, rename a symbol or write a focused test.
Authority: named files or selectionUse plan/agent mode for multi-file work that can be split into tasks, tested and reviewed as a diff.
Authority: workspace + approved toolsUse a CLI, SDK or CI agent only after the interactive version is reliable, permissioned and observable.
Authority: policy-defined and loggedLabel a mobile session as chat, assistant or operator. Show whether the model and tools run on the phone, a home computer or a cloud service; preserve the same file limits, command review and approval gates you would require at the keyboard. See the private remote pattern →
If you cannot predict which files or commands are needed, begin with a read-only question. Do not jump to an autonomous agent because the prompt is hard to write—the uncertainty is a reason to explore first.
A specification does not need to be long. It needs to say what will change, what will not change and how someone can prove the result.
Who needs what behavior? What is in and out? Which examples must work? Which questions are still unresolved?
Which modules change? What data crosses a trust boundary? Which tests, migration and rollback are required?
Can each task be reviewed, tested and committed independently? If not, split it again.
Given a signed-in user has no saved items, when they open Saved Items, then the page shows the agreed empty-state message and does not make a delete request. This is more testable than “make the page nice.”
The material difference is usually authentication, instruction files, permission controls and model routing—not the shape of good engineering work.
| Workflow moment | Codex | Claude Code | OpenCode + OpenSpec |
|---|---|---|---|
| Start safely | Use default sandbox and approvals; ask or enter Plan mode before a broad change. | Use plan mode, permission rules and sandboxing; keep consequential commands behind approval. | Use the restricted Plan agent; set unknown actions to ask and deny pushes, destructive commands and out-of-repo access. |
| Durable repo rules | AGENTS.md, with nearer nested files overriding broader guidance. | CLAUDE.md. Import @AGENTS.md to share cross-tool rules, then add only Claude-specific notes. | AGENTS.md by default; OpenCode can fall back to CLAUDE.md. Keep OpenSpec artifacts under openspec/. |
| Think before code | Ask for a plan or use Plan mode; agree on files, checks and stop conditions before edits. | Use plan mode or a read-only research pass; approve the plan before implementation. | Use OpenCode Plan or /opsx:explore, then /opsx:propose to create proposal, requirements, design and tasks. |
| Implement | Name one task, require relevant tests, then inspect the diff or run a review. | Implement one bounded task, run tests and inspect the diff before accepting more authority. | Run /opsx:apply for approved tasks. Verify the artifacts and implementation before /opsx:archive. |
| Switch models | Choose models available to the plan or API key. API authentication is separate from plan authentication. | Choose the available Claude model; a plan allowance and Console/API billing are distinct capacity paths. | OpenCode connects to multiple providers, OpenRouter and local endpoints; OpenSpec supplies the workflow, not the model. |
| What stays human | Requirement approval, secret/data policy, production access, security exceptions, migration approval, final review and release. | ||
The agent can act only on what its harness sends to the model: instructions, conversation, files, tool descriptions and tool results. Missing facts invite guesses; irrelevant facts bury the useful signal.
Build/test commands, architecture invariants, forbidden paths and verifiable conventions.
The requested outcome, relevant files, non-goals, acceptance checks and stop conditions.
Nearby instructions, a matching skill, selected documentation and the smallest useful files.
Search output, tests, scans and diffs—trimmed to what the next decision needs.
Save decisions in artifacts, then compact or open a fresh session for the next coherent task.
For open-source dependencies, manuals no longer have to be the agent’s ceiling: the exact source is the strongest evidence of how an implementation behaves. opensrc lets a coding agent fetch and search version-matched package or repository source with ordinary tools. Give it the implementation, tests and examples; keep official documentation for the supported contract, migrations and security guidance. Compare opensrc in the tool catalogue.
The harness assembles instructions, tool definitions, conversation, selected files and results for each model call. Repeated prefixes may be cached for efficiency, but caching does not make stale or irrelevant context useful.
| Control | Use it when | Avoid | Portable form |
|---|---|---|---|
| Repository instructions | A rule matters in almost every task in this repository. | Vague advice, temporary task detail and a giant generated handbook. | AGENTS.md; tool-specific files may import or complement it. |
| Scoped instructions | A rule applies only to one directory, language or file type. | Loading frontend, database and test conventions into every turn. | Nested AGENTS.md files or a tool’s path-scoped rules. |
| Reusable prompt | A person starts the same procedure with a different input. | Pretending a one-shot prompt is a permanent project rule. | A versioned Markdown template; native prompt commands where supported. |
| Skill | A repeatable multi-step capability should load only when relevant. | One enormous skill that handles unrelated jobs or hides unsafe commands. | SKILL.md plus reviewed scripts and references. |
| Specialist agent | A recurring role needs a bounded mission and restricted tools. | A “do everything” persona with write, deploy and admin access. | Named agent instructions; read-only archaeologist or test-only reviewer. |
| MCP or custom tool | The workflow needs live data or a real action from another system. | Connecting every server, exposing raw admin APIs or trusting model arguments. | A small typed tool contract with least privilege and approval. |
| Subagent | A broad, independent investigation would flood the main task context. | Delegating an ambiguous whole project or losing integration ownership. | A bounded read-only brief returning evidence and unresolved questions. |
A skill is a small, version-controlled folder that teaches an agent one repeatable job. Only SKILL.md is required; add references, scripts or assets when they improve repeated work. A strong first skill starts with a real standard you can judge—not a vague “be helpful” persona.
Just landed: Agent Plugins 1.0.0 wraps Agent Skills and MCP servers in one portable, vendor-neutral package that compatible clients can discover. The client still controls installation, permissions and execution.
Try it: give the downloaded folder to your coding agent and ask: Install this skill where you can discover it for this project, and update AGENTS.md or the repository’s equivalent instructions only if a durable note is needed. Start a fresh task, describe the job normally and let the agent select a matching skill.
Collect real prompts, inputs, expected outputs and the mistakes that matter. Keep one skill focused on one coherent job.
Give SKILL.md a precise name and description, then write the shortest sequence that reliably produces a reviewable result.
Move detailed knowledge into references and deterministic repeated work into tested scripts. Leave ordinary reasoning to the agent.
Test prompts that should and should not trigger it. Replay real tasks, inspect failures and keep a new rule only when it improves the result.
Record the concrete wrong result, not “the model is bad.”
Was context missing, contradictory, overloaded—or was the task beyond the model?
Add one scoped rule, example, test, tool constraint or smaller task boundary.
Undo the result, replay the same case and keep the change only if it helps.
A model can emit a structured request such as create_issue({title, body}). The agent harness or your application must validate the arguments, enforce identity and policy, ask for approval when needed, run the function, and return the result. A fluent request is not authorization.
Long sessions accumulate stale plans, failed approaches and noisy tool output. Preserve approved decisions in spec.md, plan.md, issues or commits; then summarize or restart before the next distinct task.
Old code contains business rules, edge cases and operational bargains that may exist nowhere else. Treat modernization as agent-assisted archaeology followed by normal spec-driven delivery.
Produce business rules with code evidence, a data model, integration inventory and an open-questions list. Read one module at a time.
Output: reviewable current-state specCompare home-grown utilities, integrations, stores, runtimes and operational assumptions with current supported options. “Keep” is valid.
Output: substitution map + trade-offsDecide boundaries, data migration, contracts, authentication, secrets, observability, rollback and a cutover strategy before implementation.
Output: approved target planDerive tests from rediscovered rules, keep the old interface where practical and switch traffic gradually. Stop when behavior is ambiguous.
Output: tested, committable modulesBuild, test and scan in CI; promote through dev and staging; observe both paths and keep a rehearsed rollback during cutover.
Output: repeatable release + recoveryRun this against one module—not an entire twenty-year-old system. A domain expert still has to validate what is active in production.
Do not edit code. For this module, produce: (1) business rules in plain language with concrete file references, (2) entities, relationships and invariants, including database-enforced rules, (3) every external integration and operational dependency, and (4) unresolved behavior questions. Separate evidence from inference. Do not propose a new architecture yet, and never guess a missing business rule.A strangler-style migration routes selected behavior to the new implementation while the rest stays on the old one. You compare results, increase traffic gradually and retain a rollback instead of betting the business on one big switch.
An AI review is useful additional evidence. It is not a replacement for deterministic tests, scanners, least privilege or a human who can own the risk.
Security checks run on every pull request, before merge. A production deployment consumes the already-scanned commit; it does not become the first place you discover a secret, vulnerable package or obvious code flaw.
SAST inspects source code. SCA checks third-party packages and licences. Secret scanning catches credentials. DAST probes a running application. None proves the application is secure; together they find problems earlier.
Names differ across GitHub, GitLab, Azure DevOps and other platforms, but the control sequence stays useful. Some private-repository features require a paid security plan; use a supported scanner you can require in CI rather than leaving the gate empty.
Enable secret scanning or push protection, dependency alerts, branch/ruleset protection and default code scanning where available. Do not let contributors push directly to the production branch.
Install from the lockfile; run lint, types and tests; then SAST, dependency review and relevant infrastructure/container scans. Give every required check a clear name.
Give deploy credentials only to the release job, require an environment approval, run preview smoke/DAST checks and keep a tested rollback. A later rebuild breaks the evidence chain.
| Gate | Minimum check | Block the change when | Safe response |
|---|---|---|---|
| Before commit | Secret scan, formatter and focused unit tests | A real credential, private key or generated secret appears. | Remove it, rotate it if exposure is possible, and replace it with a documented secret reference. |
| Pull request | Full tests, lint/type checks, SAST, dependency review and licence policy | A new high/critical flaw, vulnerable runtime dependency, forbidden licence or failing test is introduced. | Fix or remove the change. A time-limited exception needs an owner, reason, compensating control and expiry. |
| Infrastructure | IaC and container scan, least-privilege review and ephemeral credentials | Public exposure, privileged containers, broad IAM or unpinned images appear unexpectedly. | Reduce access, pin the artifact, prove a denied path and document rollback. |
| Preview | DAST, end-to-end smoke tests and authorization abuse cases | One user can read or change another user’s data, input reaches an unsafe sink, or a critical flow breaks. | Return to the spec and threat model; add a regression test before the fix is merged. |
| Deploy | Protected environment, approved artifact, health check and rollback | The commit differs from the scanned artifact, secrets are unavailable or rollback is untested. | Stop promotion. Repair the release path without rebuilding unreviewed code in production. |
Deleting the visible line is not enough because history and logs may still contain it. Revoke or rotate the credential first, investigate its use, then clean history only with repository-owner coordination.
Free plans are product demos, not serious reliability tests. Start with affordable paid access, then put the larger allowance behind the workflow that proves most useful.
The free tier is fine for simple prompts, but its limits can make capable models feel unreliable. For frequent development, begin with the lowest paid plan on both platforms.
Rule: use the checkout price in your region, including tax, and only an organization-approved plan. Do not take annual plans as they don't give flexibility to switch between tiers.
When a limit repeatedly interrupts useful work, decide which tool fits your workflow better. Upgrade that subscription to its 5× tier and keep the other on the cheaper plan.
Do not upgrade on one bad day. Look for a repeated limit pattern across real tasks. While Annual plans might be enticing there might be more value in switching 5x plans between providers as new models are released.
Improve prompts, context files, tool choice, reusable skills, model routing and the agent harness before buying another block of capacity.
Practical rule of thumb: if one developer cannot make 5× last, optimize before assuming the only answer is 20×.
This field-tested setup is used by experienced, high-output developers: keep both tools available, but put the higher tier behind the lane doing the heavier work.
This is a working pattern, not one person’s current split—and not a benchmark verdict. Run the same representative tasks through both tools, count accepted results and review effort, then let your own work choose the premium plan.
This guide concentrates on OpenAI and Anthropic because they are the frontier options used in the subscription pattern above—not because they are the only credible choices. Google, other major labs and Chinese providers may offer a better price, model or regional route for a particular project. No useful guide can list every combination, so explore the wider tool market and test contenders on your own accepted-task set.
The harness is part of the result. Context selection, tools, permissions, retries and verification can materially improve—or degrade—the same model’s performance. Cursor can produce a dramatic lift when its editor context, change review and agent loop fit the way a project is built; another workflow may perform better in Codex, Claude Code or a different harness. Test the exact developer workflow, not Cursor or any other harness in the abstract.
Use bring-your-own-key deliberately in case of Cursor. Cursor’s Pro tier or higher can run supported OpenAI and Anthropic models through Cursor’s own agent harness using your API key. The provider then meters the model tokens separately—a ChatGPT or Claude subscription does not fund those API calls. Free access is not enough for this route, and specialized features such as Tab completion still use Cursor’s services and models. Evaluate Cursor’s own models separately and keep them only if they earn a place on your work; team plans should also check Cursor’s current platform-token charges.
An API account provides access, not assured capacity. Put approved provider routes behind one governed gateway, and treat owned compute as a measured capacity decision.
Do not assume any one on-demand provider will always have headroom. Keep approved routes behind one policy-enforcing LLM proxy, and add or retire providers only when measured capacity, quality, cost or incident performance justify it.
Build the five-minute switch →Record real tasks and accepted outcomes, then test a suitable open-weight model through a hosted route. Consider owned compute only after quality and usage are known.
Run the replacement lab →The worst time to discover authentication, model behavior or spending controls is during an outage. Test this route before you need it.
Own the account. Use a team or service account, MFA and a named incident approver—not one developer’s personal billing.
Constrain the key. Separate it from production application keys; set the smallest model/provider allowlist, budget and expiry that works.
Protect the data. Apply the same source-code, customer-data, retention and region rules as the normal route.
Run a smoke and failover pack. Re-run five representative tasks against every emergency route because a fallback model or provider can produce a materially different patch, tool call or latency profile.
Close the incident. Export usage, record the model and provider, disable the route, rotate if needed and write the lesson into the runbook.
Codex plans provide included usage and optional credits. API-key use is metered by tokens and fits CLI, SDK, IDE or CI; it does not carry every plan/cloud integration.
Claude’s paid plans can enable additional metered usage at standard API rates. A Console/API route remains a distinct billing and governance path.
OpenCode connects to many providers and local models. With OpenRouter, use a dedicated prepaid key, budget guardrail and an explicit model/provider policy. Provider credentials stay local, so protect the workstation profile and never commit keys.
OpenSpec stores planning artifacts and commands for supported coding tools. Authentication, quotas, model quality and data policy still belong to the agent/provider route.
Do not send production secrets, customer records or unredacted incident logs to a personal account just because it has remaining quota. An emergency shortens time; it does not suspend data policy.
Once an online model works, preserve its successful tasks as a baseline. An open-weight candidate earns a place by matching those outcomes at acceptable speed, cost and risk.
A downloadable checkpoint may still restrict use, modification or redistribution. Read the exact model card and licence, record the version, and check whether your planned commercial or internal use is permitted. The Open Source AI Definition is a useful benchmark for the stronger term.
| Measure | Hosted baseline | OpenRouter candidate | Local candidate | Reject when |
|---|---|---|---|---|
| Accepted-task rate | Human-approved result on the same fixed cases | Same rubric and retry limit | Same checkpoint family, prompt and tool contract | The quality gap creates more review or rework than the saving covers. |
| Reviewer effort | Minutes and material edits per accepted task | Measure changed lines and review minutes | Measure again; quantization may change behavior | Humans become the hidden inference engine. |
| Reliability | Tool failures, retries and timeouts | Pin provider and disable fallback for the experiment | Record crashes, OOMs, queue time and recovery | The route cannot finish the real workflow predictably. |
| Performance | Wall time, time to first token and output speed | Record provider and endpoint metadata | Test concurrency, context and sustained load | Interactive latency or team throughput misses its service target. |
| Economics | Plan cost plus measured overflow/API cost | Input, cache and output cost per accepted task | Capex, power, cooling, operations and variable cost | Savings disappear after failed tasks and staff time. |
Select the exact model. For a controlled comparison, set a provider order and disable automatic fallbacks; otherwise a successful response may come from a different endpoint. Enforce the data policy your inputs require, including zero-data-retention routing where appropriate.
Use accepted tasks, not raw tokens. A cheap model that fails twice and needs a rewrite is not cheap.
Use at least one month of measured hosted/OpenRouter results. Put staff time, support, storage, networking and realistic electricity into the local side.
Quality and capacity still have to pass.
local monthly = hardware ÷ useful life + energy + operations + accepted tasks × local variable costbreak-even tasks = local fixed monthly ÷ (hosted cost/task − local variable cost/task)This result is financial only. Keep hosted access until the exact local model, quantization and runtime pass quality, latency, concurrency, context and recovery tests.
Best for the first baseline and low or irregular volume. Use idle hardware only if its model passes; “already owned” does not make staff time free.
DGX Spark has 128 GB unified memory and NVIDIA documents model support up to 200B parameters. Fit is not speed: benchmark the exact checkpoint, quantization, runtime and context.
Use the Spark runbook →The current Grace Blackwell DGX Station architecture offers up to 748 GB coherent memory, including up to 252 GB HBM3e. It needs a utilization case, support owner and acceptance test—not just a model that loads.
Use the Station buyer’s guide →Consider a shared cluster when multiple teams have steady, governed demand and can operate identity, scheduling, observability, backups, patching and incident response. Rent a comparable service before building one.
Compare infrastructure tiers →Say that explicitly. The benefit is then risk reduction, data control or service behavior—not cheaper tokens. Local also creates new obligations: endpoint security, physical access, patching, backups, model licences and an operator who answers when it fails.
Do not install every plugin, agent and server on day one. Add a capability only when a real workflow proves it is useful.
You can explain the requirement, the change, the tests, the scan results, the cost and the rollback without asking the model to remember for you.
Use AI to widen your reach—not to outsource your judgment.