mcp-codestyle-usage

mcp-codestyle-usage is a cursor rule for Cursor from itxaiohanglover/mcp-codestyle-server. It costs 598 tokens per session, scanned A, original, MIT.

A rule for analyzing or changing code through the project’s codestyle tools. It requires starting with a project analysis or code-context exploration before reading or editing individual code areas.

In plain words
What is it for?
Use it when understanding or modifying code in a project connected to the specified codestyle server, then use the returned context to edit and check the result.
Why use it?
It helps locate relevant functions and their relationships before making changes, reducing blind searches and incomplete edits.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc).

Good fit Use it when understanding or modifying code in a project connected to the specified codestyle server, then use the returned context to edit and check the result.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/itxaiohanglover/mcp-codestyle-server/mcp-codestyle-usage
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/itxaiohanglover/mcp-codestyle-server

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 mcp-codestyle-usage

README.md
[![agentmods](https://agentmods.dev/badge/rules/itxaiohanglover/mcp-codestyle-server/mcp-codestyle-usage/github.svg)](https://agentmods.dev/rules/itxaiohanglover/mcp-codestyle-server/mcp-codestyle-usage)
Your own site
<a href="https://agentmods.dev/rules/itxaiohanglover/mcp-codestyle-server/mcp-codestyle-usage"><img src="https://agentmods.dev/badge/rules/itxaiohanglover/mcp-codestyle-server/mcp-codestyle-usage/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 mcp-codestyle-usage

Your own site · 80×15
<a href="https://agentmods.dev/rules/itxaiohanglover/mcp-codestyle-server/mcp-codestyle-usage"><img src="https://agentmods.dev/badge/rules/itxaiohanglover/mcp-codestyle-server/mcp-codestyle-usage.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 598 This file is loaded in full into every session.
When invoked 598 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.00598 $0.00598
Opus 5.5 $0.00239 $0.00239
Sonnet 5.5 $0.00120 $0.00120
Haiku 4.5 $0.00060 $0.00060

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

Security

Grade A, and why

mcp-codestyle-usage 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.

rules/mcp-codestyle-usage.mdc · 37 lines

What it actually says

MCP codestyle 工具使用规则

优先动作:涉及理解/分析/修改任意代码时,先调用 MCP 的 analyzeProject 或 exploreCodeContext,不要先用 Cursor 的 Read/Grep 扫目录或读 mcps schema。

适用:项目已接入 mcp-codestyle-server(server id: project-0-Pipeline-codestyle)。

可用工具(直接 call_mcp_tool,无需搜索 schema)

analyzeProject(首选)

  • server: project-0-Pipeline-codestyle
  • 参数: projectPath(绝对路径), keywords(3-6 个核心函数名,逗号分隔), focusPath(可选,如 src/main)
  • 输出: Summary + Call Flow + 位置(行范围)/签名/代码预览;自动缓存骨架供 exploreCodeContext 使用

exploreCodeContext

  • server: project-0-Pipeline-codestyle
  • 参数: projectPath, mode(expand|search|trace), query
    • expand: file.py:100-200 或批量 file1:100-200|file2:300-360
    • search: 实体名(函数/类/文件关键词)
    • trace: 函数/类名(可加 direction=upstream 或 downstream)
  • lineRange(可选,仅 expand): 100-200(1 基,含端点)

标准工作流

  1. 探索:先 analyzeProject(projectPath, keywords=3-6 个) → 从报告取行范围 → exploreCodeContext(mode=expand, query="file:start-end") 批量读代码。
  2. 调用关系:exploreCodeContext(mode=trace, query="函数名") 追踪上下游。
  3. 编辑:用 MCP 拿到改动点完整代码后再 Edit;改完用 ReadLints 验证。不要先 Read/Grep 扫目录。

关键约束

  • keywords 严格 3-6 个;过多导致报告截断。
  • 不要搜索 mcps/ 或读 MCP tool schema 来“发现工具”。
  • 不要单独调用 extractProjectSkeleton(analyzeProject 已包含)。
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 · 37 lines · 598 tokens per session scan A 392806ad1624

Subscribe to this mod's changes

mcp-codestyle-usage is a cursor rule published in the GitHub repository itxaiohanglover/mcp-codestyle-server (56 stars, last pushed 7mo ago), licensed MIT. It adds 598 tokens to every session, about $0.0024 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-30.