rayvise-project

rayvise-project is a cursor rule for Cursor from rayvise/rayvise-cli. It costs 915 tokens per session, scanned A, original, MIT.

A project ruleset describing the architecture and conventions of rayvise-cli, a Cobra-based Go command-line tool for generating AI prompts through the OpenRouter API. It covers packages, configuration priority, output lengths, model selection, streaming, and project-context files.

In plain words
What is it for?
Use it as a reference when working on rayvise-cli's commands, configuration, API client, prompt handling, clipboard support, project-context discovery, and shared types.
Why use it?
It gives coding agents the project context needed to make changes that fit the existing design. It prevents inconsistent choices about configuration, model resolution, output size, and context loading.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/. Also seen: mentions CLAUDE.md; mentions AGENTS.md.

Good fit Use it as a reference when working on rayvise-cli's commands, configuration, API client, prompt handling, clipboard support, project-context discovery, and shared types.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/rayvise/rayvise-cli/rayvise-project
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.

Clone the repo
git clone --depth 1 https://github.com/rayvise/rayvise-cli

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for rayvise-project

README.md
[![agentmods](https://agentmods.dev/badge/rules/rayvise/rayvise-cli/rayvise-project/github.svg)](https://agentmods.dev/rules/rayvise/rayvise-cli/rayvise-project)
Your own site
<a href="https://agentmods.dev/rules/rayvise/rayvise-cli/rayvise-project"><img src="https://agentmods.dev/badge/rules/rayvise/rayvise-cli/rayvise-project/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for rayvise-project

Your own site · 80×15
<a href="https://agentmods.dev/rules/rayvise/rayvise-cli/rayvise-project"><img src="https://agentmods.dev/badge/rules/rayvise/rayvise-cli/rayvise-project.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 915 This file is loaded in full into every session.
When invoked 915 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00915 $0.00915
Opus 5.5 $0.00366 $0.00366
Sonnet 5.5 $0.00183 $0.00183
Haiku 4.5 $0.00092 $0.00092

Measured 1mo ago against content hash 143cb431466b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

rayvise-project 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 1mo 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.

.cursor/rules/rayvise-project.mdc · 116 lines

How it starts

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

rayvise-cli Project Context

Architecture Overview

CLI Tool: Cobra-based CLI for generating AI-optimized prompts via OpenRouter API with automatic project context awareness

Key Packages:

  • cmd/ - Cobra commands (root, generate, interactive)
  • internal/config/ - Viper config + model registry
  • internal/llm/ - OpenRouter client with streaming
  • internal/prompts/ - Prompt templates + store
  • internal/projectcontext/ - Project context detection and loading
  • internal/clipboard/ - Cross-platform clipboard ops
  • pkg/types/ - Shared types

Core Concepts

Output Lengths: Control response size via max_tokens + system prompt directives

  • short: 300 tokens, concise prompts
  • medium: 800 tokens, balanced detail
  • long: 1500 tokens, comprehensive

Model Resolution: Custom models → DefaultModels → treat as OpenRouter ID

Config Hierarchy: CLI flags → env vars (RAYVISE_*) → ~/.rayvise/config.yaml → defaults

Streaming: SSE parsing for interactive mode, non-streaming for generate command

Project Context Awareness: Automatically discovers and loads context from .cursor/rules/, CLAUDE.md, or AGENTS.md files (in priority order). Context is injected into the system prompt via {{.Context}} template variable, allowing generated prompts to be aware of project conventions and architecture.

Code Patterns

Error Handling:

// Network errors: retry once
if err != nil || resp.StatusCode >= 500 {
    time.Sleep(1 * time.Second)
    resp, err = client.Do(req)
}

// User-facing errors: clear, actionable
return fmt.Errorf("API key not found. Set RAYVISE_API_KEY or add to config.yaml")

Config Access:

cfg := config.GetConfig()
apiKey := cfg.GetAPIKey()  // Falls back to env var
model := cfg.GetDefaultModel()  // Falls back to "cerebras-llama-8b"

Prompt Rendering:

store, _ := prompts.NewStore()
systemPrompt, _ := store.Render("metaprompt", types.OutputLengthMedium)
// Template {{.LengthDirective}} auto-replaced
// Template {{.Context}} auto-replaced with project context (if found)

Read the full file on GitHub · 116 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. 1mo ago First seen · 116 lines · 915 tokens per session scan A 143cb431466b

Subscribe to this mod's changes

rayvise-project is a cursor rule published in the GitHub repository rayvise/rayvise-cli (8 stars, last pushed 5mo ago), licensed MIT. It adds 915 tokens to every session, about $0.0037 per session on Opus 5.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.