agent-briefing
Use when writing a prompt for a subagent or teammate, deciding how much context another agent needs, writing or reading a handoff…
Use when about to add or change code in an existing codebase: a new file, module, route, component, service, test, migration, error path or dependency, especially in a project the agent did not write or has not yet surveyed in this session.
Claude Code
$ npx -y skills add NoobyGains/godmode --skill codebase-conventions --agent claude-code
Codex
$ npx skills add NoobyGains/godmode --skill codebase-conventions -a codex -y
Cursor
$ npx skills add NoobyGains/godmode --skill codebase-conventions -a cursor -y
Gemini CLI
$ npx skills add NoobyGains/godmode --skill codebase-conventions -a gemini-cli -y
GitHub Copilot
$ npx skills add NoobyGains/godmode --skill codebase-conventions -a github-copilot -y
OpenCode
$ npx skills add NoobyGains/godmode --skill codebase-conventions -a opencode -y
Windsurf
$ npx skills add NoobyGains/godmode --skill codebase-conventions -a windsurf -y
name: codebase-conventions description: "Use when about to add or change code in an existing codebase: a new file, module, route, component, service, test, migration, error path or dependency, especially in a project the agent did not write or has not yet surveyed in this session."
An existing codebase is the most authoritative reference for how new code in it should look. Before adding anything, find the two or three closest precedents, write down the conventions they share, build the new code by shadowing the nearest one, and check the result against them before committing. **New code must read as if the original authors wrote it: one way of doing each thing, not two.**
NO NEW CODE WITHOUT A NAMED PRECEDENT IN THIS REPOSITORY
No exceptions. No workarounds. No shortcuts.
If you cannot point to the file you modelled your change on, you guessed. When no precedent exists, say so, and establish the convention deliberately.
**Required:**
**Skip:**
1. **Read the explicit rules first.** Linter and formatter configs, `.editorconfig`, type-checker settings, `CONTRIBUTING`, `AGENTS.md` or similar agent instructions, architecture notes, ADRs. Explicit rules beat inferred ones. Note any check you will have to pass.
2. **Survey two or three precedents.** Find the files most similar to what you will add: same kind of thing (another route, another service, another form), same layer, ideally recent. Search by name, by directory, and by the pattern itself (the function you will call, the decorator you will use). Read them fully, plus their tests.
3. **Catalogue the conventions.** Fill in the table below from what the precedents actually do, quoting the file and line for each row. Leave a row empty rather than guessing.
4. **Resolve conflicts between precedents.** If two precedents disagree, decide in this order: an explicit rule (lint, docs) wins; then the convention in the directory you are editing; then the newer pattern if `git log` shows a migration towards it; then the majority. If it is still unclear, ask the user one question with both options and a recommendation.
5. **Pick the nearest relative and shadow it.** Use the closest precedent as a skeleton: same file placement, same section order, same imports and helpers, same error and logging calls. Change only what is specific to the new feature.
6. **Reuse before you add.** Before writing a helper, search for an existing one (`utils`, `lib`, `common`, `shared`, base classes, hooks). Before adding a dependency, check the manifest and lockfile for something that already does the job. A new dependency that duplicates an existing one needs the user's approval.
7. **Run the conformity check** below on your diff before committing. Fix every miss or write down why it differs.
8. **Leave evidence.** In the task report or commit message, name the precedent you shadowed ("modelled on `src/billing/invoice.service.ts`") and any convention you established for the first time.
digraph conventions {
rankdir=TB;
rules [label="Read explicit rules"];
survey [label="Find 2-3 precedents"];
found [label="Precedent exists?", shape=diamond];
catalogue [label="Catalogue conventions"];
conflict [label="Precedents agree?", shape=diamond];
resolve [label="Rule > local dir >\nmigration direction > majority > ask"];
shadow [label="Shadow nearest relative"];
none [label="No-precedent path"];
check [label="Conformity check"];
rules -> survey -> found;
found -> catalogue [label="yes"];
found -> none [label="no"];
catalogue -> conflict;
conflict -> shadow [label="yes"];
conflict -> resolve [label="no"];
resolve -> shadow;
none -> check;
shadow -> check;
}Write this down (in your notes, the plan, or the brief you give a subagent) before writing code.
| Dimension | Question | Example answer | |---|---|---| | Placement | Where do siblings of this file live? By feature or by layer? | `src/<feature>/<feature>.service.ts` | | File naming | Case and suffix pattern? | `kebab-case.ts`, `PascalCase.tsx`, `snake_case.py` | | Exports | Default or named? Barrel files? | Named exports, re-exported from `index.ts` | | Identifiers | Case for variables, functions, types, constants? Domain vocabulary? | `camelCase`, types `PascalCase`, "customer" not "user" | | Function shape | Object parameter or positional? Sync or async? Return type? | `async fn({ id, tx })` returning `Result<T, AppError>` | | Errors | Throw, return a result, error codes? Which error classes? | Throws `DomainError` subclasses; mapped in middleware | | Validation | Where and with what? | Schema validation at the HTTP boundary only | | Logging | Which logger, what fields, which levels? | `logger.info({ orderId }, "order.created")` | | Data access | ORM, query builder, repository layer, raw SQL? Transactions how? | Repository functions take a `tx` argument | | Configuration | How are settings and secrets read? | Typed `config` module, never `process.env` inline | | State (UI) | Local, context, store, server-state library? | Server state through the existing query library | | Styling (UI) | Utility classes, CSS modules, CSS-in-JS, design-system props? | See `godmode:ui-engineering` | | Tests | Framework, location, naming, fixtures, what is mocked? | Co-located `*.te
Engineering discipline for AI coding agents: question the request, verify against current docs, plan, build test-first on the cheapest capable model, review with a second model family, prove it before saying done. One repo for Claude Code, Codex, Antigravity, Cursor, Gemini CLI and OpenCode.
Use when writing a prompt for a subagent or teammate, deciding how much context another agent needs, writing or reading a handoff…
Use when a task, feature or bug fix is implemented and before it is committed, merged or handed back to the user, and when the…
Use when about to say that work is done, fixed, passing, working, deployed or ready, before committing, opening or merging a pull…
Use when a reviewed change is about to land on a shared branch, be released or be deployed, and when the user asks for a second…
Use when a written implementation plan is ready to execute in the current session and its tasks are mostly independent, so each…
Use when GodMode skills do not seem to trigger, when the user asks whether GodMode is installed or working, or after installing…
Use your assigned AgentMail inbox to read email tasks, explicitly send or reply, and check delivery. Provided automatically by…
Create a new Architecture Decision Record with sequential numbering and AgentDB registration