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.
npx agentmods add rules/superagent-ai/grok-cli/typescript-conventionsgit clone --depth 1 https://github.com/superagent-ai/grok-cliWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.00517 |
| Opus 5 | $0.00000 | $0.00259 |
| Sonnet 5 | $0.00000 | $0.00103 |
| Haiku 4.5 | $0.00000 | $0.00052 |
Grade A, and why
typescript-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.
What it actually says
TypeScript Conventions
Module System
- This is an ESM project (
"type": "module"in package.json). - Always use ES module
import/exportsyntax — neverrequire(). - When importing local modules, include the
.jsextension (TypeScript compiles.ts→.js):import { GrokAgent } from "./agent/grok-agent.js";
TypeScript Configuration
- Target: ES2022, Module: ESNext, JSX: react
strict: falseandnoImplicitAny: false— the codebase does not enforce strict mode.moduleResolution: "Bundler"is used.- Source files live in
src/, compiled output goes todist/.
Type Practices
- Prefer explicit interfaces for public API boundaries (e.g.
ChatEntry,ToolResult,GrokToolCall). - Use
typeimports when importing only types:import type { ChatCompletionMessageParam } from "openai/resources/chat"; anyis acceptable where strict typing would add friction, but prefer narrower types when practical.- Shared types belong in
src/types/index.ts.
Naming Conventions
- Files: kebab-case (
grok-agent.ts,chat-interface.tsx,settings-manager.ts). - Classes: PascalCase (
GrokAgent,TextEditorTool,BashTool). - Interfaces/Types: PascalCase (
ChatEntry,ToolResult,StreamingChunk). - Functions/variables: camelCase (
processUserMessage,loadApiKey). - Constants: camelCase or UPPER_SNAKE_CASE for true constants (
GROK_TOOLS).
Error Handling
- Catch errors as
error: anyand access.messagefor display. - Tool execution methods return
ToolResultobjects ({ success, output?, error? }) rather than throwing. - Use
process.exit(1)for fatal CLI errors.
ESLint Rules
@typescript-eslint/no-unused-vars: error@typescript-eslint/no-explicit-any: warn
Run bun run lint to check and bun run typecheck to verify types.
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.
- 2d ago First seen · 55 lines · 0 tokens per session scan A 534ba35cddb4
typescript-conventions is a cursor rule published in the GitHub repository superagent-ai/grok-cli (3,441 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 517 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-30.
Other cursor rules, from other repositories
grok-mcp
Grok MCP orchestrator — cheap worker, unpin, typed sessionnext cards.
cursorrules
Cursor rule "cursorrules" from florian101010/awesome-agentic-AI-coding-template, covering key rules, documentation hygiene, after every change, available workflows and key files.
use-bun-instead-of-node-vite-npm-pnpm
../../CLAUDE.md.
api-property-optionality-hygiene
Fix ApiProperty/ApiPropertyOptional optionality mismatches in DTO files; use for scheduled batch fixes or DTO edits.
java-springboot-jpa-cursorrules-prompt-file
description: "Cursor rules for Java development with Springboot and JPA integration." globs: / alwaysApply: false.
conservative-file-creation
Check for existing files before creating. Be conservative about new files and code.