code-conventions

A shared set of coding rules for a project, covering names, formatting, errors, security, and tests across the codebase.

In plain words
What is it for?
Use it when writing or reviewing code, from file and function names to database columns and test code.
Why use it?
It keeps code consistent and gives developers and reviewers one place to check the project’s expectations instead of repeating them in every instruction.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/telus-labs/stagecraft/code-conventions
Any agent
npx skills add telus-labs/stagecraft --skill code-conventions
Clone the repo
git clone --depth 1 https://github.com/telus-labs/stagecraft

Made for: Claude Code, Codex.

Per session 63 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,491 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00063 $0.01491
Opus 5 $0.00032 $0.00745
Sonnet 5 $0.00013 $0.00298
Haiku 4.5 $0.00006 $0.00149

Measured 2d ago against content hash e0f78d96472d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

code-conventions scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/code-conventions/SKILL.md · 144 lines

How it starts

The opening of the file, as written. The whole thing — 144 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Code Conventions

This skill contains project-wide coding standards. Agents load this when writing or reviewing code. Do not duplicate these rules in agent prompts.

Each rule is paired with a concrete example. Reviewers cite the rule name (e.g. "BLOCKER: code-conventions #magic-number") so the author can find the rule and the example without context-switching.

General

  • #explicit-over-clever — Code is read more than it is written.

    // BAD: clever — what does the !! do? what's the precedence?
    const isReady = !!user && !!user.config && !!user.config.ready;
    // GOOD: explicit — reads top-to-bottom.
    const isReady = user != null && user.config != null && user.config.ready === true;
    
  • #docstring — Every exported function has a docstring/JSDoc.

  • #magic-number — Use a named constant when a literal would otherwise be unexplained.

    // BAD: what is 86400000?
    setTimeout(reload, 86400000);
    // GOOD:
    const MS_PER_DAY = 24 * 60 * 60 * 1000;
    setTimeout(reload, MS_PER_DAY);
    
  • #no-commented-code — No commented-out code in commits. Use git history if you need to remember what was there.

Naming

Layer Convention Example
Files kebab-case (all languages) user-store.ts, user_store.py, UserStore.kt is wrong
Classes / Types PascalCase UserStore, OrderId
Functions / variables camelCase getUser, orderCount
Constants SCREAMING_SNAKE_CASE MAX_RETRIES, JWT_SECRET
Database columns snake_case user_id, created_at

Error Handling

  • #no-silent-swallow — Never swallow an error without a comment explaining why.

    // BAD: error vanishes — why?
    try { await unlink(tmp); } catch {}
    // GOOD: intent stated; reviewer can verify it.
    try { await unlink(tmp); } catch { /* tmp already gone — best-effort cleanup */ }
    
  • #typed-errors — Don't throw bare strings; throw Error (or a subclass).

    // BAD: caller can't .message or .stack on a string.
    if (!user) throw "user not found";
    // GOOD:
    if (!user) throw new NotFoundError(`user ${id} not found`);
    

Read the full file on GitHub · 144 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 144 lines · 63 tokens per session scan A e0f78d96472d

Subscribe to this mod's changes

code-conventions is a skill published in the GitHub repository telus-labs/stagecraft (6 stars, last pushed 5d ago), licensed MIT. It adds 63 tokens to every session and 1,491 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

semantix

Install and use the semantix memory kernel as a middleware in your agent: extract user preferences / workflows / experience from past sessions, retrieve and inject them on demand. One binary + your agent's own tools.

Gnosil/semantix · 47 tokens

semantix-guide

Troubleshoot and configure Semantix capabilities: Skills (project/custom/global/builtin priority, discovery dirs), Commands (override order, /dir:file naming), Hooks (11 events, automatic project loading, matchers, timeouts), MCP (semantix-agent.toml + .mcp.json + plugin packages, autostart), plugin packages…

Gnosil/semantix · 115 tokens

file-a-task

File work into nohuman (taskadd) and check on it (taskstatus) via the nohuman MCP bridge, instead of doing the work inline.

no-human-ai/no_human · 37 tokens

intuitive-tests

Use this skill whenever the user asks about unit test best practices, test organization, flat test suites, redundant tests, test refactors, pytest/JUnit/Jest/xUnit layout, test taxonomy, flaky tests, coverage quality, fixtures, mocks, parametrization, pruning existing UTs, or "which tests are worth keeping." It…

MiaoDX/intuitive-flow · 154 tokens

intuitive-flow

Stable execution/change router after an approved plan, preflight contract, or tiny concrete task. Refactor-shaped work delegates to intuitive-refactor, and durable work runs through staged planning, review, GSD handoff, implementation, cleanup, and verification while keeping plan ledgers and active capsules compact by…

MiaoDX/intuitive-flow · 98 tokens

intuitive-preflight

Turn a vague task, plan, issue, or "LGTM/go ahead" request into an approval-ready preflight contract before implementation starts. Use when the user wants prompt preflight, clearer scope, non-goals, context package, acceptance criteria, definition of done, verification, stop gates, the exact execution command, or…

MiaoDX/intuitive-flow · 112 tokens