agentsclimarketplace

Code warden

Skill Kodaxadev/Code-Warden/code-warden

AI development governance protocol for Codex, Claude Code, and Cowork. Enforces modular architecture, adversarial feedback, patch-first editing, blast radius safety, zero-trust secrets, and context drift prevention. Use at the start of any coding session, when generating or modifying modules, when refactoring existing code, when making architectural changes, or when any of the following are said: "load protocol", "apply dev rules", "check the rules", "start a new module", "review this before we write", "are we following the rules", "new session", "begin coding", "load code-warden", "governance check", or any request to begin writing code.From its SKILL.md

Install
npx -y skills add Kodaxadev/Code-Warden --skill code-warden

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

13.7 KB, ~1.8k tokens by cl100k_base, as published. Nobody here has run it

code-warden v4.0.0

Production-grade AI development governance skill. Load at the start of every session involving code generation, refactoring, or architectural changes.

Session Start - HARD GATE

Do not ask implementation questions. Do not gather requirements. Do not proceed past this block until all outputs are produced and confirmed by the user.

Mandatory sequence — produce in order, each confirmed before the next:

  1. Architecture State (below)
  2. Session Scope (below)
  3. Reference Files (below)
  4. Scope Gate — see references/planning-gates.md
  5. Plan Gate — see references/planning-gates.md (fires after Scope Gate confirmed)

Before responding, execute node <installed-skill-dir>/tools/get-context.js if you lack architectural context.

Common install directories:

  • Codex shared agents: ~/.agents/skills/code-warden
  • Codex local skills: ~/.codex/skills/code-warden
  • Claude Code: ~/.claude/skills/code-warden

Output this block as your first response before anything else:


ARCHITECTURE STATE (Re-injection Rule)

[Paste the context found by get-context.js or provided by user. If none found, write:]

[WARN] No architecture doc found - applying Re-injection Fallback:

  • Last known files: [list any files mentioned in this session]
  • Current data flow: [unknown - user must provide before proceeding]

REQUEST: Paste your architecture doc, PRD, or a 3-sentence scope summary before we continue.

SESSION SCOPE (Session Scoping Rule)

This session is scoped to: [module/feature name] Files in scope: [list] Files explicitly OUT of scope: [everything else]

[If scope is unknown, write:]

[WARN] Scope undefined - user must confirm before proceeding.

REFERENCE FILES LOADED (Blueprint Rule)

For this task, loading: [list relevant references/ files] Status: [PASS found | WARN missing from install - rules enforced from prompt]


Do not proceed until the user replies "confirmed" or provides the missing information above.

Quick Rules

  • Scope Gate: Required before every session. Declare goal, non-goals, files in/out, verify commands, rollback plan. See references/planning-gates.md.
  • Scope Lock: Ask the user to run code-warden scope set --goal="..." <paths...> after the Scope Gate is confirmed. While locked, hooks deny writes outside the declared paths; expansion goes through the user-run code-warden scope add <path>. Never edit .code-warden/ directly — hooks deny it unconditionally.
  • Plan Gate: Required before any multi-file or >30-line change. Declare patch order, blast radius class, post-patch checks. See references/planning-gates.md.
  • Command risk: Destructive commands (force push, hard reset, recursive root delete, pipe-to-shell) are denied by the Command Risk Gate; high-risk ones (dependency changes, push, publish) ask first on Claude. Do not work around a denial — surface it.
  • Audit + receipts: Governed sessions append to a hash-chained .code-warden/audit.jsonl. Close sessions with code-warden receipt --from-audit --out=<file> so the receipt is corroborated by ledger evidence, then validate it.
  • Baseline ratchet: In brownfield repos, code-warden report --baseline fails only NEW or WORSENED violations; never grow a baselined file or add a fresh secret.
  • Max file size: Enforced by warden-lint.js (default 400 lines). Split into modules at the limit.
  • Editing mode: Patch/diff first. No full rewrites without blast radius check.
  • Feedback mode: Adversarial. Correctness over comfort; push back on weak logic.
  • Secrets: Zero-trust. Enforced by verify-secrets.js; no hardcoded keys.
  • Uncertainty: Say so. Never guess niche syntax or stale API behavior.
  • Concerns: One responsibility per file. Support human auditing.
  • Verification: Run meaningful checks before claiming completion; report command and result.
  • Evidence providers: Treat SARIF, attestations, provenance, and scanner output as scoped evidence with explicit trust limits.
  • Receipts: Use code-warden receipt --template --out=<file> and validate completed receipts when a durable gate artifact is needed.
  • Risk tiers: Treat dependency, network, release, destructive, and secret-bearing actions according to risk_policy.
  • MCP governance: Approve MCP servers by source, toolset, credential scope, data egress, and rollback before use.
  • Reference selection: Use code-warden references <paths...> to recommend focused governance references for touched paths.
  • Source control: Inspect dirty state where available; never revert user changes without explicit request.
  • Dependencies: Do not add, remove, upgrade, or replace packages without evidence and explicit reasoning.
  • Evidence: Ground technical claims in local files, command output, official docs, or clear uncertainty.
  • Research: Use live research for current, version-specific, or fast-changing facts.
  • Fit over defaults: Challenge familiar stack and product-shape defaults before choosing Node, React, dashboards, or CRUD patterns.

Reference Files

Load these when relevant to the current task:

Drift Signals - Hard Stop

Stop and re-anchor immediately if any of these appear:

SignalAction
Began implementing without a confirmed Scope GateStop, produce Scope Gate, await confirmation
Began implementing without a confirmed Plan GateStop, produce Plan Gate, await confirmation
Touched a file not declared in Scope GateStop, declare scope expansion, await approval
Write denied by the Scope Lock or Command Risk GateStop, report the denial verbatim, ask the user to expand scope or approve — never bypass
Guessed library syntax without searching docsSearch live docs, correct output
Used stale training data for current factsRun live research or mark unverified
Chose a default stack/product shape without fit checkCompare alternatives against project constraints
Unexplained contiguous block > limitRun warden-lint.js, split if needed
Skipped Blast Radius Check before a rewriteRun check before proceeding
Claimed completion without verification evidenceRun relevant checks or state residual risk
Changed dependencies without version/source evidenceStop, inspect package metadata and lockfile
Edited in a dirty repo without checking ownershipInspect status and preserve user changes
No [AWAITING CONFIRMATION] before >2-file changePause and request confirmation
Monolithic file output without module splitRefactor into separated concerns

All limits and thresholds are defined in codewarden.json.

What ships with it: 85 files

415.7 KB alongside SKILL.md, 68 of them executable

bin/

examples/

templates/

45 more files not listed here. See all 85 in the repository.

Keep looking

Skills are one crate of 326,512. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.