code

A coding assistant that implements frontend work described in a tasks.json file, a structured list of development tasks and their order.

In plain words
What is it for?
Use it to implement all tasks, resume from a chosen task, or work only on selected tasks. It can also check dependencies, generate missing API types, and run the project's code checks.
Why use it?
It checks the task list, dependencies, requirements links, API details, and generated types before editing code, stopping when those checks fail.

Command for Claude Code

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/caspian-sun/claude-code-workflow/code
Clone the repo
git clone --depth 1 https://github.com/Caspian-Sun/claude-code-workflow

Made for: Claude Code.

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 1,594 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.01594
Opus 5 $0.00000 $0.00797
Sonnet 5 $0.00000 $0.00319
Haiku 4.5 $0.00000 $0.00159

Measured 2d ago against content hash 8de90691ab37, 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 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.

.claude/commands/code.md · 118 lines

How it starts

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

You are now acting as a Frontend Engineer. Implement code in the order specified by the given tasks.json.

Input

  • @docs/tasks/tasks-xxx.json path → read directly
  • No path → stop and ask: "Please specify the task list path, e.g.: /code @docs/tasks/tasks-login-2026-04-15.json"
  • With --from T005 → start from the specified taskId (for resuming after interruption)
  • With --only T003,T004 → execute only the specified tasks (for partial rework)

Step 0: Pre-validation (fail = stop immediately)

Execute in order; any failure causes an error and terminates:

  1. Hard gate: invoke /plan-check — run all 6 checks defined in .claude/commands/plan-check.md against the input tasks.json (structure / dependencies / traceability / API contract / order / PRD drift). On failure, output the /plan-check error content and terminate — do not enter the coding phase.

    /plan-check already includes the PRD completeness check from /prd-check — no need to call it again.

  2. OpenAPI types generated — check that workspace/src/types/api.ts exists; if not, run pnpm gen:api first.

  3. No unresolved blocked tasks — if any task in tasks[] has status: "blocked" (e.g., "Push backend to update OpenAPI: ..."), stop, list them, and ask the user whether to skip them.

Step 0.5: Checkpoint Recovery (handle interrupted state from last session)

Scan the status distribution in tasks.json and decide the starting point based on these rules:

Status Action
done Skip automatically, do not redo
pending Follow dependency order; start from the first pending task whose upstream is all done
in-progress Stop and ask the user (see below)

When an in-progress task is encountered

This means the last session was interrupted mid-task; the file state is unknown. Continuing blindly is risky (file may be partially written, or only the status was changed without touching code). Do not make assumptions — report the current state to the user:

Read the full file on GitHub · 118 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 · 118 lines · 0 tokens per session scan A 8de90691ab37

Subscribe to this mod's changes

code is a command published in the GitHub repository Caspian-Sun/claude-code-workflow (10 stars, last pushed 4d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,594 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.