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/xyzbit/ai-coding/g-project-structuregit clone --depth 1 https://github.com/xyzbit/AI-CodingWhat 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.00039 | $0.00640 |
| Opus 5 | $0.00019 | $0.00320 |
| Sonnet 5 | $0.00008 | $0.00128 |
| Haiku 4.5 | $0.00004 | $0.00064 |
Grade A, and why
g-project-structure 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
项目目录结构分析
1. 顶层目录结构
api/ - API 定义目录
cmd/ - 服务入口目录
internal/ - 内部业务代码
遵循 DDD (领域驱动设计) 分层架构:
application/- 应用层command/- 命令处理query/- 查询处理service/- 应用服务
domain/- 领域层model/- 领域模型service/- 领域服务
infrastructure/- 基础设施层client/- 外部客户端converter/- 数据转换器repository/- 数据仓储publisher/- 消息发布
presentation/- 表现层assembler/- 数据组装controller/- 控制器provider/- 服务提供者subscriber/- 消息订阅者
pkg/ - 公共代码包
包含各种通用工具和基础设施:
- 数据库相关:
mysql/,redis/,clickhouse/ - 消息队列:
amqp/,kafka/ - 中间件:
middleware/ - 工具类:
tools/,filex/,stringx/ - SDK:
sdk/ - 监控和追踪:
metricx/,sentry/
deployments/ - 部署配置
按环境划分部署配置:
pre/- 预发布环境prod/- 生产环境test/- 测试环境 每个环境下可能包含:rpc/- RPC 服务配置web/- Web 服务配置cron/- 定时任务配置pubsub/- 消息订阅配置
docs/ - 项目文档
scripts/ - 脚本文件
busness/- 业务相关脚本db/- 数据库脚本shell/- Shell 脚本
third_party/ - 第三方依赖
google/- Google 相关依赖openapiv3/- OpenAPI 规范
2. 主要业务模块
项目包含多个业务模块,每个模块都遵循相同的 DDD 架构: ...
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 · 69 lines · 39 tokens per session scan A 4a2c08587c1e
g-project-structure is a cursor rule published in the GitHub repository xyzbit/AI-Coding (21 stars, last pushed 10mo ago), licensed Apache-2.0. It adds 39 tokens to every session and 640 once invoked, about $0.0002 per session on Opus 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.
Other cursor rules, from other repositories
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.
typescript
Changes to these high-fan-out internals can affect every message, delta, element, or rerun. Keep work in them minimal, and benchmark changes with representative stress-test apps.
coolify-ai-docs
Master reference to all Coolify AI documentation in .ai/ directory.
python_lib
Tips and guidelines specific to the development of the Streamlit Python library, not applicable to scripts and e2e tests.
specs
This directory contains product and tech specs for Streamlit features.