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.
git clone --depth 1 https://github.com/xyzbit/AI-CodingWrote 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.
[](https://agentmods.dev/rules/xyzbit/ai-coding/g-project-structure)<a href="https://agentmods.dev/rules/xyzbit/ai-coding/g-project-structure"><img src="https://agentmods.dev/badge/rules/xyzbit/ai-coding/g-project-structure/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.
<a href="https://agentmods.dev/rules/xyzbit/ai-coding/g-project-structure"><img src="https://agentmods.dev/badge/rules/xyzbit/ai-coding/g-project-structure.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00039 | $0.00640 |
| Opus 5.5 | $0.00016 | $0.00256 |
| Sonnet 5.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 3mo 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.
- 3mo 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 1y ago), licensed Apache-2.0. It adds 39 tokens to every session and 640 once invoked, about $0.0002 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.
g-project-structure compared with cursor rules from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| g-project-structurexyzbit/AI-Coding | Cursor rule | 21 | 1y ago | Apache-2.0 | A | 39 | Cursor |
| gonavi-goSyngnat/GoNavi | Cursor rule | 2.1k | yesterday | Apache-2.0 | A | 0 | Cursor |
| backend0xJacky/nginx-ui | Cursor rule | 12k | today | AGPL-3.0 | A | 441 | Cursor |
| code-stylecoddy-project/coddy-agent | Cursor rule | 215 | today | MIT | A | 366 | Cursor |
| gosupertokens/create-supertokens-app | Cursor rule | 24 | 6d ago | Apache-2.0 | A | 0 | Cursor |
| go-stdlib-firsttacoda/keystone | Cursor rule | 44 | 4d ago | MIT | A | 0 | Cursor |
| gozapstore/zsp | Cursor rule | 20 | 5d ago | MIT | A | 0 | Cursor |