init

A command for creating a CLAUDE.md file with general GreyCat development guidelines. GreyCat is the programming environment and project type these instructions are tailored for.

In plain words
What is it for?
Use it when starting or connecting Claude Code to a GreyCat project; it checks existing documentation and detects relevant project features before generating the file.
Why use it?
It gives a new GreyCat project documented conventions for its backend, optional frontend, version, ignored files, coding, and testing setup.

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/datathings/marketplace/init
Clone the repo
git clone --depth 1 https://github.com/datathings/marketplace
Per session 13 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 8,515 The whole file, excluding the scripts and references it only reads on demand.
Security scan E 4 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.00013 $0.08515
Opus 5 $0.00006 $0.04258
Sonnet 5 $0.00003 $0.01703
Haiku 4.5 $0.00001 $0.00851

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

Security

Grade E, and why

init scanned grade E with 4 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.

Sends data to an external URLmediumData exfiltration

A POST to an outside endpoint may be telemetry or may be exfiltration; either way the mod talks to somewhere, and you should know where.

curl -H "task: true" -X POST -d '[]' http://localhost:8080/module::compute # background task, returns task_id

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

> `vp` and pnpm are different layers, not alternatives: **pnpm** is the package manager (fetches deps); **`vp`** (VitePlus, rolldown/oxc) is the build toolchain that bundles `frontend/` → `webroot/`, and `vp install` del

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

- **Wipe `gcdata/` for clean runs**: `rm -rf gcdata && greycat test`.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

> `vp` and pnpm are different layers, not alternatives: **pnpm** is the package manager (fetches deps); **`vp`** (VitePlus, rolldown/oxc) is the build toolchain that bundles `frontend/` → `webroot/`, and `vp install` del
plugins/greycat/commands/init.md · 563 lines

How it starts

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

Initialize GreyCat Project Documentation

Purpose: Generate CLAUDE.md with generic GreyCat best practices. Run When: New GreyCat project, or setting up Claude Code integration.


Steps

  1. Check CLAUDE.md exists — if yes, ask to backup or cancel.
  2. Detect features:
    • Frontend: frontend/ exists, or package.json has vite-plus / @greycat/web / lit / @awesome.me/webawesome.
    • GreyCat version: parse @library("std", ...) from project.gcl.
  3. Check .gitignore — create or append GreyCat entries if missing.
  4. Write CLAUDE.md from the template below: replace [One-line project description] / [version]; drop the frontend sections (commands, stack, structure, coding style, testing, env) if there is no frontend; keep all backend sections.
  5. Report: created files + next steps (replace placeholders, commit).

CLAUDE.md Template

# CLAUDE.md

[One-line project description]

## Behavioral Guidelines

Bias toward caution over speed. Use judgment for trivial edits; for `.gcl`, persistence, or `@expose` endpoints follow these strictly.

**1. Think Before Coding** — State assumptions explicitly. If multiple interpretations exist (`nodeIndex` vs `Map`, persisted vs `@volatile`), present them. Read `lib/std/*.gcl` for real examples — don't guess by analogy to Java/TypeScript.

**2. Simplicity First** — Minimum code that solves the problem. No speculative features, single-use abstractions, `@volatile` "for later", `try/catch` on internal helpers, or unused generics.

**3. Surgical Changes** — Touch only what's needed; match existing style (snake_case fields, camelCase functions). `Grep` before deleting any type/function/field; remove orphans your changes create. Regenerate (never hand-edit) `project.d.ts`.

**4. Goal-Driven Execution** — Define verifiable success: lint clean, `greycat test` green, endpoint returns expected shape. For multi-step tasks, state a brief plan with per-step verification.

---

## ⚠️ CRITICAL RULES

### 1. ALWAYS LINT AFTER EACH CHANGE
```bash
greycat lint  # Verify 0 errors after ANY change

2. VERIFY BEFORE DELETING

Grep for usages before removing any type/function/variable.

3. GOTCHAS

Don't write GCL by analogy to another language — check the Common Pitfalls table below first: String slice/split(' ')/.chars(), global log(x)/sqrt(x), no static fn <T>, Array<T> {} (not ::new()), nodeIndex.set (not .add), named @volatile returns, abstract from day 1, T? on persisted types, reserved words (limit/skip), generic-return erasure.

4. USE GREYCAT SKILL & REVIEW COMMANDS

Mandatory for GCL backend work: use the /greycat skill. Before releases / after refactors, run the two review hubs:

  • /greycat:backend — dead code, anti-patterns, type safety, performance & concurrency, @expose API security, test coverage.
  • /greycat:frontend — the VitePlus + Lit + Web Awesome (or equivalent) + @greycat/web stack, performance, Lighthouse/SEO, type safety, testing (only if a frontend/ exists).

Commands

Read the full file on GitHub · 563 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 · 563 lines · 13 tokens per session scan E 4b7856aee59a

Subscribe to this mod's changes

init is a command published in the GitHub repository datathings/marketplace (11 stars, last pushed 5d ago), licensed Apache-2.0. It adds 13 tokens to every session and 8,515 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it E with 4 findings (sends data to an external url, downloads and executes remote code, recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.