code

A set of commands for common software development tasks, including code-style checks, tests, dependency security checks, and local CI runs. CI means the automated checks normally run before code is merged.

In plain words
What is it for?
Use it to lint code, run unit tests, test command-line tools, audit dependencies for known vulnerabilities, and run CI checks locally before pushing changes.
Why use it?
It gathers routine checks in one workflow and helps distinguish a quick style check from broader validation or debugging.

Command

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 commands/data-wise/craft/code
Clone the repo
git clone --depth 1 https://github.com/Data-Wise/craft
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 802 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.00000 $0.00802
Opus 5 $0.00000 $0.00401
Sonnet 5 $0.00000 $0.00160
Haiku 4.5 $0.00000 $0.00080

Measured yesterday against content hash 1719f13e39f9, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

code 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 yesterday.

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.

docs/commands/code.md · 114 lines

How it starts

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

Code & Testing Commands

Development workflow tools with mode support - 48 commands.

When to Use What

Scenario Command Why
Quick style check before commit /craft:code:lint Fast default mode (< 10s)
Full pre-flight validation /craft:check Runs lint + tests + links together
Deep debugging with traces /craft:code:lint debug Verbose output with fix suggestions
Run unit tests /craft:test Auto-detects framework (pytest, jest)
Test CLI tool behavior /craft:test Validates stdin/stdout/exit codes
Run CI checks locally /craft:ci:local Full CI pipeline without pushing
Check for vulnerabilities /craft:code:deps-audit Security-focused dependency scan
Pre-release validation /craft:code:lint release Comprehensive + types + security

Common confusion:

  • lint vs checklint checks code style only; check validates docs, links, and counts too
  • test vs code:test-gentest runs tests; code:test-gen generates test suites (renamed from test:gen in v4)
  • lint vs ci-locallint checks one thing fast; ci-local runs the full CI pipeline locally

Linting & Code Quality

/craft:code:lint

/craft:code:lint                # default mode
/craft:code:lint debug          # Verbose with suggestions
/craft:code:lint optimize       # Fast parallel linting

Testing

/craft:test

/craft:test                 # default mode
/craft:test debug           # Verbose test output
/craft:test release         # Full suite with coverage

CI/CD Commands

/craft:ci:fix

Auto-fix common CI/CD issues (linting, formatting, missing files).

/craft:ci:local

Run CI checks locally before pushing.

Dependencies

/craft:code:deps-audit

Security audit of dependencies with vulnerability reports.

/craft:code:deps-check

Check for outdated dependencies and breaking changes.

Documentation Integration

/craft:code:docs-check

Read the full file on GitHub · 114 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. yesterday First seen · 114 lines · 0 tokens per session scan A 1719f13e39f9

Subscribe to this mod's changes

code is a command published in the GitHub repository Data-Wise/craft (4 stars, last pushed 16d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 802 tokens. 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.